Revert "Don't force settings commit on sign in as sometimes that may cause 5s slowdown."

This shouldn't slow down startup anymore due to http://codereview.chromium.org/11027070/


BUG=154517


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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165160 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Remove unused gtk include from browser_focus_uitest.cc

TBR=erg@chromium.org
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165161 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Use DriveFileSystem::Reload() instead of reloading root feed.

BUG=152230
TEST=unit_tests --gtest_filter="StaleCacheFilesRemover.*"


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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165162 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Switch the TCP reads on Windows to use non-blocking/non-async I/O.
The Overlapped I/O was introducing delays when the networking stack
did not have enough data to fill the receive buffer.

This can be seen when loading pssplayground.com/ksimbili/webp.html
using a DSL connection profile on WebPagetest:
http://www.webpagetest.org/result/120830_MS_414849a6aa055bb853e7e5d51e1b29d8/
and manifests and increasingly long Time to First Byte for requests
further down the waterfall (expected values are < 90ms and it was 
going over 150ms).

It is configured as a 50% field trial and can be forced through the 
command-line for testing:
    --overlapped-reads=on - default/existing behavior
    --overlapped-reads=off - new read implementation

Trial-specific histograms are reported for page load times and
http request times.  Specifically:
    PLT.Abandoned
    PLT.LoadType
    PLT.BeginToFinish_NormalLoad
    PLT.BeginToFinish_LinkLoadNormal
    PLT.BeginToFinish_LinkLoadReload
    PLT.BeginToFinish_LinkLoadStaleOk
    Net.HttpJob.TotalTime
    Net.HttpJob.TotalTimeSuccess
    Net.HttpJob.TotalTimeCancel
    Net.HttpJob.TotalTimeCached
    Net.HttpJob.TotalTimeNotCached

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165170 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Increase Drive promo banner counter

BUG=158665

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165179 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Remove option for gray background etc. from chrome://instant

Removes option for selecting gray background, animation speed,
and logo visibilty option.

BUG=158640
TEST=Go to chrome://instant uncheck White NTP option.
R=sky@chromium.org, estade@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165190 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Allow Caps Lock to be remapped [part 1 of 2].

* Add "settings.language.remap_caps_lock_key_to" user pref.
* Modify EventRewriter so it rewrites F16 and/or Mod3Mask following the new pref.
* Modify keyboard_overlay.html so it shows a drop-down menu for Caps Lock. This part is currently commented out.

This change depends on https://gerrit.chromium.org/gerrit/#/c/36885/.

BUG=146204
TEST=new tests added
TEST=manually confirmed that F15 still works as Control, Caps Lock works as Caps Lock.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165191 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add Vector2d classes that represent offsets, instead of using Point.

Previously Point served two purposes, to be a position in 2d space, and also
an offset from the origin. This introduces a Vector2d class to represent an
offset, allowing typesafety checks for geometric operations.

The following are now the case:

Point +/- Vector = Point
- A point plus/minus an offset gives you a point at a position offset by the
vector.

Vector +/- Vector = Vector
- Two offsets can be added together to make a new offset.

Point - Point = Vector
- Subtracting one point from another gives you the offset between the two
points.

We add some new methods to perform these operations:

Rect::OffsetFromOrigin() gives the offset between the position of the rect
and the origin.

Point::OffsetFromOrigin() gives the offset between the point and the origin.

PointAtOffsetFromOrigin(Vector2d) converts a Vector2d to a Point at the given
offset away from the origin.

Rect::Offset(), Point::Add(), and Point::Subtract() now receive a Vector2d
instead of a point.

BUG=147395
R=sky

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165198 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Reset Authenticator consumer reference when consumer is deleted.
Also make sure that existing authenticator instance uses correct consumer on each CreateAuthenticator call.

See also https://chromiumcodereview.appspot.com/11232003

TBR=ivankr
BUG=158440,158807
TEST=suite_smoke (cros_* trybots) + manual testing

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165213 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Extract Favicon Download logic from FaviconTabHelper


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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165216 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Set root resource ID upon full feed update.

We used to set the resource ID at DriveResourceMetadata's
constructor as for WAPI the resource ID for root is
a fixed string, but for Drive API it is not fixed and
was set when About resource is obtained.

This caused a trouble for maintaining the code and
this CL is trying to consolidate setting root resource
ID at one place.

Although for Drive API 'root' can be used for a convenient
alias for queries, Drive API usually returns a reference
to root directory (e.g. reference to parent folder)
as its real root directory resource ID rather than 'root'
alias, therefore we don't use it here.

BUG=152230, 152288, 157314
TEST=compiles, pass all existing tests.


Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164876

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165219 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
mac: Fix regression in sending rlz parameters

https://chromiumcodereview.appspot.com/10698024 made it so that one
has to be careful to pass RLZTracker::CHROME_OMNIBOX instead of
rlz_lib::CHROME_OMNIBOX (and same for CHROME_HOME_PAGE), but it didn't
carefully update all instances of rlz_lib::CHROME_OMNIBOX.

BUG=155653
TEST=see bug

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165227 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Don't try to record an event on CrxInstaller failure.

BUG=158745

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165228 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
File manager: copy operation canceled by user = misc "copy operation failed" errors

BUG=157814
TEST=Manual test.


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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165229 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Don't crash when installing an extension and the browser window goes away.

BUG=134194
TEST=See bug, comment 10 and 11. Instead of crashing, either a new browser window from the profile where installation is happening should open (the crash in comment 10), or nothing happens (the crash in comment 11).

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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165231 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
alternate ntp: remove top chrome styling

BUG=158551
TEST=verfiy per bug rpt


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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165232 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Revert 165219 - Set root resource ID upon full feed update.

This may have broken http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/11824/steps/unit_tests/logs/stdio#failure2

We used to set the resource ID at DriveResourceMetadata's
constructor as for WAPI the resource ID for root is
a fixed string, but for Drive API it is not fixed and
was set when About resource is obtained.

This caused a trouble for maintaining the code and
this CL is trying to consolidate setting root resource
ID at one place.

Although for Drive API 'root' can be used for a convenient
alias for queries, Drive API usually returns a reference
to root directory (e.g. reference to parent folder)
as its real root directory resource ID rather than 'root'
alias, therefore we don't use it here.

BUG=152230, 152288, 157314
TEST=compiles, pass all existing tests.


Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164876

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

TBR=kochi@chromium.org
Review URL: https://codereview.chromium.org/11361021

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165236 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Reenable the BookmarkBarViewTest8.DNDBackToOriginatingMenu test on AURA.

While instantiating the Shell class for the duration of the tests, we pass in a ShellDelegate
which is implemented by the TestShellDelegate class. This should ensure that the tests run without
assuming that the screen is locked. 

The code to remove registered EventClients has been removed.

BUG=158564
R=ben
Review URL: https://codereview.chromium.org/11347051

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165239 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Fixing a DCHECK being triggered when the renderer crashed on Android.

On Android, we woul hit a DCHECK when a process terminated because the minidump
FD had already been closed.  We don't need to keep the FD, just the path.
Simplified the code to do that.

BUG=None
TEST=Crash reporting should still work.


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

git-svn-id: http://src.chromium.org/svn/trunk/src/chrome/browser@165243 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Create ash memory monitor

BUG=None
TEST=Enable via about:flags/enable-memory-monitor

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

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