rAc - do less work when model changes

The controller now does a lot more updating/clobbering/fiddling of the view when the model changes (i.e. all the stuff right after view_->ModelChanged()). This means we can afford to do a lot less in AutofillDialogViews::ModelChanged.

Although I'm not sure of the root cause of the crash in the bug, this will also have the side effect of fixing the crash because ModelChanged is part of the stack.

Also, as a further precaution, don't de-ref a possibly NULL |instrument| (even though it does seem like it should definitely be non-NULL).

BUG=343595

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251484 0039d316-1c4b-4281-b951-d872f2087c98
Disable Me2Me host controls on unsupported Linux systems.

Currently a system is considered to be supported in three cases:
 1. ~/.chrome-remote-desktop-session file exists.
 2. ~/.config/chrome-remote-desktop directory exists.
 3. DISTRIB_ID=Ubuntu is set in /etc/lsb-release

BUG=149744
R=lambroslambrou@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251485 0039d316-1c4b-4281-b951-d872f2087c98
Make code generated for histogram macros more compact.

In builds where DCHECKs are compiled in (e.g. developer
builds and Chrome Canaries), the DCHECK_EQ() in the
histogram macro was expanding to a lot of generated
machine code.

This CL moves that DCHECK() to a function instead, so that the
code is not duplicated in every call site. The function call is
wrapped behind a DCHECK_IS_ON() conditional, so that it will
still be omitted if DCHECKs are not compiled into the build.

Makes my Chromium release build smaller by over 1MB,
measuring size of Chromium Framework.

Before size: 146547380
After size:  145400692

BUG=343946
TEST=No functional changes.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251486 0039d316-1c4b-4281-b951-d872f2087c98
[Hotword] Updating the helper extension to listen to the speech reset message from the main extension.

BUG=325439, 289023
TBR=jhawkins@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251487 0039d316-1c4b-4281-b951-d872f2087c98
Add a histogram "Download.FeedbackDialogEnabled"

This adds a new UMA histogram, "Download.FeedbackDialogEnabled." The histogram tells us how the user responded to the opt-in reporting dialog (enabled = true, disabled = false).

BUG=312533

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251488 0039d316-1c4b-4281-b951-d872f2087c98
"Privet" Printing reads DPI for PWG raster conversion from device capabilities.

BUG=343239

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251489 0039d316-1c4b-4281-b951-d872f2087c98
Long press menu (shift+f6) to toggle spoken feedback.
 Factor out KeyHoldDetector.

BUG=343277
TEST=SpokenFeedbackTogglerTest

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251490 0039d316-1c4b-4281-b951-d872f2087c98
Media Galleries: Remove apps that have switched off from mediaGalleriesPrivate from the whitelist.

BUG=144496,286542

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251491 0039d316-1c4b-4281-b951-d872f2087c98
Shorter timeout to auto-launch from the voice search.

BUG=None
R=xiyuan@chromium.org
TEST=manually

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251492 0039d316-1c4b-4281-b951-d872f2087c98
android envsetup: Stop adding build-tools dir (aidl, aapt, dx, dexdump) to PATH.

It looks like everything looks qualified paths to reference the binaries
in this folder already.

BUG=330631
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251493 0039d316-1c4b-4281-b951-d872f2087c98
[Password Generation] Update UI to match final mocks.

Specifically
  - Change the text of the generation popup.
  - Add a suggestion label.
  - Show editing popup when password is focused after generation.
  - Display password when it is focused after generation.
  - Various other small UI cleanups.

BUG=318977

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251494 0039d316-1c4b-4281-b951-d872f2087c98
Re-enable prerender RemovingLink browser tests.

The tests have changed significantly since they were first disabled. Add a
WaitForStop or two for good measure, but leave them as-is for the most part.
They can be disabled again if they still flake. Merge their custom prerender
loader into the main one; it's mostly the same.

In addition, for better test coverage, add a new test which asserts on events
received when a <link rel=prerender> is added for an existing prerender after
that prerender has loaded. Significantly rework the prerender events logic
to allow the test framework to wait on an event being received in the loader.

BUG=167340, 128841

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251495 0039d316-1c4b-4281-b951-d872f2087c98
[GCM] Unregistration request

