[Android] Added a flag for the draggable menu button feature.

For more convenient menu item execution, we're planning to do experiment
with draggable menu button. This patch adds a flag to control the feature.
The draggable menu button patch  will land later, after this.

BUG=241613

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201949 0039d316-1c4b-4281-b951-d872f2087c98
Telemetry: integrates memory_measurement with TCMalloc dumps

At the end of each memory_measurement test, force TCMalloc to dump the memory maps, and collect all the files.


BUG=231800

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201953 0039d316-1c4b-4281-b951-d872f2087c98
[OSX] Use view coordinate system for tracking rect

No observable effects, but NSTrackingArea needs coordinates in the view's reference frame, not the superview's. 

No unit test since I couldn't synthesize proper mouse events
for NSTrackingRect.
(See also https://codereview.chromium.org/12330108, same problem)

R=thakis@chromium.org
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201954 0039d316-1c4b-4281-b951-d872f2087c98
Allow multiple base::MessagePumpForUI instances to be created simultanenously on Windows.

The current implementation of base::MessagePumpForUI on Windows registers a window class with a predefined name in order to create a message-only window. The window class is unregistered when base::MessagePumpForUI is deleted. This causes issues when two or more instances of base::MessagePumpForUI are created/destroyed simultanenously on different threads. For instance once thread can unregister the window class right before the other thread is trying to create a window using this class.

The CL addresses this problem by switching MessageWindow to implement a message-only window. It also moves MessageWindow from remoting/host/win to base/win along with the corresponding unit test.

MessageWindow registers a uniquely named window class per MessageWindow instance making sure that different MessageWindow objects do not share any resources. In the future this can be optimized further by registering a common window class shared by all MessageWindow objects in a thread-safe manner (by using LazyInstance for example).

BUG=241939

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

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

Too flaky, see bug.

BUG=243211
TBR=acolwell

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201957 0039d316-1c4b-4281-b951-d872f2087c98
Roll FFmpeg for bug fixes.

Adds a new test case for the bug.

BUG=242786
TEST=ffmpeg_regression_tests
TBR=acolwell

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201959 0039d316-1c4b-4281-b951-d872f2087c98
Refine Views textfield state interaction, testing, and examples.

Ignore Views textfield CTRL+<key> shortcuts with Alt pressed. 
Matches Win and fixes ctrl+alt+[a/z/etc.] AltGr input for Polish, etc.
(alternate grapheme input was triggering undo/select-all/etc.)

Enforce and test read-only and obscured states more rigorously.
(prevent cut/copy/paste as needed, this was not always checked before)

Do not change the focusable state of textfields when changing read-only.
(this matches windows native behavior better)

Expand and refine a bunch of unit tests and the Views Example for textfields.

BUG=238105,131660
TEST=Read-only and obscured Textfields work as intended. Polish input (right-Alt)+a, (right-Alt)+z, etc. work as expected. Ctrl+Alt+a, Ctrl+Alt+z, etc. are no-op on views textfields.
R=oshima@chromium.org
TBR=sky@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201961 0039d316-1c4b-4281-b951-d872f2087c98
Disk cache: Avoid writing uninitialized data to disk.

r201943 is writing to disk some random bytes after the stats.
That is fine because we never use the random data again, but
the memory bots are not happy, so limit the size of the write.

BUG=241277
TEST=green mem bots
TBR=gavinp@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201962 0039d316-1c4b-4281-b951-d872f2087c98
Revert 201806 "Create MetroViewerProcessHost as a common base fo..."

Broke ash_unittests on Win8 Aura:
http://build.chromium.org/p/chromium.win/builders/Win8%20Aura/builds/6316

[ RUN      ] AcceleratorControllerTest.Register
[912:1324:0523/094526:1371217:INFO:test_metro_viewer_process_host.cc(42)] ash::test::TestMetroViewerProcessHost::OnSetTargetSurface, target_surface = 131580
[912:1324:0523/094526:1371233:FATAL:ash_test_base.cc(149)] Check failed: !metro_viewer_host_->closed_unexpectedly(). 
Backtrace:
  base::debug::StackTrace::StackTrace [0x100839F1+33]
  logging::LogMessage::~LogMessage [0x100F6FCE+94]
  ash::test::AshTestBase::TearDown [0x006DC397+471]
  testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void> [0x007405FF+319]
  testing::Test::Run [0x0072A525+229]
  testing::TestInfo::Run [0x0072AF4D+221]
  testing::TestCase::Run [0x0072B71F+239]
  testing::internal::UnitTestImpl::RunAllTests [0x0073234D+701]
  testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool> [0x00741227+327]
  testing::UnitTest::Run [0x00730BB0+192]
  base::TestSuite::Run [0x00756AE0+240]
  main [0x0058AFA4+100]
  __tmainCRTStartup [0x0075BA6F+447] (f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:555)
  mainCRTStartup [0x0075B89F+15] (f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:371)
  BaseThreadInitThunk [0x76D78543+14]
  RtlInitializeExceptionChain [0x7775AC69+133]
  RtlInitializeExceptionChain [0x7775AC3C+88]
  (No symbol) [0x00000000]

[912:1324:0523/094526:1371233:FATAL:ash_test_base.cc(149)] Check failed: !metro_viewer_host_->closed_unexpectedly(). 
Backtrace:
  base::debug::StackTrace::StackTrace [0x100839F1+33]
  logging::LogMessage::~LogMessage [0x100F6FCE+94]
  ash::test::AshTestBase::TearDown [0x006DC397+471]
  testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void> [0x007405FF+319]
  testing::Test::Run [0x0072A525+229]
  testing::TestInfo::Run [0x0072AF4D+221]
  testing::TestCase::Run [0x0072B71F+239]
  testing::internal::UnitTestImpl::RunAllTests [0x0073234D+701]
  testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,bool> [0x00741227+327]
  testing::UnitTest::Run [0x00730BB0+192]
  base::TestSuite::Run [0x00756AE0+240]
  main [0x0058AFA4+100]
  __tmainCRTStartup [0x0075BA6F+447] (f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:555)
  mainCRTStartup [0x0075B89F+15] (f:\dd\vctools\crt_bld\self_x86\crt\src\crtexe.c:371)
  BaseThreadInitThunk [0x76D78543+14]
  RtlInitializeExceptionChain [0x7775AC69+133]
  RtlInitializeExceptionChain [0x7775AC3C+88]
  (No symbol) [0x00000000]

> Create MetroViewerProcessHost as a common base for TestMetroViewerProcessHost and ChromeMetroViewerProcessHost
> 
> Bringing LaunchViewerAndWaitForConnection() to the common base so that ChromeMetroViewerProcessHost can also benefit from it (required for ash browser tests).
> 
> BUG=179830
> 
> Review URL: https://chromiumcodereview.appspot.com/14629025

TBR=gab@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201966 0039d316-1c4b-4281-b951-d872f2087c98
Revert 201837 "OOP import on Windows."

This broke browser_tests on XP Tests (dbg)(4):
http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%28dbg%29%284%29/builds/33240

[1148:3528:0523/123340:2643015:WARNING:extension_apitest.cc(169)] Workaround for 177163, prematurely stopping test

> OOP import on Windows.
> 
> Gets rid of the import process on all platforms -- replaced by a utility process which communicates with a ProfileWriter back in the browser process to write to the profile (this uses the ExternalProcessImporterHost machinery written 2+ years ago by mirandac@ for import on Mac and still the state of the art today).
> 
> Gets rid of all issues regarding profile contention and races to profile creation between the browser and import processes on first run (example of issues this has previously caused: http://crbug.com/171475, http://crbug.com/174591, http://crbug.com/180459).
> 
> Makes bookmarks file import use the same mechanism on all platforms (this means bookmarks file import is now in-process on Linux which still uses ImporterHost (instead of ExternalProcessImporterHost) -- Linux used to use the import process solely for bookmarks file import -- but the work to switch Linux to ExternalProcessImporterHost should be very minimal after this CL and I intend to do it in a follow-up CL to unify the import flow cross-platform once and for all!).
> 
> Do not use the out-of-process import for Google Toolbar (this was already the case prior to this CL).
> To make the Google Toolbar importer work out-of-process, we would have to augment the import IPC drastically to support the web auth flow required by this importer (it requires to login to import the google.com/bookmarks favorites).
> 
> This, as a side-effect, brings silent bookmarks file import from master_preferences to Mac (long standing issue 48880).
> 
> Also fixes issue 231710 (or at least removes the condition causing the bug by making the ImportLockDialog go away on first run on Windows -- as should already have been the case).
> 
> Also addresses issue 178083 since the early message loop spinning was caused by ImportSettingsWin which was called too early on Windows (actually resulting in running the full import twice on Windows!) -- via PreCreateThreadsImpl()-->ProcessMasterPreferences()-->SetImportPreferencesAndLaunchImport()-->ImportSettingsWin()... This whole flow is removed in this CL :).
> 
> This improves first run speed in a debug build from 4901ms to 1477ms, a 332% improvement!!!! (tested by instrumenting a first run browser test, the delta is between the time the test is constructed and the time the test case is called (which happens after the browser has been initialized and import has occurred)).
> 
> This supersedes https://codereview.chromium.org/12463030/ (which won't be committed because this fix is so much better).
> 
> BUG=219419, 22142, 56816, 178083, 178051, 48880, 232241, 231710, 223462, 87657, 236225
> 
> Review URL: https://chromiumcodereview.appspot.com/12670013

TBR=gab@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201968 0039d316-1c4b-4281-b951-d872f2087c98
Revert 201932 "Add API function chrome.notifications.getAll"

Broke Mac ASAN Tests (1):
http://build.chromium.org/p/chromium.memory/builders/Mac%20ASAN%20Tests%20%281%29/builds/10683

NotificationsApiTest.TestGetAll: 
dyld: warning, unknown environment variable: DYLD_NO_PIE
dyld: warning, unknown environment variable: DYLD_NO_PIE
dyld: warning, unknown environment variable: DYLD_NO_PIE
dyld: warning, unknown environment variable: DYLD_NO_PIE
[6552:3847:0523/180035:INFO:gpu_command_buffer_stub.cc(468)] Created virtual GL
context.
../../chrome/browser/extensions/api/notifications/notifications_apitest.cc:331:
Failure
Value of: kNotificationsToCreate
Actual: 4
Expected: return_value->size()
Which is: 0

> Add API function chrome.notifications.getAll
> 
> This function returns an object whose keys are the notification
> IDs of all notifications created by that extension.
> 
> BUG=240924
> 
> Review URL: https://chromiumcodereview.appspot.com/14767029

TBR=dewittj@chromium.org

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201971 0039d316-1c4b-4281-b951-d872f2087c98
Disable FileManagerBrowserDriveTest.TestGalleryOpen temporarily due to ASAN failures.

TBR=dbeam@chromium.org
TEST=browser_tests
BUG=243611

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201973 0039d316-1c4b-4281-b951-d872f2087c98
Revert 201955 "Allow multiple base::MessagePumpForUI instances t..."

Broke browser_tests on XP Tests (dbg)(4):
http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%28dbg%29%284%29/builds/33253

[844:3260:0523/194017:1212046:FATAL:message_window.cc(28)] Check failed: CalledOnValidThread(). 
Backtrace:
  base::Histogram::GetCountAndBucketData [0x08408FD1+2262176]
  base::Histogram::GetCountAndBucketData [0x0827FBBE+651405]
  base::Histogram::GetCountAndBucketData [0x082E1E60+1053487]
  base::Histogram::GetCountAndBucketData [0x0825CC46+508181]
  base::Histogram::GetCountAndBucketData [0x0825BB66+503861]
  base::Histogram::GetCountAndBucketData [0x0825A534+498179]
  base::Histogram::GetCountAndBucketData [0x08256C16+483557]
  base::Histogram::GetCountAndBucketData [0x08256C82+483665]
  base::Histogram::GetCountAndBucketData [0x08256324+481267]
  base::Histogram::GetCountAndBucketData [0x081F59AF+85630]
  base::Histogram::GetCountAndBucketData [0x081F84AC+96635]
  base::Histogram::GetCountAndBucketData [0x081F5917+85478]
  base::Histogram::GetCountAndBucketData [0x08249FD3+431266]
  base::Histogram::GetCountAndBucketData [0x08249255+427812]
  base::Histogram::GetCountAndBucketData [0x082462CD+415644]
  base::Histogram::GetCountAndBucketData [0x0831D883+1297746]
  base::Histogram::GetCountAndBucketData [0x0831D602+1297105]
  ViewHostMsg_TextInputStateChanged::Read [0x0D3DD6F9+6214944]
  ViewHostMsg_TextInputStateChanged::Read [0x0D3DD584+6214571]
  ViewHostMsg_TextInputStateChanged::Read [0x0D33048E+5505717]
  ViewHostMsg_TextInputStateChanged::Read [0x0D3303FA+5505569]
  ViewHostMsg_TextInputStateChanged::Read [0x0D32DDEA+5495825]
  ViewHostMsg_TextInputStateChanged::Read [0x0D32BAC7+5486830]
  ViewHostMsg_TextInputStateChanged::Read [0x0D3DC9B6+6211549]
  ViewHostMsg_TextInputStateChanged::Read [0x0D367071+5729944]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x03E93429+30896697]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x025BD0DF+4853487]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x02701C3F+6183503]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x026EECCB+6105819]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x026EF6DD+6108397]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x026EFEAF+6110399]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x026F673D+6137165]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x02702637+6186055]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x026F4FA0+6131120]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x0262E070+5316224]
  (No symbol) [0x00632BF5]
  RelaunchChromeBrowserWithNewCommandLineIfNeeded [0x03E2BD73+30473091]
  (No symbol) [0x00632975]
  std::_Init_locks::operator= [0x03F5574F+5791]
  std::_Init_locks::operator= [0x03F5557F+5327]
  RegisterWaitForInputIdle [0x7C817077+73]

