Handle TemplateURLService load failure better, and make some test correctness fixes that will be needed later.

This also does a variety of miscellaneous cleanups to the modified files.

BUG=364183
TEST=none
R=jered@chromium.org, pkasting@chromium.org
TBR=engedy

Review URL: https://codereview.chromium.org/272573004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269329 0039d316-1c4b-4281-b951-d872f2087c98
Disable glibc-flavored browser tests on ARM.

There is no NaCl glibc support on ARM so these will always fail.

Review URL: https://codereview.chromium.org/261013015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269330 0039d316-1c4b-4281-b951-d872f2087c98
Fix extension policy documentation.

Force-installed extensions are not subject to the blacklist policy.
Fix the documentation to that effect.

BUG=chromium:371050
TEST=None

Review URL: https://codereview.chromium.org/276673003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269331 0039d316-1c4b-4281-b951-d872f2087c98
Implement end preview flow on mac

See mock at slides 29-34 of
https://docs.google.com/a/google.com/presentation/d/1UMAexroivw01osOXpnEqbQcE3FMyDkc9eZoIszm4DP4/edit#slide=id.g12716c613_09


BUG=358265

Review URL: https://codereview.chromium.org/267193002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269332 0039d316-1c4b-4281-b951-d872f2087c98
Increase the timeout for layout tests to run in Dr.Memory

R=bruening@chromium.org
BUG=NONE
NOTRY=true

Review URL: https://codereview.chromium.org/270523008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269333 0039d316-1c4b-4281-b951-d872f2087c98
Provide IPConfigs in networkingPrivate.GetProperties

BUG=365848
For components/wifi fixes for tests:

R=pneubeck@chromium.org
TBR=mef@chromium.org

Review URL: https://codereview.chromium.org/267433005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269334 0039d316-1c4b-4281-b951-d872f2087c98
adjust suppress for memory leak from FeedbackUploaderTest

TBR=achaulk@chromium.org
BUG=371860
TEST=waterfall

Review URL: https://codereview.chromium.org/279923002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269335 0039d316-1c4b-4281-b951-d872f2087c98
Cleanup: Mark importer resources as platform specific.

Also delete unused resources.

Review URL: https://codereview.chromium.org/269183004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269336 0039d316-1c4b-4281-b951-d872f2087c98
DevTools: Restore SetWhitelistedShortcuts handling broken in r266873

TBR=pfeldman
NOTRY=true

Review URL: https://codereview.chromium.org/278593002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269337 0039d316-1c4b-4281-b951-d872f2087c98
Make displayAsyncThen use the CompositeAndReadbackAsync path.

This avoids the use of the deprecated synchronous CompositeAndReadback
when in composited mode.

Depends on: https://codereview.chromium.org/272683003/
Depends on: https://codereview.chromium.org/262323002/

R=abarth@chromium.org, enne@chromium.org, piman@chromium.org, enne, piman
BUG=370130

Review URL: https://codereview.chromium.org/266243002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269338 0039d316-1c4b-4281-b951-d872f2087c98
Show mirror welcome tutorial only once

BUG=

Review URL: https://codereview.chromium.org/272773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269339 0039d316-1c4b-4281-b951-d872f2087c98
Support multiple sign-in for extension updates.

This changes the ExtensionDownloader to attempt multiple
sequentual queries for CRX downloads, iterating over incremental
values for the authuser query parameter (up to a max of 10).

BUG=370964
R=asargent@chromium.org

Review URL: https://codereview.chromium.org/279453002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269340 0039d316-1c4b-4281-b951-d872f2087c98
Move bookmark_index_unittest.cc back to its place.

Unit tests should be placed near the code that they test. In this case,
bookmark_index_unittest.cc is the test driver for bookmark_index.cc
which lives in components/bookmarks/core/browser, so this patch
moves it back to components/bookmarks/core/browser from
components/bookmarks/core/test.

This happend in r268917 - https://codereview.chromium.org/270153005

BUG=367833
TEST=components_unittests
R=blundell@chromium.org, sky@chromium.org

Review URL: https://codereview.chromium.org/271023002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269341 0039d316-1c4b-4281-b951-d872f2087c98
Re-enable RepeatedQuickOverscrollGestures test for non-Windows platforms

This flake appears to be windows-only, like the other failing overscroll
tests. After this is confirmed, I'll create a metabug to address all
failing overscroll tests, and try to find an appropriate owner.

BUG=369871

Review URL: https://codereview.chromium.org/279483004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269342 0039d316-1c4b-4281-b951-d872f2087c98
Unload all apps / extensions immediately when deleting a profile.

