Move ProxyPolicy fixup logic out of PolicyProvider and inject it instead.

The logic was previously applied at the UpdatePolicy level of every
ConfigurationPolicyProvider, but this needs to move to facilitiate the
refactoring of chrome/browser/policy into a layered component. Instead
a fixup function can be injected into a PolicyService at construction
time and is applied before policies from the various PolicyProviders
are merged.

There are three tests for this:
- PolicyTransformationsTest.FixDeprecatedPolicies tests that the proxy
  policy fixup function works properly.
- PolicyServiceTest.PolicyPreprocessing tests that the preprocessor
  function is applied during policy merge.
- PolicyTest.PolicyPreprocessing tests that the proxy fixup function
  is added BrowserPolicyConnector and ProfilePolicyConnector.

TEST=unit test, integration test, browser test
BUG=271392

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236511 0039d316-1c4b-4281-b951-d872f2087c98
Simplify the code by removing IBusController.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236512 0039d316-1c4b-4281-b951-d872f2087c98
Ensure the ExtensionSystem is ready before initializing an ExtensionAppModelBuilder

Some code paths currently result in an AppListSyncableService being
created for a profile before the profile is fully initialized. In this
case, the ExtensionSystem can be used, but the Extension*Service* is not
yet created, and has not finished loading all the extensions. Attempting
to populate the app launcher model at this point results in no apps
being found.

This CL adds a check in AppListSyncableService to see if the
ExtensionSystem is ready. If not, wait for it to become ready and
populate apps then.

BUG=321514
TEST=(On mac)Have two signed-in profiles; Have app launcher showing
Profile "A", Close all browser windows except for a browser showing
profile "B", Quit Chrome, Show app launcher [Chrome starts], Switch app
launcher to profile "B". App launcher should show apps, and not be
blank.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236513 0039d316-1c4b-4281-b951-d872f2087c98
Revert 236489 "Track Dynamically Assigned Command IDs in Backgro..."

That revision discovered a leak when run under ASan+LSan.

BUG=322006

> Track Dynamically Assigned Command IDs in Background Menu Generation
> 
> Menu items require that Command IDs be unique. For a single profile,
> collisions don't happen. For multiple profiles, the profile menu
> as well as its submenus start at Command ID 0, confusing the menu
> system when it tries to identify or change and item.
> 
> The fix here creates an vector to hold the extension indexes
> using the vector index as a Command ID. For profile menu labels,
> the extension index is -1.
> 
> BUG=315164
> 
> Review URL: https://codereview.chromium.org/75973004

TBR=robliao@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236514 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 236513
SVN changes up to revision 236514