[rAC, OSX] Enable passing browser tests.

A few of the browser tests pass by now, as a side effect of work on
other bugs. Enabling them permanently, to increase test coverage.

This is a re-land of r214546 (https://codereview.chromium.org/19661005/),
which got reverted in r214587 (https://codereview.chromium.org/21088008/)

In addition to the enabled browser tests it also fixes a read-after-free.

The ASAN reported bug [1] is due to the fact that on Views/Aura,
closing a widget takes a round trip through the MessageLoop [2], while on OSX closing is immediate and OnConstrainedWindowClosed is called right after closing. Due to the callback structure of Dialog/Controller, that meant the dialog and controller would get deleted while still being in use further up the callstack.

[1]
http://build.chromium.org/p/chromium.memory/builders/Mac%20ASAN%20Tests%20%28...

[2] NativeWidgetAura::Close posts a CloseNow task, which does final cleanup.
https://code.google.com/p/chromium/codesearch#chromium/src/ui/views/widget/na...


BUG=256864

Review URL: https://chromiumcodereview.appspot.com/21006009

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215108 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Revert 215106 "Move CachingPermutedEntropyProvider to its own file."

> Move CachingPermutedEntropyProvider to its own file.
> 
> No functional changes.
> 
> BUG=266007
> TEST=Existing unit tests.
> 
> Review URL: https://chromiumcodereview.appspot.com/21127007

TBR=asvitkine@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215112 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Separate parrot and non-parrot in swapjank experiment

This creates a new trial group for the non-parrot devices.
To tell if we're on a parrot we have to open a file,
so the code is moved to the file thread.

BUG=253994
TEST=none yet

Review URL: https://chromiumcodereview.appspot.com/21085009

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215113 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Setting parameters for location request.
These are reasonable values, and this quickly fixes the bug. Later, we'll also use experimental framework to be able to change request parameters remotely.

BUG=265682
TEST=See bug description

Review URL: https://chromiumcodereview.appspot.com/21205010

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215114 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Authentication Manager for Google Now

There is currently no way to observe the sign-in state of the user in Chrome.
To work around this, the new authentication manager will poll for the
sign in state and notify any listeners about a change in the sign in state.

Calls for sign in state should correspondingly go through the authentication
manager since a check may already be in flight during a call to getAuthToken.

BUG=164227

Review URL: https://chromiumcodereview.appspot.com/21235008

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215115 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Updated the strings for the managed bookmarks policy on Android.

BUG=265643

Review URL: https://chromiumcodereview.appspot.com/21499004

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215116 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Try to restore window.opener when opening blocked popups

When we block a popup, and later open it again, we try to set the opener. It works if the popup ends up being hosted in the same process.

Also added a test that session storage is not cloned.

BUG=38458
R=ajwong@chromium.org, bauerb@chromium.org, creis@chromium.org
TEST=BetterPopupBlockerTest.*

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215122 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Switch to using new Do Not Disturb tray icon on Windows.

We now want to display the slash when the message center is in
do-not-disturb mode.

BUG=264971

Review URL: https://chromiumcodereview.appspot.com/20849003

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215123 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Remove mystery keyboard layout from Chrome OS.

BUG=None
TEST=None

Review URL: https://chromiumcodereview.appspot.com/20258002

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215129 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Adding a per-component observer to get events from the component updater service.

Once pNacl migrates to the new API, the old style notifications will be removed.

More events will be added in the future iterations.


BUG=245318

Review URL: https://chromiumcodereview.appspot.com/20774003

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215131 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Always show the generated card omnibox icon (even after showing bubble max
number of times).

R=estade@chromium.org
BUG=260487,263156

Review URL: https://chromiumcodereview.appspot.com/21420003

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215134 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
android: Enable WebGL if context robustess extension is supported

If the GL implementation supports the context robustness extension
(GL_{ARB,EXT}_robustness) and promises to tell us about GPU resets, turn
on support for WebGL.

This patch also removes the Android-only --enable-webgl command line
flag. From now on, WebGL support can be forced on with the
--ignore-gpu-blacklist flag.

BUG=112928
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/21564006

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215135 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Revert 214517 "Enable Synced Notifications by default."

> Enable Synced Notifications by default.
> 
> Once the change for using a checkbox to enable individual synced notification
> types goes in (CL 19056002), we can turn on Synced Notifications by default.
> This change makes the default state on (it can still be turned off by the flag
> in chrome://flags).
> 
> BUG=248331
> 
> Review URL: https://chromiumcodereview.appspot.com/19678018

TBR=petewil@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215142 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Only log HomePageIsNewTabPage if home button is enabled

BUG=266902

Review URL: https://chromiumcodereview.appspot.com/20722007

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215147 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Revert 215147 "Only log HomePageIsNewTabPage if home button is e..."

This builds on r214498, which is being reverted.

> Only log HomePageIsNewTabPage if home button is enabled
> 
> BUG=266902
> 
> Review URL: https://chromiumcodereview.appspot.com/20722007

TBR=rockot@chromium.org


git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215154 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
file_manager: Simplify SetDriveMountPointPermissions() business

Previoulsy, SetDriveMountPointPermissions() was called in two places.
The call site of GetPreferencesFunction::RunImpl() looked very awkard.

Why did we need this? Looking at the revision history, this call site
was added in crrev.com/137102, so the function was called when the
Drive was enabled by the setting [1]. We can remove the call site
if we always call the function in RequestFileSystemFunction regardless
of whether or not the Drive is enabled in the settings, which is what
this patch does.

[1] This was tricky: when the Drive-enabled setting is changed,
onGDataPreferenceChanged event is sent to JavaScript, which calls
getGdataPreferences(), whicl calls GetGDataPreferencesFunction()
in C++, which calls AddGDataMountPoint(), which was later renamed
to SetDriveMountPointPermissions() in crrev.com/193705.

BUG=257918
TEST=Disable Drive from chrome:settings; Launch Files.app; Enable Drive from the settings page; Confirm that Drive in Files.app works just fine.
R=hashimoto@chromium.org, kinaba@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215155 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Revert 214498 "Add UMA histograms for home page, start page, and..."

We already collect at least some of this data, and I'm worried the changes here
will corrupt all our existing data.  Reverting ASAP to minimize the chance of
damage until we figure out the right way to do this.

Even if this turns out not to be corrupting data, it's still almost certainly
the wrong implementation (we should be building on all the existing framework
that already does this, including for non-prepopulated engines).

> Add UMA histograms for home page, start page, and default search engine
> hosts, as they are set in the Preferences file.
> 
> This adds histogram enum values for non-prepopulated DSE hosts. The expanded enum is used to log Preferences settings for home page, first start page, and DSE hosts.
> 
> TBR=battre@chromium.org, meacer@chromium.org, mpearson@chromium.org, rockot@chromium.org
> 
> BUG=263234
> 
> Review URL: https://codereview.chromium.org/20012003

TBR=bbudge@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215157 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Disable flaky interactive_ui_tests

These tests fail flakily during shutdown:
InstantExtendedTest.OnDefaultSearchProviderChanged
LocalNTPTest.LocalNTPJavascriptTest
InstantExtendedTest.DispatchMVChangeEventWhileNavigatingBackToNTP

BUG=267119,267117,267096
TBR=kmadhusu@chromium.org,piman@chromium.org

Review URL: https://chromiumcodereview.appspot.com/20751006

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215159 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Use extension API features instead of kNonPermissionModulesNames.

This migrates the constants in permission_set.cc to _api_features.json.

This includes a slight behavior change. Some modules with manifest keys, like
browserAction, omnibox, and commands, used to be accessible even without the
manifest key present. After this patch, they will be inaccessible. I don't
think that should be an issue in practice, because the modules wouldn't do
anything if there was no manifest key present.

BUG=234790,265006

Review URL: https://chromiumcodereview.appspot.com/20818004

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215161 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Remove unsed NetworkMenuIcon code

BUG=235236
TBR=gauravsh@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@215163 4ff67af0-8c30-449e-8e8b-ad334ec8d88c