> Allow multiple base::MessagePumpForUI instances to be created simultanenously on Windows.
> 
> The current implementation of base::MessagePumpForUI on Windows registers a window class with a predefined name in order to create a message-only window. The window class is unregistered when base::MessagePumpForUI is deleted. This causes issues when two or more instances of base::MessagePumpForUI are created/destroyed simultanenously on different threads. For instance once thread can unregister the window class right before the other thread is trying to create a window using this class.
> 
> The CL addresses this problem by switching MessageWindow to implement a message-only window. It also moves MessageWindow from remoting/host/win to base/win along with the corresponding unit test.
> 
> MessageWindow registers a uniquely named window class per MessageWindow instance making sure that different MessageWindow objects do not share any resources. In the future this can be optimized further by registering a common window class shared by all MessageWindow objects in a thread-safe manner (by using LazyInstance for example).
> 
> BUG=241939
> 
> Review URL: https://chromiumcodereview.appspot.com/15261005

TBR=alexeypa@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201974 0039d316-1c4b-4281-b951-d872f2087c98
Revert 201968 "Revert 201837 "OOP import on Windows.""

Sorry about that, seems to be a different issue - http://crbug.com/177163

> Revert 201837 "OOP import on Windows."
> 
> This broke browser_tests on XP Tests (dbg)(4):
> http://build.chromium.org/p/chromium.win/builders/XP%20Tests%20%28dbg%29%284%29/builds/33240
> 
> [1148:3528:0523/123340:2643015:WARNING:extension_apitest.cc(169)] Workaround for 177163, prematurely stopping test
> 
> > OOP import on Windows.
> > 
> > Gets rid of the import process on all platforms -- replaced by a utility process which communicates with a ProfileWriter back in the browser process to write to the profile (this uses the ExternalProcessImporterHost machinery written 2+ years ago by mirandac@ for import on Mac and still the state of the art today).
> > 
> > Gets rid of all issues regarding profile contention and races to profile creation between the browser and import processes on first run (example of issues this has previously caused: http://crbug.com/171475, http://crbug.com/174591, http://crbug.com/180459).
> > 
> > Makes bookmarks file import use the same mechanism on all platforms (this means bookmarks file import is now in-process on Linux which still uses ImporterHost (instead of ExternalProcessImporterHost) -- Linux used to use the import process solely for bookmarks file import -- but the work to switch Linux to ExternalProcessImporterHost should be very minimal after this CL and I intend to do it in a follow-up CL to unify the import flow cross-platform once and for all!).
> > 
> > Do not use the out-of-process import for Google Toolbar (this was already the case prior to this CL).
> > To make the Google Toolbar importer work out-of-process, we would have to augment the import IPC drastically to support the web auth flow required by this importer (it requires to login to import the google.com/bookmarks favorites).
> > 
> > This, as a side-effect, brings silent bookmarks file import from master_preferences to Mac (long standing issue 48880).
> > 
> > Also fixes issue 231710 (or at least removes the condition causing the bug by making the ImportLockDialog go away on first run on Windows -- as should already have been the case).
> > 
> > Also addresses issue 178083 since the early message loop spinning was caused by ImportSettingsWin which was called too early on Windows (actually resulting in running the full import twice on Windows!) -- via PreCreateThreadsImpl()-->ProcessMasterPreferences()-->SetImportPreferencesAndLaunchImport()-->ImportSettingsWin()... This whole flow is removed in this CL :).
> > 
> > This improves first run speed in a debug build from 4901ms to 1477ms, a 332% improvement!!!! (tested by instrumenting a first run browser test, the delta is between the time the test is constructed and the time the test case is called (which happens after the browser has been initialized and import has occurred)).
> > 
> > This supersedes https://codereview.chromium.org/12463030/ (which won't be committed because this fix is so much better).
> > 
> > BUG=219419, 22142, 56816, 178083, 178051, 48880, 232241, 231710, 223462, 87657, 236225
> > 
> > Review URL: https://chromiumcodereview.appspot.com/12670013
> 
> TBR=gab@chromium.org
> 
> Review URL: https://codereview.chromium.org/15968002

TBR=dbeam@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201977 0039d316-1c4b-4281-b951-d872f2087c98
[Mac] Override abort() to crash into breakpad.

abort() sends SIGABRT, breakpad unfortunately does not intercept
signal crashes.  Override abort() to crash in a way that breakpad will
intercept.

BUG=57504

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201978 0039d316-1c4b-4281-b951-d872f2087c98
Make Autofill SyncableServices use a backend interface for DB work, rather than calling WebDataService directly.

This will (eventually) allow WebDataService to live entirely on the UI Thread, and also ensures that we don't expose any more of the backend functionality than is needed by the SyncableServices.

(depends on: https://codereview.chromium.org/14679005/)

BUG=230920

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201979 0039d316-1c4b-4281-b951-d872f2087c98
Fix USB Permission string to UI-review approved Strings:

How about ?
Access the USB device X from Y

If X is missing:
Access the USB device from Y

If both are missing:
Access the USB device 

BUG=229697

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201980 0039d316-1c4b-4281-b951-d872f2087c98
Load and send Wallet Risk params after user has agreed

R=isherman@chromium.org
BUG=173505
TEST=unit_tests, no sued
NOTRY=true

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

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