Wrapper over URL fetcher allowing for making request to remove registration of apps from the GCM. It pretends to be an API call instead of GCM client infrastructure code on purpose, to omit certain server side logic.

Patch includes:
* Implementation of the request using a URL fetcher with delete request
* Parsing of the response, with error handling
* triggering of the retry logic based on the provided backoff policy and when the last error allows to retry
* UMA logging of the request result.

BUG=284553

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251496 0039d316-1c4b-4281-b951-d872f2087c98
Fix threading of certificate cache clearing.

The previous instance assumed it was on IO thread. There's also no
handle to IO thread from the Java layer. Introduce another helper in
chrome/ layer which can redirect to IOThread.

BUG=341500
TBR=klobag

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251497 0039d316-1c4b-4281-b951-d872f2087c98
Refactors the auto-launch logic and adds tests for it.

Previously multiple views control 'auto-launch' status which is
complicated and not test-friendly. This CL separates the roles:
- SearchResultListView updates the auto-launch status based on
  the current settings. It can cancel by itself.
- SearchBoxView is responsible to cancel the auto-launch when
  the contents has changed.
- ContentsView still needs to ping SearchResultListView to
  update the auto-launch state, because only it knows the current
  show state.

BUG=341926
R=xiyuan@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251498 0039d316-1c4b-4281-b951-d872f2087c98
Fix the Mac status bubble.

It would DCHECK if a fade-in were ever interrupted by a fade-out, or vice versa.

BUG=338110
TEST=as in bug

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251499 0039d316-1c4b-4281-b951-d872f2087c98
Disable SettingsEnforcement when the machine is connected to a domain.

This add ~0.18ms to startup on my machine; note that it's already called 4 times before me (the first call costing ~0.38m followed by 3 X 0.18ms).

See my analysis on http://codereview.chromium.org/140553005

It's not clear whether this can get worse in some scenarios, but I'm already calling this later than the current caller so...

I'm also keeping the result as a static to avoid calling this multiple times (e.g. when doing unloaded profile initialization we don't want to call this multiple times in a loop in a short time span).

And we have timing stats for Settings.FilterOnLoadTime which will let us know if there are any big outliers coming out of this CL.

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

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

BUG=329738

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251501 0039d316-1c4b-4281-b951-d872f2087c98
Implement inline signin with iframe

=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
This is a dup of https://codereview.chromium.org/130963006/ since I cannot
upload to that issue.  The only change is to address Xiyuan's two comments
in patchset 3 of that CL.
=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=

Inline signin chrome://chrome-signin is currently implemented using webview embedded in webUI, which breaks a couple of features in webUI and has serious accessbility issues. Since webview will be reimplemented based on OOPIF in the near future, and all the issues we have today will no longer apply, thus it is not worth the effort to fix them as they are throw away work. Instead, as suggested by John and prototyped in https://codereview.chromium.org/141363006/, we decide to switch to iframe instead. A few issues worth to mention,

1. The iframe shares the same renderer as the embedder webUI, and thus could be potentially exposed to dangerous webUI privileges. John suggested a fix by assigning a unique storage partition ID to the inline signin page. As a result the inline signin and its embedded web content should never share the same renderer with other webUI pages.

2. webview provides a direct API to inject script and to monitor requests/responses, which is not (directly) available with iframe. The CL works around the issue using content script and background script, quite similar to what CrOS is doing for SAML flow today. Thus it is also the first step towards unifying SAML flows on CrOS and desktop.

3. with webview approach, we used to have a unique temporary partition for each instance of inline signin, in order to make sure multiple instances do not interfere with each other. This is more difficult with the iframe approach, since the partition ID is hardcoded in a quite low layer. In this CL, all inline signin pages share the same persistent partition, which means we have to handle the case when user loads the sign in page with a dirty cookie jar, and thus the newly connected user may not be stored in the primary session. The CL solves the issue by reading 'session_index' from 'google-accounts-signin' header.

BUG=338127

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251503 0039d316-1c4b-4281-b951-d872f2087c98
Media Galleries: Refactor media scan worker function into a worker class.

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

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