Previously apps could remain running with references to profiles that had been deleted by users, but before the browser shut down and profiles were fully removed. Problems included E.g. opening a link in an app would open a tab in the deleted profile.

BUG=368684
TEST=Manual testing as described on http://crbug.com/368684#c1

Review URL: https://codereview.chromium.org/266343002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269343 0039d316-1c4b-4281-b951-d872f2087c98
Refactor HostSetupDialog and HostInstallDialog.
1. Moved all the host installation logic to the HOST_INSTALL step in HostSetupDialog
2. On Windows host installation now occurs before the pin prompt when user enables remote connection.
3. HostInstallDialog now handles both the prompt (Linux/Mac) and non-prompt (windows) scenarios.
4. Renamed onDone and onError in HostInstallDialog to onOk and onCancel. The install prompt doesn't perform any task itself and won't incur any error so onOk an onCancel are better names.

This CL is a precursor to the change that enables automatic host installation for IT2Me on windows.

BUG=134215

Review URL: https://codereview.chromium.org/243993002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269344 0039d316-1c4b-4281-b951-d872f2087c98
[FileAPI] Clean up WebFileSystemImpl before Blink shutdown

WebFileSystemImpl should not outlive V8 instance, since it may have references to V8.
This CL ensures it deleted before Blink shutdown.

BUG=369525

Review URL: https://codereview.chromium.org/270633009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269345 0039d316-1c4b-4281-b951-d872f2087c98
Introduce a new framework for back-and-forth tracked preference migration
between Protected Preferences and unprotected Preferences.

Migration from unprotected Preferences to Protected Preferences was previously
done after both stores had been initialized. This was inherently incorrect as
some operations (PrefHashFilter::FilterOnLoad) would occur before the values
had been moved to the proper store. It also introduced a weird method in
PrefHashFilter::MigrateValues which required an independent PrefHashFilter
(backed by a copy of the real PrefHashStore). This after-the-fact migration
caused Settings.TrackedPreferenceCleared spikes when changing a value from
being enforced to not being enforced (as we'd have a MAC, but no value yet in
this store when running FilterOnLoad()) and more importantly it also caused
issue 365769 -- both of these issues highlight the incorrectness of the
current approach.

The migration back from Protected Preferences to unprotected Preferences when
enforcement was disabled was using yet another mechanism which would only kick
in when a given pref was written to (ref. old non-const
SegregatedPrefStore::StoreForKey()).

The new framework intercepts PrefFilter::FilterOnLoad() events for both stores
and does the back-and-forth migration in place before it even hands them back
to the PrefFilter::FinalizeFilterOnLoad() which then hands it back to the
JsonPrefStores (so that they are agnostic to the migration; from their point
of view their values were always in their store as they received it).
Furthermore, this new framework will easily allow us to later move MACs out of
Local State into their respective stores (which is a task on our radar which
we currently have no easy way to accomplish).

The new framework also handles read errors better. For example, it was
previously possible for the unprotected->protected migration to result in data
loss if the protected store was somehow read-only from a read error while the
unprotected store wasn't -- resulting in an in-memory migration only flushed
to disk in the store from which the value was deleted... The new framework
handles those cases, preferring temporary data duplication over potential data
loss (duplicated data is cleaned up once confirmation is obtained that the new
authority for this data has been successfully written to disk -- it will even
try again in following Chrome runs if it doesn't succeed in this one).

BUG=365769
TEST=
A) Make sure all kTrackedPrefs consistently report
   Settings.TrackedPreferenceUnchanged across changes from various enforcement
   levels (using --force-fieldtrials).
B) Make sure the prefs are properly migrated to their new store (and
   subsequently cleaned up from their old store) when changing the
   enforcement_level across multiple runs.
C) Make sure prefs are properly migrated in a quick startup/shutdown with a
   new enforcement_level and that their old value is properly cleaned up in a
   subsequent startup at the same enforcement_level (or re-migrated at another
   enforcement_level).

R=bauerb@chromium.org, stuartmorgan@chromium.org, thakis@chromium.org

Review URL: https://codereview.chromium.org/257003007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269346 0039d316-1c4b-4281-b951-d872f2087c98
Use ICU alternatives in net/base/filename_util.cc
TEST=build/android/test_runner.py gtest -s net_unittests --gtest_filter=FilenameUtilTest*

BUG=362608

Review URL: https://codereview.chromium.org/269033002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269347 0039d316-1c4b-4281-b951-d872f2087c98
Updating trunk VERSION from 1984.0 to 1985.0

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269349 0039d316-1c4b-4281-b951-d872f2087c98