Make SourceBufferStream Remove() and PrepareRangesForNextAppend() methods use common removal logic.

These two methods were using slightly different algorithms to remove buffers
and ranges. Each of these algorithms had bugs in them that could leave around
stale memory references or put the ranges in an odd state. This patch unifies
the removal logic and fixes fixes the bugs in the removal algorithm.

BUG=303413

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231850 0039d316-1c4b-4281-b951-d872f2087c98
Few pyauto prefs related tests re-written as browser_tests.
testImagesNotBlockedInIncognito
testHomepagePrefs
testUnderTheHoodPref
testHaveLocalStatePrefs

BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231851 0039d316-1c4b-4281-b951-d872f2087c98
Check for a null delegate in the OverscrollController

The OverscrollController delegate may be null. Check for this when determining
if a gesture completes a given overscroll sequence.

BUG=312424

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231852 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231851
Move password_form_fill_data_unittest.cc into components_unittests.

BUG=140037
TEST=components_unittests
R=joi@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231853 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231853
Revert first-run UI for apps

This CL reverts:
https://codereview.chromium.org/25769004/
https://codereview.chromium.org/26466006

We don't need this UI and will use different approach.

BUG=296393,308455
TEST=manual
R=asargent@chromium.org, sky@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231854 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231854
Make JavaBridgeDispatcherHost not be a RenderViewHostObserver anymore.

The only reason it was inheriting from it was to to dispatch an IPC from the renderer. Dispatch the IPC in WebContentsImpl instead, since that already knows about the java bridge code and send it to JavaBridgeDispatcherHostManager. I did this instead of exposing WebContentsImpl::message_source_ as no one else needs this yet, and I'm nervous of exposing it in case of misuse.

This also fixes usage of RenderProcessHost and RenderViewHost on the background java thread, which is not thread-safe, and a possible use-after-free with RenderViewHost.

This is part of the work in removing RenderViewHostObserver.

BUG=306569
R=steveblock@chromium.org, torne@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231856 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231856
[Telemetry] Fix page sets with both file:// and http:// URLs on Android.

When we start the browser, it is configured to always use WPR (this makes http
work). When we go to hit the file:// URL, we need to hit the other web server
instead of WPR, but we can't reconfigure Chrome without restarting.

So, WPR has logic to forward any 127.0.0.1 requests on to another server to
allow the local HTTP server to get the requests. The problem was that we were
explicitly requesting localhost instead of 127.0.0.1 which fooled WPR.

BUG=311582

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231858 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231858
Mojo: Add basic IDL parser and frontend

mojo_parser    - parses IDL, produces syntax tree
mojo_translate - translates syntax tree to Mojom IR
mojo_idl       - frontend that hooks it all together

The result "mojo_idl foo.idl" ingests the IDL file and spits out C++ code!

R=davemoore@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231860 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231860
FileAPI: Add GrantCreateReadWriteFileSystem to ChildProcessSecurityPolicy

Currently there is no way to grant full permissions of
CREATE_READ_WRITE_FILE_GRANT to isolated filesystems (CreateOverwriteFile
permission is missing). Therefore, files in isolated filesystems could not be
opened from pepper plugins.
(Please see CanOpenFileSystemURLWithPepperFlags for more details)

This change provides GrantCreateReadWriteFileSystem to grant the permission to
isolated filesystems.


BUG=286240
TEST=n/a

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231864 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231864
Remove NOTIFICATION_RESOURCE_RECEIVED_REDIRECT from prerender.

Replace with WebContentsObserver::DidGetRedirectForResourceRequest.

BUG=170921

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231865 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231865
Adding UMA events to track when the user clicks on the Most Visited tiles.

Events are used by the script computing time-to-long-dwell because they're available as a time-stamped stream of events server-side. We want to compute ttld starting from a click on a Most Visited.

BUG=312752

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

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