diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index 389f5e9e2..a509c2b6 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -407,3 +407,10 @@
 
 # DEPS sorting.
 f5e7996a0cffea847bb2c14bd8c49a1d9ea3749e
+
+# The Great Blink mv
+a30d423812ad0d766e93b0f3a53523807b50b17b
+0aee4434a4dba42a42abaea9bfbc0cd196a63bc1
+
+# Spelling fixes.
+daf569b53e1b679e2073bce7189de74e59c34a6c
diff --git a/.gitattributes b/.gitattributes
index dfb4ad1..9cc142c 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -3,3 +3,43 @@
 
 # Force LF checkout of the pins files to avoid transport_security_state_generator errors.
 /net/http/*.pins  text eol=lf
+
+# Force LF checkout for all source files
+*.c text eol=lf
+*.cc text eol=lf
+*.cpp text eol=lf
+*.grd   text eol=lf
+*.grdp   text eol=lf
+*.gn text eol=lf
+*.gni text eol=lf
+*.h text eol=lf
+*.html   text eol=lf
+*.in   text eol=lf
+*.inc   text eol=lf
+*.java   text eol=lf
+*.js   text eol=lf
+*.json   text eol=lf
+*.md text eol=lf
+*.mm text eol=lf
+*.sh text eol=lf
+*.sql   text eol=lf
+*.txt   text eol=lf
+*.xml   text eol=lf
+*.xslt   text eol=lf
+.clang-format   text eol=lf
+.eslintrc.js   text eol=lf
+.git-blame-ignore-revs   text eol=lf
+.gitattributes   text eol=lf
+.gitignore   text eol=lf
+.vpython   text eol=lf
+codereview.settings   text eol=lf
+DEPS   text eol=lf
+ENG_REVIEW_OWNERS   text eol=lf
+LICENSE text eol=lf
+LICENSE.* text eol=lf
+MAJOR_BRANCH_DATE   text eol=lf
+OWNERS   text eol=lf
+README   text eol=lf
+README.*   text eol=lf
+WATCHLISTS   text eol=lf
+VERSION   text eol=lf
diff --git a/.gitignore b/.gitignore
index 3e837e8..8a02255 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+*.bak
 *.gypcmd
 *.mk
 *.ncb
@@ -101,8 +102,11 @@
 /chrome/browser/resources/media_router_internal/
 /chrome/browser/resources/settings_internal/
 /chrome/browser/resources/software_rendering_list
-/chrome/browser/resources/vr/assets/*.png
+# Asset files downloaded by gclient runhooks.
+/chrome/browser/resources/vr/assets/google_chrome/*.png
+/chrome/browser/resources/vr/assets/google_chrome/*.wav
 /chrome/browser/spellchecker/internal
+/chrome/browser/ui/media_router/internal
 /chrome/browser_tests_run.xml
 /chrome/chrome_run.xml
 /chrome/chrome_user32_delay_imports.xml
@@ -115,9 +119,7 @@
 /chrome/installer/mini_installer.xml
 /chrome/installer/mini_installer/mini_installer.aps
 /chrome/installer/mini_installer/support
-/chrome/installer/mini_installer_syzygy.xml
 /chrome/installer/mini_installer_tests_run.xml
-/chrome/installer/zucchini/testdata/*.exe
 /chrome/installer_util_strings.xml
 /chrome/interactive_ui_tests_run.xml
 /chrome/setup.xml
@@ -144,9 +146,12 @@
 /chrome/test/data/perf/private/
 /chrome/test/data/perf/third_party/
 /chrome/test/data/plugin/
-/chrome/test/data/vr/webvr_info/
+/chrome/test/data/vr/
 /chrome/test/data/webrtc/resources
+/chrome/test/data/xr/webvr_info/
+/chrome/test/data/xr/webxr_samples/
 /chrome/test/media_router/internal
+/chrome/test/python_tests/
 /chrome/tools/memory
 /chrome/tools/test/reference_build
 /chrome/unit_tests_run.xml
@@ -154,6 +159,7 @@
 /chrome_elf/chrome_elf_resources.xml
 /chromecast/internal
 /chromeos/assistant/internal
+/cipd_cache/
 /clank
 /cloud_print/cloud_print_version_resources.xml
 /components/chrome_settings_proto_generated_compile.xml
@@ -167,6 +173,7 @@
 /components/search_engines/prepopulated_engines.xml
 /components/suggestions.xml
 /components/variations.xml
+/components/zucchini/testdata/*.exe
 /content/browser/service_worker/proto.xml
 /content/content_browsertests_run.xml
 /content/content_common_mojo_bindings.xml
@@ -199,6 +206,7 @@
 /ios/third_party/ochamcrest/src
 /ios_internal
 /libassistant
+/libinteraction
 /llvm
 /media/cast/logging/cast_logging_proto_lib.xml
 /media/cdm/api
@@ -257,10 +265,8 @@
 /tools/json_schema_compiler/test/json_schema_compiler_tests.xml
 /tools/metrics/actions/actions.old.xml
 /tools/metrics/histograms/histograms.before.pretty-print.xml
+/tools/metrics/histograms/enums.before.pretty-print.xml
 /tools/page_cycler/acid3
-/tools/perf/data
-/tools/perf/internal
-/tools/perf/results.html
 /tools/swarming_client
 /tools/tryserver
 /tools/win/link_limiter/build
@@ -268,10 +274,9 @@
 /ui/keyboard/keyboard_mojom_bindings.xml
 /ui/surface/surface.xml
 /ui/surface/surface_gpu_tests.xml
+/ui/webui/internal
 /v8
 /webkit/data
 /webpagereplay_logs/
-/win8/delegate_execute/delegate_execute_version_resources.xml
-/win8/metro_driver/metro_driver_version_resources.xml
 /x86-generic_out/
 /xcodebuild
diff --git a/.gn b/.gn
index 50a8a2f..eaf210e 100644
--- a/.gn
+++ b/.gn
@@ -37,18 +37,18 @@
   v8_extra_library_files = [
     # Dependencies used by the extra libraries. Putting them here causes them
     # to be executed first during snapshot creation.
-    "//third_party/WebKit/Source/core/streams/CommonOperations.js",
-    "//third_party/WebKit/Source/core/streams/CommonStrings.js",
-    "//third_party/WebKit/Source/core/streams/SimpleQueue.js",
+    "//third_party/blink/renderer/core/streams/CommonOperations.js",
+    "//third_party/blink/renderer/core/streams/CommonStrings.js",
+    "//third_party/blink/renderer/core/streams/SimpleQueue.js",
 
     # Extra libraries.
-    "//third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js",
-    "//third_party/WebKit/Source/core/streams/CountQueuingStrategy.js",
-    "//third_party/WebKit/Source/core/streams/ReadableStream.js",
-    "//third_party/WebKit/Source/core/streams/WritableStream.js",
+    "//third_party/blink/renderer/core/streams/ByteLengthQueuingStrategy.js",
+    "//third_party/blink/renderer/core/streams/CountQueuingStrategy.js",
+    "//third_party/blink/renderer/core/streams/ReadableStream.js",
+    "//third_party/blink/renderer/core/streams/WritableStream.js",
+    "//third_party/blink/renderer/core/streams/TransformStream.js",
   ]
-  v8_experimental_extra_library_files =
-      [ "//third_party/WebKit/Source/core/streams/TransformStream.js" ]
+  v8_experimental_extra_library_files = []
   v8_enable_gdbjit = false
   v8_imminent_deprecation_warnings = false
 
@@ -84,9 +84,74 @@
   #"//chrome/*",  # Epic number of errors.
   "//chrome/app/*",
   "//chrome/app_shim/*",
+
+  #"//chrome/browser/android/*",  # Only vr has errors. https://crbug.com/871623
+  "//chrome/browser/android/accessibility/*",
+  "//chrome/browser/android/autofill_assistant/*",
+  "//chrome/browser/android/bookmarks/*",
+  "//chrome/browser/android/bottombar/*",
+  "//chrome/browser/android/browserservices/*",
+  "//chrome/browser/android/browsing_data/*",
+  "//chrome/browser/android/component_updater/*",
+  "//chrome/browser/android/compositor/*",
+  "//chrome/browser/android/compositor/layer/*",
+  "//chrome/browser/android/compositor/resources/*",
+  "//chrome/browser/android/compositor/scene_layer/*",
+  "//chrome/browser/android/consent_auditor/*",
+  "//chrome/browser/android/content/*",
+  "//chrome/browser/android/contextualsearch/*",
+  "//chrome/browser/android/contextual_suggestions/*",
+  "//chrome/browser/android/cookies/*",
+  "//chrome/browser/android/crash/*",
+  "//chrome/browser/android/customtabs/*",
+  "//chrome/browser/android/digital_asset_links/*",
+  "//chrome/browser/android/document/*",
+  "//chrome/browser/android/dom_distiller/*",
+  "//chrome/browser/android/download/*",
+  "//chrome/browser/android/download/items/*",
+  "//chrome/browser/android/download/service/*",
+  "//chrome/browser/android/explore_sites/*",
+  "//chrome/browser/android/feature_engagement/*",
+  "//chrome/browser/android/feed/*",
+  "//chrome/browser/android/feedback/*",
+  "//chrome/browser/android/find_in_page/*",
+  "//chrome/browser/android/history/*",
+  "//chrome/browser/android/history_report/*",
+  "//chrome/browser/android/instantapps/*",
+  "//chrome/browser/android/locale/*",
+  "//chrome/browser/android/metrics/*",
+  "//chrome/browser/android/mojo/*",
+  "//chrome/browser/android/net/*",
+  "//chrome/browser/android/ntp/*",
+  "//chrome/browser/android/omnibox/*",
+  "//chrome/browser/android/oom_intervention/*",
+  "//chrome/browser/android/password_manager/*",
+  "//chrome/browser/android/payments/*",
+  "//chrome/browser/android/policy/*",
+  "//chrome/browser/android/preferences/*",
+  "//chrome/browser/android/preferences/autofill/*",
+  "//chrome/browser/android/profiles/*",
+  "//chrome/browser/android/proto/*",
+  "//chrome/browser/android/provider/*",
+  "//chrome/browser/android/rappor/*",
+  "//chrome/browser/android/rlz/*",
+  "//chrome/browser/android/search_permissions/*",
+  "//chrome/browser/android/sessions/*",
+  "//chrome/browser/android/signin/*",
+  "//chrome/browser/android/subresource_filter/*",
+  "//chrome/browser/android/tasks/*",
+  "//chrome/browser/android/thumbnail/*",
+  "//chrome/browser/android/usb/*",
+  "//chrome/browser/android/vr/arcore_device/*",
+  "//chrome/browser/android/webapk/*",
+  "//chrome/browser/android/webapps/*",
+  "//chrome/browser/android/widget/*",
+
   "//chrome/browser/chromeos/*",
   "//chrome/browser/extensions/*",
+  "//chrome/browser/resource_coordinator/*",
   "//chrome/browser/ui/*",
+  "//chrome/chrome_cleaner/*",
   "//chrome/common/*",
   "//chrome/installer/*",
   "//chrome/profiling",
@@ -109,11 +174,11 @@
   "//extensions:extensions_unittests",
   "//extensions/browser:browser_tests",
   "//extensions/browser:unit_tests",
+  "//extensions/browser/install:*",
+  "//extensions/common:common",
   "//extensions/common:unit_tests",
   "//extensions/renderer:unit_tests",
-  "//extensions/shell:browser_tests",
-  "//extensions/shell:unit_tests",
-  "//extensions/utility:unit_tests",
+  "//extensions/shell/*",
   "//gin/*",
   "//google_apis/*",
   "//google_update/*",
@@ -135,6 +200,7 @@
   #"//pdf/*",  # Medium-hard.
   #"//ppapi/*",  # Lots of errors.
   "//ppapi/examples/*",
+  "//ppapi/tests/*",
   "//printing/*",
 
   #"//remoting/*",  # Medium-hard.
@@ -149,7 +215,9 @@
 
   #"//third_party/*",  # May not ever want this.
   #"//third_party/breakpad/*",  # Small errors.
+  "//third_party/boringssl/*",
   "//third_party/brotli/*",
+  "//third_party/fuchsia-sdk/*",
   "//third_party/hunspell/*",
   "//third_party/leveldatabase/*",
 
@@ -160,13 +228,15 @@
   "//third_party/snappy/*",
 
   #"//third_party/WebKit/*",  # Errors: https://crbug.com/800764
+  #"//third_party/webrtc/*",  # Errors: https://crbug.com/824831
+  "//third_party/webrtc_overrides/*",
   "//tools/*",
 
   "//ui/*",
   "//url/*",
 
   #"//v8/*",  # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
-  "//win8/*",
+  "//webrunner/*",
 ]
 
 # These are the list of GN files that run exec_script. This whitelist exists
diff --git a/.vpython b/.vpython
index 7a1e9c1..13dc189 100644
--- a/.vpython
+++ b/.vpython
@@ -25,6 +25,7 @@
 python_version: "2.7"
 
 # Used by:
+#   build/chromeos/run_vm_test.py
 #   third_party/catapult
 #
 # This version must be compatible with the version range specified by
@@ -67,6 +68,7 @@
 
 # Used by:
 #   third_party/catapult
+#   chrome/test/vr/perf/latency/run_latency_test.py
 #
 # This version must be compatible with the version range specified by
 # //third_party/catapult/telemetry/telemetry/internal/util/external_modules.py
@@ -131,3 +133,45 @@
   name: "infra/python/wheels/httplib2-py2_py3"
   version: "version:0.10.3"
 >
+
+# Used by:
+#   chrome/test/vr/perf/latency/run_latency_test.py
+wheel: <
+  name: "infra/python/wheels/peakutils-py2_py3"
+  version: "version:1.0.3"
+  match_tag: <
+    abi: "cp27mu"
+    platform: "manylinux1_i686"
+  >
+  match_tag: <
+    abi: "cp27mu"
+    platform: "manylinux1_x86_64"
+  >
+>
+wheel: <
+  name: "infra/python/wheels/pyserial-py2_py3"
+  version: "version:3.4"
+>
+wheel: <
+  name: "infra/python/wheels/scipy/${vpython_platform}"
+  version: "version:0.19.0"
+  match_tag: <
+    abi: "cp27mu"
+    platform: "manylinux1_i686"
+  >
+  match_tag: <
+    abi: "cp27mu"
+    platform: "manylinux1_x86_64"
+  >
+>
+
+# Used by:
+#   content/test/gpu/gpu_tests/color_profile_manager_mac.py
+# Note: there's a version of this wheel for even older OS versions,
+# but we don't need it for the GPU tests, and it looks like there are
+# bugs in the not_match_tag implementation.
+wheel: <
+  name: "infra/python/wheels/pyobjc/${vpython_platform}"
+  version: "version:4.1"
+  match_tag: < platform: "macosx_10_10_intel" >
+>
diff --git a/AUTHORS b/AUTHORS
index 5c6d7c3..3489adf 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -49,11 +49,13 @@
 Alfredo Hernandez <ahernandez.miralles@gmail.com>
 Ali Vathi <ali.akbar@gmail.com>
 Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
+Alper Çakan <alpercakan98@gmail.com>
 Ambarish Rapte <ambarish.r@samsung.com>
 Amey Jahagirdar <jahagird@amazon.com>
 Amit Sarkar <amit.srkr@samsung.com>
 Amogh Bihani <amogh.bihani@samsung.com>
 Amos Lim <amoseui@gmail.com>
+Amos Lim <eui-sang.lim@samsung.com>
 Amruth Raj <amruthraj@motorola.com>
 Amruth Raj <ckqr36@motorola.com>
 Anand Ratn <anand.ratn@samsung.com>
@@ -72,6 +74,7 @@
 Anish Patankar <anish.p@samsung.com>
 Ankit Kumar <ankit2.kumar@samsung.com>
 Ankur Verma <ankur1.verma@samsung.com>
+Anna Henningsen <anna@addaleax.net>
 Anne Kao <annekao94@gmail.com>
 Anssi Hannula <anssi.hannula@iki.fi>
 Anthony Halliday <anth.halliday12@gmail.com>
@@ -80,6 +83,7 @@
 Antonio Gomes <a1.gomes@sisa.samsung.com>
 Anuj Kumar Sharma <anujk.sharma@samsung.com>
 Arjun Karthik <arjunkar@amazon.com>
+Arman Ghotb <armanghotb@gmail.com>
 Armin Burgmeier <aburgmeier@bloomberg.net>
 Arnaud Renevier <a.renevier@samsung.com>
 Arpita Bahuguna <a.bah@samsung.com>
@@ -92,8 +96,10 @@
 Arunprasad Rajkumar <arurajku@cisco.com>
 Ashish Kumar Gupta <guptaag@amazon.com>
 Ashlin Joseph <ashlin.j@samsung.com>
+Asish Singh <asish.singh@samsung.com>
 Attila Dusnoki <dati91@gmail.com>
 Avinaash Doreswamy <avi.nitk@samsung.com>
+Ayush Khandelwal <k.ayush@samsung.com>
 Balazs Kelemen <b.kelemen@samsung.com>
 Baul Eun <baul.eun@samsung.com>
 Behara Mani Shyam Patro <behara.ms@samsung.com>
@@ -122,6 +128,8 @@
 Bruno de Oliveira Abinader <brunoabinader@gmail.com>
 Bruno Roy <brusi_roy@hotmail.com>
 Bryan Donlan <bdonlan@gmail.com>
+Bryce Thomas <bryct@amazon.com>
+Byounghoon Yoon <bill.2714@kakaocorp.com>
 Byoungkwon Ko <codeimpl@gmail.com>
 Byungwoo Lee <bw80.lee@samsung.com>
 Caesar Wang <wxt@rock-chips.com>
@@ -159,7 +167,6 @@
 Claudio DeSouza <claudiomdsjr@gmail.com>
 Clemens Fruhwirth <clemens@endorphin.org>
 Clement Scheelfeldt Skau <clementskau@gmail.com>
-Clinton Staley <clintstaley@chromium.org>
 Clinton Staley <clintstaley@gmail.com>
 Connor Pearson <cjp822@gmail.com>
 Craig Schlenter <craig.schlenter@gmail.com>
@@ -185,11 +192,13 @@
 Dániel Vince <vinced@inf.u-szeged.hu>
 Darshini KN <kn.darshini@samsung.com>
 David Benjamin <davidben@mit.edu>
+David Davidovic <david@davidovic.io>
 David Erceg <erceg.david@gmail.com>
 David Fox <david@davidjfox.com>
 David Futcher <david.mike.futcher@gmail.com>
 David Leen <davileen@amazon.com>
 David McAllister <mcdavid@amazon.com>
+David Michael Barr <david.barr@samsung.com>
 David Spellman <dspell@amazon.com>
 Dax Kelson <dkelson@gurulabs.com>
 Debashish Samantaray <d.samantaray@samsung.com>
@@ -209,7 +218,6 @@
 Dominik Röttsches <dominik.rottsches@intel.com>
 Don Woodward <woodward@adobe.com>
 Donghee Na <corona10@gmail.com>
-Dongheun Kang <dongheun.kang@lge.com>
 Dongie Agnir <dongie.agnir@gmail.com>
 Dongjun Kim <djmix.kim@samsung.com>
 Dongseong Hwang <dongseong.hwang@intel.com>
@@ -218,6 +226,7 @@
 Donna Wu <donna.wu@intel.com>
 Douglas F. Turner <doug.turner@gmail.com>
 Dustin Doloff <doloffd@amazon.com>
+Ebrahim Byagowi <ebrahim@gnu.org>
 Ebrahim Byagowi <ebraminio@gmail.com>
 Eden Wang <nedenwang@tencent.com>
 Eduardo Lima (Etrunko) <eblima@gmail.com>
@@ -243,6 +252,7 @@
 Evgeny Agafonchikov <evgeny.agafonchikov@akvelon.com>
 Fabien Tassin <fta@sofaraway.org>
 Felix H. Dahlke <fhd@ubercode.de>
+Fengrong Fang <fr.fang@samsung.com>
 Fernando Jiménez Moreno <ferjmoreno@gmail.com>
 Finbar Crago <finbar.crago@gmail.com>
 François Beaufort <beaufort.francois@gmail.com>
@@ -256,8 +266,11 @@
 Gaetano Mendola <mendola@gmail.com>
 Gajendra N <gajendra.n@samsung.com>
 Gajendra Singh <wxjg68@motorola.com>
+Ganesh Borle <ganesh.borle@samsung.com>
 Gao Chun <chun.gao@intel.com>
 Gao Chun <gaochun.dev@gmail.com>
+Gautham Banasandra <gautham.bangalore@gmail.com>
+George Adams <geoada@amazon.com>
 George Joseph <kottackal.george@gmail.com>
 George Liaskos <geo.liaskos@gmail.com>
 Georgy Buranov <gburanov@gmail.com>
@@ -267,7 +280,6 @@
 Girish Kumar M <mck.giri@samsung.com>
 Gitanshu Mehndiratta <g.mehndiratt@samsung.com>
 Giuseppe Iuculano <giuseppe@iuculano.it>
-Glenn Adams <glenn@chromium.org>
 Gnanasekar Somanathan <gnanasekar.s@samsung.com>
 Gordana Cmiljanovic <gordana.cmiljanovic@imgtec.com>
 Goutham Jagannatha <wrm364@motorola.com>
@@ -284,6 +296,7 @@
 Haeun Kim <haeungun@gmail.com>
 Haitao Feng <haitao.feng@intel.com>
 Halley Zhao <halley.zhao@intel.com>
+Halton Huo <halton.huo@gmail.com>
 Halton Huo <halton.huo@intel.com>
 Hans Hillen <hans.hillen@gmail.com>
 Haojian Wu <hokein.wu@gmail.com>
@@ -304,6 +317,7 @@
 Huapeng Li <huapengl@amazon.com>
 Huayong Xu <huayong.xu@samsung.com>
 Hugo Holgersson <hugo.holgersson@sonymobile.com>
+Hui Wang <wanghui07050707@gmail.com>
 Huiwon Jo <jhwon0415@gmail.com>
 Huy Duong <huy.duongdinh@gmail.com>
 Hwanseung Lee <hs1217.lee@gmail.com>
@@ -326,7 +340,6 @@
 Isaac Reilly <reillyi@amazon.com>
 Ivan Naydonov <samogot@gmail.com>
 Ivan Sham <ivansham@amazon.com>
-J. Ryan Stinnett <jryans@chromium.org>
 Jack Bates <jack@nottheoilrig.com>
 Jacob Clark <jacob.jh.clark@googlemail.com>
 Jacob Mandelson <jacob@mandelson.org>
@@ -335,7 +348,6 @@
 Jaekyeom Kim <btapiz@gmail.com>
 Jaemin Seo <jaemin86.seo@samsung.com>
 Jaeseok Yoon <yjaeseok@gmail.com>
-Jaideep Bajwa <bjaideep@ca.ibm.com>
 Jaime Soriano Pastor <jsorianopastor@gmail.com>
 Jake Helfert <jake@helfert.us>
 Jake Hendy <me@jakehendy.com>
@@ -357,12 +369,14 @@
 Jay Oster <jay@kodewerx.org>
 Jay Soffian <jaysoffian@gmail.com>
 Jeado Ko <haibane84@gmail.com>
+Jeffrey C <jeffreyca16@gmail.com>
 Jeongeun Kim <je_julie.kim@samsung.com>
 Jeongmin Kim <kimwjdalsl@gmail.com>
 Jeongwoo Park <skeksk91@gmail.com>
 Jeremy Noring <jnoring@hirevue.com>
 Jeremy Spiegel <jeremysspiegel@gmail.com>
 Jeroen Van den Berghe <vandenberghe.jeroen@gmail.com>
+Jerry Lin <wahahab11@gmail.com>
 Jesper Storm Bache <jsbache@gmail.com>
 Jesse Miller <jesse@jmiller.biz>
 Jesus Sanchez-Palencia <jesus.sanchez-palencia.fernandez.fil@intel.com>
@@ -380,13 +394,13 @@
 Jingwei Liu <kingweiliu@gmail.com>
 Jingyi Wei <wjywbs@gmail.com>
 Jinho Bang <jinho.bang@samsung.com>
-Jinkyu Seong <jinkyu.seong@lge.com>
 Jinsong Fan <fanjinsong@sogou-inc.com>
 Jinwoo Song <jinwoo7.song@samsung.com>
 Jinyoung Hur <hurims@gmail.com>
 Jitendra Kumar Sahoo <jitendra.ks@samsung.com>
 Joachim Bauch <jbauch@webrtc.org>
 Joachim Bauch <mail@joachim-bauch.de>
+Joanmarie Diggs <joanmarie.diggs@gmail.com>
 Joe Knoll <joe.knoll@workday.com>
 Joe Thomas <mhx348@motorola.com>
 Joel Stanley <joel@jms.id.au>
@@ -422,9 +436,11 @@
 Jungkee Song <jungkee.song@samsung.com>
 Junmin Zhu <junmin.zhu@intel.com>
 Justin Okamoto <justmoto@amazon.com>
+Justin Ribeiro <justin@justinribeiro.com>
 Jüri Valdmann <juri.valdmann@qt.io>
 Kai Jiang <jiangkai@gmail.com>
 Kai Köhne <kai.koehne@qt.io>
+Kai Uwe Broulik <kde@privat.broulik.de>
 Kal Conley <kcconley@gmail.com>
 Kalyan Kondapally <kalyan.kondapally@intel.com>
 Kamil Jiwa <kamil.jiwa@gmail.com>
@@ -449,8 +465,10 @@
 Kevin M. McCormick <mckev@amazon.com>
 Khasim Syed Mohammed <khasim.mohammed@linaro.org>
 Kihong Kwon <kihong.kwon@samsung.com>
+Kihoon Ko <rhrlgns777@gmail.com>
 Kihwang Kim <pwangkk@gmail.com>
 Kim Christensen <kimworking@gmail.com>
+Kimberly Hunter <kimberhu@amazon.com>
 Kingshuk Jana <kingshuk.j@samsung.com>
 Kirill Bobyrev <kirillbobyrev@gmail.com>
 Kirill Ovchinnikov <kirill.ovchinn@gmail.com>
@@ -487,11 +505,13 @@
 Lidwine Genevet <lgenevet@cisco.com>
 Lingyun Cai <lingyun.cai@intel.com>
 Lionel Landwerlin <lionel.g.landwerlin@intel.com>
+Lizhi Fan <lizhi.fan@samsung.com>
 Loo Rong Jie <loorongjie@gmail.com>
 Lorenzo Stoakes <lstoakes@gmail.com>
 Lu Guanqun <guanqun.lu@gmail.com>
 Lucie Brozkova <lucinka.brozkova@gmail.com>
 Luiz Von Dentz <luiz.von.dentz@intel.com>
+Luka Dojcilovic <l.dojcilovic@gmail.com>
 Luke Inman-Semerau <luke.semerau@gmail.com>
 Luke Zarko <lukezarko@gmail.com>
 Luoxi Pan <l.panpax@gmail.com>
@@ -546,6 +566,7 @@
 Michael Gilbert <floppymaster@gmail.com>
 Michael Lopez <lopes92290@gmail.com>
 Michael Morrison <codebythepound@gmail.com>
+Michael Müller <michael@fds-team.de>
 Michael Schechter <mike.schechter@gmail.com>
 Michaël Zasso <mic.besace@gmail.com>
 Michael Zugelder <michael@zugelder.org>
@@ -565,7 +586,6 @@
 Miran Karic <miran.karic@imgtec.com>
 Mirela Budaes <mbudaes@adobe.com>
 Mirela Budaes <mbudaes@gmail.com>
-Mitchell Rosen <mitchellwrosen@chromium.org>
 Miyoung Shin <myid.shin@samsung.com>
 Mohamed I. Hammad <ibraaaa@gmail.com>
 Mohamed Mansour <m0.interactive@gmail.com>
@@ -574,6 +594,7 @@
 Mohan Reddy <mohan.reddy@samsung.com>
 Mohit Bhalla <bhallam@amazon.com>
 Mrunal Kapade <mrunal.kapade@intel.com>
+Myeongjin Cho <myeongjin.cho@navercorp.com>
 Myles C. Maxfield <mymax@amazon.com>
 Myung-jong Kim <mjkim610@gmail.com>
 Nagarajan Narayanan <nagarajan.n@samsung.com>
@@ -591,6 +612,7 @@
 Nikhil Bansal <n.bansal@samsung.com>
 Nikhil Sahni <nikhil.sahni@samsung.com>
 Nikita Ofitserov <himikof@gmail.com>
+Niklas Hambüchen <mail@nh2.me>
 Niklas Schulze <me@jns.io>
 Nikola Kovacs <nikola.kovacs@gmail.com>
 Nils Schneider <nils.schneider@gmail.com>
@@ -627,8 +649,6 @@
 Peng Hu <penghu@tencent.com>
 Peng Jiang <leiyi.jp@gmail.com>
 Peng Xinchao <pxinchao@gmail.com>
-Petar Jovanovic <petarj@mips.com>
-Peter Beverloo <peter@chromium.org>
 Peter Bright <drpizza@quiscalusmexicanus.org>
 Peter Brophy <pbrophy@adobe.com>
 Peter Collingbourne <peter@pcc.me.uk>
@@ -640,6 +660,7 @@
 Philipp Hancke <philipp.hancke@googlemail.com>
 Philippe Beauchamp <philippe.beauchamp@gmail.com>
 Philippe Beaudoin <philippe.beaudoin@gmail.com>
+PhistucK <phistuck@gmail.com>
 Pierre Neter <pierreneter@gmail.com>
 Pierre-Antoine LaFayette <pierre.lafayette@gmail.com>
 Po-Chun Chang <pochang0403@gmail.com>
@@ -677,6 +698,8 @@
 Renata Hodovan <rhodovan.u-szeged@partner.samsung.com>
 Rene Bolldorf <rb@radix.io>
 Rene Ladan <r.c.ladan@gmail.com>
+Richard Baranyi <lordprotector@gmail.com>
+Richard Li <richard.li@intel.com>
 Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
 Riku Voipio <riku.voipio@linaro.org>
 Rob Buis <rob.buis@samsung.com>
@@ -725,6 +748,8 @@
 Scott Blomquist <sblom@microsoft.com>
 Scott D Phillips <scott.d.phillips@intel.com>
 Sean Bryant <sean@cyberwang.net>
+Sean DuBois <seaduboi@amazon.com>
+Sebastian Amend <sebastian.amend@googlemail.com>
 Seo Sanghyeon <sanxiyn@gmail.com>
 Seokju Kwon <seokju.kwon@gmail.com>
 SeongTae Jeong <ferendevelop.gl@gmail.com>
@@ -756,10 +781,12 @@
 Shreeram Kushwaha <shreeram.k@samsung.com>
 Shreyas Gopal <shreyas.g@samsung.com>
 Shreyas VA <v.a.shreyas@gmail.com>
+Shubham Agrawal <shubag@amazon.com>
 Siba Samal <siba.samal@samsung.com>
 Siddharth Bagai <b.siddharth@samsung.com>
 Siddharth Shankar <funkysidd@gmail.com>
 Simon Arlott <simon.arlott@gmail.com>
+Simon La Macchia <smacchia@amazon.com>
 Siva Kumar Gunturi <siva.gunturi@samsung.com>
 Sohan Jyoti Ghosh <sohan.jyoti@huawei.com>
 Sohan Jyoti Ghosh <sohan.jyoti@samsung.com>
@@ -768,6 +795,7 @@
 Soorya R <soorya.r@samsung.com>
 Soren Dreijer <dreijerbit@gmail.com>
 Srirama Chandra Sekhar Mogali <srirama.m@samsung.com>
+Staphany Park <stapark008@gmail.com>
 Stephen Searles <stephen.searles@gmail.com>
 Steve Sanders <steve@zanderz.com>
 Steven Pennington <spenn@engr.uvic.ca>
@@ -781,7 +809,6 @@
 Sunchang Li <johnstonli@tencent.com>
 Suneel Kota <suneel.kota@samsung.com>
 Sungguk Lim <limasdf@gmail.com>
-Sunghoon Kim <shoon.kim@lge.com>
 Sungmann Cho <sungmann.cho@gmail.com>
 Sungmann Cho <sungmann.cho@navercorp.com>
 Sunil Ratnu <sunil.ratnu@samsung.com>
@@ -813,12 +840,14 @@
 Tibor Dusnoki <tibor.dusnoki.91@gmail.com>
 Tim Ansell <mithro@mithis.com>
 Tim Niederhausen <tim@rnc-ag.de>
+Timo Gurr <timo.gurr@gmail.com>
 Timo Reimann <ttr314@googlemail.com>
 Timo Witte <timo.witte@gmail.com>
 Tom Callaway <tcallawa@redhat.com>
 Tom Harwood <tfh@skip.org>
 Tomas Popela <tomas.popela@gmail.com>
 Torsten Kurbad <google@tk-webart.de>
+Trent Willis <trentmwillis@gmail.com>
 Trevor Perrin <unsafe@trevp.net>
 Tripta Gupta <tripta.g@samsung.com>
 U. Artie Eoff <ullysses.a.eoff@intel.com>
@@ -829,6 +858,7 @@
 Valentin Ilie <valentin.ilie@intel.com>
 Vamshikrishna Yellenki <vamshi@motorola.com>
 Vani Hegde <vani.hegde@samsung.com>
+Varun Chowdhary Paturi <v.paturi@samsung.com>
 Vartul Katiyar <vartul.k@samsung.com>
 Vedran Šajatović <vedran.sajatovic@gmail.com>
 Vernon Tang <vt@foilhead.net>
@@ -842,15 +872,12 @@
 Vivek Galatage <vivek.vg@samsung.com>
 Volker Sorge <volker.sorge@gmail.com>
 Waihung Fu <fufranci@amazon.com>
-Wanchang Ryu <wanchang.ryu@lge.com>
-Wang Qing <wangqing-hf@loongson.cn>
 WenSheng He <wensheng.he@samsung.com>
 Wesley Lancel <wesleylancel@gmail.com>
 Wesley Wigham <t-weswig@microsoft.com>
 Wesley Wigham <wwigham@gmail.com>
 Will Hirsch <chromium@willhirsch.co.uk>
 Will Shackleton <w.shackleton@gmail.com>
-William Xie <william.xie@chromium.org>
 William Xie <william.xie@intel.com>
 Xiang Long <xiang.long@intel.com>
 Xiangze Zhang <xiangze.zhang@intel.com>
@@ -869,16 +896,17 @@
 Xunran Ding <xunran.ding@samsung.com>
 Xunran Ding <dingxunran@gmail.com>
 Yael Aharon <yael.aharon@intel.com>
-Yair Yogev <progame@chromium.org>
 Yan Wang <yan0422.wang@samsung.com>
 Yang Gu <yang.gu@intel.com>
 Yannic Bonenberger <contact@yannic-bonenberger.com>
 Yarin Kaul <yarin.kaul@gmail.com>
+Yash Vempati <vempatiy@amazon.com>
 Ye Liu <cbakgly@gmail.com>
 Yeol Park <peary2@gmail.com>
 Yi Shen <yi.shen@samsung.com>
 Yi Sun <ratsunny@gmail.com>
 Yichen Jiang <jiangyichen123@gmail.com>
+Yifei Yu <yuyifei@xiaomi.com>
 Yizhou Jiang <yizhou.jiang@intel.com>
 Yoav Weiss <yoav@yoav.ws>
 Yoav Zilberberg <yoav.zilberberg@gmail.com>
@@ -889,17 +917,19 @@
 Yoonjae Cho <yoonjae.cho92@gmail.com>
 Yoshinori Sano <yoshinori.sano@gmail.com>
 Youngho Seo <hazivoo@gmail.com>
-Youngho Yoo <youngho33.yoo@lge.com>
+Youngjin Choi <cyjin9.yc@gmail.com>
 YoungKi Hong <simon.hong81@gmail.com>
 Youngmin Yoo <youngmin.yoo@samsung.com>
 Youngsoo Choi <kenshin.choi@samsung.com>
 Youngsun Suh <zard17@gmail.com>
+Yuhong Sha <yuhong.sha@samsung.com>
 Yumikiyo Osanai <yumios.art@gmail.com>
 Yunchao He <yunchao.he@intel.com>
-Yunsik Jang <yunsik.jang@lge.com>
 Yupei Wang <perryuwang@tencent.com>
+Yura Yaroshevich <yura.yaroshevich@gmail.com>
 Yuri Gorobets <yuri.gorobets@gmail.com>
 Yuriy Taraday <yorik.sar@gmail.com>
+Yuvanesh Natarajan <yuvanesh.n1@samsung.com>
 Zeno Albisser <zeno.albisser@digia.com>
 Zeqin Chen <talonchen@tencent.com>
 Zhaoze Zhou <zhaoze.zhou@partner.samsung.com>
@@ -914,12 +944,16 @@
 Zoltan Kuscsik <zoltan.kuscsik@linaro.org>
 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
 方觉 (Fang Jue) <fangjue23303@gmail.com>
+Rajesh Mahindra <rmahindra@uber.com>
+Yuan-Pin Yu <yjames@uber.com>
+Vinoth Chandar <vinoth@uber.com>
 
 ACCESS CO., LTD. <*@access-company.com>
 Akamai Inc. <*@akamai.com>
 ARM Holdings <*@arm.com>
 BlackBerry Limited <*@blackberry.com>
 Canonical Limited <*@canonical.com>
+Cloudflare, Inc. <*@cloudflare.com>
 Code Aurora Forum <*@codeaurora.org>
 Collabora Limited <*@collabora.com>
 Comodo CA Limited
@@ -938,10 +972,12 @@
 Loongson Technology Corporation Limited. <*@loongson.cn>
 Macadamian <*@macadamian.com>
 MIPS Technologies, Inc. <*@mips.com>
+Mozilla Corporation <*@mozilla.com>
 Neverware Inc. <*@neverware.com>
 NIKE, Inc. <*@nike.com>
 NVIDIA Corporation <*@nvidia.com>
 Opera Software ASA <*@opera.com>
+Optical Tone Ltd <*@opticaltone.com>
 Seznam.cz, a.s. <*@firma.seznam.cz>
 Spotify AB <*@spotify.com>
 Tableau Software <*@tableau.com>
@@ -949,6 +985,8 @@
 The Chromium Authors <*@chromium.org>
 The MathWorks, Inc. <binod.pant@mathworks.com>
 Torchmobile Inc.
+Upwork <*@cloud.upwork.com>
 Venture 3 Systems LLC <*@venture3systems.com>
 Vewd Software AS <*@vewd.com>
+Vivaldi Technologies AS <*@vivaldi.com>
 Yandex LLC <*@yandex-team.ru>
diff --git a/BUILD.gn b/BUILD.gn
index d488d53..2543a3a 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -13,14 +13,15 @@
 import("//build/config/sanitizers/sanitizers.gni")
 import("//build/config/ui.gni")
 import("//components/nacl/features.gni")
-import("//device/vr/features/features.gni")
-import("//extensions/features/features.gni")
+import("//device/vr/buildflags/buildflags.gni")
+import("//extensions/buildflags/buildflags.gni")
 import("//media/media_options.gni")
 import("//media/gpu/args.gni")
 import("//remoting/remoting_enable.gni")
 import("//third_party/openh264/openh264_args.gni")
 import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
 import("//ui/base/ui_features.gni")
+import("//ui/webui/webui_features.gni")
 import("//ui/ozone/ozone.gni")
 import("//v8/gni/v8.gni")
 import("//v8/snapshot_toolchain.gni")
@@ -67,6 +68,7 @@
     "//net:net_unittests",
     "//skia:skia_unittests",
     "//sql:sql_unittests",
+    "//tools/binary_size:binary_size_trybot_py",
     "//tools/ipc_fuzzer:ipc_fuzzer_all",
     "//ui/base:ui_base_unittests",
     "//url:url_unittests",
@@ -89,19 +91,22 @@
     ]
   }
 
+  if (closure_compile) {
+    deps += [ ":webui_closure_compile" ]
+  }
+
   if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) {
     deps += [
-      ":webui_closure_compile",
       "//chrome",
-      "//chrome/browser/resources/media_router/extension:all",
-      "//chrome/installer/zucchini:zucchini",
-      "//chrome/installer/zucchini:zucchini_unittests",
       "//chrome/test:browser_tests",
       "//chrome/test:interactive_ui_tests",
       "//chrome/test:sync_integration_tests",
       "//chrome/test/chromedriver:chromedriver_unittests",
+      "//components/subresource_filter/tools:subresource_filter_tools",
       "//components/sync/tools:sync_client",
       "//components/sync/tools:sync_listen_notifications",
+      "//components/zucchini:zucchini",
+      "//components/zucchini:zucchini_unittests",
       "//gpu/gles2_conform_support:gles2_conform_test",
       "//gpu/khronos_glcts_support:khronos_glcts_test",
       "//jingle:jingle_unittests",
@@ -136,11 +141,11 @@
       "//ppapi/examples/video_effects",
       "//ppapi/examples/video_encode",
       "//printing:printing_unittests",
+      "//third_party/SPIRV-Tools/src:SPIRV-Tools",
+      "//third_party/SPIRV-Tools/src/test/fuzzers",
       "//third_party/cacheinvalidation:cacheinvalidation_unittests",
       "//third_party/pdfium/samples:pdfium_test",
       "//third_party/webrtc/rtc_tools:frame_analyzer",
-      "//tools/battor_agent",
-      "//tools/battor_agent:battor_agent_unittests",
       "//tools/perf/clear_system_cache",
       "//tools/traffic_annotation/auditor:traffic_annotation_auditor",
       "//tools/traffic_annotation/auditor:traffic_annotation_auditor_unittests",
@@ -158,28 +163,24 @@
       "//content/test:content_perftests",
       "//content/test:content_unittests",
       "//gpu:gpu_unittests",
-      "//gpu/ipc/service:gpu_ipc_service_unittests",
       "//ipc:ipc_tests",
       "//media:media_unittests",
       "//media/midi:midi_unittests",
       "//media/mojo:media_mojo_unittests",
       "//mojo",
-      "//mojo/common:mojo_common_unittests",
-      "//mojo/edk/system:mojo_system_unittests",
-      "//mojo/edk/test:mojo_public_bindings_unittests",
-      "//mojo/edk/test:mojo_public_system_unittests",
+      "//mojo:mojo_unittests",
       "//net:net_perftests",
-      "//third_party/WebKit/Source/controller:webkit_unit_tests",
-      "//third_party/WebKit/Source/platform/wtf:wtf_unittests",
+      "//third_party/blink/renderer/controller:webkit_unit_tests",
+      "//third_party/blink/renderer/platform/wtf:wtf_unittests",
       "//ui/gl:gl_unittests",
       "//url/ipc:url_ipc_unittests",
     ]
   }
 
-  if (!is_ios && !is_android && !is_chromecast) {
+  if (!is_ios && !is_android) {
     deps += [
-      "//tools/gn",
-      "//tools/gn:gn_unittests",
+      "//components/cronet:cronet_tests",
+      "//components/cronet:cronet_unittests",
     ]
   }
 
@@ -188,6 +189,7 @@
       "//chrome/test:telemetry_perf_unittests",
       "//chrome/test:unit_tests",
       "//components:components_browsertests",
+      "//components/ui_devtools/viz_views",
       "//components/viz:viz_perftests",
       "//components/viz:viz_unittests",
       "//components/viz/common:viz_benchmark",
@@ -196,11 +198,12 @@
       "//media/capture:capture_unittests",
       "//media/cast:cast_unittests",
       "//storage:storage_unittests",
-      "//third_party/WebKit/Source/platform:blink_platform_unittests",
-      "//third_party/WebKit/Source/platform/heap:blink_heap_unittests",
       "//third_party/angle/src/tests:angle_end2end_tests",
       "//third_party/angle/src/tests:angle_unittests",
       "//third_party/angle/src/tests:angle_white_box_tests",
+      "//third_party/blink/common:blink_common_unittests",
+      "//third_party/blink/renderer/platform:blink_platform_unittests",
+      "//third_party/blink/renderer/platform/heap:blink_heap_unittests",
       "//third_party/catapult/telemetry:bitmaptools($host_toolchain)",
       "//third_party/smhasher:pmurhash",
       "//tools/imagediff($host_toolchain)",
@@ -250,16 +253,10 @@
     deps += [
       "//ui/ozone",
       "//ui/ozone:ozone_unittests",
+      "//ui/ozone/demo",
+      "//ui/ozone/gl:ozone_gl_unittests",
     ]
 
-    # TODO(crbug.com/766360): These require a working GL implementation.
-    if (!is_fuchsia) {
-      deps += [
-        "//ui/ozone/demo",
-        "//ui/ozone/gl:ozone_gl_unittests",
-      ]
-    }
-
     if (ozone_platform_x11) {
       deps += [ "//ui/ozone:ozone_x11_unittests" ]
     }
@@ -281,6 +278,7 @@
       "//build/android/gyp/test:hello_world",
       "//build/android/gyp/test:hello_world",
       "//build/android/stacktrace:java_deobfuscate",
+      "//chrome/android/webapk/shell_apk:maps_go_webapk",
       "//chrome/android/webapk/shell_apk:webapk",
       "//chrome/test/vr/perf:motopho_latency_test",
       "//components/invalidation/impl:components_invalidation_impl_junit_tests",
@@ -293,7 +291,6 @@
       "//net/android:net_junit_tests",
       "//services:service_junit_tests",
       "//testing/android/junit:junit_unit_tests",
-      "//third_party/android_async_task:android_async_task_java",
       "//third_party/catapult/devil",
       "//third_party/errorprone:errorprone_java",
       "//third_party/smhasher:murmurhash3",
@@ -304,7 +301,6 @@
       "//tools/android/customtabs_benchmark:customtabs_benchmark_apk",
       "//tools/android/errorprone_plugin:errorprone_plugin_java",
       "//tools/android/kerberos/SpnegoAuthenticator:spnego_authenticator_apk",
-      "//tools/cygprofile:cygprofile_unittests",
       "//ui/android:ui_junit_tests",
     ]
     deps -= [
@@ -320,7 +316,7 @@
         "//components/cronet/android:cronet_sample_test_apk",
         "//components/cronet/android:cronet_test_apk",
         "//components/cronet/android:cronet_test_instrumentation_apk",
-        "//components/cronet/android:cronet_unittests",
+        "//components/cronet/android:cronet_unittests_android",
       ]
     }
 
@@ -341,10 +337,7 @@
     }
 
     if (target_cpu != "x64") {
-      deps += [
-        "//content/shell/android:chromium_linker_test_apk",
-        "//third_party/android_platform:android_relocation_packer_unittests($host_toolchain)",
-      ]
+      deps += [ "//content/shell/android:chromium_linker_test_apk" ]
     }
 
     if (enable_chrome_android_internal) {
@@ -352,12 +345,22 @@
     }
   }
 
+  # NOTE: The following should really be 'is_android', but the fuzzing build
+  #       seems currently broken for this platform at the moment, and the
+  #       corresponding code build and works on Linux unmodified.
+  #       See instructions in the corresponding BUILD.gn.
+  if (is_linux) {
+    deps +=
+        [ "//third_party/android_crazy_linker:android_crazy_linker_zip_fuzzer" ]
+  }
+
   if (is_linux || is_android) {
     deps += [
       "//third_party/breakpad:breakpad_unittests",
       "//third_party/breakpad:core-2-minidump",
       "//third_party/breakpad:generate_test_dump",
       "//third_party/breakpad:minidump-2-core",
+      "//tools/dump_process_memory:dump_process",
     ]
   }
 
@@ -366,14 +369,15 @@
       "//ash:ash_content_unittests",
       "//ash:ash_shell_with_content",
       "//ash:ash_unittests",
+      "//ash/app_list:app_list_demo",
+      "//ash/app_list:app_list_unittests",
       "//chromeos:chromeos_unittests",
       "//chromeos/components:chromeos_components_unittests",
+      "//chromeos/components/proximity_auth:proximity_auth_unittests",
+      "//chromeos/services:chromeos_services_unittests",
       "//components/session_manager/core",
-      "//ui/app_list:app_list_demo",
-      "//ui/app_list:app_list_unittests",
-      "//ui/app_list/presenter:app_list_presenter_unittests",
-      "//ui/arc:ui_arc_unittests",
       "//ui/chromeos:ui_chromeos_unittests",
+      "//ui/keyboard:keyboard_unittests",
     ]
   }
 
@@ -429,7 +433,6 @@
       "//base:build_utf8_validator_tables",
       "//base:check_example",
       "//cc:cc_perftests",
-      "//cc/blink:cc_blink_unittests",
       "//components:components_perftests",
       "//device:device_unittests",
       "//gin:gin_shell",
@@ -458,10 +461,7 @@
         "//media/cast:generate_barcode_video",
         "//media/cast:generate_timecode_audio",
         "//net:crash_cache",
-        "//net:crl_set_dump",
         "//net:dns_fuzz_stub",
-        "//net:gdig",
-        "//net:get_server_time",
         "//net:net_watcher",  # TODO(GYP): This should be conditional on use_v8_in_net
         "//net:run_testserver",
         "//net:stress_cache",
@@ -478,6 +478,9 @@
         "//extensions/shell:app_shell",
         "//extensions/shell/installer:app_shell_installer",
       ]
+      if (is_desktop_linux && is_official_build) {
+        deps += [ "//extensions/shell:app_shell_linux_symbols" ]
+      }
     }
 
     if (enable_nacl) {
@@ -506,7 +509,7 @@
       "//components/network_hints/browser",
       "//content/public/app:browser",
       "//content/public/app:child",
-      "//mojo/edk/test:mojo_public_system_perftests",
+      "//mojo:mojo_perftests",
       "//services/service_manager/public/cpp",
       "//testing/gmock:gmock_main",
       "//third_party/breakpad:dump_syms($host_toolchain)",
@@ -524,7 +527,6 @@
         "//skia:filter_fuzz_stub",
         "//skia:image_operations_bench",
         "//third_party/sqlite:sqlite_shell",
-        "//ui/keyboard:keyboard_unittests",
         "//ui/snapshot:snapshot_unittests",
       ]
 
@@ -557,15 +559,18 @@
   if (is_win) {
     deps += [
       "//base:pe_image_test",
+      "//chrome/chrome_cleaner:chrome_cleaner_unittests",
+      "//chrome/elevation_service:elevation_service_unittests",
       "//chrome/install_static:install_static_unittests",
       "//chrome/installer/gcapi",
       "//chrome/installer/setup:setup_unittests",
-      "//chrome/tools/build/win/syzygy:chrome_dll_syzygy",
+      "//chrome/notification_helper:notification_helper_unittests",
       "//chrome_elf:chrome_elf_import_unittests",
       "//chrome_elf:chrome_elf_unittests",
       "//chrome_elf:dll_hash_main",
       "//cloud_print:cloud_print_unittests",
       "//components/wifi:wifi_test",
+      "//components/zucchini",
       "//net:quic_client",
       "//net:quic_server",
       "//sandbox/win:pocdll",
@@ -582,9 +587,10 @@
       "//tools/win/chromeexts:chromeexts",
     ]
 
-    if (!(is_component_build && is_debug && target_cpu == "x86")) {
-      deps +=
-          [ "//chrome/installer/mini_installer:next_version_mini_installer" ]
+    # TODO(thakis): Enable this in cross builds, https://crbug.com/799827
+    if (!(is_component_build && is_debug && target_cpu == "x86") &&
+        host_os == "win") {
+      deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
     }
   } else if (!is_android && !is_ios && !is_fuchsia) {
     deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
@@ -594,7 +600,7 @@
     deps += [ "//chromecast:cast_shell" ]
   }
 
-  if (is_mac || is_win) {
+  if (is_mac || is_win || is_android || (is_linux && !is_chromeos)) {
     deps += [
       "//third_party/crashpad/crashpad:crashpad_tests",
       "//third_party/crashpad/crashpad/handler:crashpad_handler",
@@ -618,17 +624,11 @@
     deps += [ "//content/browser/bluetooth/tools:bluetooth_metrics_hash" ]
   }
 
-  if (!is_android && !is_ios && !is_chromeos && !is_fuchsia) {
-    deps += [ "//components/proximity_auth:proximity_auth_unittests" ]
-  }
-
   if (is_win || is_linux) {
     deps += [
       "//mash:all",
       "//media/mojo/services:media_service_unittests",
       "//mojo",
-      "//services/ui/demo",
-      "//services/ui/ws:tests",
       "//ui/views/mus:views_mus_interactive_ui_tests",
       "//ui/views/mus:views_mus_unittests",
     ]
@@ -651,10 +651,10 @@
       "//chrome/installer/util:strings",
       "//chrome/tools/convert_dict",
       "//components/constrained_window:unit_tests",
-      "//components/filesystem:filesystem_service_unittests",
-      "//components/leveldb:leveldb_service_unittests",
       "//components/metrics:serialization",
       "//components/rappor:unit_tests",
+      "//components/services/filesystem:filesystem_service_unittests",
+      "//components/services/leveldb:leveldb_service_unittests",
       "//components/sessions:unit_tests",
       "//media/blink:media_blink_unittests",
       "//media/cast:udp_proxy",
@@ -735,6 +735,8 @@
       "//headless",
       "//headless:headless_shell",
       "//headless:headless_tests",
+      "//webrunner",
+      "//webrunner:webrunner_unittests",
     ]
   }
 }
@@ -742,8 +744,14 @@
 if (is_fuchsia) {
   # TODO(https://crbug.com/731217): This can't practically be in //v8 without
   # duplicating all the Fuchsia running infrastructure there.
-  fuchsia_executable_runner("d8_fuchsia") {
-    exe_target = "//v8:d8"
+  fuchsia_package("d8_fuchsia_pkg") {
+    binary = "//v8:d8"
+    package_name_override = "d8"
+  }
+
+  fuchsia_package_runner("d8_fuchsia") {
+    package = ":d8_fuchsia_pkg"
+    package_name_override = "d8"
   }
 }
 
@@ -758,6 +766,7 @@
       "//cloud_print",
       "//cloud_print/virtual_driver/win/port_monitor:copy_gcp_portmon_binaries",
       "//components/policy:pack_policy_templates",
+      "//components/zucchini",
       "//courgette",
       "//courgette:copy_courgette_binaries",
       "//remoting/webapp",
@@ -796,24 +805,6 @@
       "//url:url_unittests",
     ]
   }
-
-  group("All_syzygy") {
-    if (is_syzyasan) {
-      deps = [
-        "//chrome/installer/mini_installer:mini_installer",
-        "//chrome/installer/mini_installer:mini_installer_syzygy",
-      ]
-    }
-  }
-
-  if (is_syzyasan) {
-    group("chrome_official_syzyasan_builder") {
-      deps = [
-        ":All_syzygy",
-        ":chrome_official_builder_no_unittests",
-      ]
-    }
-  }
 }
 
 if (is_chromeos) {
@@ -851,7 +842,7 @@
 
   if (!is_ios) {
     deps += [ "//v8:postmortem-metadata" ]
-    if (v8_use_snapshot) {
+    if (v8_use_snapshot && !v8_use_external_startup_data) {
       deps += [ "//v8:v8_snapshot" ]
     }
   }
@@ -865,12 +856,12 @@
 
     deps = [
       ":webkit_layout_tests",
-      "//third_party/WebKit/public:all_blink",
+      "//third_party/blink/public:all_blink",
     ]
   }
 
   # Layout tests runner
-  # third_party/WebKit/Tools/Scripts/run-webkit-tests
+  # third_party/blink/tools/run_web_tests.py
   group("run_webkit_tests") {
     testonly = true
     deps = [
@@ -906,13 +897,15 @@
       "//device/bluetooth/public/mojom:fake_bluetooth_interfaces_js_data_deps",
       "//device/usb/public/mojom:mojom_js_data_deps",
       "//device/vr/public/mojom:mojom_js_data_deps",
-      "//media/capture/mojo:image_capture_js_data_deps",
+      "//media/capture/mojom:image_capture_js_data_deps",
       "//mojo/public/interfaces/bindings/tests:test_data_deps",
-      "//services/device/public/interfaces:interfaces_js_data_deps",
-      "//services/device/public/interfaces:generic_sensor_js_data_deps",
+      "//mojo/public/mojom/base:base_js_data_deps",
       "//services/shape_detection/public/mojom:mojom_js_data_deps",
-      "//third_party/WebKit/public:blink_devtools_frontend_resources_files",
-      "//third_party/WebKit/public:mojo_bindings_js_data_deps",
+      "//services/device/public/mojom:mojom_js_data_deps",
+      "//services/device/public/mojom:generic_sensor_js_data_deps",
+      "//skia/public/interfaces:interfaces_js_data_deps",
+      "//third_party/blink/public:blink_devtools_frontend_resources_files",
+      "//third_party/blink/public:mojo_bindings_js_data_deps",
       "//third_party/mesa:osmesa",
       "//tools/imagediff",
     ]
@@ -955,8 +948,9 @@
       "//testing/scripts/run_isolated_script_test.py",
       "//testing/xvfb.py",
       "//third_party/WebKit/LayoutTests/",
-      "//third_party/WebKit/PerformanceTests/",
-      "//third_party/WebKit/Tools/Scripts/",
+      "//third_party/blink/perf_tests/",
+      "//third_party/blink/tools/",
+      "//third_party/pywebsocket/src/mod_pywebsocket/",
     ]
 
     if (is_win) {
@@ -1006,13 +1000,14 @@
       "//third_party/WebKit/LayoutTests/SlowTests",
       "//third_party/WebKit/LayoutTests/TestExpectations",
       "//third_party/WebKit/LayoutTests/VirtualTestSuites",
-      "//third_party/WebKit/Source/bindings/scripts/",
-      "//third_party/WebKit/Tools/Scripts/",
+      "//third_party/blink/renderer/bindings/scripts/",
+      "//third_party/blink/renderer/build/scripts/",
       "//third_party/blink/tools/",
       "//third_party/catapult/common/py_utils/",
       "//third_party/catapult/devil/",
       "//third_party/catapult/dependency_manager/",
       "//third_party/catapult/third_party/zipfile/",
+      "//third_party/catapult/third_party/typ/",
       "//third_party/depot_tools/pylint.py",
       "//third_party/depot_tools/pylintrc",
       "//third_party/depot_tools/third_party/logilab/",
@@ -1020,7 +1015,6 @@
       "//third_party/depot_tools/third_party/pylint.py",
       "//third_party/ply/",
       "//third_party/pymock/",
-      "//third_party/typ/",
       "//tools/idl_parser/",
     ]
   }
@@ -1034,7 +1028,7 @@
       "//cc:cc_perftests",
       "//chrome/test:load_library_perf_tests",
       "//chrome/test:performance_test_suite",
-      "//chrome/test:telemetry_perf_tests",
+      "//chrome/test:telemetry_perf_tests_without_chrome",
       "//components/tracing:tracing_perftests",
       "//gpu:command_buffer_perftests",
       "//gpu:gpu_perftests",
@@ -1067,7 +1061,10 @@
           [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
     }
     if (is_win || is_android) {
-      data_deps += [ "//chrome/test:angle_perftests" ]
+      data_deps += [
+        "//components:components_perftests",
+        "//chrome/test:angle_perftests",
+      ]
     }
   }
 }
@@ -1088,7 +1085,10 @@
       ]
     }
     if (enable_ipc_fuzzer && !is_component_build) {
-      deps += [ "//tools/ipc_fuzzer:ipc_fuzzer_all" ]
+      deps += [
+        "//chrome/app:service_manifests",
+        "//tools/ipc_fuzzer:ipc_fuzzer_all",
+      ]
     }
     if (!is_chromeos) {
       deps += [
@@ -1096,12 +1096,6 @@
         "//v8:v8_shell($v8_snapshot_toolchain)",
       ]
     }
-    if (is_win && symbol_level == 2 && target_cpu == "x86" && is_syzyasan) {
-      deps += [
-        "//chrome/tools/build/win/syzygy:chrome_dll_syzygy",
-        "//content/shell:content_shell_syzyasan",
-      ]
-    }
   }
 }
 
@@ -1145,10 +1139,22 @@
       "Do not use a platform name in your output directory (found \"$root_build_dir\"). http://crbug.com/548283")
 }
 
-group("webui_closure_compile") {
-  data_deps = []
-  if (is_chromeos) {
-    data_deps += [ "//chrome/browser/resources/chromeos/login:closure_compile" ]
+if (closure_compile) {
+  group("webui_closure_compile") {
+    data_deps = [
+      "chrome/browser/resources:closure_compile",
+      "content/browser/resources:closure_compile",
+      "ui/webui/resources:closure_compile",
+    ]
+    if (is_chromeos) {
+      data_deps += [ "ui/file_manager:closure_compile" ]
+    }
+    if (is_android) {
+      data_deps += [ "components/offline_pages/resources:closure_compile" ]
+    }
+    if (is_win && is_chrome_branded) {
+      data_deps += [ "components/nux_google_apps/resources:closure_compile" ]
+    }
   }
 }
 
diff --git a/DEPS b/DEPS
index 169cc9a..195db254 100644
--- a/DEPS
+++ b/DEPS
@@ -28,6 +28,9 @@
 
 gclient_gn_args_file = 'src/build/config/gclient_args.gni'
 gclient_gn_args = [
+  'build_with_chromium',
+  'checkout_android',
+  'checkout_android_native_support',
   'checkout_libaom',
   'checkout_nacl',
   'checkout_oculus_sdk',
@@ -35,12 +38,25 @@
 
 
 vars = {
+  # Variable that can be used to support multiple build scenarios, like having
+  # Chromium specific targets in a client project's GN file or sync dependencies
+  # conditionally etc.
+  'build_with_chromium': True,
+
   # By default, we should check out everything needed to run on the main
   # chromium waterfalls. This var can be also be set to "small", in order
   # to skip things are not strictly needed to build chromium for development
   # purposes.
   'checkout_configuration': 'default',
 
+  # Pull in Android native toolchain dependencies for Chrome OS too, so we can
+  # build ARC++ support libraries.
+  'checkout_android_native_support': 'checkout_android or checkout_chromeos',
+
+  # By default, do not check out android sdk sources. This can be overridden
+  # e.g. with custom_vars.
+  'checkout_android_sdk_sources': False,
+
   # Check out and download nacl by default. This can be disabled e.g. with
   # custom_vars.
   'checkout_nacl': True,
@@ -58,12 +74,22 @@
   'checkout_libaom': True,
 
   # By default do not check out the Oculus SDK. Only available for Googlers.
-  'checkout_oculus_sdk' : False,
+  'checkout_oculus_sdk' : 'checkout_src_internal and checkout_win',
 
   # TODO(dpranke): change to != "small" once != is supported.
   'checkout_traffic_annotation_tools': 'checkout_configuration == "default"',
   'checkout_instrumented_libraries': 'checkout_linux and checkout_configuration == "default"',
 
+  # Default to the empty board. Desktop Chrome OS builds don't need cros SDK
+  # dependencies. Other Chrome OS builds should always define this explicitly.
+  'cros_board': '',
+  # Surround the board var in quotes so gclient doesn't try parsing the string
+  # as an expression.
+  'cros_download_vm': '"{cros_board}" == "amd64-generic"',
+
+  # ANGLE's deps are relative to the angle_root variable.
+  'angle_root': 'src/third_party/angle',
+
   'android_git': 'https://android.googlesource.com',
   'aomedia_git': 'https://aomedia.googlesource.com',
   'chromium_git': 'https://chromium.googlesource.com',
@@ -75,43 +101,43 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling sfntly
   # and whatever else without interference from each other.
-  'sfntly_revision': '16f3404e41edc9708a51fbce481f22e46b809686',
+  'sfntly_revision': '2804148152d27fa2e6ec97a32bc2d56318e51142',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling Skia
   # and whatever else without interference from each other.
-  'skia_revision': '6ce969472e2ede1e3d6549579c095a12c2d576ca',
+  'skia_revision': 'bc6f9c9a8c6b83bc91496c28d85541855747a5da',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
-  'v8_revision': '154036696b17284282f18fa7769a0c78e76ef719',
+  'v8_revision': '4fe3de13fc5c2592559bb5e49e1a81a6d09a2efd',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling swarming_client
   # and whatever else without interference from each other.
-  'swarming_revision': '88229872dd17e71658fe96763feaa77915d8cbd6',
+  'swarming_revision': '486c9b53c4d54dd4b95bb6ce0e31160e600dfc11',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling ANGLE
   # and whatever else without interference from each other.
-  'angle_revision': '2f23f35afb94cd94f0f73192893982eb6ff83f02',
+  'angle_revision': '9b6a3f92603260e8b324fa3e0e2936f4bf5ae414',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling build tools
   # and whatever else without interference from each other.
-  'buildtools_revision': 'a09e064635a49f08e585e3b173d5fbc3dd3f485e',
+  'buildtools_revision': '9a90d9aaadeb5e04327ed05775f45132e4b3523f',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling SwiftShader
   # and whatever else without interference from each other.
-  'swiftshader_revision': 'b1d452eaeeb8272e37b87446511f2e0e95d27e6f',
+  'swiftshader_revision': '9e22c542d6be9bdc4066a224264b9d3a1fb73018',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling PDFium
   # and whatever else without interference from each other.
-  'pdfium_revision': '2f68cb53f5938e2dd572db79fc5689c987cb350d',
+  'pdfium_revision': '4174b5ab6ac9024acb9b42acbb61d628a2a679e3',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling openmax_dl
   # and whatever else without interference from each other.
-  'openmax_dl_revision': 'b611996df3b8f6b151339d22c12c21f167009cb6',
+  'openmax_dl_revision': '59265e0e9105ec94e473b59c5c7ca1941e4dbd83',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling BoringSSL
   # and whatever else without interference from each other.
-  'boringssl_revision': '61dedd681501616de5928fe5c0eac6640d4de0c1',
+  'boringssl_revision': '6410e18e9190b6b0c71955119fbf3cae1b9eedb7',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling google-toolbox-for-mac
   # and whatever else without interference from each other.
@@ -127,19 +153,23 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling NaCl
   # and whatever else without interference from each other.
-  'nacl_revision': '8ad1515975c09beebd2e9ea69c1f9c5ba88a5bbf',
+  'nacl_revision': '96088f46727b75b2f6a24e1b62e5cc59ddb4612d',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling freetype
   # and whatever else without interference from each other.
-  'freetype_revision': '4a03f17449ae45f0dacf4de4694ccd6e5e1b24d1',
+  'freetype_revision': '578bcf103a12fb742cdb314565819011d1ac12a7',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling HarfBuzz
+  # and whatever else without interference from each other.
+  'harfbuzz_revision': '2b76767bf572364d3d647cdd139f2044a7ad06b2',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling catapult
   # and whatever else without interference from each other.
-  'catapult_revision': 'e7298f36f7912f2caa122086cfbe71734d04b73f',
+  'catapult_revision': '0d25dda9b148bcd2dad9e1080b1dc57eaf9d2c2a',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
-  'libfuzzer_revision': 'ba2c1cd6f87accb32b5dbce297387c56a2e53a2f',
+  'libfuzzer_revision': '658ff786a213703ff0df6ba4a288e9a1e218c074',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling devtools-node-modules
   # and whatever else without interference from each other.
@@ -148,6 +178,46 @@
   # the commit queue can handle CLs rolling libprotobuf-mutator
   # and whatever else without interference from each other.
   'libprotobuf-mutator': '3fc43a01d721ef1bacfefed170bc22abf1b8b051',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling feed
+  # and whatever else without interference from each other.
+  'feed_revision': '180fca04760493784b3183a2220fce639e96f1a5',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling android_sdk_build-tools_version
+  # and whatever else without interference from each other.
+  'android_sdk_build-tools_version': 'version:27.0.3-cr0',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling android_sdk_emulator_version
+  # and whatever else without interference from each other.
+  'android_sdk_emulator_version': 'version:27.1.12-cr0',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling android_sdk_extras_version
+  # and whatever else without interference from each other.
+  'android_sdk_extras_version': 'version:47.0.0-cr0',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling android_sdk_platform-tools_version
+  # and whatever else without interference from each other.
+  'android_sdk_platform-tools_version': 'version:27.0.1-cr0',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling android_sdk_platforms_version
+  # and whatever else without interference from each other.
+  'android_sdk_platforms_version': 'version:android-27-cr0',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling android_sdk_sources_version
+  # and whatever else without interference from each other.
+  'android_sdk_sources_version': 'version:android-27-cr1',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling android_sdk_tools_version
+  # and whatever else without interference from each other.
+  'android_sdk_tools_version': 'version:26.1.1-cr9',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling feed
+  # and whatever else without interference from each other.
+  'spv_tools_revision': '714bf84e58abd9573488fc365707fb8f288ca73c',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling feed
+  # and whatever else without interference from each other.
+  'spv_headers_revision': 'ff684ffc6a35d2a58f0f63108877d0064ea33feb',
 }
 
 # Only these hosts are allowed for dependencies in this DEPS file.
@@ -156,6 +226,7 @@
   'android.googlesource.com',
   'aomedia.googlesource.com',
   'boringssl.googlesource.com',
+  'chrome-infra-packages.appspot.com',
   'chrome-internal.googlesource.com',
   'chromium.googlesource.com',
   'pdfium.googlesource.com',
@@ -166,7 +237,7 @@
 
 deps = {
   'src/chrome/browser/resources/media_router/extension/src':
-    Var('chromium_git') + '/media_router.git' + '@' + '6fc8d5201d0998eb5575dc389409d74e67b2b981',
+    Var('chromium_git') + '/media_router.git' + '@' + '475baa8b2eb0a7a9dd1c96c9c7a6a8d9035cc8d7',
 
   'src/buildtools':
     Var('chromium_git') + '/chromium/buildtools.git' + '@' +  Var('buildtools_revision'),
@@ -182,14 +253,28 @@
   'src/chrome/test/data/perf/frame_rate/content':
     Var('chromium_git') + '/chromium/frame_rate/content.git' + '@' + 'c10272c88463efeef6bb19c9ec07c42bc8fe22b9',
 
-  'src/chrome/test/data/vr/webvr_info':
+  'src/chrome/test/data/xr/webvr_info':
     Var('chromium_git') + '/external/github.com/toji/webvr.info.git' + '@' + 'c58ae99b9ff9e2aa4c524633519570bf33536248',
 
+  'src/chrome/test/data/xr/webxr_samples':
+    Var('chromium_git') + '/external/github.com/immersive-web/webxr-samples.git' + '@' + 'cf02f19c4ff6894705a9407722ab52551e010c60',
+
   'src/ios/third_party/earl_grey/src': {
-      'url': Var('chromium_git') + '/external/github.com/google/EarlGrey.git' + '@' + '2fd8a7d4b76f820fb95bce495c0ceb324dbe3edb',
+      'url': Var('chromium_git') + '/external/github.com/google/EarlGrey.git' + '@' + '451b6497352d0731e9827a338f32024e564078c6',
       'condition': 'checkout_ios',
   },
 
+  'src/ios/third_party/firebase': {
+      'packages': [
+        {
+          'package': 'chromium/third_party/firebase_ios',
+          'version': 'version:5.0.1',
+        },
+      ],
+      'condition': 'checkout_ios',
+      'dep_type': 'cipd',
+  },
+
   'src/ios/third_party/fishhook/src': {
       'url': Var('chromium_git') + '/external/github.com/facebook/fishhook.git' + '@' + 'd172d5247aa590c25d0b1885448bae76036ea22c',
       'condition': 'checkout_ios',
@@ -201,7 +286,7 @@
   },
 
   'src/ios/third_party/material_components_ios/src': {
-      'url': Var('chromium_git') + '/external/github.com/material-components/material-components-ios.git' + '@' + '686cc976347618f75c9de58d4c1c220eaa8b4976',
+      'url': Var('chromium_git') + '/external/github.com/material-components/material-components-ios.git' + '@' + '3a50c7a3b2f4ec760d2d2405b6b9787e5493c049',
       'condition': 'checkout_ios',
   },
 
@@ -236,7 +321,7 @@
   },
 
   'src/ios/third_party/motion_animator_objc/src': {
-      'url': Var('chromium_git') + '/external/github.com/material-motion/motion-animator-objc.git' + '@' + 'ff39ecc69fdee46d388cc9f882201d54c3d5039c',
+      'url': Var('chromium_git') + '/external/github.com/material-motion/motion-animator-objc.git' + '@' + '5df831026445004b2fc0f6a42f8b8f33af46512b',
       'condition': 'checkout_ios',
   },
 
@@ -251,29 +336,141 @@
   },
 
   'src/media/cdm/api':
-    Var('chromium_git') + '/chromium/cdm.git' + '@' + '1a21842c5f6e1c4055f9f3c76c3526b66e565df5',
+    Var('chromium_git') + '/chromium/cdm.git' + '@' + '50431fd832bbf389ee839e3f8cb68e82606f0513',
 
   'src/native_client': {
       'url': Var('chromium_git') + '/native_client/src/native_client.git' + '@' + Var('nacl_revision'),
       'condition': 'checkout_nacl',
   },
 
+  'src/tools/luci-go': {
+      'packages': [
+        {
+          'package': 'infra/tools/luci/isolate/${{platform}}',
+          'version': 'git_revision:bc125484b8513898f17bc2501ac5e95330f44a3b',
+        },
+      ],
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/spirv-headers/src':
+    Var('chromium_git') + '/external/github.com/KhronosGroup/SPIRV-Headers.git@' +
+        Var('spv_headers_revision'),
+
   'src/third_party/SPIRV-Tools/src':
-    Var('chromium_git') + '/external/github.com/KhronosGroup/SPIRV-Tools.git' + '@' + '9166854ac93ef81b026e943ccd230fed6c8b8d3c',
+    Var('chromium_git') + '/external/github.com/KhronosGroup/SPIRV-Tools.git@' +
+        Var('spv_tools_revision'),
+
+  'src/third_party/accessibility_test_framework': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/accessibility-test-framework',
+              'version': 'version:2.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
 
   'src/third_party/android_protobuf/src': {
-      'url': Var('chromium_git') + '/external/android_protobuf.git' + '@' + '7fca48d8ce97f7ba3ab8eea5c472f1ad3711762f',
+      'url': Var('android_git') + '/platform/external/protobuf.git' + '@' + '7fca48d8ce97f7ba3ab8eea5c472f1ad3711762f',
       'condition': 'checkout_android',
   },
 
   'src/third_party/android_ndk': {
-      'url': Var('chromium_git') + '/android_ndk.git' + '@' + 'e951c37287c7d8cd915bf8d4149fd4a06d808b55',
+      'url': Var('chromium_git') + '/android_ndk.git' + '@' + '5cd86312e794bdf542a3685c6f10cbb96072990b',
+      'condition': 'checkout_android_native_support',
+  },
+
+  'src/third_party/android_support_test_runner': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_support_test_runner',
+              'version': 'version:0.5-cr0',
+          },
+      ],
       'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_system_sdk': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_system_sdk',
+              'version': 'version:28-dp3-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
   },
 
   'src/third_party/android_tools': {
-      'url': Var('chromium_git') + '/android_tools.git' + '@' + '9a70d48fcdd68cd0e7e968f342bd767ee6323bd1',
+      'url': Var('chromium_git') + '/android_tools.git' + '@' + '130499e25286f4d56acafa252fee09f3cc595c49',
+      'condition': 'checkout_android_native_support',
+  },
+
+  'src/third_party/android_build_tools/aapt2': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_tools_aapt2',
+              'version': 'version:3.2.0-alpha18-4804415-cr0',
+          },
+      ],
       'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_build_tools/bundletool': {
+      'packages': [
+          {
+       'package': 'chromium/third_party/android_tools_bundletool',
+       'version': 'version:0.5.0-cr0',
+   },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_sdk/public': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_sdk/public/build-tools',
+              'version': Var('android_sdk_build-tools_version'),
+          },
+          {
+              'package': 'chromium/third_party/android_sdk/public/emulator',
+              'version': Var('android_sdk_emulator_version'),
+          },
+          {
+              'package': 'chromium/third_party/android_sdk/public/extras',
+              'version': Var('android_sdk_extras_version'),
+          },
+          {
+              'package': 'chromium/third_party/android_sdk/public/platform-tools',
+              'version': Var('android_sdk_platform-tools_version'),
+          },
+          {
+              'package': 'chromium/third_party/android_sdk/public/platforms',
+              'version': Var('android_sdk_platforms_version'),
+          },
+          {
+              'package': 'chromium/third_party/android_sdk/public/tools',
+              'version': Var('android_sdk_tools_version'),
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_sdk/sources': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_sdk/sources',
+              'version': Var('android_sdk_sources_version'),
+          },
+      ],
+      'condition': 'checkout_android_sdk_sources',
+      'dep_type': 'cipd',
   },
 
   'src/third_party/angle':
@@ -284,11 +481,33 @@
       'condition': 'checkout_android',
   },
 
+  'src/third_party/apk-patch-size-estimator': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/apk-patch-size-estimator',
+              'version': 'version:0.2-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
   'src/third_party/auto/src': {
       'url': Var('chromium_git') + '/external/github.com/google/auto.git' + '@' + '8a81a858ae7b78a1aef71ac3905fade0bbd64e82',
       'condition': 'checkout_android',
   },
 
+  'src/third_party/bazel': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/bazel',
+              'version': 'version:0.10.0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
   'src/third_party/bidichecker':
     Var('chromium_git') + '/external/bidichecker/lib.git' + '@' + '97f2aa645b74c28c57eca56992235c79850fa9e0',
 
@@ -300,8 +519,30 @@
   'src/third_party/boringssl/src':
     Var('boringssl_git') + '/boringssl.git' + '@' +  Var('boringssl_revision'),
 
+  'src/third_party/bouncycastle': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/bouncycastle',
+              'version': 'version:1.46-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
   'src/third_party/breakpad/breakpad':
-    Var('chromium_git') + '/breakpad/breakpad.git' + '@' + 'ac4a549e29fbc8fe58212380e41fa24f36e6c3ec',
+    Var('chromium_git') + '/breakpad/breakpad.git' + '@' + '79ba6a494fb2097b39f76fe6a4b4b4f407e32a02',
+
+  'src/third_party/byte_buddy': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/byte_buddy',
+              'version': 'version:1.8.8-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
 
   'src/third_party/catapult':
     Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
@@ -311,7 +552,7 @@
 
   # Build tools for Chrome OS. Note: This depends on third_party/pyelftools.
   'src/third_party/chromite': {
-      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '7dd3b4e6d7a6b2e123d1aec04b121fd7c40871e0',
+      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'aba1649cfb985a84ecb02a82ece69c6f4a76fb2a',
       'condition': 'checkout_linux',
   },
 
@@ -322,21 +563,21 @@
     Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8',
 
   'src/third_party/crc32c/src':
-    Var('chromium_git') + '/external/github.com/google/crc32c.git' + '@' + '0f771ed5ef83556451e1736f22b1a11054dc81c3',
+    Var('chromium_git') + '/external/github.com/google/crc32c.git' + '@' + 'f8925d027884dde9a8f567f1fa230b92048f6132',
 
   # For Linux and Chromium OS.
   'src/third_party/cros_system_api': {
-      'url': Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + '5ed4b3d3c6ee676a12bf73152871fc8a4dad3129',
+      'url': Var('chromium_git') + '/chromiumos/platform/system_api.git' + '@' + 'a2a458bd5d690a1b7bba24d73650b19f3b9549d1',
       'condition': 'checkout_linux',
   },
 
   'src/third_party/custom_tabs_client/src': {
-      'url': Var('chromium_git') + '/custom-tabs-client.git' + '@' + 'a0b6c6f7db4127c191ebb9ef008609224658edb2',
+      'url': Var('chromium_git') + '/custom-tabs-client.git' + '@' + '81a14bc0885944a65afa81acd00da16cecb74b8b',
       'condition': 'checkout_android',
   },
 
   'src/third_party/depot_tools':
-    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '46541b4996f25b706146148331b9613c8a787e7e',
+    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '284b5e0c60ac489df16a7926207c5d255d2ca6d6',
 
   'src/third_party/devtools-node-modules':
     Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'),
@@ -346,37 +587,51 @@
 
   'src/third_party/elfutils/src': {
       'url': Var('chromium_git') + '/external/elfutils.git' + '@' + '249673729a7e5dbd5de4f3760bdcaa3d23d154d7',
-      'condition': 'checkout_android',
+      'condition': 'checkout_android_native_support',
   },
 
   'src/third_party/errorprone/lib': {
-      'url': Var('chromium_git') + '/chromium/third_party/errorprone.git' + '@' + 'ecc57c2b00627667874744b9ad8efe10734d97a8',
+      'url': Var('chromium_git') + '/chromium/third_party/errorprone.git' + '@' + '980d49e839aa4984015efed34b0134d4b2c9b6d7',
+      'condition': 'checkout_android',
+  },
+
+  'src/third_party/espresso': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/espresso',
+              'version': 'version:2.2.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/feed/src': {
+      'url': Var('chromium_git') + '/feed' + '@' + Var('feed_revision'),
       'condition': 'checkout_android',
   },
 
   'src/third_party/ffmpeg':
-    Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + '58a80d15568fa98c07bd5e89ab8afcb018291c58',
-
-  'src/third_party/findbugs': {
-      'url': Var('chromium_git') + '/chromium/deps/findbugs.git' + '@' + '4275d9ac8610db6b1bc9a5e887f97e41b33fac67',
-      'condition': 'checkout_android',
-  },
+    Var('chromium_git') + '/chromium/third_party/ffmpeg.git' + '@' + 'de23348fef6fd063b066e9652005973f86ed52ff',
 
   'src/third_party/flac':
-    Var('chromium_git') + '/chromium/deps/flac.git' + '@' + '7d0f5b3a173ffe98db08057d1f52b7787569e0a6',
+    Var('chromium_git') + '/chromium/deps/flac.git' + '@' + 'af862024c8c8fa0ae07ced05e89013d881b00596',
 
   'src/third_party/flatbuffers/src':
     Var('chromium_git') + '/external/github.com/google/flatbuffers.git' + '@' + '01c50d57a67a52ee3cddd81b54d4647e9123a290',
 
   # Used for embedded builds. CrOS & Linux use the system version.
   'src/third_party/fontconfig/src': {
-      'url': Var('chromium_git') + '/external/fontconfig.git' + '@' + 'b546940435ebfb0df575bc7a2350d1e913919c34',
+      'url': Var('chromium_git') + '/external/fontconfig.git' + '@' + '1451f829e750926cec27855eded71c24ac7ac7c6',
       'condition': 'checkout_linux',
   },
 
   'src/third_party/freetype/src':
     Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + Var('freetype_revision'),
 
+  'src/third_party/harfbuzz-ng/src':
+    Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git' + '@' + Var('harfbuzz_revision'),
+
   # Chrome OS touchpad gestures library.
   'src/third_party/gestures/gestures': {
       'url': Var('chromium_git') + '/chromiumos/platform/gestures.git' + '@' + '74f55100df966280d305d5d5ada824605f875839',
@@ -391,8 +646,19 @@
       'condition': 'checkout_ios or checkout_mac',
   },
 
+  'src/third_party/google-truth': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/google-truth',
+              'version': 'version:0.40',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
   'src/third_party/googletest/src':
-    Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + '0062e4869f07a3ef235703ddf63af604b712446c',
+    Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + 'd5266326752f0a1dadbd310932d8f4fd8c3c5e7d',
 
   # GNU binutils assembler for x86-32.
   'src/third_party/gnu_binutils': {
@@ -405,16 +671,87 @@
       'condition': 'checkout_win',
   },
 
-  'src/third_party/gvr-android-sdk/src': {
-      'url': Var('chromium_git') + '/external/github.com/googlevr/gvr-android-sdk.git' + '@' + '6aef4ab34276aac81ee38f1cb1d034de7fc4a4eb',
+  'src/third_party/gson': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/gson',
+              'version': 'version:2.8.0-cr0',
+          },
+      ],
       'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/guava': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/guava',
+              'version': 'version:23.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/gvr-android-sdk/src': {
+      'url': Var('chromium_git') + '/external/github.com/googlevr/gvr-android-sdk.git' + '@' + '233e7fe922a543e0bc55382d64cacd047307d0e7',
+      'condition': 'checkout_android',
+  },
+
+  'src/third_party/arcore-android-sdk/src': {
+      'url': Var('chromium_git') + '/external/github.com/google-ar/arcore-android-sdk.git' + '@' + '772bed8e2e1bc525a0d10441fa71168a9a87eb69',
+      'condition': 'checkout_android',
+  },
+
+  'src/third_party/hamcrest': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/hamcrest',
+              'version': 'version:1.3-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
   },
 
   'src/third_party/hunspell_dictionaries':
     Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + 'a9bac57ce6c9d390a52ebaad3259f5fdb871210e',
 
   'src/third_party/icu':
-    Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'd888fd2a1be890f4d35e43f68d6d79f42519a357',
+    Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '297a4dd02b9d36c92ab9b4f121e433c9c3bc14f8',
+
+  'src/third_party/icu4j': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/icu4j',
+              'version': 'version:53.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/intellij': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/intellij',
+              'version': 'version:12.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/javax_inject': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/javax_inject',
+              'version': 'version:1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
 
   'src/third_party/jsoncpp/source':
     Var('chromium_git') + '/external/github.com/open-source-parsers/jsoncpp.git' + '@' + 'f572e8e42e22cfcf5ab0aea26574f408943edfa4', # from svn 248
@@ -435,22 +772,22 @@
   },
 
   'src/third_party/leveldatabase/src':
-    Var('chromium_git') + '/external/leveldb.git' + '@' + 'ca216e493f32278f50a823811ab95f64cf0f839b',
+    Var('chromium_git') + '/external/leveldb.git' + '@' + '18683981505dc374ce29211c80a9552f8f2f4571',
 
   'src/third_party/libFuzzer/src':
     Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git' + '@' +  Var('libfuzzer_revision'),
 
   'src/third_party/libaddressinput/src':
-    Var('chromium_git') + '/external/libaddressinput.git' + '@' + 'a575c63de328d0c72237c55d1a05e191c245122a',
+    Var('chromium_git') + '/external/libaddressinput.git' + '@' + 'd7ed8e2f3f35ce9a3aafdfdc48745ceab66e7229',
 
   'src/third_party/libaom/source/libaom': {
-    'url': Var('aomedia_git') + '/aom.git' + '@' +  'cc92258a08d98f469dff1be288acbc322632377b',
+    'url': Var('aomedia_git') + '/aom.git' + '@' +  '7a76b645a08ce45ef52dfb7fd719a26c1af1da85',
     'condition': 'checkout_libaom',
   },
 
   # Userspace interface to kernel DRM services.
   'src/third_party/libdrm/src': {
-      'url': Var('chromium_git') + '/chromiumos/third_party/libdrm.git' + '@' + '16ffb1e6fce0fbd57f7a1e76021c575a40f6dc7a',
+      'url': Var('chromium_git') + '/chromiumos/third_party/libdrm.git' + '@' + '0061b1f244574e615c415479725046ab2951f09a',
       'condition': 'checkout_linux',
   },
 
@@ -475,7 +812,7 @@
     Var('chromium_git') + '/external/github.com/google/libprotobuf-mutator.git' + '@' +  Var('libprotobuf-mutator'),
 
   'src/third_party/libsrtp':
-    Var('chromium_git') + '/chromium/deps/libsrtp.git' + '@' + '1d45b8e599dc2db6ea3ae22dbc94a8c504652423',
+    Var('chromium_git') + '/chromium/deps/libsrtp.git' + '@' + 'fc2345089a6b3c5aca9ecd2e1941871a78a13e9c',
 
   # Android Explicit Synchronization.
   'src/third_party/libsync/src': {
@@ -484,13 +821,13 @@
   },
 
   'src/third_party/libvpx/source/libvpx':
-    Var('chromium_git') + '/webm/libvpx.git' + '@' +  'edc9a4687699b372a0c27856020b42434ddc3014',
+    Var('chromium_git') + '/webm/libvpx.git' + '@' +  '6fd9d0244c7d8941ce0004bcd2efce5d6676bef5',
 
   'src/third_party/libwebm/source':
-    Var('chromium_git') + '/webm/libwebm.git' + '@' + 'b03c65468b06d097f27235d93d76bfc45f490ede',
+    Var('chromium_git') + '/webm/libwebm.git' + '@' + '01c1d1d76f139345c442bfc8e61b4e1cba809059',
 
   'src/third_party/libyuv':
-    Var('chromium_git') + '/libyuv/libyuv.git' + '@' + '439fc3ce3d7b4bc0a584617ebc2160c083006d28',  # from r1697
+    Var('chromium_git') + '/libyuv/libyuv.git' + '@' + '55f5d91f11f929c4c59c32621c3d5457cca3ab0b',  # from r1714
 
   'src/third_party/lighttpd': {
       'url': Var('chromium_git') + '/chromium/deps/lighttpd.git' + '@' + Var('lighttpd_revision'),
@@ -509,7 +846,7 @@
   },
 
   'src/third_party/mesa/src':
-    Var('chromium_git') + '/chromium/deps/mesa.git' + '@' + 'ef811c6bd4de74e13e7035ca882cc77f85793fef',
+    Var('chromium_git') + '/chromium/deps/mesa.git' + '@' + '9d9b0710470f581cb5485b02b6acd8415cc093e8',
 
   # GNU binutils assembler for x86-64.
   'src/third_party/mingw-w64/mingw/bin': {
@@ -519,7 +856,7 @@
 
   # Graphics buffer allocator for Chrome OS.
   'src/third_party/minigbm/src': {
-      'url': Var('chromium_git') + '/chromiumos/platform/minigbm.git' + '@' + '27a7e6a24709564e18c3382d0aeda0b40c7ae03b',
+      'url': Var('chromium_git') + '/chromiumos/platform/minigbm.git' + '@' + '3cb5bbacc5c8a79105c868875222696f6b9d8296',
       'condition': 'checkout_linux',
   },
 
@@ -530,7 +867,7 @@
   },
 
   'src/third_party/mockito/src': {
-      'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + 'de83ad4598ad4cf5ea53c69a8a8053780b04b850',
+      'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + '04a2a289a4222f80ad20717c25144981210d2eac',
       'condition': 'checkout_android',
   },
 
@@ -550,12 +887,34 @@
       'condition': 'checkout_android',
   },
 
+  'src/third_party/objenesis': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/objenesis',
+              'version': 'version:2.4-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
   'src/third_party/openh264/src':
-    Var('chromium_git') + '/external/github.com/cisco/openh264' + '@' + '2e96d62426547ac4fb5cbcd122e5f6eb68d66ee6',
+    Var('chromium_git') + '/external/github.com/cisco/openh264' + '@' + '3b51f16a4a41df729f8d647f03e48c5f272911ff',
 
   'src/third_party/openmax_dl':
     Var('webrtc_git') + '/deps/third_party/openmax.git' + '@' +  Var('openmax_dl_revision'),
 
+  'src/third_party/ow2_asm': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/ow2_asm',
+              'version': 'version:5.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
   'src/third_party/pdfium':
     Var('pdfium_git') + '/pdfium.git' + '@' +  Var('pdfium_revision'),
 
@@ -566,7 +925,7 @@
   },
 
   'src/third_party/perfetto':
-    Var('android_git') + '/platform/external/perfetto.git' + '@' +  '135841c8077f13f14c6b80e32d391da84d2ee131',
+    Var('android_git') + '/platform/external/perfetto.git' + '@' +  '74182d1df594d4b007526412d2a46a87a7f85f21',
 
   'src/third_party/perl': {
       'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + 'ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78',
@@ -582,17 +941,42 @@
   'src/third_party/pyftpdlib/src':
     Var('chromium_git') + '/external/pyftpdlib.git' + '@' + '2be6d65e31c7ee6320d059f581f05ae8d89d7e45',
 
+  'src/third_party/quic_trace/src':
+    Var('chromium_git') + '/external/github.com/google/quic-trace.git' + '@' + 'c9028909ba2356e073de4ea963b56fd81417a46d',
+
   'src/third_party/pywebsocket/src':
     Var('chromium_git') + '/external/github.com/google/pywebsocket.git' + '@' + '2d7b73c3acbd0f41dcab487ae5c97c6feae06ce2',
 
   'src/third_party/re2/src':
     Var('chromium_git') + '/external/github.com/google/re2.git' + '@' + '5185d85264d23cfae4b38e2703703e9a4c8e974c',
 
+  'src/third_party/r8': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/r8',
+              'version': 'version:1.2.28-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
   'src/third_party/requests/src': {
       'url': Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'f172b30356d821d180fa4ecfa3e71c7274a32de4',
       'condition': 'checkout_android',
   },
 
+  'src/third_party/robolectric': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/robolectric',
+              'version': 'version:3.5.1',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
   'src/third_party/robolectric/robolectric': {
       'url': Var('chromium_git') + '/external/robolectric.git' + '@' + '7e067f1112e1502caa742f7be72d37b5678d3403',
       'condition': 'checkout_android',
@@ -611,7 +995,18 @@
     Var('chromium_git') + '/external/smhasher.git' + '@' + 'e87738e57558e0ec472b2fc3a643b838e5b6e88f',
 
   'src/third_party/snappy/src':
-    Var('chromium_git') + '/external/github.com/google/snappy.git' + '@' + 'b02bfa754ebf27921d8da3bd2517eab445b84ff9',
+    Var('chromium_git') + '/external/github.com/google/snappy.git' + '@' + 'ca37ab7fb9b718e056009babb4fea591626e5882',
+
+  'src/third_party/sqlite4java': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/sqlite4java',
+              'version': 'version:0.282-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
 
   'src/third_party/swiftshader':
     Var('swiftshader_git') + '/SwiftShader.git' + '@' +  Var('swiftshader_revision'),
@@ -622,7 +1017,7 @@
   },
 
   'src/third_party/usrsctp/usrsctplib':
-    Var('chromium_git') + '/external/github.com/sctplab/usrsctp' + '@' + '0e076261b832121cf120ddc04aaff87ac3a34d30',
+    Var('chromium_git') + '/external/github.com/sctplab/usrsctp' + '@' + '7a8bc9a90ca96634aa56ee712856d97f27d903f8',
 
   'src/third_party/visualmetrics/src':
     Var('chromium_git') + '/external/github.com/WPO-Foundation/visualmetrics.git' + '@' +  '1edde9d2fe203229c895b648fdec355917200ad6',
@@ -649,18 +1044,29 @@
     Var('chromium_git') + '/external/selenium/py.git' + '@' + '5fd78261a75fe08d27ca4835fb6c5ce4b42275bd',
 
   'src/third_party/webgl/src':
-    Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'a182a9ad3078aca566d8355eabf2d9f56f70ee82',
+    Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '21dbf06b5aa6c7dc8cf56314d4a3f96f57956c53',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + '5dbb58602f2456afd7ae1bd67e5851336dc725d1', # commit position 21742
+    Var('webrtc_git') + '/src.git' + '@' + '5f0ce99c04eb18313dd24b3dc31cc6246496d6d5',
 
   'src/third_party/xdg-utils': {
       'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
       'condition': 'checkout_linux',
   },
 
+  'src/third_party/xstream': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/xstream',
+              'version': 'version:1.4.8-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
   'src/third_party/yasm/source/patched-yasm':
-    Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + 'b98114e18d8b9b84586b10d24353ab8616d4c5fc',
+    Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + '720b70524a4424b15fc57e82263568c8ba0496ad',
 
   'src/tools/gyp':
     Var('chromium_git') + '/external/gyp.git' + '@' + 'd61a9397e668fa9843c4aa7da9e79460fe590bfb',
@@ -675,9 +1081,475 @@
     Var('chromium_git') + '/v8/v8.git' + '@' +  Var('v8_revision'),
 
   'src-internal': {
-    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@5bfc0fc20a0f3d52e99cb617b871e8b60ea32319',
+    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@36668c6ef51c6ea84bfffc9d96137008eb2a6e0f',
     'condition': 'checkout_src_internal',
   },
+
+  # === ANDROID_DEPS Generated Code Start ===
+  # Generated by //tools/android/roll/android_deps/fetch_all.py
+  'src/third_party/android_deps/libs/android_arch_core_common': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/android_arch_core_common',
+              'version': 'version:1.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/android_arch_lifecycle_common': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_common',
+              'version': 'version:1.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/android_arch_lifecycle_runtime': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_runtime',
+              'version': 'version:1.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_animated_vector_drawable': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_animated_vector_drawable',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_appcompat_v7': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_appcompat_v7',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_cardview_v7': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_cardview_v7',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_design': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_design',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_gridlayout_v7': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_gridlayout_v7',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_leanback_v17': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_leanback_v17',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_mediarouter_v7': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_mediarouter_v7',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_multidex': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_multidex',
+              'version': 'version:1.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_palette_v7': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_palette_v7',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_preference_leanback_v17': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_preference_leanback_v17',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_preference_v14': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_preference_v14',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_preference_v7': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_preference_v7',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_recyclerview_v7': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_recyclerview_v7',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_support_annotations': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_annotations',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_support_compat': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_compat',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_support_core_ui': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_core_ui',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_support_core_utils': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_core_utils',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_support_fragment': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_fragment',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_support_media_compat': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_media_compat',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_support_v13': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_v13',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_support_v4': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_v4',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_support_vector_drawable': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_vector_drawable',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_android_support_transition': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_android_support_transition',
+              'version': 'version:27.0.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_auth': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_auth_base': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth_base',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_base': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_base',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_basement': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_basement',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_cast': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cast',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_cast_framework': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cast_framework',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_fido': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_fido',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_gcm': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_gcm',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_iid': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_iid',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_instantapps': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_instantapps',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_location': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_location',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_tasks': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_tasks',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_vision': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_vision',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_gms_play_services_vision_common': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_vision_common',
+              'version': 'version:12.0.1-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  'src/third_party/android_deps/libs/com_google_android_play_core': {
+      'packages': [
+          {
+              'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core',
+              'version': 'version:1.3.0-cr0',
+          },
+      ],
+      'condition': 'checkout_android',
+      'dep_type': 'cipd',
+  },
+
+  # === ANDROID_DEPS Generated Code End ===
 }
 
 
@@ -695,6 +1567,9 @@
   '+third_party/icu/source/common/unicode',
   '+third_party/icu/source/i18n/unicode',
   '+url',
+
+  # Chromium cannot directly depend on Abseil.
+  '-absl',
 ]
 
 
@@ -704,9 +1579,8 @@
   'out',
   'skia',
   'testing',
-  'third_party/breakpad/breakpad',
+  'third_party/abseil-cpp',
   'v8',
-  'win8',
 ]
 
 
@@ -734,10 +1608,9 @@
     ],
   },
   {
-    # Ensure that while generating dependencies lists in .gyp files we don't
-    # accidentally reference any .pyc files whose corresponding .py files have
-    # already been deleted.
-    # We should actually try to avoid generating .pyc files, crbug.com/500078.
+    # Ensure that we don't accidentally reference any .pyc files whose
+    # corresponding .py files have since been deleted.
+    # We could actually try to avoid generating .pyc files, crbug.com/500078.
     'name': 'remove_stale_pyc_files',
     'pattern': '.',
     'action': [
@@ -749,6 +1622,8 @@
         'src/infra',
         'src/ppapi',
         'src/printing',
+        'src/third_party/blink/renderer/build/scripts',
+        'src/third_party/blink/tools',  # See http://crbug.com/625877.
         'src/third_party/catapult',
         'src/third_party/closure_compiler/build',
         'src/third_party/WebKit/Tools/Scripts',  # See http://crbug.com/625877.
@@ -995,15 +1870,14 @@
     ]
   },
  {
-    'name': 'content_shell_fonts',
+    'name': 'test_fonts',
     'pattern': '.',
-    'condition': 'checkout_linux',
     'action': [ 'download_from_google_storage',
                 '--no_resume',
                 '--extract',
                 '--no_auth',
                 '--bucket', 'chromium-fonts',
-                '-s', 'src/third_party/content_shell_fonts/content_shell_test_fonts.tar.gz.sha1',
+                '-s', 'src/third_party/test_fonts/test_fonts.tar.gz.sha1',
     ],
   },
   # Pull order files for the win/clang build.
@@ -1020,6 +1894,7 @@
     ],
   },
   # Pull luci-go binaries (isolate, swarming) using checked-in hashes.
+  # TODO(maruel): Remove, https://crbug.com/851596
   {
     'name': 'luci-go_win',
     'pattern': '.',
@@ -1056,19 +1931,6 @@
                 '-d', 'src/tools/luci-go/linux64',
     ],
   },
-  # Pull the Syzygy binaries, used for optimization and instrumentation.
-  {
-    'name': 'syzygy-binaries',
-    'pattern': '.',
-    'condition': 'host_os == "win"',
-    'action': ['python',
-               'src/build/get_syzygy_binaries.py',
-               '--output-dir=src/third_party/syzygy/binaries',
-               '--revision=8164b24ebde9c5649c9a09e88a7fc0b0fcbd1bc5',
-               '--overwrite',
-               '--copy-dia-binaries',
-    ],
-  },
   {
     'name': 'apache_win32',
     'pattern': '\\.sha1',
@@ -1196,19 +2058,6 @@
     ],
   },
 
-  # Download Telemetry's binary dependencies
-  # TODO(crbug.com/780967) - remove this once the bots are setting the
-  # `checkout_telemetry_dependencies` condition.
-  {
-    'name': 'fetch_telemetry_binary_dependencies',
-    'pattern': '.',
-    'action': [ 'vpython',
-                'src/tools/perf/conditionally_execute',
-                '--gyp-condition', 'fetch_telemetry_dependencies=1',
-                'src/third_party/catapult/telemetry/bin/fetch_telemetry_binary_dependencies',
-    ],
-  },
-
   # This is used to ensure that all network operations are properly
   # annotated so we can document what they're for.
   {
@@ -1250,24 +2099,28 @@
                 '--no_resume',
                 '--no_auth',
                 '--num_threads=4',
-                '--bucket', 'chromium-binary-patching',
-                '-d', 'src/chrome/installer/zucchini/testdata',
+                '--bucket', 'chromium-binary-patching/zucchini_testdata',
+                '--recursive',
+                '-d', 'src/components/zucchini',
     ],
   },
 
   {
-    'name': 'Android CIPD Ensure',
+    # We used to use src as a CIPD root. We moved it to a different directory
+    # in crrev.com/c/930178 but left the clobber here to ensure that that CL
+    # could be reverted safely. This can be safely removed once crbug.com/794764
+    # is resolved.
+    'name': 'Android Clobber Deprecated CIPD Root',
     'pattern': '.',
     'condition': 'checkout_android',
-    'action': ['src/build/cipd/cipd_wrapper.py',
-               '--chromium-root', 'src',
-               '--ensure-file', 'src/build/cipd/android/android.ensure',
+    'action': ['src/build/cipd/clobber_cipd_root.py',
+               '--root', 'src',
     ],
   },
   {
     'name': 'Fetch Android AFDO profile',
     'pattern': '.',
-    'condition': 'checkout_android',
+    'condition': 'checkout_android or checkout_linux',
     'action': ['vpython', 'src/chrome/android/profiles/update_afdo_profile.py'],
   },
   {
@@ -1322,6 +2175,30 @@
       ],
   },
   {
+    'name': 'gvr_static_shim_custom_libcxx_android_arm',
+    'pattern': '\\.sha1',
+    'condition': 'checkout_android',
+    'action': [ 'python',
+                'src/third_party/depot_tools/download_from_google_storage.py',
+                '--no_resume',
+                '--no_auth',
+                '--bucket', 'chromium-gvr-static-shim',
+                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm.a.sha1',
+    ],
+  },
+  {
+    'name': 'gvr_static_shim_custom_libcxx_android_arm64',
+    'pattern': '\\.sha1',
+    'condition': 'checkout_android',
+    'action': [ 'python',
+                'src/third_party/depot_tools/download_from_google_storage.py',
+                '--no_resume',
+                '--no_auth',
+                '--bucket', 'chromium-gvr-static-shim',
+                '-s', 'src/third_party/gvr-android-sdk/libgvr_shim_static_custom_libcxx_arm64.a.sha1',
+      ],
+  },
+  {
     'name': 'vr_assets',
     'pattern': '.',
     'condition': 'checkout_src_internal and checkout_android',
@@ -1330,7 +2207,7 @@
                '--bucket', 'chrome-vr-assets',
                '--recursive',
                '--directory',
-               'src/chrome/browser/resources/vr/assets',
+               'src/chrome/browser/resources/vr/assets/google_chrome',
     ],
   },
   {
@@ -1354,6 +2231,15 @@
                 'src/third_party/gvr-android-sdk/test-apks/update.py',
     ],
   },
+  # DOWNLOAD AR test APKs only if the environment variable is set
+  {
+    'name': 'ar_test_apks',
+    'pattern': '.',
+    'condition': 'checkout_android',
+    'action': [ 'python',
+                'src/third_party/arcore-android-sdk/test-apks/update.py',
+    ],
+  },
   # Download Oculus SDK if appropriate.
   {
     'name': 'libovr',
@@ -1388,6 +2274,47 @@
     ],
   },
 
+  # Download CrOS simplechrome artifacts. The first hooks is for boards that
+  # support VM images, the second hook for all other boards.
+  {
+    'name': 'cros_simplechrome_artifacts_with_vm',
+    'pattern': '.',
+    # Building for CrOS is only supported on linux currently.
+    'condition': '((checkout_chromeos and host_os == "linux") and cros_download_vm) and ("{cros_board}" != "")',
+    'action': [
+      'src/third_party/chromite/bin/cros',
+      'chrome-sdk',
+      '--nogoma',
+      '--use-external-config',
+      '--nogn-gen',
+      '--download-vm',
+      '--board={cros_board}',
+      '--cache-dir=src/build/cros_cache/',
+      # TODO(crbug.com/834134): Remove the cache clobber when the sdk is smart
+      # enough to eject old toolchains from the cache.
+      '--clear-sdk-cache',
+      '--log-level=error',
+      'exit',
+    ],
+  },
+  {
+    'name': 'cros_simplechrome_artifacts_with_no_vm',
+    'pattern': '.',
+    # Building for CrOS is only supported on linux currently.
+    'condition': '((checkout_chromeos and host_os == "linux") and not cros_download_vm) and ("{cros_board}" != "")',
+    'action': [
+      'src/third_party/chromite/bin/cros',
+      'chrome-sdk',
+      '--nogoma',
+      '--use-external-config',
+      '--nogn-gen',
+      '--board={cros_board}',
+      '--cache-dir=src/build/cros_cache/',
+      '--log-level=error',
+      'exit',
+    ],
+  },
+
   # Download and initialize "vpython" VirtualEnv environment packages.
   {
     'name': 'vpython_common',
@@ -1402,10 +2329,8 @@
 recursedeps = [
   # buildtools provides clang_format, libc++, and libc++abi
   'src/buildtools',
-  # android_tools manages the NDK.
-  'src/third_party/android_tools',
   # ANGLE manages DEPS that it also owns the build files for, such as dEQP.
-  ("src/third_party/angle", "DEPS.chromium"),
+  "src/third_party/angle",
   # src-internal has its own DEPS file to pull additional internal repos
   'src-internal',
 ]
diff --git a/OWNERS b/OWNERS
index db7e31d..e2b9e16 100644
--- a/OWNERS
+++ b/OWNERS
@@ -18,7 +18,9 @@
 per-file BUILD.gn=file://build/OWNERS
 per-file codereview.settings=agable@chromium.org
 per-file DEPS=*
+per-file PRESUBMIT*.py=agrieve@chromium.org  # For .pydeps changes
 per-file PRESUBMIT*.py=dcheng@chromium.org
+per-file PRESUBMIT*.py=dpranke@chromium.org
 per-file PRESUBMIT*.py=jochen@chromium.org
 per-file README.md=*
 per-file WATCHLISTS=*
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
index 927ec2b..3e7c03a7 100644
--- a/PRESUBMIT.py
+++ b/PRESUBMIT.py
@@ -36,6 +36,11 @@
 _IMPLEMENTATION_EXTENSIONS = r'\.(cc|cpp|cxx|mm)$'
 
 
+# Fragment of a regular expression that matches C++ and Objective-C++
+# header files.
+_HEADER_EXTENSIONS = r'\.(h|hpp|hxx)$'
+
+
 # Regular expression that matches code only used for test binaries
 # (best effort).
 _TEST_CODE_EXCLUDED_PATHS = (
@@ -179,6 +184,28 @@
     ),
 )
 
+_BANNED_IOS_OBJC_FUNCTIONS = (
+    (
+      r'/\bTEST[(]',
+      (
+        'TEST() macro should not be used in Objective-C++ code as it does not ',
+        'drain the autorelease pool at the end of the test. Use TEST_F() ',
+        'macro instead with a fixture inheriting from PlatformTest (or a ',
+        'typedef).'
+      ),
+      True,
+    ),
+    (
+      r'/\btesting::Test\b',
+      (
+        'testing::Test should not be used in Objective-C++ code as it does ',
+        'not drain the autorelease pool at the end of the test. Use ',
+        'PlatformTest instead.'
+      ),
+      True,
+    ),
+)
+
 
 _BANNED_CPP_FUNCTIONS = (
     # Make sure that gtest's FRIEND_TEST() macro is not used; the
@@ -315,10 +342,12 @@
         'Specify libraries to link with in build files and not in the source.',
       ),
       True,
-      (),
+      (
+          r'^third_party[\\\/]abseil-cpp[\\\/].*',
+      ),
     ),
     (
-      'base::SequenceChecker',
+      r'/base::SequenceChecker\b',
       (
         'Consider using SEQUENCE_CHECKER macros instead of the class directly.',
       ),
@@ -326,7 +355,7 @@
       (),
     ),
     (
-      'base::ThreadChecker',
+      r'/base::ThreadChecker\b',
       (
         'Consider using THREAD_CHECKER macros instead of the class directly.',
       ),
@@ -378,7 +407,8 @@
       'leveldb::NewMemEnv',
       (
         'Instead of leveldb::NewMemEnv() use leveldb_chrome::NewMemEnv() from',
-        'third_party/leveldatabase/leveldb_chrome.h.',
+        'third_party/leveldatabase/leveldb_chrome.h. It exposes environments',
+        "to Chrome's tracing, making their memory usage visible.",
       ),
       True,
       (
@@ -386,29 +416,24 @@
       ),
     ),
     (
-      'MessageLoop::QuitWhenIdleClosure',
-      (
-        'MessageLoop::QuitWhenIdleClosure is deprecated. Please use a',
-        'QuitWhenIdleClosure obtained from a specific RunLoop instance.',
-      ),
-      False,
-      (),
-    ),
-    (
       'RunLoop::QuitCurrent',
       (
         'Please migrate away from RunLoop::QuitCurrent*() methods. Use member',
         'methods of a specific RunLoop instance instead.',
       ),
-      True,
+      False,
       (),
     ),
     (
       'base::ScopedMockTimeMessageLoopTaskRunner',
       (
-        'ScopedMockTimeMessageLoopTaskRunner is deprecated.',
+        'ScopedMockTimeMessageLoopTaskRunner is deprecated. Prefer',
+        'ScopedTaskEnvironment::MainThreadType::MOCK_TIME. There are still a',
+        'few cases that may require a ScopedMockTimeMessageLoopTaskRunner',
+        '(i.e. mocking the main MessageLoopForUI in browser_tests), but check',
+        'with gab@ first if you think you need it)',
       ),
-      True,
+      False,
       (),
     ),
     (
@@ -426,13 +451,13 @@
       (
         'Use the new API in base/threading/thread_restrictions.h.',
       ),
-      True,
+      False,
       (),
     ),
     (
       r'/\bbase::Bind\(',
       (
-          'Please consider using base::Bind{Once,Repeating} instead '
+          'Please consider using base::Bind{Once,Repeating} instead',
           'of base::Bind. (crbug.com/714018)',
       ),
       False,
@@ -441,7 +466,7 @@
     (
       r'/\bbase::Callback<',
       (
-          'Please consider using base::{Once,Repeating}Callback instead '
+          'Please consider using base::{Once,Repeating}Callback instead',
           'of base::Callback. (crbug.com/714018)',
       ),
       False,
@@ -450,13 +475,66 @@
     (
       r'/\bbase::Closure\b',
       (
-          'Please consider using base::{Once,Repeating}Closure instead '
+          'Please consider using base::{Once,Repeating}Closure instead',
           'of base::Closure. (crbug.com/714018)',
       ),
       False,
       (),
     ),
     (
+      r'RunMessageLoop',
+      (
+          'RunMessageLoop is deprecated, use RunLoop instead.',
+      ),
+      False,
+      (),
+    ),
+    (
+      r'RunThisRunLoop',
+      (
+          'RunThisRunLoop is deprecated, use RunLoop directly instead.',
+      ),
+      False,
+      (),
+    ),
+    (
+      r'RunAllPendingInMessageLoop()',
+      (
+          "Prefer RunLoop over RunAllPendingInMessageLoop, please contact gab@",
+          "if you're convinced you need this.",
+      ),
+      False,
+      (),
+    ),
+    (
+      r'RunAllPendingInMessageLoop(BrowserThread',
+      (
+          'RunAllPendingInMessageLoop is deprecated. Use RunLoop for',
+          'BrowserThread::UI, TestBrowserThreadBundle::RunIOThreadUntilIdle',
+          'for BrowserThread::IO, and prefer RunLoop::QuitClosure to observe',
+          'async events instead of flushing threads.',
+      ),
+      False,
+      (),
+    ),
+    (
+      r'MessageLoopRunner',
+      (
+          'MessageLoopRunner is deprecated, use RunLoop instead.',
+      ),
+      False,
+      (),
+    ),
+    (
+      r'GetDeferredQuitTaskForRunLoop',
+      (
+          "GetDeferredQuitTaskForRunLoop shouldn't be needed, please contact",
+          "gab@ if you found a use case where this is the only solution.",
+      ),
+      False,
+      (),
+    ),
+    (
       'sqlite3_initialize',
       (
         'Instead of sqlite3_initialize, depend on //sql, ',
@@ -468,16 +546,60 @@
         r'^third_party/sqlite/.*\.(c|cc|h)$',
       ),
     ),
+    (
+      'net::URLFetcher',
+      (
+        'net::URLFetcher should no longer be used in content embedders. ',
+        'Instead, use network::SimpleURLLoader instead, which supports ',
+        'an out-of-process network stack. ',
+        'net::URLFetcher may still be used in binaries that do not embed',
+        'content.',
+      ),
+      False,
+      (
+        r'^ios[\\\/].*\.(cc|h)$',
+        r'.*[\\\/]ios[\\\/].*\.(cc|h)$',
+        r'.*_ios\.(cc|h)$',
+        r'^net[\\\/].*\.(cc|h)$',
+        r'.*[\\\/]tools[\\\/].*\.(cc|h)$',
+      ),
+    ),
+    (
+      r'/\barraysize\b',
+      (
+          "arraysize is deprecated, please use base::size(array) instead ",
+          "(https://crbug.com/837308). ",
+      ),
+      False,
+      (),
+    ),
+    (
+      r'std::random_shuffle',
+      (
+        'std::random_shuffle is deprecated in C++14, and removed in C++17. Use',
+        'base::RandomShuffle instead.'
+      ),
+      True,
+      (),
+    ),
 )
 
 
 _IPC_ENUM_TRAITS_DEPRECATED = (
     'You are using IPC_ENUM_TRAITS() in your code. It has been deprecated.\n'
-    'See http://www.chromium.org/Home/chromium-security/education/security-tips-for-ipc')
+    'See http://www.chromium.org/Home/chromium-security/education/'
+    'security-tips-for-ipc')
+
+_LONG_PATH_ERROR = (
+    'Some files included in this CL have file names that are too long (> 200'
+    ' characters). If committed, these files will cause issues on Windows. See'
+    ' https://crbug.com/612667 for more details.'
+)
 
 _JAVA_MULTIPLE_DEFINITION_EXCLUDED_PATHS = [
     r".*[\\\/]BuildHooksAndroidImpl\.java",
     r".*[\\\/]LicenseContentProvider\.java",
+    r".*[\\\/]PlatformServiceBridgeImpl.java",
 ]
 
 # These paths contain test data and other known invalid JSON files.
@@ -486,6 +608,7 @@
     r'^components[\\\/]policy[\\\/]resources[\\\/]policy_templates\.json$',
     r'^third_party[\\\/]protobuf[\\\/]',
     r'^third_party[\\\/]WebKit[\\\/]LayoutTests[\\\/]external[\\\/]wpt[\\\/]',
+    r'^third_party[\\\/]blink[\\\/]renderer[\\\/]devtools[\\\/]protocol\.json$',
 ]
 
 
@@ -515,8 +638,48 @@
 
 
 _ANDROID_SPECIFIC_PYDEPS_FILES = [
+    'base/android/jni_generator/jni_generator.pydeps',
+    'base/android/jni_generator/jni_registration_generator.pydeps',
+    'build/android/gyp/aar.pydeps',
+    'build/android/gyp/aidl.pydeps',
+    'build/android/gyp/apkbuilder.pydeps',
+    'build/android/gyp/app_bundle_to_apks.pydeps',
+    'build/android/gyp/bytecode_processor.pydeps',
+    'build/android/gyp/compile_resources.pydeps',
+    'build/android/gyp/create_bundle_wrapper_script.pydeps',
+    'build/android/gyp/copy_ex.pydeps',
+    'build/android/gyp/create_app_bundle.pydeps',
+    'build/android/gyp/create_apk_operations_script.pydeps',
+    'build/android/gyp/create_dist_jar.pydeps',
+    'build/android/gyp/create_java_binary_script.pydeps',
+    'build/android/gyp/create_stack_script.pydeps',
+    'build/android/gyp/create_test_runner_script.pydeps',
+    'build/android/gyp/create_tool_wrapper.pydeps',
+    'build/android/gyp/desugar.pydeps',
+    'build/android/gyp/dex.pydeps',
+    'build/android/gyp/dist_aar.pydeps',
+    'build/android/gyp/emma_instr.pydeps',
+    'build/android/gyp/filter_zip.pydeps',
+    'build/android/gyp/gcc_preprocess.pydeps',
+    'build/android/gyp/generate_proguarded_module_jar.pydeps',
+    'build/android/gyp/ijar.pydeps',
+    'build/android/gyp/java_cpp_enum.pydeps',
+    'build/android/gyp/javac.pydeps',
+    'build/android/gyp/jinja_template.pydeps',
+    'build/android/gyp/lint.pydeps',
+    'build/android/gyp/main_dex_list.pydeps',
+    'build/android/gyp/merge_jar_info_files.pydeps',
+    'build/android/gyp/merge_manifest.pydeps',
+    'build/android/gyp/prepare_resources.pydeps',
+    'build/android/gyp/proguard.pydeps',
+    'build/android/gyp/write_build_config.pydeps',
+    'build/android/gyp/write_ordered_libraries.pydeps',
+    'build/android/incremental_install/generate_android_manifest.pydeps',
+    'build/android/incremental_install/write_installer_json.pydeps',
+    'build/android/resource_sizes.pydeps',
     'build/android/test_runner.pydeps',
     'build/android/test_wrapper/logdog_wrapper.pydeps',
+    'build/protoc_java.pydeps',
     'build/secondary/third_party/android_platform/'
         'development/scripts/stack.pydeps',
     'net/tools/testserver/testserver.pydeps',
@@ -525,6 +688,7 @@
 
 _GENERIC_PYDEPS_FILES = [
     'chrome/test/chromedriver/test/run_py_tests.pydeps',
+    'tools/binary_size/supersize.pydeps',
 ]
 
 
@@ -533,9 +697,14 @@
 
 # Bypass the AUTHORS check for these accounts.
 _KNOWN_ROBOTS = set(
-  '%s-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com' % s
-  for s in ('afdo', 'angle', 'catapult', 'depot-tools', 'nacl', 'pdfium',
-            'skia', 'src-internal', 'webrtc'))
+    '%s-chromium-autoroll@skia-buildbots.google.com.iam.gserviceaccount.com' % s
+    for s in ('afdo', 'angle', 'catapult', 'chromite', 'depot-tools',
+              'fuchsia-sdk', 'nacl', 'pdfium', 'perfetto', 'skia',
+              'src-internal', 'webrtc')
+  ) | set('%s@appspot.gserviceaccount.com' % s for s in ('findit-for-me',)
+  ) | set('%s@developer.gserviceaccount.com' % s for s in ('3su6n15k.default',)
+  ) | set('%s@chops-service-accounts.iam.gserviceaccount.com' % s
+          for s in ('v8-ci-autoroll-builder',))
 
 
 def _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api):
@@ -547,7 +716,7 @@
   # We only scan .cc files and the like, as the declaration of
   # for-testing functions in header files are hard to distinguish from
   # calls to such functions without a proper C++ parser.
-  file_inclusion_pattern = r'.+%s' % _IMPLEMENTATION_EXTENSIONS
+  file_inclusion_pattern = [r'.+%s' % _IMPLEMENTATION_EXTENSIONS]
 
   base_function_pattern = r'[ :]test::[^\s]+|ForTest(s|ing)?|for_test(s|ing)?'
   inclusion_pattern = input_api.re.compile(r'(%s)\s*\(' % base_function_pattern)
@@ -562,7 +731,7 @@
                   input_api.DEFAULT_BLACK_LIST)
     return input_api.FilterSourceFile(
       affected_file,
-      white_list=(file_inclusion_pattern, ),
+      white_list=file_inclusion_pattern,
       black_list=black_list)
 
   problems = []
@@ -581,6 +750,49 @@
     return []
 
 
+def _CheckNoProductionCodeUsingTestOnlyFunctionsJava(input_api, output_api):
+  """This is a simplified version of
+  _CheckNoProductionCodeUsingTestOnlyFunctions for Java files.
+  """
+  javadoc_start_re = input_api.re.compile(r'^\s*/\*\*')
+  javadoc_end_re = input_api.re.compile(r'^\s*\*/')
+  name_pattern = r'ForTest(s|ing)?'
+  # Describes an occurrence of "ForTest*" inside a // comment.
+  comment_re = input_api.re.compile(r'//.*%s' % name_pattern)
+  # Catch calls.
+  inclusion_re = input_api.re.compile(r'(%s)\s*\(' % name_pattern)
+  # Ignore definitions. (Comments are ignored separately.)
+  exclusion_re = input_api.re.compile(r'(%s)[^;]+\{' % name_pattern)
+
+  problems = []
+  sources = lambda x: input_api.FilterSourceFile(
+    x,
+    black_list=(('(?i).*test', r'.*\/junit\/')
+                + input_api.DEFAULT_BLACK_LIST),
+    white_list=[r'.*\.java$']
+  )
+  for f in input_api.AffectedFiles(include_deletes=False, file_filter=sources):
+    local_path = f.LocalPath()
+    is_inside_javadoc = False
+    for line_number, line in f.ChangedContents():
+      if is_inside_javadoc and javadoc_end_re.search(line):
+        is_inside_javadoc = False
+      if not is_inside_javadoc and javadoc_start_re.search(line):
+        is_inside_javadoc = True
+      if is_inside_javadoc:
+        continue
+      if (inclusion_re.search(line) and
+          not comment_re.search(line) and
+          not exclusion_re.search(line)):
+        problems.append(
+          '%s:%d\n    %s' % (local_path, line_number, line.strip()))
+
+  if problems:
+    return [output_api.PresubmitPromptOrNotify(_TEST_ONLY_WARNING, problems)]
+  else:
+    return []
+
+
 def _CheckNoIOStreamInHeaders(input_api, output_api):
   """Checks to make sure no .h files include <iostream>."""
   files = []
@@ -654,18 +866,40 @@
   the reverse: changes in histograms.xml not matched in the code itself."""
   touched_histograms = []
   histograms_xml_modifications = []
-  pattern = input_api.re.compile('UMA_HISTOGRAM.*\("(.*)"')
+  call_pattern_c = r'\bUMA_HISTOGRAM.*\('
+  call_pattern_java = r'\bRecordHistogram\.record[a-zA-Z]+Histogram\('
+  name_pattern = r'"(.*?)"'
+  single_line_c_re = input_api.re.compile(call_pattern_c + name_pattern)
+  single_line_java_re = input_api.re.compile(call_pattern_java + name_pattern)
+  split_line_c_prefix_re = input_api.re.compile(call_pattern_c)
+  split_line_java_prefix_re = input_api.re.compile(call_pattern_java)
+  split_line_suffix_re = input_api.re.compile(r'^\s*' + name_pattern)
+  last_line_matched_prefix = False
   for f in input_api.AffectedFiles():
     # If histograms.xml itself is modified, keep the modified lines for later.
     if f.LocalPath().endswith(('histograms.xml')):
       histograms_xml_modifications = f.ChangedContents()
       continue
-    if not f.LocalPath().endswith(('cc', 'mm', 'cpp')):
+    if f.LocalPath().endswith(('cc', 'mm', 'cpp')):
+      single_line_re = single_line_c_re
+      split_line_prefix_re = split_line_c_prefix_re
+    elif f.LocalPath().endswith(('java')):
+      single_line_re = single_line_java_re
+      split_line_prefix_re = split_line_java_prefix_re
+    else:
       continue
     for line_num, line in f.ChangedContents():
-      found = pattern.search(line)
+      if last_line_matched_prefix:
+        suffix_found = split_line_suffix_re.search(line)
+        if suffix_found :
+          touched_histograms.append([suffix_found.group(1), f, line_num])
+          last_line_matched_prefix = False
+          continue
+      found = single_line_re.search(line)
       if found:
         touched_histograms.append([found.group(1), f, line_num])
+        continue
+      last_line_matched_prefix = split_line_prefix_re.search(line)
 
   # Search for the touched histogram names in the local modifications to
   # histograms.xml, and, if not found, on the base histograms.xml file.
@@ -754,7 +988,8 @@
       'Never commit changes to .DEPS.git. This file is maintained by an\n'
       'automated system based on what\'s in DEPS and your changes will be\n'
       'overwritten.\n'
-      'See https://sites.google.com/a/chromium.org/dev/developers/how-tos/get-the-code#Rolling_DEPS\n'
+      'See https://sites.google.com/a/chromium.org/dev/developers/how-tos/'
+      'get-the-code#Rolling_DEPS\n'
       'for more information')]
   return []
 
@@ -766,9 +1001,10 @@
     return []
   # Outsource work to gclient verify
   try:
-    input_api.subprocess.check_output(['gclient', 'verify'])
+    input_api.subprocess.check_output(['gclient', 'verify'],
+                                      stderr=input_api.subprocess.STDOUT)
     return []
-  except input_api.subprocess.CalledProcessError, error:
+  except input_api.subprocess.CalledProcessError as error:
     return [output_api.PresubmitError(
         'DEPS file must have only git dependencies.',
         long_text=error.output)]
@@ -786,6 +1022,18 @@
         return True
     return False
 
+  def IsIosObcjFile(affected_file):
+    local_path = affected_file.LocalPath()
+    if input_api.os_path.splitext(local_path)[-1] not in ('.mm', '.m', '.h'):
+      return False
+    basename = input_api.os_path.basename(local_path)
+    if 'ios' in basename.split('_'):
+      return True
+    for sep in (input_api.os_path.sep, input_api.os_path.altsep):
+      if sep and 'ios' in local_path.split(sep):
+        return True
+    return False
+
   def CheckForMatch(affected_file, line_num, line, func_name, message, error):
     matched = False
     if func_name[0:1] == '/':
@@ -814,6 +1062,11 @@
       for func_name, message, error in _BANNED_OBJC_FUNCTIONS:
         CheckForMatch(f, line_num, line, func_name, message, error)
 
+  for f in input_api.AffectedFiles(file_filter=IsIosObcjFile):
+    for line_num, line in f.ChangedContents():
+      for func_name, message, error in _BANNED_IOS_OBJC_FUNCTIONS:
+        CheckForMatch(f, line_num, line, func_name, message, error)
+
   file_filter = lambda f: f.LocalPath().endswith(('.cc', '.mm', '.h'))
   for f in input_api.AffectedFiles(file_filter=file_filter):
     for line_num, line in f.ChangedContents():
@@ -898,13 +1151,13 @@
   added_java_imports = []
   for f in input_api.AffectedFiles():
     if CppChecker.IsCppFile(f.LocalPath()):
-      changed_lines = [line for line_num, line in f.ChangedContents()]
+      changed_lines = [line for _, line in f.ChangedContents()]
       added_includes.append([f.AbsoluteLocalPath(), changed_lines])
     elif ProtoChecker.IsProtoFile(f.LocalPath()):
-      changed_lines = [line for line_num, line in f.ChangedContents()]
+      changed_lines = [line for _, line in f.ChangedContents()]
       added_imports.append([f.AbsoluteLocalPath(), changed_lines])
     elif JavaChecker.IsJavaFile(f.LocalPath()):
-      changed_lines = [line for line_num, line in f.ChangedContents()]
+      changed_lines = [line for _, line in f.ChangedContents()]
       added_java_imports.append([f.AbsoluteLocalPath(), changed_lines])
 
   deps_checker = checkdeps.DepsChecker(input_api.PresubmitLocalPath())
@@ -1052,6 +1305,7 @@
       'Version control conflict markers found, please resolve.', errors))
   return results
 
+
 def _CheckGoogleSupportAnswerUrl(input_api, output_api):
   pattern = input_api.re.compile('support\.google\.com\/chrome.*/answer')
   errors = []
@@ -1063,8 +1317,8 @@
   results = []
   if errors:
     results.append(output_api.PresubmitPromptWarning(
-      'Found Google support URL addressed by answer number. Please replace with '
-      'a p= identifier instead. See crbug.com/679462\n', errors))
+      'Found Google support URL addressed by answer number. Please replace '
+      'with a p= identifier instead. See crbug.com/679462\n', errors))
   return results
 
 
@@ -1077,7 +1331,7 @@
     """
     return input_api.FilterSourceFile(
       affected_file,
-      white_list=(r'^(android_webview|base|content|net)[\\\/].*', ),
+      white_list=[r'^(android_webview|base|content|net)[\\\/].*'],
       black_list=(_EXCLUDED_PATHS +
                   _TEST_CODE_EXCLUDED_PATHS +
                   input_api.DEFAULT_BLACK_LIST))
@@ -1102,14 +1356,15 @@
     return []
 
 
+# TODO: add unit tests.
 def _CheckNoAbbreviationInPngFileName(input_api, output_api):
   """Makes sure there are no abbreviations in the name of PNG files.
   The native_client_sdk directory is excluded because it has auto-generated PNG
   files for documentation.
   """
   errors = []
-  white_list = (r'.*_[a-z]_.*\.png$|.*_[a-z]\.png$',)
-  black_list = (r'^native_client_sdk[\\\/]',)
+  white_list = [r'.*_[a-z]_.*\.png$|.*_[a-z]\.png$']
+  black_list = [r'^native_client_sdk[\\\/]']
   file_filter = lambda f: input_api.FilterSourceFile(
       f, white_list=white_list, black_list=black_list)
   for f in input_api.AffectedFiles(include_deletes=False,
@@ -1135,7 +1390,7 @@
       rule[1:] for rule in parsed_deps.get('include_rules', [])
       if rule.startswith('+') or rule.startswith('!')
   ])
-  for specific_file, rules in parsed_deps.get('specific_include_rules',
+  for _, rules in parsed_deps.get('specific_include_rules',
                                               {}).iteritems():
     add_rules.update([
         rule[1:] for rule in rules
@@ -1273,8 +1528,9 @@
   return []
 
 
+# TODO: add unit tests.
 def _CheckSpamLogging(input_api, output_api):
-  file_inclusion_pattern = r'.+%s' % _IMPLEMENTATION_EXTENSIONS
+  file_inclusion_pattern = [r'.+%s' % _IMPLEMENTATION_EXTENSIONS]
   black_list = (_EXCLUDED_PATHS +
                 _TEST_CODE_EXCLUDED_PATHS +
                 input_api.DEFAULT_BLACK_LIST +
@@ -1285,7 +1541,7 @@
                  r"^chrome[\\\/]browser[\\\/]ui[\\\/]startup[\\\/]"
                      r"startup_browser_creator\.cc$",
                  r"^chrome[\\\/]installer[\\\/]setup[\\\/].*",
-                 r"^chrome[\\\/]installer[\\\/]zucchini[\\\/].*",
+                 r"^chrome[\\\/]chrome_cleaner[\\\/].*",
                  r"chrome[\\\/]browser[\\\/]diagnostics[\\\/]" +
                      r"diagnostics_writer\.cc$",
                  r"^chrome_elf[\\\/]dll_hash[\\\/]dll_hash_main\.cc$",
@@ -1295,6 +1551,7 @@
                      r"dump_stability_report_main_win.cc$",
                  r"^components[\\\/]html_viewer[\\\/]"
                      r"web_test_delegate_impl\.cc$",
+                 r"^components[\\\/]zucchini[\\\/].*",
                  # TODO(peter): Remove this exception. https://crbug.com/534537
                  r"^content[\\\/]browser[\\\/]notifications[\\\/]"
                      r"notification_event_dispatcher_impl\.cc$",
@@ -1316,7 +1573,7 @@
                      r"dump_file_system.cc$",
                  r"^headless[\\\/]app[\\\/]headless_shell\.cc$"))
   source_file_filter = lambda x: input_api.FilterSourceFile(
-      x, white_list=(file_inclusion_pattern,), black_list=black_list)
+      x, white_list=file_inclusion_pattern, black_list=black_list)
 
   log_info = set([])
   printf = set([])
@@ -1400,6 +1657,81 @@
   return []
 
 
+def _CheckUniquePtr(input_api, output_api):
+  file_inclusion_pattern = [r'.+%s' % _IMPLEMENTATION_EXTENSIONS]
+  sources = lambda affected_file: input_api.FilterSourceFile(
+      affected_file,
+      black_list=(_EXCLUDED_PATHS + _TEST_CODE_EXCLUDED_PATHS +
+                  input_api.DEFAULT_BLACK_LIST),
+      white_list=file_inclusion_pattern)
+
+  # Pattern to capture a single "<...>" block of template arguments. It can
+  # handle linearly nested blocks, such as "<std::vector<std::set<T>>>", but
+  # cannot handle branching structures, such as "<pair<set<T>,set<U>>". The
+  # latter would likely require counting that < and > match, which is not
+  # expressible in regular languages. Should the need arise, one can introduce
+  # limited counting (matching up to a total number of nesting depth), which
+  # should cover all practical cases for already a low nesting limit.
+  template_arg_pattern = (
+      r'<[^>]*'       # Opening block of <.
+      r'>([^<]*>)?')  # Closing block of >.
+  # Prefix expressing that whatever follows is not already inside a <...>
+  # block.
+  not_inside_template_arg_pattern = r'(^|[^<,\s]\s*)'
+  null_construct_pattern = input_api.re.compile(
+      not_inside_template_arg_pattern
+      + r'\bstd::unique_ptr'
+      + template_arg_pattern
+      + r'\(\)')
+
+  # Same as template_arg_pattern, but excluding type arrays, e.g., <T[]>.
+  template_arg_no_array_pattern = (
+      r'<[^>]*[^]]'        # Opening block of <.
+      r'>([^(<]*[^]]>)?')  # Closing block of >.
+  # Prefix saying that what follows is the start of an expression.
+  start_of_expr_pattern = r'(=|\breturn|^)\s*'
+  # Suffix saying that what follows are call parentheses with a non-empty list
+  # of arguments.
+  nonempty_arg_list_pattern = r'\(([^)]|$)'
+  return_construct_pattern = input_api.re.compile(
+      start_of_expr_pattern
+      + r'std::unique_ptr'
+      + template_arg_no_array_pattern
+      + nonempty_arg_list_pattern)
+
+  problems_constructor = []
+  problems_nullptr = []
+  for f in input_api.AffectedSourceFiles(sources):
+    for line_number, line in f.ChangedContents():
+      # Disallow:
+      # return std::unique_ptr<T>(foo);
+      # bar = std::unique_ptr<T>(foo);
+      # But allow:
+      # return std::unique_ptr<T[]>(foo);
+      # bar = std::unique_ptr<T[]>(foo);
+      local_path = f.LocalPath()
+      if return_construct_pattern.search(line):
+        problems_constructor.append(
+          '%s:%d\n    %s' % (local_path, line_number, line.strip()))
+      # Disallow:
+      # std::unique_ptr<T>()
+      if null_construct_pattern.search(line):
+        problems_nullptr.append(
+          '%s:%d\n    %s' % (local_path, line_number, line.strip()))
+
+  errors = []
+  if problems_nullptr:
+    errors.append(output_api.PresubmitError(
+        'The following files use std::unique_ptr<T>(). Use nullptr instead.',
+        problems_nullptr))
+  if problems_constructor:
+    errors.append(output_api.PresubmitError(
+        'The following files use explicit std::unique_ptr constructor.'
+        'Use std::make_unique<T>() instead.',
+        problems_constructor))
+  return errors
+
+
 def _CheckUserActionUpdate(input_api, output_api):
   """Checks if any new user action has been added."""
   if any('actions.xml' == input_api.os_path.basename(f) for f in
@@ -1581,6 +1913,7 @@
   # matching the above patterns, which trigger false positives.
   exclude_paths = [
       'third_party/crashpad/*',
+      'third_party/third_party/blink/renderer/platform/bindings/*',
       'third_party/win_build_output/*',
   ]
 
@@ -1623,7 +1956,7 @@
               'per-file %s=file://ipc/SECURITY_OWNERS' % pattern,
           ]
       }
-      to_check[owners_file][pattern]['files'].append(f)
+    to_check[owners_file][pattern]['files'].append(input_file)
 
   # Iterate through the affected files to see what we actually need to check
   # for. We should only nag patch authors about per-file rules if a file in that
@@ -1640,7 +1973,12 @@
       mostly_json_lines = '\n'.join(f.NewContents())
       # Comments aren't allowed in strict JSON, so filter them out.
       json_lines = json_comment_eater.Nom(mostly_json_lines)
-      json_content = input_api.json.loads(json_lines)
+      try:
+        json_content = input_api.json.loads(json_lines)
+      except:
+        # There's another PRESUBMIT check that already verifies that JSON files
+        # are not invalid, so no need to emit another warning here.
+        continue
       if 'interface_provider_specs' in json_content:
         AddPatternToCheck(f, input_api.os_path.basename(f.LocalPath()))
     for pattern in file_patterns:
@@ -1686,13 +2024,15 @@
   for owners_file, patterns in to_check.iteritems():
     missing_lines = []
     files = []
-    for pattern, entry in patterns.iteritems():
+    for _, entry in patterns.iteritems():
       missing_lines.extend(entry['rules'])
       files.extend(['  %s' % f.LocalPath() for f in entry['files']])
     if missing_lines:
       errors.append(
-          '%s needs the following lines added:\n\n%s\n\nfor files:\n%s' %
-          (owners_file, '\n'.join(missing_lines), '\n'.join(files)))
+          'Because of the presence of files:\n%s\n\n'
+          '%s needs the following %d lines added:\n\n%s' %
+          ('\n'.join(files), owners_file, len(missing_lines),
+           '\n'.join(missing_lines)))
 
   results = []
   if errors:
@@ -1756,6 +2096,7 @@
   return results
 
 
+# TODO: add unit tests
 def _CheckAndroidToastUsage(input_api, output_api):
   """Checks that code uses org.chromium.ui.widget.Toast instead of
      android.widget.Toast (Chromium Toast doesn't force hardware
@@ -1773,7 +2114,7 @@
                   input_api.DEFAULT_BLACK_LIST +
                   (r'^chromecast[\\\/].*',
                    r'^remoting[\\\/].*')),
-      white_list=(r'.*\.java$',))
+      white_list=[r'.*\.java$'])
 
   for f in input_api.AffectedSourceFiles(sources):
     for line_num, line in f.ChangedContents():
@@ -1822,7 +2163,7 @@
 
   REF_MSG = ('See docs/android_logging.md '
             'or contact dgn@chromium.org for more info.')
-  sources = lambda x: input_api.FilterSourceFile(x, white_list=(r'.*\.java$',),
+  sources = lambda x: input_api.FilterSourceFile(x, white_list=[r'.*\.java$'],
       black_list=cr_log_check_excluded_paths)
 
   tag_decl_errors = []
@@ -1906,7 +2247,7 @@
       r'^import junit\.framework\..*;',
       input_api.re.MULTILINE)
   sources = lambda x: input_api.FilterSourceFile(
-      x, white_list=(r'.*\.java$',), black_list=None)
+      x, white_list=[r'.*\.java$'], black_list=None)
   errors = []
   for f in input_api.AffectedFiles(sources):
     for line_num, line in f.ChangedContents():
@@ -1930,7 +2271,7 @@
   class_declaration_pattern = input_api.re.compile(r'^public class \w*Test ')
 
   sources = lambda x: input_api.FilterSourceFile(
-      x, white_list=(r'.*Test\.java$',), black_list=None)
+      x, white_list=[r'.*Test\.java$'], black_list=None)
   errors = []
   for f in input_api.AffectedFiles(sources):
     if not f.OldContents():
@@ -1952,13 +2293,14 @@
       ' questions.', errors))
   return results
 
+
 def _CheckAndroidTestAnnotationUsage(input_api, output_api):
   """Checks that android.test.suitebuilder.annotation.* is no longer used."""
   deprecated_annotation_import_pattern = input_api.re.compile(
       r'^import android\.test\.suitebuilder\.annotation\..*;',
       input_api.re.MULTILINE)
   sources = lambda x: input_api.FilterSourceFile(
-      x, white_list=(r'.*\.java$',), black_list=None)
+      x, white_list=[r'.*\.java$'], black_list=None)
   errors = []
   for f in input_api.AffectedFiles(sources):
     for line_num, line in f.ChangedContents():
@@ -2010,7 +2352,7 @@
                   _TEST_CODE_EXCLUDED_PATHS +
                   input_api.DEFAULT_BLACK_LIST +
                   (r'^android_webview[\\\/]glue[\\\/].*',)),
-      white_list=(r'.*\.java$',))
+      white_list=[r'.*\.java$'])
 
   for f in input_api.AffectedSourceFiles(sources):
     for line_num, line in f.ChangedContents():
@@ -2107,15 +2449,21 @@
   results = []
   # First, check for new / deleted .pydeps.
   for f in input_api.AffectedFiles(include_deletes=True):
-    if f.LocalPath().endswith('.pydeps'):
-      if f.Action() == 'D' and f.LocalPath() in _ALL_PYDEPS_FILES:
-        results.append(output_api.PresubmitError(
-            'Please update _ALL_PYDEPS_FILES within //PRESUBMIT.py to '
-            'remove %s' % f.LocalPath()))
-      elif f.Action() != 'D' and f.LocalPath() not in _ALL_PYDEPS_FILES:
-        results.append(output_api.PresubmitError(
-            'Please update _ALL_PYDEPS_FILES within //PRESUBMIT.py to '
-            'include %s' % f.LocalPath()))
+    # Check whether we are running the presubmit check for a file in src.
+    # f.LocalPath is relative to repo (src, or internal repo).
+    # os_path.exists is relative to src repo.
+    # Therefore if os_path.exists is true, it means f.LocalPath is relative
+    # to src and we can conclude that the pydeps is in src.
+    if input_api.os_path.exists(f.LocalPath()):
+      if f.LocalPath().endswith('.pydeps'):
+        if f.Action() == 'D' and f.LocalPath() in _ALL_PYDEPS_FILES:
+          results.append(output_api.PresubmitError(
+              'Please update _ALL_PYDEPS_FILES within //PRESUBMIT.py to '
+              'remove %s' % f.LocalPath()))
+        elif f.Action() != 'D' and f.LocalPath() not in _ALL_PYDEPS_FILES:
+          results.append(output_api.PresubmitError(
+              'Please update _ALL_PYDEPS_FILES within //PRESUBMIT.py to '
+              'include %s' % f.LocalPath()))
 
   if results:
     return results
@@ -2144,7 +2492,9 @@
     # It's ok for base/memory/singleton.h to have |Singleton<|.
     black_list = (_EXCLUDED_PATHS +
                   input_api.DEFAULT_BLACK_LIST +
-                  (r"^base[\\\/]memory[\\\/]singleton\.h$",))
+                  (r"^base[\\\/]memory[\\\/]singleton\.h$",
+                   r"^net[\\\/]quic[\\\/]platform[\\\/]impl[\\\/]"
+                       r"quic_singleton_impl\.h$"))
     return input_api.FilterSourceFile(affected_file, black_list=black_list)
 
   pattern = input_api.re.compile(r'(?<!class\sbase::)Singleton\s*<')
@@ -2193,6 +2543,8 @@
   ( "-webkit-repeating-radial-gradient", "repeating-radial-gradient" ),
 ]
 
+
+# TODO: add unit tests
 def _CheckNoDeprecatedCss(input_api, output_api):
   """ Make sure that we don't use deprecated CSS
       properties, functions or values. Our external
@@ -2200,7 +2552,7 @@
       (reader mode) are ignored by the hooks as it
       needs to be consumed by WebKit. """
   results = []
-  file_inclusion_pattern = (r".+\.css$",)
+  file_inclusion_pattern = [r".+\.css$"]
   black_list = (_EXCLUDED_PATHS +
                 _TEST_CODE_EXCLUDED_PATHS +
                 input_api.DEFAULT_BLACK_LIST +
@@ -2227,10 +2579,12 @@
   ( "__defineSetter__", "Object.defineProperty" ),
 ]
 
+
+# TODO: add unit tests
 def _CheckNoDeprecatedJs(input_api, output_api):
   """Make sure that we don't use deprecated JS in Chrome code."""
   results = []
-  file_inclusion_pattern = (r".+\.js$",)  # TODO(dbeam): .html?
+  file_inclusion_pattern = [r".+\.js$"]  # TODO(dbeam): .html?
   black_list = (_EXCLUDED_PATHS + _TEST_CODE_EXCLUDED_PATHS +
                 input_api.DEFAULT_BLACK_LIST)
   file_filter = lambda f: input_api.FilterSourceFile(
@@ -2244,20 +2598,23 @@
               (fpath.LocalPath(), lnum, deprecated, replacement)))
   return results
 
+
 def _CheckForRiskyJsArrowFunction(line_number, line):
   if ' => ' in line:
     return "line %d, is using an => (arrow) function\n %s\n" % (
         line_number, line)
   return ''
 
+
 def _CheckForRiskyJsConstLet(input_api, line_number, line):
   if input_api.re.match('^\s*(const|let)\s', line):
     return "line %d, is using const/let keyword\n %s\n" % (
         line_number, line)
   return ''
 
+
 def _CheckForRiskyJsFeatures(input_api, output_api):
-  maybe_ios_js = (r"^(ios|components|ui\/webui\/resources)\/.+\.js$", )
+  maybe_ios_js = [r"^(ios|components|ui\/webui\/resources)\/.+\.js$"]
   # 'ui/webui/resources/cr_components are not allowed on ios'
   not_ios_filter = (r".*ui\/webui\/resources\/cr_components.*", )
   file_filter = lambda f: input_api.FilterSourceFile(f, white_list=maybe_ios_js,
@@ -2305,6 +2662,7 @@
 
   return results
 
+
 def _CheckForRelativeIncludes(input_api, output_api):
   # Need to set the sys.path so PRESUBMIT_test.py runs properly
   import sys
@@ -2327,7 +2685,7 @@
     if not CppChecker.IsCppFile(f.LocalPath()):
       continue
 
-    relative_includes = [line for line_num, line in f.ChangedContents()
+    relative_includes = [line for _, line in f.ChangedContents()
                          if "#include" in line and "../" in line]
     if not relative_includes:
       continue
@@ -2476,6 +2834,46 @@
   return []
 
 
+def _CheckNewHeaderWithoutGnChange(input_api, output_api):
+  """Checks that newly added header files have corresponding GN changes.
+  Note that this is only a heuristic. To be precise, run script:
+  build/check_gn_headers.py.
+  """
+
+  def headers(f):
+    return input_api.FilterSourceFile(
+      f, white_list=(r'.+%s' % _HEADER_EXTENSIONS, ))
+
+  new_headers = []
+  for f in input_api.AffectedSourceFiles(headers):
+    if f.Action() != 'A':
+      continue
+    new_headers.append(f.LocalPath())
+
+  def gn_files(f):
+    return input_api.FilterSourceFile(f, white_list=(r'.+\.gn', ))
+
+  all_gn_changed_contents = ''
+  for f in input_api.AffectedSourceFiles(gn_files):
+    for _, line in f.ChangedContents():
+      all_gn_changed_contents += line
+
+  problems = []
+  for header in new_headers:
+    basename = input_api.os_path.basename(header)
+    if basename not in all_gn_changed_contents:
+      problems.append(header)
+
+  if problems:
+    return [output_api.PresubmitPromptWarning(
+      'Missing GN changes for new header files', items=sorted(problems),
+      long_text='Please double check whether newly added header files need '
+      'corresponding changes in gn or gni files.\nThis checking is only a '
+      'heuristic. Run build/check_gn_headers.py to be precise.\n'
+      'Read https://crbug.com/661774 for more info.')]
+  return []
+
+
 def _AndroidSpecificOnUploadChecks(input_api, output_api):
   """Groups checks that target android code."""
   results = []
@@ -2503,6 +2901,8 @@
 
   results.extend(
       _CheckNoProductionCodeUsingTestOnlyFunctions(input_api, output_api))
+  results.extend(
+      _CheckNoProductionCodeUsingTestOnlyFunctionsJava(input_api, output_api))
   results.extend(_CheckNoIOStreamInHeaders(input_api, output_api))
   results.extend(_CheckNoUNIT_TESTInSourceFiles(input_api, output_api))
   results.extend(_CheckDCHECK_IS_ONHasBraces(input_api, output_api))
@@ -2536,6 +2936,8 @@
   results.extend(_CheckNoDeprecatedJs(input_api, output_api))
   results.extend(_CheckParseErrors(input_api, output_api))
   results.extend(_CheckForIPCRules(input_api, output_api))
+  results.extend(_CheckForLongPathnames(input_api, output_api))
+  results.extend(_CheckForIncludeGuards(input_api, output_api))
   results.extend(_CheckForWindowsLineEndings(input_api, output_api))
   results.extend(_CheckSingletonInHeaders(input_api, output_api))
   results.extend(_CheckPydepsNeedsUpdating(input_api, output_api))
@@ -2547,12 +2949,20 @@
   results.extend(_CheckWATCHLISTS(input_api, output_api))
   results.extend(input_api.RunTests(
     input_api.canned_checks.CheckVPythonSpec(input_api, output_api)))
+  results.extend(_CheckTranslationScreenshots(input_api, output_api))
 
-  if any('PRESUBMIT.py' == f.LocalPath() for f in input_api.AffectedFiles()):
-    results.extend(input_api.canned_checks.RunUnitTestsInDirectory(
-        input_api, output_api,
-        input_api.PresubmitLocalPath(),
-        whitelist=[r'^PRESUBMIT_test\.py$']))
+  for f in input_api.AffectedFiles():
+    path, name = input_api.os_path.split(f.LocalPath())
+    if name == 'PRESUBMIT.py':
+      full_path = input_api.os_path.join(input_api.PresubmitLocalPath(), path)
+      test_file = input_api.os_path.join(path, 'PRESUBMIT_test.py')
+      if f.Action() != 'D' and input_api.os_path.exists(test_file):
+        # The PRESUBMIT.py file (and the directory containing it) might
+        # have been affected by being moved or removed, so only try to
+        # run the tests if they still exist.
+        results.extend(input_api.canned_checks.RunUnitTestsInDirectory(
+            input_api, output_api, full_path,
+            whitelist=[r'^PRESUBMIT_test\.py$']))
   return results
 
 
@@ -2737,6 +3147,133 @@
     return []
 
 
+def _CheckForLongPathnames(input_api, output_api):
+  """Check to make sure no files being submitted have long paths.
+  This causes issues on Windows.
+  """
+  problems = []
+  for f in input_api.AffectedSourceFiles(None):
+    local_path = f.LocalPath()
+    # Windows has a path limit of 260 characters. Limit path length to 200 so
+    # that we have some extra for the prefix on dev machines and the bots.
+    if len(local_path) > 200:
+      problems.append(local_path)
+
+  if problems:
+    return [output_api.PresubmitError(_LONG_PATH_ERROR, problems)]
+  else:
+    return []
+
+
+def _CheckForIncludeGuards(input_api, output_api):
+  """Check that header files have proper guards against multiple inclusion.
+  If a file should not have such guards (and it probably should) then it
+  should include the string "no-include-guard-because-multiply-included".
+  """
+  def is_chromium_header_file(f):
+    # We only check header files under the control of the Chromium
+    # project. That is, those outside third_party apart from
+    # third_party/blink.
+    file_with_path = input_api.os_path.normpath(f.LocalPath())
+    return (file_with_path.endswith('.h') and
+            (not file_with_path.startswith('third_party') or
+             file_with_path.startswith(
+               input_api.os_path.join('third_party', 'blink'))))
+
+  def replace_special_with_underscore(string):
+    return input_api.re.sub(r'[+\\/.-]', '_', string)
+
+  errors = []
+
+  for f in input_api.AffectedSourceFiles(is_chromium_header_file):
+    guard_name = None
+    guard_line_number = None
+    seen_guard_end = False
+
+    file_with_path = input_api.os_path.normpath(f.LocalPath())
+    base_file_name = input_api.os_path.splitext(
+      input_api.os_path.basename(file_with_path))[0]
+    upper_base_file_name = base_file_name.upper()
+
+    expected_guard = replace_special_with_underscore(
+      file_with_path.upper() + '_')
+
+    # For "path/elem/file_name.h" we should really only accept
+    # PATH_ELEM_FILE_NAME_H_ per coding style.  Unfortunately there
+    # are too many (1000+) files with slight deviations from the
+    # coding style. The most important part is that the include guard
+    # is there, and that it's unique, not the name so this check is
+    # forgiving for existing files.
+    #
+    # As code becomes more uniform, this could be made stricter.
+
+    guard_name_pattern_list = [
+      # Anything with the right suffix (maybe with an extra _).
+      r'\w+_H__?',
+
+      # To cover include guards with old Blink style.
+      r'\w+_h',
+
+      # Anything including the uppercase name of the file.
+      r'\w*' + input_api.re.escape(replace_special_with_underscore(
+        upper_base_file_name)) + r'\w*',
+    ]
+    guard_name_pattern = '|'.join(guard_name_pattern_list)
+    guard_pattern = input_api.re.compile(
+      r'#ifndef\s+(' + guard_name_pattern + ')')
+
+    for line_number, line in enumerate(f.NewContents()):
+      if 'no-include-guard-because-multiply-included' in line:
+        guard_name = 'DUMMY'  # To not trigger check outside the loop.
+        break
+
+      if guard_name is None:
+        match = guard_pattern.match(line)
+        if match:
+          guard_name = match.group(1)
+          guard_line_number = line_number
+
+          # We allow existing files to use include guards whose names
+          # don't match the chromium style guide, but new files should
+          # get it right.
+          if not f.OldContents():
+            if guard_name != expected_guard:
+              errors.append(output_api.PresubmitPromptWarning(
+                'Header using the wrong include guard name %s' % guard_name,
+                ['%s:%d' % (f.LocalPath(), line_number + 1)],
+                'Expected: %r\nFound: %r' % (expected_guard, guard_name)))
+      else:
+        # The line after #ifndef should have a #define of the same name.
+        if line_number == guard_line_number + 1:
+          expected_line = '#define %s' % guard_name
+          if line != expected_line:
+            errors.append(output_api.PresubmitPromptWarning(
+              'Missing "%s" for include guard' % expected_line,
+              ['%s:%d' % (f.LocalPath(), line_number + 1)],
+              'Expected: %r\nGot: %r' % (expected_line, line)))
+
+        if not seen_guard_end and line == '#endif  // %s' % guard_name:
+          seen_guard_end = True
+        elif seen_guard_end:
+          if line.strip() != '':
+            errors.append(output_api.PresubmitPromptWarning(
+              'Include guard %s not covering the whole file' % (
+                guard_name), [f.LocalPath()]))
+            break  # Nothing else to check and enough to warn once.
+
+    if guard_name is None:
+      errors.append(output_api.PresubmitPromptWarning(
+        'Missing include guard %s' % expected_guard,
+        [f.LocalPath()],
+        'Missing include guard in %s\n'
+        'Recommended name: %s\n'
+        'This check can be disabled by having the string\n'
+        'no-include-guard-because-multiply-included in the header.' %
+        (f.LocalPath(), expected_guard)))
+
+  return errors
+
+
 def _CheckForWindowsLineEndings(input_api, output_api):
   """Check source code and known ascii text files for Windows style line
   endings.
@@ -2752,9 +3289,12 @@
   source_file_filter = lambda f: input_api.FilterSourceFile(
       f, white_list=file_inclusion_pattern, black_list=None)
   for f in input_api.AffectedSourceFiles(source_file_filter):
-    for line_number, line in f.ChangedContents():
+    include_file = False
+    for _, line in f.ChangedContents():
       if line.endswith('\r\n'):
-        problems.append(f.LocalPath())
+        include_file = True
+    if include_file:
+      problems.append(f.LocalPath())
 
   if problems:
     return [output_api.PresubmitPromptWarning('Are you sure that you want '
@@ -2764,8 +3304,7 @@
   return []
 
 
-def _CheckSyslogUseWarning(input_api, output_api, source_file_filter=None,
-                           lint_filters=None, verbose_level=None):
+def _CheckSyslogUseWarning(input_api, output_api, source_file_filter=None):
   """Checks that all source files use SYSLOG properly."""
   syslog_files = []
   for f in input_api.AffectedSourceFiles(source_file_filter):
@@ -2784,22 +3323,20 @@
   """Checks that crbug(.com) links are correctly prefixed by https://,
    unless they come in the accepted form TODO(crbug.com/...)
   """
-  white_list = r'.+%s' % _IMPLEMENTATION_EXTENSIONS
-  black_list = (_EXCLUDED_PATHS + _TEST_CODE_EXCLUDED_PATHS)
-  sources = lambda f: input_api.FilterSourceFile(
-      f, white_list=white_list, black_list=black_list)
 
-  pattern = input_api.re.compile(r'//.*(?<!:\/\/)crbug[.com]*')
-  accepted_pattern = input_api.re.compile(r'//.*TODO\(crbug[.com]*');
+  # The cr bug strings are split to avoid matching in real presubmit
+  # checkings.
+  pattern = input_api.re.compile(r'//.*(?<!:\/\/)cr''bug[.com]*')
+  accepted_pattern = input_api.re.compile(r'//.*TODO\(cr''bug[.com]*')
   problems = []
-  for f in input_api.AffectedSourceFiles(sources):
+  for f in input_api.AffectedSourceFiles(input_api.FilterSourceFile):
     for line_num, line in f.ChangedContents():
       if pattern.search(line) and not accepted_pattern.search(line):
         problems.append('    %s:%d %s' % (f.LocalPath(), line_num, line))
 
   if problems:
     return [output_api.PresubmitPromptWarning(
-      'Found unprefixed crbug.com URL(s), consider prepending https://\n'+
+      'Found unprefixed crbug.com URL(s), consider prepending https://\n' +
       '\n'.join(problems))]
   return []
 
@@ -2815,6 +3352,8 @@
   results.extend(_CheckSyslogUseWarning(input_api, output_api))
   results.extend(_CheckGoogleSupportAnswerUrl(input_api, output_api))
   results.extend(_CheckCrbugLinksHaveHttps(input_api, output_api))
+  results.extend(_CheckUniquePtr(input_api, output_api))
+  results.extend(_CheckNewHeaderWithoutGnChange(input_api, output_api))
   return results
 
 
@@ -2858,3 +3397,178 @@
   results.extend(input_api.canned_checks.CheckChangeHasDescription(
       input_api, output_api))
   return results
+
+
+def _CheckTranslationScreenshots(input_api, output_api):
+  PART_FILE_TAG = "part"
+  import os
+  import sys
+  from io import StringIO
+
+  try:
+    old_sys_path = sys.path
+    sys.path = sys.path + [input_api.os_path.join(
+          input_api.PresubmitLocalPath(), 'tools', 'grit')]
+    import grit.grd_reader
+    import grit.node.message
+    import grit.util
+  finally:
+    sys.path = old_sys_path
+
+  def _GetGrdMessages(grd_path_or_string, dir_path='.'):
+    """Load the grd file and return a dict of message ids to messages.
+
+    Ignores any nested grdp files pointed by <part> tag.
+    """
+    doc = grit.grd_reader.Parse(grd_path_or_string, dir_path,
+        stop_after=None, first_ids_file=None,
+        debug=False, defines=None,
+        tags_to_ignore=set([PART_FILE_TAG]))
+    return {
+      msg.attrs['name']:msg for msg in doc.GetChildrenOfType(
+        grit.node.message.MessageNode)
+    }
+
+  def _GetGrdpMessagesFromString(grdp_string):
+    """Parses the contents of a grdp file given in grdp_string.
+
+    grd_reader can't parse grdp files directly. Instead, this creates a
+    temporary directory with a grd file pointing to the grdp file, and loads the
+    grd from there. Any nested grdp files (pointed by <part> tag) are ignored.
+    """
+    WRAPPER = """<?xml version="1.0" encoding="utf-8"?>
+    <grit latest_public_release="1" current_release="1">
+      <release seq="1">
+        <messages>
+          <part file="sub.grdp" />
+        </messages>
+      </release>
+    </grit>
+    """
+    with grit.util.TempDir({'main.grd': WRAPPER,
+                            'sub.grdp': grdp_string}) as temp_dir:
+      return _GetGrdMessages(temp_dir.GetPath('main.grd'), temp_dir.GetPath())
+
+  new_or_added_paths = set(f.LocalPath()
+      for f in input_api.AffectedFiles()
+      if (f.Action() == 'A' or f.Action() == 'M'))
+  removed_paths = set(f.LocalPath()
+      for f in input_api.AffectedFiles(include_deletes=True)
+      if f.Action() == 'D')
+
+  affected_grds = [f for f in input_api.AffectedFiles()
+      if (f.LocalPath().endswith('.grd') or
+          f.LocalPath().endswith('.grdp'))]
+  affected_png_paths = [f.AbsoluteLocalPath()
+      for f in input_api.AffectedFiles()
+      if (f.LocalPath().endswith('.png'))]
+
+  # Check for screenshots. Developers can upload screenshots using
+  # tools/translation/upload_screenshots.py which finds and uploads
+  # images associated with .grd files (e.g. test_grd/IDS_STRING.png for the
+  # message named IDS_STRING in test.grd) and produces a .sha1 file (e.g.
+  # test_grd/IDS_STRING.png.sha1) for each png when the upload is successful.
+  #
+  # The logic here is as follows:
+  #
+  # - If the CL has a .png file under the screenshots directory for a grd
+  #   file, warn the developer. Actual images should never be checked into the
+  #   Chrome repo.
+  #
+  # - If the CL contains modified or new messages in grd files and doesn't
+  #   contain the corresponding .sha1 files, warn the developer to add images
+  #   and upload them via tools/translation/upload_screenshots.py.
+  #
+  # - If the CL contains modified or new messages in grd files and the
+  #   corresponding .sha1 files, everything looks good.
+  #
+  # - If the CL contains removed messages in grd files but the corresponding
+  #   .sha1 files aren't removed, warn the developer to remove them.
+  unnecessary_screenshots = []
+  missing_sha1 = []
+  unnecessary_sha1_files = []
+
+
+  def _CheckScreenshotAdded(screenshots_dir, message_id):
+    sha1_path = input_api.os_path.join(
+        screenshots_dir, message_id + '.png.sha1')
+    if sha1_path not in new_or_added_paths:
+      missing_sha1.append(sha1_path)
+
+
+  def _CheckScreenshotRemoved(screenshots_dir, message_id):
+    sha1_path = input_api.os_path.join(
+        screenshots_dir, message_id + '.png.sha1')
+    if sha1_path not in removed_paths:
+      unnecessary_sha1_files.append(sha1_path)
+
+
+  for f in affected_grds:
+    file_path = f.LocalPath()
+    old_id_to_msg_map = {}
+    new_id_to_msg_map = {}
+    if file_path.endswith('.grdp'):
+      if f.OldContents():
+        old_id_to_msg_map = _GetGrdpMessagesFromString(
+          unicode('\n'.join(f.OldContents())))
+      if f.NewContents():
+        new_id_to_msg_map = _GetGrdpMessagesFromString(
+          unicode('\n'.join(f.NewContents())))
+    else:
+      if f.OldContents():
+        old_id_to_msg_map = _GetGrdMessages(
+          StringIO(unicode('\n'.join(f.OldContents()))))
+      if f.NewContents():
+        new_id_to_msg_map = _GetGrdMessages(
+          StringIO(unicode('\n'.join(f.NewContents()))))
+
+    # Compute added, removed and modified message IDs.
+    old_ids = set(old_id_to_msg_map)
+    new_ids = set(new_id_to_msg_map)
+    added_ids = new_ids - old_ids
+    removed_ids = old_ids - new_ids
+    modified_ids = set([])
+    for key in old_ids.intersection(new_ids):
+      if (old_id_to_msg_map[key].FormatXml()
+          != new_id_to_msg_map[key].FormatXml()):
+        modified_ids.add(key)
+
+    grd_name, ext = input_api.os_path.splitext(
+        input_api.os_path.basename(file_path))
+    screenshots_dir = input_api.os_path.join(
+        input_api.os_path.dirname(file_path), grd_name + ext.replace('.', '_'))
+
+    # Check the screenshot directory for .png files. Warn if there is any.
+    for png_path in affected_png_paths:
+      if png_path.startswith(screenshots_dir):
+        unnecessary_screenshots.append(png_path)
+
+    for added_id in added_ids:
+      _CheckScreenshotAdded(screenshots_dir, added_id)
+
+    for modified_id in modified_ids:
+      _CheckScreenshotAdded(screenshots_dir, modified_id)
+
+    for removed_id in removed_ids:
+      _CheckScreenshotRemoved(screenshots_dir, removed_id)
+
+  results = []
+  if unnecessary_screenshots:
+    results.append(output_api.PresubmitNotifyResult(
+      'Do not include actual screenshots in the changelist. Run '
+      'tools/translate/upload_screenshots.py to upload them instead:',
+      sorted(unnecessary_screenshots)))
+
+  if missing_sha1:
+    results.append(output_api.PresubmitNotifyResult(
+      'You are adding or modifying UI strings.\n'
+      'To ensure the best translations, take screenshots of the relevant UI '
+      '(https://g.co/chrome/translation) and add these files to your '
+      'changelist:', sorted(missing_sha1)))
+
+  if unnecessary_sha1_files:
+    results.append(output_api.PresubmitNotifyResult(
+      'You removed strings associated with these files. Remove:',
+      sorted(unnecessary_sha1_files)))
+
+  return results
diff --git a/PRESUBMIT_test.py b/PRESUBMIT_test.py
index 4b195d8..ce9e79b 100755
--- a/PRESUBMIT_test.py
+++ b/PRESUBMIT_test.py
@@ -4,16 +4,17 @@
 # found in the LICENSE file.
 
 import os.path
-import re
 import subprocess
 import unittest
 
 import PRESUBMIT
-from PRESUBMIT_test_mocks import MockChange, MockFile, MockAffectedFile
+from PRESUBMIT_test_mocks import MockFile, MockAffectedFile
 from PRESUBMIT_test_mocks import MockInputApi, MockOutputApi
 
+
 _TEST_DATA_DIR = 'base/test/data/presubmit'
 
+
 class VersionControlConflictsTest(unittest.TestCase):
   def testTypicalConflict(self):
     lines = ['<<<<<<< HEAD',
@@ -38,13 +39,17 @@
         MockInputApi(), MockFile('some/polymer/README.md', lines))
     self.assertEqual(0, len(errors))
 
+
 class UmaHistogramChangeMatchedOrNotTest(unittest.TestCase):
   def testTypicalCorrectlyMatchedChange(self):
     diff_cc = ['UMA_HISTOGRAM_BOOL("Bla.Foo.Dummy", true)']
+    diff_java = [
+      'RecordHistogram.recordBooleanHistogram("Bla.Foo.Dummy", true)']
     diff_xml = ['<histogram name="Bla.Foo.Dummy"> </histogram>']
     mock_input_api = MockInputApi()
     mock_input_api.files = [
       MockFile('some/path/foo.cc', diff_cc),
+      MockFile('some/path/foo.java', diff_java),
       MockFile('tools/metrics/histograms/histograms.xml', diff_xml),
     ]
     warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
@@ -53,15 +58,24 @@
 
   def testTypicalNotMatchedChange(self):
     diff_cc = ['UMA_HISTOGRAM_BOOL("Bla.Foo.Dummy", true)']
+    diff_java = [
+      'RecordHistogram.recordBooleanHistogram("Bla.Foo.Dummy", true)']
     mock_input_api = MockInputApi()
-    mock_input_api.files = [MockFile('some/path/foo.cc', diff_cc)]
+    mock_input_api.files = [
+      MockFile('some/path/foo.cc', diff_cc),
+      MockFile('some/path/foo.java', diff_java),
+    ]
     warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
                                                    MockOutputApi())
     self.assertEqual(1, len(warnings))
     self.assertEqual('warning', warnings[0].type)
+    self.assertTrue('foo.cc' in warnings[0].items[0])
+    self.assertTrue('foo.java' in warnings[0].items[1])
 
   def testTypicalNotMatchedChangeViaSuffixes(self):
     diff_cc = ['UMA_HISTOGRAM_BOOL("Bla.Foo.Dummy", true)']
+    diff_java = [
+      'RecordHistogram.recordBooleanHistogram("Bla.Foo.Dummy", true)']
     diff_xml = ['<histogram_suffixes name="SuperHistogram">',
                 '  <suffix name="Dummy"/>',
                 '  <affected-histogram name="Snafu.Dummy"/>',
@@ -69,15 +83,20 @@
     mock_input_api = MockInputApi()
     mock_input_api.files = [
       MockFile('some/path/foo.cc', diff_cc),
+      MockFile('some/path/foo.java', diff_java),
       MockFile('tools/metrics/histograms/histograms.xml', diff_xml),
     ]
     warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
                                                    MockOutputApi())
     self.assertEqual(1, len(warnings))
     self.assertEqual('warning', warnings[0].type)
+    self.assertTrue('foo.cc' in warnings[0].items[0])
+    self.assertTrue('foo.java' in warnings[0].items[1])
 
   def testTypicalCorrectlyMatchedChangeViaSuffixes(self):
     diff_cc = ['UMA_HISTOGRAM_BOOL("Bla.Foo.Dummy", true)']
+    diff_java = [
+      'RecordHistogram.recordBooleanHistogram("Bla.Foo.Dummy", true)']
     diff_xml = ['<histogram_suffixes name="SuperHistogram">',
                 '  <suffix name="Dummy"/>',
                 '  <affected-histogram name="Bla.Foo"/>',
@@ -85,6 +104,7 @@
     mock_input_api = MockInputApi()
     mock_input_api.files = [
       MockFile('some/path/foo.cc', diff_cc),
+      MockFile('some/path/foo.java', diff_java),
       MockFile('tools/metrics/histograms/histograms.xml', diff_xml),
     ]
     warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
@@ -93,6 +113,7 @@
 
   def testTypicalCorrectlyMatchedChangeViaSuffixesWithSeparator(self):
     diff_cc = ['UMA_HISTOGRAM_BOOL("Snafu_Dummy", true)']
+    diff_java = ['RecordHistogram.recordBooleanHistogram("Snafu_Dummy", true)']
     diff_xml = ['<histogram_suffixes name="SuperHistogram" separator="_">',
                 '  <suffix name="Dummy"/>',
                 '  <affected-histogram name="Snafu"/>',
@@ -100,12 +121,65 @@
     mock_input_api = MockInputApi()
     mock_input_api.files = [
       MockFile('some/path/foo.cc', diff_cc),
+      MockFile('some/path/foo.java', diff_java),
       MockFile('tools/metrics/histograms/histograms.xml', diff_xml),
     ]
     warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
                                                    MockOutputApi())
     self.assertEqual(0, len(warnings))
 
+  def testNameMatch(self):
+    # Check that the detected histogram name is "Dummy" and not, e.g.,
+    # "Dummy\", true);  // The \"correct"
+    diff_cc = ['UMA_HISTOGRAM_BOOL("Dummy", true);  // The "correct" histogram']
+    diff_java = [
+      'RecordHistogram.recordBooleanHistogram("Dummy", true);' +
+      '  // The "correct" histogram']
+    diff_xml = ['<histogram name="Dummy"> </histogram>']
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('some/path/foo.cc', diff_cc),
+      MockFile('some/path/foo.java', diff_java),
+      MockFile('tools/metrics/histograms/histograms.xml', diff_xml),
+    ]
+    warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
+                                                   MockOutputApi())
+    self.assertEqual(0, len(warnings))
+
+  def testSimilarMacroNames(self):
+    diff_cc = ['PUMA_HISTOGRAM_COOL("Mountain Lion", 42)']
+    diff_java = [
+      'FakeRecordHistogram.recordFakeHistogram("Mountain Lion", 42)']
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('some/path/foo.cc', diff_cc),
+      MockFile('some/path/foo.java', diff_java),
+    ]
+    warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
+                                                   MockOutputApi())
+    self.assertEqual(0, len(warnings))
+
+  def testMultiLine(self):
+    diff_cc = ['UMA_HISTOGRAM_BOOLEAN(', '    "Multi.Line", true)']
+    diff_cc2 = ['UMA_HISTOGRAM_BOOLEAN(', '    "Multi.Line"', '    , true)']
+    diff_java = [
+      'RecordHistogram.recordBooleanHistogram(',
+      '    "Multi.Line", true);',
+    ]
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('some/path/foo.cc', diff_cc),
+      MockFile('some/path/foo2.cc', diff_cc2),
+      MockFile('some/path/foo.java', diff_java),
+    ]
+    warnings = PRESUBMIT._CheckUmaHistogramChanges(mock_input_api,
+                                                   MockOutputApi())
+    self.assertEqual(1, len(warnings))
+    self.assertEqual('warning', warnings[0].type)
+    self.assertTrue('foo.cc' in warnings[0].items[0])
+    self.assertTrue('foo2.cc' in warnings[0].items[1])
+
+
 class BadExtensionsTest(unittest.TestCase):
   def testBadRejFile(self):
     mock_input_api = MockInputApi()
@@ -154,14 +228,14 @@
     diff_bad_h = ['Foo* foo = base::Singleton<Foo>::get();']
     mock_input_api = MockInputApi()
     mock_input_api.files = [MockAffectedFile('base/memory/singleton.h',
-                                     diff_singleton_h),
+                                             diff_singleton_h),
                             MockAffectedFile('foo.h', diff_foo_h),
                             MockAffectedFile('foo2.h', diff_foo2_h),
                             MockAffectedFile('bad.h', diff_bad_h)]
     warnings = PRESUBMIT._CheckSingletonInHeaders(mock_input_api,
                                                   MockOutputApi())
     self.assertEqual(1, len(warnings))
-    self.assertEqual(2, len(warnings[0].items))
+    self.assertEqual(1, len(warnings[0].items))
     self.assertEqual('error', warnings[0].type)
     self.assertTrue('Found base::Singleton<T>' in warnings[0].message)
 
@@ -203,14 +277,14 @@
              ' # ifdef TARGET_IPHONE_SIMULATOR',
              '# if defined(VALID) || defined(TARGET_IPHONE_SIMULATOR)',
              '# else  // defined(TARGET_IPHONE_SIMULATOR)',
-             '#endif  // defined(TARGET_IPHONE_SIMULATOR)',]
+             '#endif  // defined(TARGET_IPHONE_SIMULATOR)']
     errors = PRESUBMIT._CheckForInvalidIfDefinedMacrosInFile(
         MockInputApi(), MockFile('some/path/source.mm', lines))
     self.assertEqual(len(lines), len(errors))
 
   def testValidIfDefinedMacroNames(self):
     lines = ['#if defined(FOO)',
-             '#ifdef BAR',]
+             '#ifdef BAR']
     errors = PRESUBMIT._CheckForInvalidIfDefinedMacrosInFile(
         MockInputApi(), MockFile('some/path/source.cc', lines))
     self.assertEqual(0, len(errors))
@@ -320,7 +394,7 @@
       ('invalid_json_4.json',
        ['{ "a": "b" "c": "d" }'],
        'Expecting , delimiter:'),
-      ]
+    ]
 
     input_api.files = [MockFile(filename, contents)
                        for (filename, contents, _) in test_data]
@@ -476,7 +550,7 @@
         '  };',
         '};'],
        'Interface missing name.'),
-      ]
+    ]
 
     input_api.files = [MockFile(filename, contents)
                        for (filename, contents, _) in test_data]
@@ -503,7 +577,6 @@
             'android_chromium_variable_nexus4',
             'android_clang_dbg_recipe',
             'android_compile_dbg',
-            'android_compile_mips_dbg',
             'android_compile_x64_dbg',
             'android_compile_x86_dbg',
             'android_coverage',
@@ -601,7 +674,6 @@
     self.assertEqual(
       [], PRESUBMIT._CheckUserActionUpdate(input_api, MockOutputApi()))
 
-
   def testUserMetricsActionNotAddedToActions(self):
     input_api = MockInputApi()
     file_with_user_action = 'file_with_user_action.cc'
@@ -656,10 +728,21 @@
       MockAffectedFile('new.pydeps', [], action='A'),
     ]
 
+    self.mock_input_api.CreateMockFileInPath(
+        [x.LocalPath() for x in self.mock_input_api.AffectedFiles(
+            include_deletes=True)])
     results = self._RunCheck()
     self.assertEqual(1, len(results))
     self.assertTrue('PYDEPS_FILES' in str(results[0]))
 
+  def testPydepNotInSrc(self):
+    self.mock_input_api.files = [
+      MockAffectedFile('new.pydeps', [], action='A'),
+    ]
+    self.mock_input_api.CreateMockFileInPath([])
+    results = self._RunCheck()
+    self.assertEqual(0, len(results))
+
   def testRemovedPydep(self):
     # PRESUBMIT._CheckPydepsNeedsUpdating is only implemented for Android.
     if self.mock_input_api.platform != 'linux2':
@@ -668,7 +751,9 @@
     self.mock_input_api.files = [
       MockAffectedFile(PRESUBMIT._ALL_PYDEPS_FILES[0], [], action='D'),
     ]
-
+    self.mock_input_api.CreateMockFileInPath(
+        [x.LocalPath() for x in self.mock_input_api.AffectedFiles(
+            include_deletes=True)])
     results = self._RunCheck()
     self.assertEqual(1, len(results))
     self.assertTrue('PYDEPS_FILES' in str(results[0]))
@@ -741,6 +826,179 @@
     self.assertTrue('File is stale' in str(results[0]))
     self.assertTrue('File is stale' in str(results[1]))
 
+
+class IncludeGuardTest(unittest.TestCase):
+  def testIncludeGuardChecks(self):
+    mock_input_api = MockInputApi()
+    mock_output_api = MockOutputApi()
+    mock_input_api.files = [
+        MockAffectedFile('content/browser/thing/foo.h', [
+          '// Comment',
+          '#ifndef CONTENT_BROWSER_THING_FOO_H_',
+          '#define CONTENT_BROWSER_THING_FOO_H_',
+          'struct McBoatFace;',
+          '#endif  // CONTENT_BROWSER_THING_FOO_H_',
+        ]),
+        MockAffectedFile('content/browser/thing/bar.h', [
+          '#ifndef CONTENT_BROWSER_THING_BAR_H_',
+          '#define CONTENT_BROWSER_THING_BAR_H_',
+          'namespace content {',
+          '#endif  // CONTENT_BROWSER_THING_BAR_H_',
+          '}  // namespace content',
+        ]),
+        MockAffectedFile('content/browser/test1.h', [
+          'namespace content {',
+          '}  // namespace content',
+        ]),
+        MockAffectedFile('content\\browser\\win.h', [
+          '#ifndef CONTENT_BROWSER_WIN_H_',
+          '#define CONTENT_BROWSER_WIN_H_',
+          'struct McBoatFace;',
+          '#endif  // CONTENT_BROWSER_WIN_H_',
+        ]),
+        MockAffectedFile('content/browser/test2.h', [
+          '// Comment',
+          '#ifndef CONTENT_BROWSER_TEST2_H_',
+          'struct McBoatFace;',
+          '#endif  // CONTENT_BROWSER_TEST2_H_',
+        ]),
+        MockAffectedFile('content/browser/internal.h', [
+          '// Comment',
+          '#ifndef CONTENT_BROWSER_INTERNAL_H_',
+          '#define CONTENT_BROWSER_INTERNAL_H_',
+          '// Comment',
+          '#ifndef INTERNAL_CONTENT_BROWSER_INTERNAL_H_',
+          '#define INTERNAL_CONTENT_BROWSER_INTERNAL_H_',
+          'namespace internal {',
+          '}  // namespace internal',
+          '#endif  // INTERNAL_CONTENT_BROWSER_THING_BAR_H_',
+          'namespace content {',
+          '}  // namespace content',
+          '#endif  // CONTENT_BROWSER_THING_BAR_H_',
+        ]),
+        MockAffectedFile('content/browser/thing/foo.cc', [
+          '// This is a non-header.',
+        ]),
+        MockAffectedFile('content/browser/disabled.h', [
+          '// no-include-guard-because-multiply-included',
+          'struct McBoatFace;',
+        ]),
+        # New files don't allow misspelled include guards.
+        MockAffectedFile('content/browser/spleling.h', [
+          '#ifndef CONTENT_BROWSER_SPLLEING_H_',
+          '#define CONTENT_BROWSER_SPLLEING_H_',
+          'struct McBoatFace;',
+          '#endif  // CONTENT_BROWSER_SPLLEING_H_',
+        ]),
+        # New files don't allow + in include guards.
+        MockAffectedFile('content/browser/foo+bar.h', [
+          '#ifndef CONTENT_BROWSER_FOO+BAR_H_',
+          '#define CONTENT_BROWSER_FOO+BAR_H_',
+          'struct McBoatFace;',
+          '#endif  // CONTENT_BROWSER_FOO+BAR_H_',
+        ]),
+        # Old files allow misspelled include guards (for now).
+        MockAffectedFile('chrome/old.h', [
+          '// New contents',
+          '#ifndef CHROME_ODL_H_',
+          '#define CHROME_ODL_H_',
+          '#endif  // CHROME_ODL_H_',
+        ], [
+          '// Old contents',
+          '#ifndef CHROME_ODL_H_',
+          '#define CHROME_ODL_H_',
+          '#endif  // CHROME_ODL_H_',
+        ]),
+        # Using a Blink style include guard outside Blink is wrong.
+        MockAffectedFile('content/NotInBlink.h', [
+          '#ifndef NotInBlink_h',
+          '#define NotInBlink_h',
+          'struct McBoatFace;',
+          '#endif  // NotInBlink_h',
+        ]),
+        # Using a Blink style include guard in Blink is no longer ok.
+        MockAffectedFile('third_party/blink/InBlink.h', [
+          '#ifndef InBlink_h',
+          '#define InBlink_h',
+          'struct McBoatFace;',
+          '#endif  // InBlink_h',
+        ]),
+        # Using a bad include guard in Blink is not ok.
+        MockAffectedFile('third_party/blink/AlsoInBlink.h', [
+          '#ifndef WrongInBlink_h',
+          '#define WrongInBlink_h',
+          'struct McBoatFace;',
+          '#endif  // WrongInBlink_h',
+        ]),
+        # Using a bad include guard in Blink is not accepted even if
+        # it's an old file.
+        MockAffectedFile('third_party/blink/StillInBlink.h', [
+          '// New contents',
+          '#ifndef AcceptedInBlink_h',
+          '#define AcceptedInBlink_h',
+          'struct McBoatFace;',
+          '#endif  // AcceptedInBlink_h',
+        ], [
+          '// Old contents',
+          '#ifndef AcceptedInBlink_h',
+          '#define AcceptedInBlink_h',
+          'struct McBoatFace;',
+          '#endif  // AcceptedInBlink_h',
+        ]),
+        # Using a non-Chromium include guard in third_party
+        # (outside blink) is accepted.
+        MockAffectedFile('third_party/foo/some_file.h', [
+          '#ifndef REQUIRED_RPCNDR_H_',
+          '#define REQUIRED_RPCNDR_H_',
+          'struct SomeFileFoo;',
+          '#endif  // REQUIRED_RPCNDR_H_',
+        ]),
+      ]
+    msgs = PRESUBMIT._CheckForIncludeGuards(
+        mock_input_api, mock_output_api)
+    expected_fail_count = 8
+    self.assertEqual(expected_fail_count, len(msgs),
+                     'Expected %d items, found %d: %s'
+                     % (expected_fail_count, len(msgs), msgs))
+    self.assertEqual(msgs[0].items, ['content/browser/thing/bar.h'])
+    self.assertEqual(msgs[0].message,
+                     'Include guard CONTENT_BROWSER_THING_BAR_H_ '
+                     'not covering the whole file')
+
+    self.assertEqual(msgs[1].items, ['content/browser/test1.h'])
+    self.assertEqual(msgs[1].message,
+                     'Missing include guard CONTENT_BROWSER_TEST1_H_')
+
+    self.assertEqual(msgs[2].items, ['content/browser/test2.h:3'])
+    self.assertEqual(msgs[2].message,
+                     'Missing "#define CONTENT_BROWSER_TEST2_H_" for '
+                     'include guard')
+
+    self.assertEqual(msgs[3].items, ['content/browser/spleling.h:1'])
+    self.assertEqual(msgs[3].message,
+                     'Header using the wrong include guard name '
+                     'CONTENT_BROWSER_SPLLEING_H_')
+
+    self.assertEqual(msgs[4].items, ['content/browser/foo+bar.h'])
+    self.assertEqual(msgs[4].message,
+                     'Missing include guard CONTENT_BROWSER_FOO_BAR_H_')
+
+    self.assertEqual(msgs[5].items, ['content/NotInBlink.h:1'])
+    self.assertEqual(msgs[5].message,
+                     'Header using the wrong include guard name '
+                     'NotInBlink_h')
+
+    self.assertEqual(msgs[6].items, ['third_party/blink/InBlink.h:1'])
+    self.assertEqual(msgs[6].message,
+                     'Header using the wrong include guard name '
+                     'InBlink_h')
+
+    self.assertEqual(msgs[7].items, ['third_party/blink/AlsoInBlink.h:1'])
+    self.assertEqual(msgs[7].message,
+                     'Header using the wrong include guard name '
+                     'WrongInBlink_h')
+
+
 class AndroidDeprecatedTestAnnotationTest(unittest.TestCase):
   def testCheckAndroidTestAnnotationUsage(self):
     mock_input_api = MockInputApi()
@@ -786,8 +1044,9 @@
     self.assertTrue('UsedDeprecatedSmokeAnnotation.java:1' in msgs[0].items,
                     'UsedDeprecatedSmokeAnnotation not found in errors')
 
+
 class AndroidDeprecatedJUnitFrameworkTest(unittest.TestCase):
-  def testCheckAndroidTestAnnotationUsage(self):
+  def testCheckAndroidTestJUnitFramework(self):
     mock_input_api = MockInputApi()
     mock_output_api = MockOutputApi()
 
@@ -820,8 +1079,9 @@
                     in msgs[0].items,
                     'UsedDeprecatedJUnitAssert not found in errors')
 
-class AndroidJUnitBaseClass(unittest.TestCase):
-  def testCheckAndroidTestAnnotationUsage(self):
+
+class AndroidJUnitBaseClassTest(unittest.TestCase):
+  def testCheckAndroidTestJUnitBaseClass(self):
     mock_input_api = MockInputApi()
     mock_output_api = MockOutputApi()
 
@@ -837,7 +1097,7 @@
         MockAffectedFile('HistoricallyIncorrectTest.java', [
           'public class Test extends BaseCaseA {',
           '}',
-          ], old_contents=[
+        ], old_contents=[
           'public class Test extends BaseCaseB {',
           '}',
         ]),
@@ -850,11 +1110,11 @@
           'public class IncorrectTest extends TestCase {',
           '}',
         ]),
-        MockAffectedFile('IncorrectTestWithInterface.java', [
+        MockAffectedFile('IncorrectWithInterfaceTest.java', [
           'public class Test implements X extends BaseClass {',
           '}',
         ]),
-        MockAffectedFile('IncorrectTestMultiLine.java', [
+        MockAffectedFile('IncorrectMultiLineTest.java', [
           'public class Test implements X, Y, Z',
           '        extends TestBase {',
           '}',
@@ -870,11 +1130,12 @@
                      % (3, len(msgs[0].items), msgs[0].items))
     self.assertTrue('IncorrectTest.java:1' in msgs[0].items,
                     'IncorrectTest not found in errors')
-    self.assertTrue('IncorrectTestWithInterface.java:1'
+    self.assertTrue('IncorrectWithInterfaceTest.java:1'
                     in msgs[0].items,
-                    'IncorrectTestWithInterface not found in errors')
-    self.assertTrue('IncorrectTestMultiLine.java:2' in msgs[0].items,
-                    'IncorrectTestMultiLine not found in errors')
+                    'IncorrectWithInterfaceTest not found in errors')
+    self.assertTrue('IncorrectMultiLineTest.java:2' in msgs[0].items,
+                    'IncorrectMultiLineTest not found in errors')
+
 
 class LogUsageTest(unittest.TestCase):
 
@@ -1001,6 +1262,7 @@
     self.assertTrue('HasDottedTag.java' in msgs[4].items)
     self.assertTrue('HasOldTag.java' in msgs[4].items)
 
+
 class GoogleAnswerUrlFormatTest(unittest.TestCase):
 
   def testCatchAnswerUrlId(self):
@@ -1031,6 +1293,7 @@
       input_api, MockOutputApi())
     self.assertEqual(0, len(warnings))
 
+
 class HardcodedGoogleHostsTest(unittest.TestCase):
 
   def testWarnOnAssignedLiterals(self):
@@ -1073,7 +1336,7 @@
       ])
     ]
     warnings = PRESUBMIT._CheckUselessForwardDeclarations(mock_input_api,
-      MockOutputApi())
+                                                          MockOutputApi())
     self.assertEqual(0, len(warnings))
 
   def testNoNestedDeclaration(self):
@@ -1087,7 +1350,7 @@
       ])
     ]
     warnings = PRESUBMIT._CheckUselessForwardDeclarations(mock_input_api,
-      MockOutputApi())
+                                                          MockOutputApi())
     self.assertEqual(0, len(warnings))
 
   def testSubStrings(self):
@@ -1101,7 +1364,7 @@
       ])
     ]
     warnings = PRESUBMIT._CheckUselessForwardDeclarations(mock_input_api,
-      MockOutputApi())
+                                                          MockOutputApi())
     self.assertEqual(2, len(warnings))
 
   def testUselessForwardDeclaration(self):
@@ -1115,7 +1378,7 @@
       ])
     ]
     warnings = PRESUBMIT._CheckUselessForwardDeclarations(mock_input_api,
-      MockOutputApi())
+                                                          MockOutputApi())
     self.assertEqual(2, len(warnings))
 
   def testBlinkHeaders(self):
@@ -1131,7 +1394,7 @@
       ])
     ]
     warnings = PRESUBMIT._CheckUselessForwardDeclarations(mock_input_api,
-      MockOutputApi())
+                                                          MockOutputApi())
     self.assertEqual(4, len(warnings))
 
 
@@ -1182,6 +1445,7 @@
         mock_input_api, mock_output_api)
     self.assertEqual(2, len(warnings))
 
+
 class RelativeIncludesTest(unittest.TestCase):
   def testThirdPartyNotWebKitIgnored(self):
     mock_input_api = MockInputApi()
@@ -1247,6 +1511,113 @@
     self.assertEqual(1, len(errors))
 
 
+class NewHeaderWithoutGnChangeTest(unittest.TestCase):
+  def testAddHeaderWithoutGn(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', ''),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(1, len(warnings))
+    self.assertTrue('base/stuff.h' in warnings[0].items)
+
+  def testModifyHeader(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', '', action='M'),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(0, len(warnings))
+
+  def testDeleteHeader(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', '', action='D'),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(0, len(warnings))
+
+  def testAddHeaderWithGn(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', ''),
+      MockAffectedFile('base/BUILD.gn', 'stuff.h'),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(0, len(warnings))
+
+  def testAddHeaderWithGni(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', ''),
+      MockAffectedFile('base/files.gni', 'stuff.h'),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(0, len(warnings))
+
+  def testAddHeaderWithOther(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', ''),
+      MockAffectedFile('base/stuff.cc', 'stuff.h'),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(1, len(warnings))
+
+  def testAddHeaderWithWrongGn(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', ''),
+      MockAffectedFile('base/BUILD.gn', 'stuff_h'),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(1, len(warnings))
+
+  def testAddHeadersWithGn(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', ''),
+      MockAffectedFile('base/another.h', ''),
+      MockAffectedFile('base/BUILD.gn', 'another.h\nstuff.h'),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(0, len(warnings))
+
+  def testAddHeadersWithWrongGn(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', ''),
+      MockAffectedFile('base/another.h', ''),
+      MockAffectedFile('base/BUILD.gn', 'another_h\nstuff.h'),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(1, len(warnings))
+    self.assertFalse('base/stuff.h' in warnings[0].items)
+    self.assertTrue('base/another.h' in warnings[0].items)
+
+  def testAddHeadersWithWrongGn2(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockAffectedFile('base/stuff.h', ''),
+      MockAffectedFile('base/another.h', ''),
+      MockAffectedFile('base/BUILD.gn', 'another_h\nstuff_h'),
+    ]
+    warnings = PRESUBMIT._CheckNewHeaderWithoutGnChange(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(1, len(warnings))
+    self.assertTrue('base/stuff.h' in warnings[0].items)
+    self.assertTrue('base/another.h' in warnings[0].items)
+
+
 class MojoManifestOwnerTest(unittest.TestCase):
   def testMojoManifestChangeNeedsSecurityOwner(self):
     mock_input_api = MockInputApi()
@@ -1288,23 +1659,361 @@
     self.assertEqual([], errors)
 
 
-class CrbugUrlFormatTest(unittest.TestCase):
-
-  def testCheckCrbugLinksHaveHttps(self):
+class CheckCrbugLinksHaveHttpsTest(unittest.TestCase):
+  def assertWarningsWithFile(self, content, expected_warnings, file_name):
     input_api = MockInputApi()
     input_api.files = [
-      MockFile('somewhere/file.cc',
-               ['// TODO(developer): crbug.com should be linkified',
-                '// TODO(developer): (crbug.com) should be linkified',
-                '// TODO(developer): crbug/123 should be well formed',
-                '// TODO(developer): http://crbug.com it\'s OK',
-                '// TODO(developer): https://crbug.com is just great',
-                '// TODO(crbug.com/123456): this pattern it\'s also OK']),
+      MockFile(file_name, [content])
     ]
 
     warnings = PRESUBMIT._CheckCrbugLinksHaveHttps(input_api, MockOutputApi())
+    self.assertEqual(expected_warnings, len(warnings))
+
+  def assertWarnings(self, content, expected_warnings):
+    for f in ['somewhere/file.cc', 'file.java', 'file.py', 'file_test.cc']:
+      self.assertWarningsWithFile(content, expected_warnings, f)
+
+  # The cr bug strings are split to avoid matching in real PRESUBMIT, so meta!
+  def testNoScheme(self):
+    self.assertWarnings('// TODO(dev): cr''bug.com should be linkified', 1)
+
+  def testNoScheme2(self):
+    self.assertWarnings('// TODO(dev): (cr''bug.com) should be linkified', 1)
+
+  def testNoCom(self):
+    self.assertWarnings('// TODO(dev): cr''bug/123 should be well formed', 1)
+
+  def testHttp(self):
+    self.assertWarnings('// TODO(dev): http://cr''bug.com it\'s OK', 0)
+
+  def testHttps(self):
+    self.assertWarnings('// TODO(dev): https://cr''bug.com is just great', 0)
+
+  def testTodo(self):
+    self.assertWarnings('// TODO(cr''bug.com/123456): it\'s also OK', 0)
+
+
+class BannedFunctionCheckTest(unittest.TestCase):
+
+  def testBannedIosObcjFunctions(self):
+    input_api = MockInputApi()
+    input_api.files = [
+      MockFile('some/ios/file.mm',
+               ['TEST(SomeClassTest, SomeInteraction) {',
+                '}']),
+      MockFile('some/mac/file.mm',
+               ['TEST(SomeClassTest, SomeInteraction) {',
+                '}']),
+      MockFile('another/ios_file.mm',
+               ['class SomeTest : public testing::Test {};']),
+    ]
+
+    errors = PRESUBMIT._CheckNoBannedFunctions(input_api, MockOutputApi())
+    self.assertEqual(1, len(errors))
+    self.assertTrue('some/ios/file.mm' in errors[0].message)
+    self.assertTrue('another/ios_file.mm' in errors[0].message)
+    self.assertTrue('some/mac/file.mm' not in errors[0].message)
+
+
+class NoProductionCodeUsingTestOnlyFunctionsTest(unittest.TestCase):
+  def testTruePositives(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('some/path/foo.cc', ['foo_for_testing();']),
+      MockFile('some/path/foo.mm', ['FooForTesting();']),
+      MockFile('some/path/foo.cxx', ['FooForTests();']),
+      MockFile('some/path/foo.cpp', ['foo_for_test();']),
+    ]
+
+    results = PRESUBMIT._CheckNoProductionCodeUsingTestOnlyFunctions(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(1, len(results))
+    self.assertEqual(4, len(results[0].items))
+    self.assertTrue('foo.cc' in results[0].items[0])
+    self.assertTrue('foo.mm' in results[0].items[1])
+    self.assertTrue('foo.cxx' in results[0].items[2])
+    self.assertTrue('foo.cpp' in results[0].items[3])
+
+  def testFalsePositives(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('some/path/foo.h', ['foo_for_testing();']),
+      MockFile('some/path/foo.mm', ['FooForTesting() {']),
+      MockFile('some/path/foo.cc', ['::FooForTests();']),
+      MockFile('some/path/foo.cpp', ['// foo_for_test();']),
+    ]
+
+    results = PRESUBMIT._CheckNoProductionCodeUsingTestOnlyFunctions(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(0, len(results))
+
+
+class NoProductionJavaCodeUsingTestOnlyFunctionsTest(unittest.TestCase):
+  def testTruePositives(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('dir/java/src/foo.java', ['FooForTesting();']),
+      MockFile('dir/java/src/bar.java', ['FooForTests(x);']),
+      MockFile('dir/java/src/baz.java', ['FooForTest(', 'y', ');']),
+      MockFile('dir/java/src/mult.java', [
+        'int x = SomethingLongHere()',
+        '    * SomethingLongHereForTesting();'
+      ])
+    ]
+
+    results = PRESUBMIT._CheckNoProductionCodeUsingTestOnlyFunctionsJava(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(1, len(results))
+    self.assertEqual(4, len(results[0].items))
+    self.assertTrue('foo.java' in results[0].items[0])
+    self.assertTrue('bar.java' in results[0].items[1])
+    self.assertTrue('baz.java' in results[0].items[2])
+    self.assertTrue('mult.java' in results[0].items[3])
+
+  def testFalsePositives(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('dir/java/src/foo.xml', ['FooForTesting();']),
+      MockFile('dir/java/src/foo.java', ['FooForTests() {']),
+      MockFile('dir/java/src/bar.java', ['// FooForTest();']),
+      MockFile('dir/java/src/bar2.java', ['x = 1; // FooForTest();']),
+      MockFile('dir/javatests/src/baz.java', ['FooForTest(', 'y', ');']),
+      MockFile('dir/junit/src/baz.java', ['FooForTest(', 'y', ');']),
+      MockFile('dir/junit/src/javadoc.java', [
+        '/** Use FooForTest(); to obtain foo in tests.'
+        ' */'
+      ]),
+      MockFile('dir/junit/src/javadoc2.java', [
+        '/** ',
+        ' * Use FooForTest(); to obtain foo in tests.'
+        ' */'
+      ]),
+    ]
+
+    results = PRESUBMIT._CheckNoProductionCodeUsingTestOnlyFunctionsJava(
+        mock_input_api, MockOutputApi())
+    self.assertEqual(0, len(results))
+
+
+class CheckUniquePtrTest(unittest.TestCase):
+  def testTruePositivesNullptr(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('dir/baz.cc', ['std::unique_ptr<T>()']),
+      MockFile('dir/baz-p.cc', ['std::unique_ptr<T<P>>()']),
+    ]
+
+    results = PRESUBMIT._CheckUniquePtr(mock_input_api, MockOutputApi())
+    self.assertEqual(1, len(results))
+    self.assertTrue('nullptr' in results[0].message)
+    self.assertEqual(2, len(results[0].items))
+    self.assertTrue('baz.cc' in results[0].items[0])
+    self.assertTrue('baz-p.cc' in results[0].items[1])
+
+  def testTruePositivesConstructor(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('dir/foo.cc', ['return std::unique_ptr<T>(foo);']),
+      MockFile('dir/bar.mm', ['bar = std::unique_ptr<T>(foo)']),
+      MockFile('dir/mult.cc', [
+        'return',
+        '    std::unique_ptr<T>(barVeryVeryLongFooSoThatItWouldNotFitAbove);'
+      ]),
+      MockFile('dir/mult2.cc', [
+        'barVeryVeryLongLongBaaaaaarSoThatTheLineLimitIsAlmostReached =',
+        '    std::unique_ptr<T>(foo);'
+      ]),
+      MockFile('dir/mult3.cc', [
+        'bar = std::unique_ptr<T>(',
+        '    fooVeryVeryVeryLongStillGoingWellThisWillTakeAWhileFinallyThere);'
+      ]),
+    ]
+
+    results = PRESUBMIT._CheckUniquePtr(mock_input_api, MockOutputApi())
+    self.assertEqual(1, len(results))
+    self.assertTrue('std::make_unique' in results[0].message)
+    self.assertEqual(5, len(results[0].items))
+    self.assertTrue('foo.cc' in results[0].items[0])
+    self.assertTrue('bar.mm' in results[0].items[1])
+    self.assertTrue('mult.cc' in results[0].items[2])
+    self.assertTrue('mult2.cc' in results[0].items[3])
+    self.assertTrue('mult3.cc' in results[0].items[4])
+
+  def testFalsePositives(self):
+    mock_input_api = MockInputApi()
+    mock_input_api.files = [
+      MockFile('dir/foo.cc', ['return std::unique_ptr<T[]>(foo);']),
+      MockFile('dir/bar.mm', ['bar = std::unique_ptr<T[]>(foo)']),
+      MockFile('dir/file.cc', ['std::unique_ptr<T> p = Foo();']),
+      MockFile('dir/baz.cc', [
+        'std::unique_ptr<T> result = std::make_unique<T>();'
+      ]),
+      MockFile('dir/baz2.cc', [
+        'std::unique_ptr<T> result = std::make_unique<T>('
+      ]),
+      MockFile('dir/nested.cc', ['set<std::unique_ptr<T>>();']),
+      MockFile('dir/nested2.cc', ['map<U, std::unique_ptr<T>>();']),
+    ]
+
+    results = PRESUBMIT._CheckUniquePtr(mock_input_api, MockOutputApi())
+    self.assertEqual(0, len(results))
+
+
+class TranslationScreenshotsTest(unittest.TestCase):
+  # An empty grd file.
+  OLD_GRD_CONTENTS = """<?xml version="1.0" encoding="UTF-8"?>
+           <grit latest_public_release="1" current_release="1">
+             <release seq="1">
+               <messages></messages>
+             </release>
+           </grit>
+        """.splitlines()
+  # A grd file with a single message.
+  NEW_GRD_CONTENTS1 = """<?xml version="1.0" encoding="UTF-8"?>
+           <grit latest_public_release="1" current_release="1">
+             <release seq="1">
+               <messages>
+                 <message name="IDS_TEST1">
+                   Test string 1
+                 </message>
+               </messages>
+             </release>
+           </grit>
+        """.splitlines()
+  # A grd file with two messages.
+  NEW_GRD_CONTENTS2 = """<?xml version="1.0" encoding="UTF-8"?>
+           <grit latest_public_release="1" current_release="1">
+             <release seq="1">
+               <messages>
+                 <message name="IDS_TEST1">
+                   Test string 1
+                 </message>
+                 <message name="IDS_TEST2">
+                   Test string 2
+                 </message>
+               </messages>
+             </release>
+           </grit>
+        """.splitlines()
+
+  DO_NOT_UPLOAD_PNG_MESSAGE = ('Do not include actual screenshots in the '
+                               'changelist. Run '
+                               'tools/translate/upload_screenshots.py to '
+                               'upload them instead:')
+  GENERATE_SIGNATURES_MESSAGE = ('You are adding or modifying UI strings.\n'
+                                 'To ensure the best translations, take '
+                                 'screenshots of the relevant UI '
+                                 '(https://g.co/chrome/translation) and add '
+                                 'these files to your changelist:')
+  REMOVE_SIGNATURES_MESSAGE = ('You removed strings associated with these '
+                               'files. Remove:')
+
+  def makeInputApi(self, files):
+    input_api = MockInputApi()
+    input_api.files = files
+    return input_api
+
+  def testNoScreenshots(self):
+    # CL modified and added messages, but didn't add any screenshots.
+    input_api = self.makeInputApi([
+      MockAffectedFile('test.grd', self.NEW_GRD_CONTENTS2,
+                       self.OLD_GRD_CONTENTS, action='M')])
+    warnings = PRESUBMIT._CheckTranslationScreenshots(input_api,
+                                                      MockOutputApi())
     self.assertEqual(1, len(warnings))
-    self.assertEqual(3, warnings[0].message.count('\n'));
+    self.assertEqual(self.GENERATE_SIGNATURES_MESSAGE, warnings[0].message)
+    self.assertEqual(
+      ['test_grd/IDS_TEST1.png.sha1', 'test_grd/IDS_TEST2.png.sha1'],
+      warnings[0].items)
+
+    input_api = self.makeInputApi([
+      MockAffectedFile('test.grd', self.NEW_GRD_CONTENTS2,
+                       self.NEW_GRD_CONTENTS1, action='M')])
+    warnings = PRESUBMIT._CheckTranslationScreenshots(input_api,
+                                                      MockOutputApi())
+    self.assertEqual(1, len(warnings))
+    self.assertEqual(self.GENERATE_SIGNATURES_MESSAGE, warnings[0].message)
+    self.assertEqual(['test_grd/IDS_TEST2.png.sha1'], warnings[0].items)
+
+
+  def testUnnecessaryScreenshots(self):
+    # CL added a single message and added the png file, but not the sha1 file.
+    input_api = self.makeInputApi([
+      MockAffectedFile('test.grd', self.NEW_GRD_CONTENTS1,
+                       self.OLD_GRD_CONTENTS, action='M'),
+      MockAffectedFile('test_grd/IDS_TEST1.png', 'binary', action='A')])
+    warnings = PRESUBMIT._CheckTranslationScreenshots(input_api,
+                                                      MockOutputApi())
+    self.assertEqual(2, len(warnings))
+    self.assertEqual(self.DO_NOT_UPLOAD_PNG_MESSAGE, warnings[0].message)
+    self.assertEqual(['test_grd/IDS_TEST1.png'], warnings[0].items)
+    self.assertEqual(self.GENERATE_SIGNATURES_MESSAGE, warnings[1].message)
+    self.assertEqual(['test_grd/IDS_TEST1.png.sha1'], warnings[1].items)
+
+    # CL added two messages, one has a png. Expect two messages:
+    # - One for the unnecessary png.
+    # - Another one for missing .sha1 files.
+    input_api = self.makeInputApi([
+      MockAffectedFile('test.grd', self.NEW_GRD_CONTENTS2,
+                       self.OLD_GRD_CONTENTS, action='M'),
+      MockAffectedFile('test_grd/IDS_TEST1.png', 'binary', action='A')])
+    warnings = PRESUBMIT._CheckTranslationScreenshots(input_api,
+                                                      MockOutputApi())
+    self.assertEqual(2, len(warnings))
+    self.assertEqual(self.DO_NOT_UPLOAD_PNG_MESSAGE, warnings[0].message)
+    self.assertEqual(['test_grd/IDS_TEST1.png'], warnings[0].items)
+    self.assertEqual(self.GENERATE_SIGNATURES_MESSAGE, warnings[1].message)
+    self.assertEqual(['test_grd/IDS_TEST1.png.sha1',
+                      'test_grd/IDS_TEST2.png.sha1'], warnings[1].items)
+
+  def testScreenshotsWithSha1(self):
+    # CL added two messages and their corresponding .sha1 files. No warnings.
+    input_api = self.makeInputApi([
+      MockAffectedFile('test.grd', self.NEW_GRD_CONTENTS2,
+                       self.OLD_GRD_CONTENTS, action='M'),
+      MockFile('test_grd/IDS_TEST1.png.sha1', 'binary', action='A'),
+      MockFile('test_grd/IDS_TEST2.png.sha1', 'binary', action='A')])
+    warnings = PRESUBMIT._CheckTranslationScreenshots(input_api,
+                                                      MockOutputApi())
+    self.assertEqual([], warnings)
+
+  def testScreenshotsRemovedWithSha1(self):
+    # Swap old contents with new contents, remove IDS_TEST1 and IDS_TEST2. The
+    # sha1 files associated with the messages should also be removed by the CL.
+    input_api = self.makeInputApi([
+      MockAffectedFile('test.grd', self.OLD_GRD_CONTENTS,
+                       self.NEW_GRD_CONTENTS2, action='M'),
+      MockFile('test_grd/IDS_TEST1.png.sha1', 'binary', ""),
+      MockFile('test_grd/IDS_TEST2.png.sha1', 'binary', "")])
+    warnings = PRESUBMIT._CheckTranslationScreenshots(input_api,
+                                                      MockOutputApi())
+    self.assertEqual(1, len(warnings))
+    self.assertEqual(self.REMOVE_SIGNATURES_MESSAGE, warnings[0].message)
+    self.assertEqual(['test_grd/IDS_TEST1.png.sha1',
+                      'test_grd/IDS_TEST2.png.sha1'], warnings[0].items)
+
+    # Same as above, but this time one of the .sha1 files is removed.
+    input_api = self.makeInputApi([
+      MockAffectedFile('test.grd', self.OLD_GRD_CONTENTS,
+                       self.NEW_GRD_CONTENTS2, action='M'),
+      MockFile('test_grd/IDS_TEST1.png.sha1', 'binary', ''),
+      MockAffectedFile('test_grd/IDS_TEST2.png.sha1',
+                       '', 'old_contents', action='D')])
+    warnings = PRESUBMIT._CheckTranslationScreenshots(input_api,
+                                                      MockOutputApi())
+    self.assertEqual(1, len(warnings))
+    self.assertEqual(self.REMOVE_SIGNATURES_MESSAGE, warnings[0].message)
+    self.assertEqual(['test_grd/IDS_TEST1.png.sha1'], warnings[0].items)
+
+    # Remove both sha1 files. No presubmit warnings.
+    input_api = self.makeInputApi([
+      MockAffectedFile('test.grd', self.OLD_GRD_CONTENTS,
+                       self.NEW_GRD_CONTENTS2, action='M'),
+      MockFile('test_grd/IDS_TEST1.png.sha1', 'binary', action='D'),
+      MockFile('test_grd/IDS_TEST2.png.sha1', 'binary', action='D')])
+    warnings = PRESUBMIT._CheckTranslationScreenshots(input_api,
+                                                      MockOutputApi())
+    self.assertEqual([], warnings)
 
 
 if __name__ == '__main__':
diff --git a/PRESUBMIT_test_mocks.py b/PRESUBMIT_test_mocks.py
index e15afcc..ed6a750 100644
--- a/PRESUBMIT_test_mocks.py
+++ b/PRESUBMIT_test_mocks.py
@@ -51,6 +51,7 @@
 
     return errors
 
+
 class MockInputApi(object):
   """Mock class for the InputApi class.
 
@@ -58,6 +59,8 @@
   attribute as the list of changed files.
   """
 
+  DEFAULT_BLACK_LIST = ()
+
   def __init__(self):
     self.canned_checks = MockCannedChecks()
     self.fnmatch = fnmatch
@@ -73,11 +76,39 @@
     self.change = MockChange([])
     self.presubmit_local_path = os.path.dirname(__file__)
 
+  def CreateMockFileInPath(self, f_list):
+    self.os_path.exists = lambda x: x in f_list
+
   def AffectedFiles(self, file_filter=None, include_deletes=False):
-    return self.files
+    for file in self.files:
+      if file_filter and not file_filter(file):
+        continue
+      if not include_deletes and file.Action() == 'D':
+        continue
+      yield file
 
   def AffectedSourceFiles(self, file_filter=None):
-    return self.files
+    return self.AffectedFiles(file_filter=file_filter)
+
+  def FilterSourceFile(self, file, white_list=(), black_list=()):
+    local_path = file.LocalPath()
+    found_in_white_list = not white_list
+    if white_list:
+      if type(white_list) is str:
+        raise TypeError('white_list should be an iterable of strings')
+      for pattern in white_list:
+        compiled_pattern = re.compile(pattern)
+        if compiled_pattern.search(local_path):
+          found_in_white_list = True
+          break
+    if black_list:
+      if type(black_list) is str:
+        raise TypeError('black_list should be an iterable of strings')
+      for pattern in black_list:
+        compiled_pattern = re.compile(pattern)
+        if compiled_pattern.search(local_path):
+          return False
+    return found_in_white_list
 
   def LocalPaths(self):
     return self.files
diff --git a/WATCHLISTS b/WATCHLISTS
index ad748cc0..e48f29c 100644
--- a/WATCHLISTS
+++ b/WATCHLISTS
@@ -62,6 +62,10 @@
                   '|media/midi/*_android.*' \
                   '|media/video/capture/android'
     },
+    'android_search_widget': {
+      'filepath': 'chrome/android/java/src/org/chromium/chrome/browser/locale/' \
+                  '|chrome/android/java/src/org/chromium/chrome/browser/searchwidget/'
+    },
     'android_studio': {
       'filepath': 'build/android/gradle/' \
                   '|docs/android_studio.md' \
@@ -83,6 +87,9 @@
     'android_webview': {
       'filepath': 'android_webview/',
     },
+    'animation_worklet': {
+      'filepath': 'third_party/blink/renderer/modules/animationworklet/',
+    },
     'app_list': {
       'filepath': 'ash/app_list'\
                   '|chrome/browser/ui/app_list'\
@@ -96,11 +103,10 @@
                   '|chrome/browser/ui/web_applications/'\
                   '|chrome/common/mac/'
     },
-    'appcache': {
-      'filepath': 'appcache/',
-    },
     'apps': {
-      'filepath': '^apps/',
+      'filepath': '^apps/'\
+                  '|chrome/browser/apps/'\
+                  '|chrome/browser/chromeos/apps/'
     },
     'arc': {
       'filepath': 'arc/',
@@ -122,12 +128,20 @@
     'arc_power': {
       'filepath': 'components/arc/power/',
     },
+    'arc_video_accelerator': {
+      'filepath': 'components/arc/video_accelerator',
+    },
     'ash': {
       'filepath': 'ash/',
     },
     'assistant': {
-      'filepath': 'chromeos/assistant/'\
-                  '|chromeos/services/assistant/'
+      'filepath': 'ash/assistant/'\
+                  '|chromeos/assistant/'\
+                  '|chromeos/services/assistant/'\
+                  '|chrome/browser/ui/ash/assistant/'
+    },
+    'audio_service': {
+      'filepath': 'services/audio/'
     },
     'aura': {
       'filepath': 'ui/aura/',
@@ -155,6 +169,16 @@
                   'components/autofill/browser/webdata/|'\
                   'components/webdata/',
     },
+    'autofill_credit_cards': {
+      'filepath': 'chrome/browser/ui/autofill/chrome_autofill_client*|'\
+                  'chrome/browser/ui/autofill/save_card_*|'\
+                  'chrome/browser/ui/views/autofill/card_unmask_*|'\
+                  'chrome/browser/ui/views/autofill/save_card_*|'\
+                  'components/autofill/core/browser/autofill_save_card_infobar_*|'\
+                  'components/autofill/core/browser/credit_card_save_manager*|'\
+                  'components/autofill/core/browser/form_data_importer*|'\
+                  'components/autofill/core/browser/ui/',
+    },
     'background_fetch': {
       'filepath': 'background_fetch|'\
                   'background-fetch',
@@ -167,8 +191,8 @@
                   'chrome/android/javatests/src/org/chromium/chrome/browser/banners/|'\
                   'chrome/browser/banners/|'\
                   'chrome/browser/ui/android/infobars/app_banner_.*|'\
-                  'third_party/WebKit/public/platform/modules/app_banner/|'\
-                  'third_party/WebKit/Source/modules/app_banner/',
+                  'third_party/blink/public/platform/modules/app_banner/|'\
+                  'third_party/blink/renderer/modules/app_banner/',
     },
     'base': {
       'filepath': '^base/',
@@ -179,6 +203,9 @@
     'base_memory': {
       'filepath': '^base/memory',
     },
+    'base_scheduler': {
+      'filepath': '^base/task/',
+    },
     'base_task_scheduler': {
       'filepath': '^base/task_scheduler',
     },
@@ -198,71 +225,67 @@
       'filepath': 'third_party/(WebKit|blink)/',
     },
     'blink_accessibility': {
-      'filepath': 'third_party/WebKit/.*(accessibility|AXObjectCache|WebAX)'
+      'filepath': 'third_party/(WebKit|blink)/.*(accessibility|ax_object_cache|web_ax)'
     },
     'blink_animation': {
-      'filepath': 'third_party/WebKit/.*([Aa]nimat|[Tt]ransition)',
+      'filepath': 'third_party/(WebKit|blink)/.*([Aa]nimat|[Tt]ransition)',
     },
     'blink_app_banner': {
-      'filepath': 'third_party/WebKit/Source/modules/app_banner' \
-                  '|third_party/WebKit/public/platform/modules/app_banner',
+      'filepath': 'third_party/blink/renderer/modules/app_banner' \
+                  '|third_party/blink/public/platform/modules/app_banner',
     },
     'blink_audio': {
-      'filepath': 'third_party/WebKit/Source/platform/audio' \
-                  '|third_party/WebKit/Source/modules/webaudio',
+      'filepath': 'third_party/blink/renderer/platform/audio' \
+                  '|third_party/blink/renderer/modules/webaudio' \
+                  '|third_party/WebKit/LayoutTests/external/wpt/webaudio',
     },
     'blink_battery_status': {
-      'filepath': 'third_party/WebKit/Source/modules/battery/' \
+      'filepath': 'third_party/blink/renderer/modules/battery/' \
                   '|third_party/WebKit/LayoutTests/battery-status/' \
-                  '|third_party/WebKit/Source/core/frame/PlatformEvent(Controller|Dispatcher)'
-    },
-    'blink_bidi': {
-      'filepath': 'third_party/WebKit/Source/platform/text/.*Bidi' \
-                  '|third_party/WebKit/Source/core/rendering/.*Bidi',
+                  '|third_party/blink/renderer/core/frame/platform_event_(controller|dispatcher)'
     },
     'blink_bindings': {
-      'filepath': 'third_party/WebKit/Source/platform/bindings' \
-                  '|third_party/WebKit/Source/bindings',
+      'filepath': 'third_party/blink/renderer/platform/bindings' \
+                  '|third_party/blink/renderer/bindings',
     },
     'blink_bindings_serialization': {
-      'filepath': 'third_party/WebKit/Source/bindings/(core|modules)/v8/.*[Ss]erializ',
+      'filepath': 'third_party/blink/renderer/bindings/(core|modules)/v8/.*serializ',
     },
     'blink_bluetooth': {
-      'filepath': 'third_party/WebKit/.*[Bb]luetooth'
+      'filepath': 'third_party/(WebKit|blink)/.*[Bb]luetooth'
     },
     'blink_canvas2d': {
-      'filepath': 'third_party/WebKit/Source/core/html/canvas' \
-                  '|third_party/WebKit/Source/core/html/HTMLCanvasElement' \
-                  '|third_party/WebKit/Source/modules/canvas2d' \
-                  '|third_party/WebKit/Source/platform/graphics/Canvas2D',
+      'filepath': 'third_party/blink/renderer/core/html/canvas' \
+                  '|third_party/blink/renderer/modules/canvas2d' \
+                  '|third_party/blink/renderer/platform/graphics/canvas_2d',
     },
     'blink_client_hints': {
-      'filepath': 'third_party/WebKit/Source/core/loader/AcceptClientHints*' \
-                  '|third_party/WebKit/Source/core/loader/FrameFetchContext*' \
-                  '|third_party/WebKit/Source/core/loader/resource/ImageResource*' \
-                  '|third_party/WebKit/Source/platform/loader/fetch/FetchContext*' \
-                  '|third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher*'
+      'filepath': 'third_party/blink/renderer/core/loader/accept_client_hints*' \
+                  '|third_party/blink/renderer/core/loader/frame_fetch_context*' \
+                  '|third_party/blink/renderer/core/loader/resource/image_resource*' \
+                  '|third_party/blink/renderer/platform/loader/fetch/fetch_context*' \
+                  '|third_party/blink/renderer/platform/loader/fetch/resource_fetcher*'
     },
     'blink_clipboard': {
-      'filepath': 'third_party/WebKit/Source/core/clipboard' \
-                  '|third_party/WebKit/Source/core/page/.*Drag' \
-                  '|third_party/WebKit/Source/platform/.*Drag' \
-                  '|third_party/WebKit/Source/platform/clipboard' \
-                  '|third_party/WebKit/Source/web/.*Drag' \
-                  '|third_party/WebKit/public/platform/.*Drag' \
-                  '|third_party/WebKit/public/web/.*Drag',
+      'filepath': 'third_party/blink/renderer/core/clipboard' \
+                  '|third_party/blink/renderer/core/page/.*drag' \
+                  '|third_party/blink/renderer/platform/.*drag' \
+                  '|third_party/blink/public/platform/.*drag' \
+                  '|third_party/blink/public/web/.*drag',
     },
     'blink_common': {
-      'filepath': 'third_party/WebKit/common',
+      'filepath': 'third_party/blink/common'
+                  '|third_party/blink/public/common' \
+                  '|third_party/blink/public/mojom',
     },
     'blink_controller': {
-      'filepath': 'third_party/WebKit/Source/controller',
+      'filepath': 'third_party/blink/renderer/controller',
     },
     'blink_css': {
-      'filepath': 'third_party/WebKit/Source/core/css',
+      'filepath': 'third_party/blink/renderer/core/css',
     },
     'blink_css_flexbox': {
-      'filepath': 'third_party/WebKit/Source/core/rendering/.*Flex' \
+      'filepath': 'third_party/blink/renderer/core/rendering/.*flex' \
                   '|third_party/WebKit/LayoutTests/fast/deprecated-flexbox/' \
                   '|third_party/WebKit/LayoutTests/css3/flexbox/' \
                   '|third_party/WebKit/LayoutTests/ietestcenter/css3/flexbox/'
@@ -274,285 +297,274 @@
                   '|third_party/WebKit/LayoutTests/printing/'
     },
     'blink_css_grid_layout': {
-      'filepath': 'third_party/WebKit/Source/core/layout/.*Grid' \
-                  '|third_party/WebKit/Source/core/paint/.*Grid' \
-                  '|third_party/WebKit/Source/core/css/.*Grid' \
+      'filepath': 'third_party/blink/renderer/core/layout/.*grid' \
+                  '|third_party/blink/renderer/core/paint/.*grid' \
+                  '|third_party/blink/renderer/core/css/.*grid' \
                   '|third_party/WebKit/LayoutTests/fast/css-grid-layout/' \
                   '|third_party/WebKit/LayoutTests/ietestcenter/css3/grid/' \
                   '|third_party/WebKit/LayoutTests/platform/.*/fast/css-grid-layout/' \
                   '|third_party/WebKit/LayoutTests/platform/.*/ietestcenter/css3/grid/'
     },
     'blink_custom_elements': {
-      'filepath': 'third_party/WebKit/Source/core/html/custom/' \
-                  '|third_party/WebKit/Source/bindings/core/v8/.*CustomElement',
+      'filepath': 'third_party/blink/renderer/core/html/custom/' \
+                  '|third_party/blink/renderer/bindings/core/v8/.*custom_element',
     },
     'blink_device_orientation': {
-      'filepath': 'third_party/WebKit/Source/modules/device_orientation/' \
+      'filepath': 'content/browser/device_sensors/' \
+                  '|content/test/data/device_sensors/' \
+                  '|third_party/blink/renderer/modules/device_orientation/' \
                   '|third_party/WebKit/LayoutTests/device_orientation/' \
-                  '|third_party/WebKit/Source/core/frame/PlatformEvent(Controller|Dispatcher)' \
-                  '|third_party/WebKit/Source/core/frame/DeviceSingleWindowEventController'
+                  '|third_party/blink/renderer/core/frame/platform_event_(controller|dispatcher)' \
+                  '|third_party/blink/renderer/core/frame/device_single_window_event_controller'
     },
     'blink_devtools': {
-      'filepath': 'third_party/WebKit/.*(inspector|DevTools|devtools)',
+      'filepath': 'third_party/(WebKit|blink)/.*(inspector|DevTools|dev_tools|devtools)',
     },
     'blink_dom': {
-      'filepath': 'third_party/WebKit/Source/core/dom/'
+      'filepath': 'third_party/blink/renderer/core/dom/'
     },
     'blink_dom_events': {
-      'filepath': 'third_party/WebKit/Source/core/dom/events/'
+      'filepath': 'third_party/blink/renderer/core/dom/events/'
     },
     'blink_events': {
-      'filepath': 'third_party/WebKit/Source/core/page/.*Event' \
-                  '|third_party/WebKit/Source/core/dom/.*Event' \
-                  '|third_party/WebKit/Source/core/css/.*Event' \
-                  '|third_party/WebKit/Source/platform/.*Event'
+      'filepath': 'third_party/blink/renderer/core/page/.*event' \
+                  '|third_party/blink/renderer/core/dom/.*event' \
+                  '|third_party/blink/renderer/core/css/.*event' \
+                  '|third_party/blink/renderer/platform/.*event'
     },
     'blink_fetch': {
-      'filepath': 'third_party/WebKit/Source/platform/loader/fetch'
-    },
-    'blink_fetch_api': {
-      'filepath': 'third_party/WebKit/Source/core/xmlhttprequest/' \
-                  '|third_party/WebKit/Source/modules/beacon/' \
-                  '|third_party/WebKit/Source/modules/eventsource/' \
-                  '|third_party/WebKit/Source/modules/fetch/'
+      'filepath': 'third_party/blink/renderer/platform/loader/fetch'
     },
     'blink_fileapi': {
-      'filepath': 'third_party/WebKit/Source/modules/filesystem/' \
-                  '|third_party/WebKit/Source/core/fileapi/' \
-                  '|third_party/WebKit/Source/platform/.*File' \
-                  '|third_party/WebKit/Source/web/.*File' \
+      'filepath': 'third_party/blink/renderer/modules/filesystem/' \
+                  '|third_party/blink/renderer/core/fileapi/' \
+                  '|third_party/blink/renderer/platform/.*file' \
                   '|third_party/WebKit/LayoutTests/fast/file' \
-                  '|third_party/WebKit/public/.*File'
+                  '|third_party/blink/public/.*_file'
     },
     'blink_frames': {
-      'filepath': 'third_party/WebKit/Source/core/frame/'
+      'filepath': 'third_party/blink/renderer/core/frame/'
     },
     'blink_geolocation': {
       'filepath': 'third_party/WebKit/LayoutTests/geolocation-api/' \
-                  '|third_party/WebKit/Source/modules/geolocation/' \
-                  '|third_party/WebKit/Source/web/.*Geolocation' \
-                  '|third_party/WebKit/public/web/.*Geolocation'
+                  '|third_party/blink/renderer/modules/geolocation/' \
+                  '|third_party/blink/public/web/.*geolocation'
     },
     'blink_heap': {
-      'filepath': 'third_party/WebKit/Source/platform/heap' \
+      'filepath': 'third_party/blink/renderer/platform/heap' \
                   '|base/allocator/partition_allocator/'
     },
     'blink_html': {
-      'filepath': 'third_party/WebKit/Source/core/html/'
+      'filepath': 'third_party/blink/renderer/core/html/'
     },
     'blink_htmlparser': {
-      'filepath': 'third_party/WebKit/Source/core/html/parser/'
+      'filepath': 'third_party/blink/renderer/core/html/parser/'
     },
     'blink_indexed_db': {
-      'filepath': 'third_party/WebKit/Source/modules/indexeddb/' \
-                  '|third_party/WebKit/Source/web/.*IDB' \
+      'filepath': 'third_party/blink/renderer/modules/indexeddb/' \
                   '|third_party/WebKit/LayoutTests/storage/indexeddb' \
-                  '|third_party/WebKit/public/platform/.*IDB'
+                  '|third_party/blink/public/platform/.*_idb'
     },
     'blink_input': {
-      'filepath': 'third_party/WebKit/Source/core/input/'
+      'filepath': 'third_party/blink/renderer/core/input/'
     },
     'blink_layers': {
-      'filepath': 'third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator' \
-                  '|third_party/WebKit/Source/platform/graphics/GraphicsLayer' \
-                  '|third_party/WebKit/Source/core/layout/Layer'
+      'filepath': 'third_party/blink/renderer/core/page/scrolling/scrolling_coordinator' \
+                  '|third_party/blink/renderer/platform/graphics/graphics_layer' \
+                  '|third_party/blink/renderer/core/layout/layer'
     },
     'blink_layout': {
-      'filepath': 'third_party/WebKit/Source/core/layout' \
-                  '|third_party/WebKit/Source/core/rendering'
+      'filepath': 'third_party/blink/renderer/core/layout'
     },
     'blink_layout_ng': {
-      'filepath': 'third_party/WebKit/Source/core/layout/ng',
+      'filepath': 'third_party/blink/renderer/core/layout/ng',
     },
     'blink_loader': {
-      'filepath': 'third_party/WebKit/Source/core/loader/' \
-                  '|third_party/WebKit/Source/platform/loader/'
+      'filepath': 'third_party/blink/renderer/core/loader/' \
+                  '|third_party/blink/renderer/platform/loader/'
     },
     'blink_media': {
-      'filepath': 'third_party/WebKit/Source/core/css/mediaControls' \
-                  '|third_party/WebKit/Source/core/html/.*(Audio|Media|Video)' \
-                  '|third_party/WebKit/Source/core/html/shadow/MediaControl' \
-                  '|third_party/WebKit/Source/core/layout/LayoutMedia' \
-                  '|third_party/WebKit/Source/core/layout/LayoutTextTrackContainerElement' \
-                  '|third_party/WebKit/Source/modules/(encryptedmedia|mediasource)' \
-                  '|third_party/WebKit/Source/platform/drm/' \
-                  '|third_party/WebKit/Source/platform/graphics/media/' \
-                  '|third_party/WebKit/Source/web/.*Media' \
+      'filepath': 'third_party/blink/renderer/core/css/mediaControls' \
+                  '|third_party/blink/renderer/core/html/.*_(audio|media|video)' \
+                  '|third_party/blink/renderer/core/html/shadow/media_control' \
+                  '|third_party/blink/renderer/core/layout/layout_media' \
+                  '|third_party/blink/renderer/core/layout/layout_text_track_container_element' \
+                  '|third_party/blink/renderer/modules/(encryptedmedia|mediasource)' \
+                  '|third_party/blink/renderer/platform/drm/' \
+                  '|third_party/blink/renderer/platform/graphics/media/' \
                   '|third_party/WebKit/LayoutTests/media/' \
-                  '|third_party/WebKit/public/.*Media'
+                  '|third_party/blink/public/.*_media'
     },
     'blink_media_queries': {
-      'filepath': 'third_party/WebKit/Source/core/css/CSSMediaRule' \
-                    '|third_party/WebKit/Source/core/css/MediaList' \
-                    '|third_party/WebKit/Source/core/css/MediaQuery' \
-                    '|third_party/WebKit/Source/core/css/parser/MediaQuery'
+      'filepath': 'third_party/blink/renderer/core/css/css_media_rule' \
+                    '|third_party/blink/renderer/core/css/media_list' \
+                    '|third_party/blink/renderer/core/css/media_query' \
+                    '|third_party/blink/renderer/core/css/parser/media_query'
     },
     'blink_mediastream': {
-      'filepath': 'third_party/WebKit/Source/modules/mediastream/' \
-                  '|third_party/WebKit/Source/platform/mediastream/' \
-                  '|third_party/WebKit/Source/platform/exported/WebMediaStream' \
-                  '|third_party/WebKit/Source/platform/exported/WebRTC' \
+      'filepath': 'third_party/blink/renderer/modules/mediastream/' \
+                  '|third_party/blink/renderer/platform/mediastream/' \
+                  '|third_party/blink/renderer/platform/exported/web_media_stream' \
+                  '|third_party/blink/renderer/platform/exported/web_rtc' \
                   '|third_party/WebKit/LayoutTests/fast/mediastream/'
     },
     'blink_modules': {
-      'filepath': 'third_party/WebKit/Source/modules'
+      'filepath': 'third_party/blink/renderer/modules'
     },
     'blink_navigator_content_utils': {
-      'filepath': 'third_party/WebKit/Source/modules/navigatorcontentutils' \
+      'filepath': 'third_party/blink/renderer/modules/navigatorcontentutils' \
                   '|third_party/WebKit/LayoutTests/fast/dom/navigatorcontentutils'
     },
     'blink_out_of_process_frames': {
-      'filepath': 'third_party/WebKit/Source/core/frame/FrameOwner' \
-                  '|third_party/WebKit/Source/core/frame/Frame\.' \
-                  '|third_party/WebKit/Source/web/WebFrame' \
-                  '|third_party/WebKit/Source/web/WebRemoteFrameImpl'
+      'filepath': 'third_party/blink/renderer/core/frame/frame_owner' \
+                  '|third_party/blink/renderer/core/frame/frame\.' \
+                  '|third_party/blink/renderer/core/frame/web_frame' \
+                  '|third_party/blink/renderer/core/exported/web_remote_frame_impl'
     },
     'blink_paint': {
-      'filepath': 'third_party/WebKit/Source/core/paint/'
+      'filepath': 'third_party/blink/renderer/core/paint/'
     },
     'blink_paintworklet': {
-      'filepath': 'third_party/WebKit/Source/modules/csspaint/' \
+      'filepath': 'third_party/blink/renderer/modules/csspaint/' \
                   '|third_party/WebKit/LayoutTests/http/tests/csspaint/' \
                   '|third_party/WebKit/LayoutTests/externla/wpt/css/css-paint-api/'
     },
     'blink_performance_timing': {
-      'filepath': 'third_party/WebKit/Source/core/timing/'
+      'filepath': 'third_party/blink/renderer/core/timing/'
     },
     'blink_permissions': {
-      'filepath': 'third_party/WebKit/Source/modules/permissions/' \
-                  '|third_party/WebKit/public/platform/modules/permissions/',
+      'filepath': 'third_party/blink/renderer/modules/permissions/' \
+                  '|third_party/blink/public/platform/modules/permissions/',
     },
     'blink_platform': {
-      'filepath': 'third_party/WebKit/Source/platform'
+      'filepath': 'third_party/blink/renderer/platform'
     },
     'blink_platform_graphics': {
-      'filepath': 'third_party/WebKit/Source/platform/fonts' \
-                  '|third_party/WebKit/Source/platform/geometry' \
-                  '|third_party/WebKit/Source/platform/graphics'
+      'filepath': 'third_party/blink/renderer/platform/fonts' \
+                  '|third_party/blink/renderer/platform/geometry' \
+                  '|third_party/blink/renderer/platform/graphics'
     },
     'blink_preloadScanner': {
-      'filepath': 'third_party/WebKit/Source/core/html/parser/HTMLPreloadScanner',
+      'filepath': 'third_party/blink/renderer/core/html/parser/html_preload_scanner',
     },
     'blink_prerender': {
-      'filepath': 'third_party/WebKit/.*(Prerender|loader/LinkLoader|html/HTMLLinkElement)'
+      'filepath': 'third_party/(WebKit|blink)/.*([Pp]rerender|loader/link_loader|html/html_link_element)'
     },
     'blink_public_api': {
-      'filepath': 'third_party/WebKit/public'
+      'filepath': 'third_party/blink/public'
     },
     'blink_quota': {
-      'filepath': 'third_party/WebKit/Source/modules/quota/' \
-                  '|third_party/WebKit/Source/web/.*Quota' \
-                  '|third_party/WebKit/public/.*Quota'
+      'filepath': 'third_party/blink/renderer/modules/quota/' \
+                  '|third_party/blink/public/.*quota'
     },
     'blink_scheduler': {
-      'filepath': 'third_party/WebKit/Source/platform/scheduler' \
-                  '|third_party/WebKit/Source/core/html/parser/.*Scheduler'
+      'filepath': 'third_party/blink/renderer/platform/scheduler' \
+                  '|third_party/blink/renderer/core/html/parser/.*scheduler'
     },
     'blink_screen_orientation': {
-      'filepath': 'third_party/WebKit/Source/modules/screen_orientation/' \
-                  '|third_party/WebKit/public/platform/modules/screen_orientation',
+      'filepath': 'third_party/blink/renderer/modules/screen_orientation/' \
+                  '|third_party/blink/public/platform/modules/screen_orientation',
     },
     'blink_script': {
-      'filepath': 'third_party/WebKit/Source/bindings/core/v8/.*Module.*' \
-                  '|third_party/WebKit/Source/bindings/core/v8/ScriptController.*' \
-                  '|third_party/WebKit/Source/bindings/core/v8/ScriptSourceCode.*' \
-                  '|third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.*'
-                  '|third_party/WebKit/Source/core/dom/.*Modul.*' \
-                  '|third_party/WebKit/Source/core/dom/.*Script.*' \
-                  '|third_party/WebKit/Source/core/html/HTMLScriptElement.*' \
-                  '|third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.*' \
-                  '|third_party/WebKit/Source/core/loader/modulescript/' \
-                  '|third_party/WebKit/Source/core/loader/resource/ScriptResource.*' \
-                  '|third_party/WebKit/Source/core/svg/SVGScriptElement.*' \
-                  '|third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.*'
+      'filepath': 'third_party/blink/renderer/bindings/core/v8/.*module.*' \
+                  '|third_party/blink/renderer/bindings/core/v8/script_controller.*' \
+                  '|third_party/blink/renderer/bindings/core/v8/script_source_code.*' \
+                  '|third_party/blink/renderer/bindings/core/v8/v8_script_runner.*'
+                  '|third_party/blink/renderer/core/dom/.*modul.*' \
+                  '|third_party/blink/renderer/core/dom/.*script.*' \
+                  '|third_party/blink/renderer/core/html/html_script_element.*' \
+                  '|third_party/blink/renderer/core/html/parser/html_parser_script_runner.*' \
+                  '|third_party/blink/renderer/core/loader/modulescript/' \
+                  '|third_party/blink/renderer/core/loader/resource/script_resource.*' \
+                  '|third_party/blink/renderer/core/svg/svg_script_element.*' \
+                  '|third_party/blink/renderer/core/xml/parser/xml_document_parser.*'
     },
     'blink_scroll': {
-      'filepath': 'third_party/WebKit/Source/core/frame/.*View.*' \
-                  '|third_party/WebKit/Source/core/input/.*Scroll.*' \
-                  '|third_party/WebKit/Source/core/input/EventHandler.*' \
-                  '|third_party/WebKit/Source/core/page/scrolling/' \
-                  '|third_party/WebKit/Source/core/paint/.*ScrollableArea.*' \
-                  '|third_party/WebKit/Source/platform/scroll/'
+      'filepath': 'third_party/blink/renderer/core/frame/.*view.*' \
+                  '|third_party/blink/renderer/core/input/.*scroll.*' \
+                  '|third_party/blink/renderer/core/input/event_handler.*' \
+                  '|third_party/blink/renderer/core/page/scrolling/' \
+                  '|third_party/blink/renderer/core/paint/.*scrollable_area.*' \
+                  '|third_party/blink/renderer/platform/scroll/'
     },
-    'blink_serviceworkers' : {
-      'filepath': 'third_party/WebKit/Source/modules/serviceworkers' \
+    'blink_service_worker' : {
+      'filepath': 'third_party/blink/renderer/modules/service_worker' \
                   '|third_party/WebKit/LayoutTests/http/tests/serviceworker' \
                   '|third_party/WebKit/LayoutTests/external/wpt/service-workers'
     },
-    'blink_serviceworkers_tests' : {
+    'blink_service_worker_tests' : {
       'filepath': 'third_party/WebKit/LayoutTests/http/tests/serviceworker' \
                   '|third_party/WebKit/LayoutTests/external/wpt/service-workers'
     },
     'blink_shadow_dom': {
-      'filepath': 'third_party/WebKit/Source/core/dom/.*Shadow' \
-                  '|third_party/WebKit/Source/core/dom/.*Slot' \
-                  '|third_party/WebKit/Source/core/dom/.*InsertionPoint' \
-                  '|third_party/WebKit/Source/core/dom/.*FlatTree'
+      'filepath': 'third_party/blink/renderer/core/dom/.*shadow' \
+                  '|third_party/blink/renderer/core/dom/.*slot' \
+                  '|third_party/blink/renderer/core/dom/.*insertion_point' \
+                  '|third_party/blink/renderer/core/dom/.*flat_tree'
     },
     'blink_spellcheck' : {
-      'filepath': 'third_party/WebKit/Source/core/editing/spellcheck'
+      'filepath': 'third_party/blink/renderer/core/editing/spellcheck'
     },
     'blink_spv2_layout_tests': {
       'filepath': 'third_party/WebKit/LayoutTests/virtual/spv2'
     },
     'blink_streams': {
-      'filepath': 'third_party/WebKit/Source/core/streams/'
+      'filepath': 'third_party/blink/renderer/core/streams/'
     },
     'blink_style': {
-      'filepath': 'third_party/WebKit/.*(style/|Style)',
+      'filepath': 'third_party/(WebKit|blink)/.*(style/|Style)',
     },
     'blink_svg': {
-      'filepath': 'third_party/WebKit/Source/core/(layout/)?svg',
+      'filepath': 'third_party/blink/renderer/core/(layout/)?svg',
     },
     'blink_track': {
-      'filepath': 'third_party/WebKit/Source/core/html/track/' \
-                  '|third_party/WebKit/Source/core/loader/TextTrack' \
-                  '|third_party/WebKit/Source/core/html/HTMLMediaElement' \
-                  '|third_party/WebKit/Source/core/html/HTMLTrackElement' \
-                  '|third_party/WebKit/Source/core/html/shadow/MediaControl' \
-                  '|third_party/WebKit/Source/core/css/mediaControl' \
+      'filepath': 'third_party/blink/renderer/core/html/track/' \
+                  '|third_party/blink/renderer/core/loader/text_track' \
+                  '|third_party/blink/renderer/core/html/meida/html_media_element' \
+                  '|third_party/blink/renderer/core/html/shadow/media_control' \
+                  '|third_party/blink/renderer/core/css/mediaControl' \
                   '|third_party/WebKit/LayoutTests/media/track/'
     },
     'blink_vibration': {
       'filepath': 'third_party/WebKit/LayoutTests/vibration/' \
-                  '|third_party/WebKit/Source/modules/vibration/'
+                  '|third_party/blink/renderer/modules/vibration/'
     },
     'blink_viewport_interaction': {
-      'filepath': 'third_party/WebKit/Source/core/css/.*Viewport' \
-                  '|third_party/WebKit/Source/core/dom/ViewportArguments' \
-                  '|third_party/WebKit/Source/core/frame/FrameView.*' \
-                  '|third_party/WebKit/Source/core/frame/.*Viewport.*' \
-                  '|third_party/WebKit/Source/core/html/HTMLMetaElement'
+      'filepath': 'third_party/blink/renderer/core/css/.*viewport' \
+                  '|third_party/blink/renderer/core/dom/viewport_arguments' \
+                  '|third_party/blink/renderer/core/frame/frame_view.*' \
+                  '|third_party/blink/renderer/core/frame/.*viewport.*' \
+                  '|third_party/blink/renderer/core/html/html_meta_element'
     },
     'blink_w3ctests': {
       'filepath': 'third_party/WebKit/LayoutTests/external/' \
-                  '|third_party/WebKit/Tools/Scripts/webkitpy/w3c/'
+                  '|third_party/blink/tools/blinkpy/w3c/'
     },
     'blink_webp': {
-      'filepath': 'third_party/WebKit/Source/platform/image-decoders/webp' \
-                  '|third_party/WebKit/Source/platform/image-encoders/skia/WEBP'
+      'filepath': 'third_party/blink/renderer/platform/image-decoders/webp' \
+                  '|third_party/blink/renderer/platform/image-encoders/skia/webp'
     },
     'blink_websockets': {
-      'filepath': 'third_party/WebKit/Source/modules/websockets/' \
-                  '|third_party/WebKit/Source/platform/modules/websockets/'
+      'filepath': 'third_party/blink/renderer/modules/websockets/' \
+                  '|third_party/blink/renderer/platform/modules/websockets/'
     },
     'blink_workers': {
-      'filepath': 'third_party/WebKit/Source/core/workers' \
+      'filepath': 'third_party/blink/renderer/core/workers' \
                   '|third_party/WebKit/LayoutTests/http/tests/workers' \
                   '|third_party/WebKit/LayoutTests/fast/workers' \
                   '|third_party/WebKit/LayoutTests/external/wpt/workers'
     },
     'blink_wtf': {
-      'filepath': 'third_party/WebKit/Source/platform/wtf',
+      'filepath': 'third_party/blink/renderer/platform/wtf',
     },
     'blink_xml': {
-      'filepath': 'third_party/WebKit/Source/core/xml/'
+      'filepath': 'third_party/blink/renderer/core/xml/'
     },
     'bookmarks': {
       'filepath': 'chrome/browser/bookmarks/' \
                   '|chrome/browser/extensions/api/bookmark_manager_private/' \
                   '|chrome/browser/extensions/api/bookmarks/' \
-                  '|chrome/browser/resources/bookmark_manager/' \
+                  '|chrome/browser/resources/md_bookmarks/' \
                   '|chrome/browser/ui/bookmarks/' \
                   '|chrome/browser/ui/cocoa/bookmarks/' \
                   '|chrome/browser/ui/views/bookmarks/' \
@@ -561,8 +573,20 @@
     'bottombar': {
       'filepath': 'chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/',
     },
-    'browser_chromeos': {
-      'filepath': 'chrome/browser/chromeos/',
+    'breve': {
+      'filepath': 'chrome/browser/net/spdyproxy|'\
+                  'chrome_proxy|'\
+                  'client_hints|'
+                  'components/blacklist|'\
+                  'components/data_use|'\
+                  'data_reduction_proxy|'\
+                  'data_use_measurement|'\
+                  'lazy_load|'
+                  'navigation_predictor|'\
+                  'net/nqe|'\
+                  'optimization_guide|'\
+                  'optimization_hints|'\
+                  'previews'
     },
     'browser_components': {
       'filepath': 'chrome/browser/autofill/' \
@@ -580,7 +604,7 @@
                   '|chrome/browser/resources/settings/',
     },
     'browsing_data': {
-      'filepath': 'chrome/browser/browsing_data/',
+      'filepath': '/browsing_data/',
     },
     'bubble': {
       'filepath': 'ui/views/bubble/|'\
@@ -613,6 +637,9 @@
       'filepath': 'cc/'\
                   '|components/viz/'
     },
+    'cc-animation': {
+      'filepath': 'cc/animation/'
+    },
     'cc-contexts': {
       'filepath': 'components/viz/common/gpu'
     },
@@ -630,6 +657,9 @@
       'filepath': 'cc/resources'\
                   '|components/viz/common/resources'
     },
+    'cc-scheduler': {
+      'filepath': 'cc/scheduler'
+    },
     'certificate_transparency': {
       'filepath': 'components/certificate_transparency/'\
                   '|net/cert/ct_'\
@@ -639,6 +669,15 @@
                   '|net/cert/signed_tree_head'\
                   '|net/test/ct_',
     },
+    'chrome_cleaner': {
+      'filepath': 'chrome/browser/component_updater/sw_reporter_'\
+                  '|chrome/browser/resources/settings/chrome_cleanup_page/'\
+                  '|chrome/browser/safe_browsing/chrome_cleaner/'\
+                  '|chrome/browser/ui/views/chrome_cleaner_'\
+                  '|chrome/browser/ui/webui/settings/chrome_cleanup_'\
+                  '|chrome/chrome_cleaner/'\
+                  '|components/chrome_cleaner/',
+    },
     'chrome_elf': {
       'filepath': 'chrome_elf',
     },
@@ -659,7 +698,7 @@
       'filepath': 'chrome/test/chromedriver|'\
                   'chrome/test/data/chromedriver|'\
                   'third_party/webdriver|'\
-                  'third_party/WebKit/Source/devtools/front_end/emulated_devices/module.json'
+                  'third_party/blink/renderer/devtools/front_end/emulated_devices/module.json'
     },
     'chromeos': {
       'filepath': 'chromeos/',
@@ -672,12 +711,12 @@
     'chromeos_calculator': {
       'filepath': 'chrome/common/extensions/docs/examples/apps/calculator/',
     },
-    'chromeos_dbus': {
-      'filepath': 'chromeos/dbus/',
-    },
     'chromeos_geolocation': {
       'filepath': 'chromeos/geolocation/',
     },
+    'chromeos_lkgm': {
+      'filepath': 'chromeos/CHROMEOS_LKGM',
+    },
     'chromeos_login': {
       'filepath': 'chrome/browser/chromeos/login/|'\
                   'chrome/browser/ui/webui/chromeos/login/|'\
@@ -715,9 +754,6 @@
     'components_deps': {
       'filepath': 'components/([^/]*/)*DEPS',
     },
-    'content': {
-      'filepath': 'content/',
-    },
     'content_bluetooth': {
       'filepath': 'content/.*bluetooth'
     },
@@ -732,13 +768,6 @@
     'content_shell': {
       'filepath': 'content/shell/',
     },
-    'content_view_core': {
-      'filepath': 'content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java|'
-                  'content/browser/android/content_view_core.*',
-    },
-    'content_websockets': {
-      'filepath': 'content/browser/websockets/',
-    },
     'content_worker': {
       'filepath': 'content/.*worker',
     },
@@ -752,19 +781,23 @@
       'filepath': 'courgette/',
     },
     'cq': {
-      'filepath': 'infra/config/cq.cfg',
+      'filepath': 'infra/config/branch/cq.cfg',
     },
     'cr_elements': {
       'filepath': 'ui/webui/resources/cr_element',
     },
+    'cros_benchmarks': {
+      'filepath': 'tools/perf/contrib/cros_benchmarks',
+    },
+    'crostini': {
+      'filepath': 'crostini',
+    },
     'custom_tabs': {
       'filepath': 'chrome/android/java/src/org/chromium/chrome/browser/customtabs/|'\
                   'chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/',
     },
-    'data_reduction_proxy': {
-      'filepath': 'chrome/browser/net/spdyproxy/|'\
-                  'data_reduction_proxy|'\
-                  'chrome_proxy',
+    'dbus': {
+      'filepath': 'dbus/',
     },
     'deep_memory_profiler': {
       'filepath': 'tools/(deep_memory_profiler|find_runtime_symbols)',
@@ -785,15 +818,6 @@
                   'chrome/browser/ui/views/permission_bubble/chooser_bubble_.*|'\
                   'chrome/browser/usb/usb_chooser_.*',
     },
-    'device_sensors': {
-      'filepath': 'content/browser/device_sensors/|'\
-                  'content/common/device_sensors/|'\
-                  'content/public/android/java/src/org/chromium/content/browser/DeviceSensors.java|'\
-                  'content/public/android/javatests/src/org/chromium/content/browser/DeviceSensorsTest.java|'\
-                  'content/renderer/device_sensors/|'\
-                  'content/test/data/device_sensors/|'\
-                  'device/sensors/',
-    },
     'devtools': {
       'filepath': 'devtools',
     },
@@ -820,22 +844,27 @@
                   'chrome/browser/google_apis/'
     },
     'drive_resource_metadata': {
-      'filepath': 'chrome/browser/chromeos/drive/resource_metadata'
+      'filepath': 'drive.*resource_metadata'
     },
     'eme': {
-      'filepath': 'components/cdm/|' \
+      'filepath': 'chrome/renderer/media/.*key_system|' \
+                  'chrome/browser/media/.*(cdm|encrypted)|' \
+                  'components/cdm/|' \
                   'content/browser/media/cdm/|' \
-                  'content/renderer/media/crypto/|' \
-                  'media/base/android/*drm*|' \
+                  'media/base/android/.*drm|' \
                   'media/cdm/|' \
                   'third_party/widevine/cdm/'
     },
+    'explore_sites': {
+      'filepath': 'chrome/browser/android/explore_sites/|' \
+                  'chrome/android/java/src/org/chromium/chrome/browser/explore_sites/'
+    },
     'extension': {
       'filepath': 'extension',
     },
     'feature_policy': {
-      'filepath': 'third_party/WebKit/Source/platform/feature_policy/|' \
-                  'third_party/WebKit/Source/bindings/core/v8/OriginTrialFeatures',
+      'filepath': 'third_party/blink/renderer/platform/feature_policy/|' \
+                  'third_party/blink/renderer/bindings/core/v8/origin_trial_features',
     },
     'fileapi': {
       'filepath': 'file_system/|' \
@@ -879,7 +908,7 @@
     },
     'generic_sensor': {
       'filepath': 'services/device/generic_sensor/|'\
-                  'third_party/WebKit/Source/modules/sensor/',
+                  'third_party/blink/renderer/modules/sensor/',
     },
     'geolocation': {
       'filepath': 'chrome/browser/geolocation/|'\
@@ -904,6 +933,9 @@
     'gpu_passthrough_cmd_decoder': {
       'filepath': 'gpu/command_buffer/service/.*passthrough',
     },
+    'headless': {
+      'filepath': 'headless/'
+    },
     'history_ui': {
       'filepath': 'chrome/browser/resources/(md_)?history|'\
                   'chrome/browser/ui/webui/.*history',
@@ -942,7 +974,8 @@
     },
     'installer_win': {
       'filepath': 'chrome/install_static/'\
-                  '|chrome/installer/(?!gcapi_mac/|linux/|mac/)',
+                  '|chrome/installer/(?!gcapi_mac/|linux/|mac/)'\
+                  '|components/zucchini/',
     },
     'instant': {
       'filepath': 'instant|searchbox|'\
@@ -963,18 +996,9 @@
     'ios_showcase': {
       'filepath': 'ios/showcase/',
     },
-    'ios_test': {
-      'filepath': 'ios/chrome/test/|'\
-                  'ios/testing/|'\
-                  'ios/web/public/test/|'\
-                  'ios/web/test/',
-    },
     'ios_web': {
       'filepath': 'ios/web(_view)?/',
     },
-    'ipc': {
-      'filepath': 'ipc/ipc',
-    },
     'libaom': {
       'filepath': 'third_party/libaom/',
     },
@@ -1009,6 +1033,9 @@
       'filepath': 'content/(browser|renderer)/manifest/'\
                   '|content/public/common/manifest*',
     },
+    'mash_buildbot_filters': {
+      'filepath': 'testing/buildbot/filters/mash.*filter',
+    },
     'md_settings': {
       'filepath': 'chrome/browser/resources/settings/'\
                   '|chrome/browser/ui/webui/settings/'\
@@ -1019,13 +1046,13 @@
     },
     'media_capture_from_element': {
       'filepath': 'content/renderer/media_capture_from_element/' \
-                  '|third_party/WebKit/Source/modules/mediacapture/' \
-                  '|third_party/WebKit/Source/platform/exported/WebCanvasCapture' \
+                  '|third_party/blink/renderer/modules/mediacapture/' \
+                  '|third_party/blink/renderer/platform/exported/web_canvas_capture' \
                   '|third_party/WebKit/LayoutTests/fast/mediacapturefromelement/' \
-                  '|third_party/WebKit/public/platform/WebCanvasCapture'
+                  '|third_party/blink/public/platform/web_canvas_capture'
     },
     'media_controls': {
-      'filepath': 'third_party/WebKit/Source/modules/media_controls/'
+      'filepath': 'third_party/blink/renderer/modules/media_controls/'
     },
     'media_galleries': {
       'filepath': 'chrome/browser/extensions/api/media_galleries/'\
@@ -1035,14 +1062,14 @@
                   '|chrome/test/data/extensions/api_test/media_galleries/'
     },
     'media_mojo': {
-      'filepath': 'media/mojo/*'
+      'filepath': 'media/mojo/'
     },
     'media_recorder': {
       'filepath': 'content/renderer/media_recorder/' \
-                  '|third_party/WebKit/Source/modules/mediarecorder/' \
-                  '|third_party/WebKit/Source/platform/exported/WebMediaRecorder' \
+                  '|third_party/blink/renderer/modules/mediarecorder/' \
+                  '|third_party/blink/renderer/platform/exported/web_media_recorder' \
                   '|third_party/WebKit/LayoutTests/fast/mediarecorder/' \
-                  '|third_party/WebKit/public/platform/WebMediaRecorder'
+                  '|third_party/blink/public/platform/web_media_recorder'
     },
     'media_remoting': {
       'filepath': 'chrome/browser/media/cast_remoting'\
@@ -1054,13 +1081,17 @@
       'filepath': 'chrome/android/(java|junit)/src/org/chromium/chrome/browser/media/router/' \
                   '|chrome/browser/media/router/' \
                   '|chrome/browser/resources/media_router/' \
+                  '|chrome/browser/ui/media_router/' \
                   '|chrome/browser/ui/views/media_router/' \
                   '|chrome/browser/ui/webui/media_router/' \
-                  '|chrome/common/media/router/' \
+                  '|chrome/common/media_router/' \
                   '|chrome/test/data/webui/media_router/' \
                   '|chrome/test/media_router/' \
                   '|chrome/utility/media_router/'
     },
+    'media_win': {
+      'filepath': 'media/gpu/windows/'
+    },
     'memory_coordinator': {
       'filepath': 'base/memory/memory_|' \
                   'content/browser/memory/|' \
@@ -1094,8 +1125,14 @@
     'mojo': {
       'filepath': 'mojo',
     },
-    'mojo_top_level_directory': {
-      'filepath': '^mojo/',
+    'multidevice': {
+      'filepath': 'ash/multidevice_setup/'\
+                  '|chrome/browser/resources/chromeos/multidevice_setup/'\
+                  '|chromeos/components/proximity_auth/'\
+                  '|chromeos/services/device_sync/'\
+                  '|chromeos/services/multidevice_setup/'\
+                  '|chromeos/services/secure_channel/'\
+                  '|components/cryptauth/'
     },
     'mus': {
       'filepath': 'services/ui/'\
@@ -1133,16 +1170,21 @@
         'chrome/browser/ui/webui/net_internals/|' \
         'components/net_log/'
     },
+    'net_server': {
+      'filepath': 'net/server/'
+    },
     'net_spdy': {
       'filepath': 'net/spdy/',
     },
     'net_websockets': {
-      'filepath': 'net/websockets/' \
-                  '|net/data/websocket/'
+      'filepath': 'net/websockets/',
     },
     'netinfo': {
       'filepath': '/netinfo/',
     },
+    'network_service': {
+      'filepath': 'services/network/',
+    },
     'nfc': {
       'filepath': '/nfc/',
     },
@@ -1155,10 +1197,11 @@
         'content/public/browser/platform_notification|'\
         'content/public/common/platform_notification|'\
         'content/renderer/notification_|'\
+        'chrome/notification_helper/|'\
         'third_party/WebKit/LayoutTests/external/wpt/notifications|'\
         'third_party/WebKit/LayoutTests/http/tests/notifications|'\
-        'third_party/WebKit/Source/modules/notifications|'\
-        'third_party/WebKit/public/platform/modules/notifications|'\
+        'third_party/blink/renderer/modules/notifications|'\
+        'third_party/blink/public/platform/modules/notifications|'\
         'ui/message_center/'
     },
     'nqe': {
@@ -1263,8 +1306,8 @@
                   '|third_party/WebKit/LayoutTests/external/wpt/payment-request'\
                   '|third_party/WebKit/LayoutTests/http/tests/payments'\
                   '|third_party/WebKit/LayoutTests/payments'\
-                  '|third_party/WebKit/public/platform/modules/payments'\
-                  '|third_party/WebKit/Source/modules/payments'
+                  '|third_party/blink/public/platform/modules/payments'\
+                  '|third_party/blink/renderer/modules/payments'
     },
     'payments_ios': {
       'filepath': 'ios/web/payments'\
@@ -1285,11 +1328,10 @@
                   '|permission_context',
     },
     'picture_in_picture': {
-      'filepath': 'third_party/WebKit/Source/modules/picture_in_picture/'
+      'filepath': 'third_party/blink/renderer/modules/picture_in_picture/'
     },
-    'plugin': {
-      'filepath': 'chrome/browser/plugin|chrome/plugin/|'\
-        'chrome/common/plugin',
+    'policy_templates': {
+      'filepath': 'components/policy/resources/policy_templates.json'
     },
     'polymer': {
       'filepath': 'third_party/polymer/|'\
@@ -1311,9 +1353,13 @@
     },
     'presentation': {
       'filepath': 'content/(browser|common|renderer)/presentation/' \
-                  '|third_party/WebKit/public/platform/modules/presentation/' \
+                  '|third_party/blink/public/platform/modules/presentation/' \
                   '|third_party/WebKit/LayoutTests/presentation/' \
-                  '|third_party/WebKit/Source/modules/presentation/'
+                  '|third_party/blink/renderer/modules/presentation/'
+    },
+    'print_preview': {
+      'filepath': 'chrome/browser/resources/print_preview/' \
+                  '|chrome/browser/ui/webui/print_preview/'
     },
     'push_messaging': {
       'filepath': 'push_messaging'
@@ -1333,7 +1379,7 @@
                   'rlz/win/lib/machine_id_win.cc',
     },
     'runtime_enabled_features': {
-      'filepath' : 'third_party/WebKit/Source/platform/runtime_enabled_features.json5'
+      'filepath' : 'third_party/blink/renderer/platform/runtime_enabled_features.json5'
     },
     'safe_browsing': {
       'filepath': 'chrome/(browser|common|renderer)/safe_browsing/|'\
@@ -1342,19 +1388,12 @@
     'safe_browsing_db': {
       'filepath': 'components/safe_browsing_db/',
     },
-    'scheduler': {
-      'filepath': 'cc/scheduler'\
-                  '|content/renderer/scheduler'
-    },
     'screen_orientation': {
       'filepath': 'screen_orientation',
     },
     'service_worker': {
       'filepath': 'content/(browser|renderer|child|common)/service_worker/',
     },
-    'services_network': {
-      'filepath': 'services/network',
-    },
     'services_public': {
       'filepath': 'services/([^/]*/)*public/',
     },
@@ -1377,7 +1416,7 @@
                   '|chromeos/dbus/smb_provider_client',
     },
     'source_idls': {
-      'filepath': 'third_party/Webkit/Source/(core|modules|platform)/.*\.idl',
+      'filepath': 'third_party/blink/renderer/(core|modules|platform)/.*\.idl',
     },
     'spellcheck': {
       'filepath': 'chrome/browser/spellchecker/'\
@@ -1403,10 +1442,6 @@
                   '|chrome/browser/.*managed_user'\
                   '|chrome/browser/.*supervised_user',
     },
-    'swreporter': {
-      'filepath': 'chrome/browser/safe_browsing/chrome_cleaner/'\
-                  '|chrome/browser/component_updater/sw_reporter_',
-    },
     'sync': {
       'filepath': '^chrome/android/sync_shell/'\
                   '|^chrome/browser/ui/sync/'\
@@ -1475,9 +1510,11 @@
       'filepath': 'apitest|unittest|browsertest|uitest|chrome/test/',
     },
     'tether': {
-      'filepath': 'components/cryptauth/'\
+      'filepath': 'chrome/browser/chromeos/tether/'\
+                  '|chrome/browser/ui/ash/network/tether*'\
                   '|chromeos/components/tether/'\
-                  '|components/proximity_auth/',
+                  '|components/cryptauth/'\
+                  '|components/proximity_auth/logging'
     },
     'textinput': {
       'filepath': 'chrome/browser/ui/input_method'\
@@ -1503,11 +1540,16 @@
     'tools_win_chromeexts': {
       'filepath': 'tools/win/chromeexts',
     },
+    'touch_selection': {
+      'filepath': 'ui/touch_selection/'\
+                  '|content/public/android/java/src/org/chromium/content/browser/selection/'
+    },
     'tracing': {
       'filepath': 'base/debug/trace_event.*'\
                   '|base/trace_event/'\
                   '|content/browser/tracing/'\
-                  '|components/tracing/'
+                  '|components/tracing/'\
+                  '|services/tracing/'
     },
     'ui_compositor': {
       'filepath': 'ui/compositor/layer\.|'\
@@ -1539,9 +1581,6 @@
     'vaapi': {
       'filepath': 'media/gpu/vaapi',
     },
-    'valgrind': {
-      'filepath': 'valgrind',
-    },
     'version_assembly': {
       'filepath': 'chrome/app/version_assembly',
     },
@@ -1561,6 +1600,11 @@
                   '|media/muxers/'\
                   '|services/video_capture/',
     },
+    'video_gpu': {
+      'filepath': 'content/renderer/media/|'\
+                  'media/capture/video/|'\
+                  'media/gpu/',
+    },
     'views': {
       # Applies to all files and subdirs within this directory.
       'filepath': '^ui/views/',
@@ -1573,13 +1617,22 @@
                   '|ash/virtual_keyboard',
     },
     'virtual_reality': {
-      'filepath': 'vr_shell/|'\
-                  '/vr/|'\
-                  'third_party/gvr',
+      # Includes VR, AR, and XR.
+      'filepath': '/vr/'\
+                  '|/xr'\
+                  '|third_party/arcore'\
+                  '|third_party/gvr'\
+                  '|third_party/libovr'\
+                  '|third_party/openvr',
     },
     'wake_lock': {
       'filepath': 'wake_lock',
     },
+    'web_package': {
+      'filepath': 'content/browser/loader/prefetch_url_loader'\
+                  '|content/browser/web_package/'\
+                  '|content/test/data/sxg/'
+    },
     'web_share': {
       'filepath': 'chrome/android/java/src/org/chromium/chrome/browser/webshare/'\
                   '|chrome/android/javatests/src/org/chromium/chrome/browser/WebShare.*'\
@@ -1587,8 +1640,21 @@
                   '|chrome/browser/webshare/'\
                   '|third_party/WebKit/LayoutTests/webshare/'\
                   '|third_party/WebKit/LayoutTests/external/wpt/web-share/'\
-                  '|third_party/WebKit/public/platform/modules/webshare/'\
-                  '|third_party/WebKit/Source/modules/webshare/',
+                  '|third_party/blink/public/platform/modules/webshare/'\
+                  '|third_party/blink/renderer/modules/webshare/',
+    },
+    'webauthn': {
+        'filepath': 'chrome/android/java/src/org/chromium/chrome/browser/webauth/'\
+                    '|chrome/android/javatests/src/org/chromium/chrome/browser/webauth/'\
+                    '|chrome/browser/webauthn/'\
+                    '|chrome/browser/ui/webauthn/'\
+                    '|chrome/browser/ui/views/webauthn/'\
+                    '|content/browser/webauth/'\
+                    '|device/fido/'\
+                    '|third_party/blink/public/platform/modules/webauth/',
+    },
+    'webgpu': {
+        'filepath': 'third_party/blink/renderer/modules/webgpu/',
     },
     'webrtc_browser_tests': {
       'filepath': 'chrome/browser/media/.*webrtc.*browsertest|'\
@@ -1627,7 +1693,8 @@
   # Please keep alphabetical
   ##############################################################################
   'WATCHLISTS': {
-    'about_flags': ['asvitkine+watch@chromium.org'],
+    'about_flags': ['asvitkine+watch@chromium.org',
+                    'jmedley+watch@chromium.org'],
     'accelerator_table': ['derat+watch@chromium.org',
                           'yusukes+watch@chromium.org'],
     'accessibility': ['aboxhall+watch@chromium.org',
@@ -1639,37 +1706,44 @@
                       'katie+watch@chromium.org',
                       'nektar+watch@chromium.org',
                       'yuzo+watch@chromium.org'],
-    'add_to_homescreen': ['dominickn+watch@chromium.org',
+    'add_to_homescreen': ['dominickn+watch-a2hs@chromium.org',
                           'hanxi+watch@chromium.org',
                           'pkotwicz+watch@chromium.org'],
     'android_crash_reporting': ['asvitkine+watch@chromium.org'],
     'android_crazy_linker': ['johnmaguire+watch@google.com'],
     'android_infobars': ['dfalcantara+watch@chromium.org'],
     'android_infra': ['agrieve+watch@chromium.org',
+                      'estevenson+watch@chromium.org',
                       'jbudorick+watch@chromium.org'],
     'android_item_chooser_dialogs': ['juncai+watch@chromium.org',
                                      'ortuno+watch@chromium.org'],
     'android_loading': ['gabadie+watch@chromium.org',
                         'lizeb+watch-android-loading@chromium.org'],
     'android_media': ['mlamouri+watch-media@chromium.org'],
+    'android_search_widget': ['tedchoc+watch@chromium.org',
+                              'yusufo+watch@chromium.org'],
     'android_studio': ['wnwen+watch@chromium.org',
                        'nyquist+watch@chromium.org'],
     'android_tab': ['dtrainor+watch@chromium.org'],
     'android_uma_settings': ['asvitkine+watch@chromium.org',
                              'gayane+watch@chromium.org'],
-    'android_webapk': ['dominickn+watch@chromium.org'],
+    'android_webapk': ['dominickn+watch-webapk@chromium.org'],
     'android_webview': ['android-webview-reviews@chromium.org'],
+    'animation_worklet': ['yigu@chromium.org',
+                          'majidvp@chromium.org'],
     'app_list': ['tfarina@chromium.org'],
-    'app_shortcuts': ['mgiuca+watch@chromium.org',
+    'app_shortcuts': ['loyso+watch@chromium.org',
+                      'mgiuca+watch@chromium.org',
                       'tapted+watch@chromium.org'],
-    'appcache': ['michaeln@chromium.org'],
     'apps': ['chromium-apps-reviews@chromium.org',
+             'dominickn+watch-apps@chromium.org',
              'tfarina@chromium.org'],
     'arc': ['elijahtaylor+arcwatch@chromium.org',
             'hidehiko+watch@chromium.org',
             'lhchavez+watch@chromium.org',
             'victorhsieh+watch@chromium.org',
-            'yusukes+watch@chromium.org'],
+            'yusukes+watch@chromium.org',
+            'arc-reviews+chromium@google.com'],
     'arc_auth': ['khmel+watch@chromium.org'],
     'arc_fileapi': ['nya+watch@chromium.org'],
     'arc_kiosk': ['poromov+watch@chromium.org'],
@@ -1677,32 +1751,42 @@
                 'cernekee@chromium.org',
                 'snanda@chromium.org'],
     'arc_power': ['ejcaruso+watch@chromium.org'],
+    'arc_video_accelerator': ['hiroh+watch@chromium.org'],
     'ash': ['kalyan.kondapally@intel.com',
             'sadrul@chromium.org'],
     'assistant': ['croissant-eng+reviews@chromium.org'],
+    'audio_service': ['marinaciocea+watch@chromium.org',
+                      'maxmorin+watch@chromium.org',
+                      'olka+watch@chromium.org'],
     'aura': ['kalyan.kondapally@intel.com',
              'sadrul@chromium.org'],
     'aura_compositor': ['danakj+watch@chromium.org',
                         'jbauman+watch@chromium.org',
                         'kalyan.kondapally@intel.com',
                         'piman+watch@chromium.org'],
-    'autofill': ['rouslan+autofill@chromium.org',
-                 'vabr+watchlistautofill@chromium.org',
+    'autofill': ['anthonyvd+autofillwatch@chromium.org',
+                 'dlkumar+autofillwatch@google.com',
+                 'ftirelo+autofillwatch@chromium.org',
                  'mathp+autofillwatch@chromium.org',
+                 'rogerm+autofillwatch@chromium.org',
                  'sebsg+autofillwatch@chromium.org',
-                 'rogerm+autofillwatch@chromium.org'],
-    'background_fetch': ['delphick+watch@chromium.org',
-                         'peter@chromium.org'],
+                 'tmartino+autofillwatch@chromium.org',
+                 'vabr+watchlistautofill@chromium.org'],
+    'autofill_credit_cards': ['jsaul+autofillwatch@google.com'],
+    'background_fetch': ['peter@chromium.org',
+                         'rayankans+watch@chromium.org',
+                         'nator@chromium.org'],
     'background_sync': ['chasej+watch@chromium.org',
                         'iclelland+watch@chromium.org',
                         'peter@chromium.org'],
-    'banners': ['dominickn+watch@chromium.org',
+    'banners': ['dominickn+watch-banners@chromium.org',
                 'hanxi+watch@chromium.org',
                 'pkotwicz+watch@chromium.org'],
     'base': ['vmpstr+watch@chromium.org'],
     'base_allocator': ['dmikurube@chromium.org',
                        'wfh+watch@chromium.org'],
     'base_memory': ['gavinp+memory@chromium.org'],
+    'base_scheduler': ['scheduler-bugs+base@chromium.org'],
     'base_task_scheduler': ['fdoray+watch@chromium.org',
                             'gab+watch@chromium.org',
                             'robliao+watch@chromium.org'],
@@ -1718,7 +1802,6 @@
                             'dmazzoni@chromium.org',
                             'dougt+watch@chromium.org',
                             'je_julie.kim@chromium.org',
-                            'katie+watch@chromium.org',
                             'nektar@chromium.org'],
     'blink_animation': ['alexis.menard@intel.com',
                         'blink-reviews-animation@chromium.org',
@@ -1730,29 +1813,29 @@
                     'rtoy@chromium.org'],
     'blink_battery_status': ['mlamouri+watch-blink@chromium.org',
                              'timvolodine@chromium.org'],
-    'blink_bidi': ['leviw+bidiwatch@chromium.org'],
     'blink_bindings': ['blink-reviews-bindings@chromium.org'],
     'blink_bindings_serialization': ['jbroman+watch@chromium.org'],
-    'blink_bluetooth': ['cco3+watch@chromium.org',
-                        'mattreynolds+watch@chromium.org',
+    'blink_bluetooth': ['mattreynolds+watch@chromium.org',
                         'ortuno+watch@chromium.org'],
     'blink_canvas2d': ['dongseong.hwang@intel.com',
-                       'junov@chromium.org'],
+                       'fserb@chromium.org'],
     'blink_client_hints': ['yoav@yoav.ws'],
     'blink_clipboard': ['dcheng@chromium.org'],
-    'blink_common': ['jbroman+watch@chromium.org'],
+    'blink_common': ['jbroman+watch@chromium.org',
+                     'kinuko+watch@chromium.org'],
     'blink_controller': ['haraken@chromium.org'],
     'blink_css': ['alexis.menard@intel.com',
                   'apavlov+blink@chromium.org',
-                  'blink-reviews-css@chromium.org',
-                  'rob.buis@samsung.com'],
+                  'blink-reviews-css@chromium.org'],
     'blink_css_flexbox': ['cbiesinger@chromium.org'],
     'blink_css_fragmentation_tests': ['mstensho@chromium.org'],
     'blink_css_grid_layout': ['jfernandez@igalia.com',
                               'rego@igalia.com',
                               'svillar@igalia.com'],
     'blink_custom_elements': ['dominicc+watchlist@chromium.org'],
-    'blink_device_orientation': ['mlamouri+watch-blink@chromium.org',
+    'blink_device_orientation': ['juncai+watch@chromium.org',
+                                 'mlamouri+watch-blink@chromium.org',
+                                 'rijubrata.bhaumik@intel.com',
                                  'timvolodine@chromium.org'],
     'blink_devtools': ['apavlov+blink@chromium.org',
                        'caseq+blink@chromium.org',
@@ -1761,8 +1844,7 @@
                        'lushnikov+blink@chromium.org',
                        'pfeldman+blink@chromium.org'],
     'blink_dom': ['blink-reviews-dom@chromium.org',
-                  'eae+blinkwatch@chromium.org',
-                  'rob.buis@samsung.com'],
+                  'eae+blinkwatch@chromium.org'],
     'blink_dom_events': ['hayato@chromium.org'],
     'blink_events': ['blink-reviews-events@chromium.org',
                      'dtapuska+blinkwatch@chromium.org',
@@ -1770,14 +1852,12 @@
     'blink_fetch': ['gavinp+loader@chromium.org',
                     'japhet@chromium.org',
                     'loading-reviews+fetch@chromium.org'],
-    'blink_fetch_api': ['tyoshino+watch@chromium.org'],
     'blink_fileapi': ['kinuko+fileapi@chromium.org',
                       'nhiroki@chromium.org',
                       'tzik@chromium.org'],
     'blink_frames': ['blink-reviews-frames@chromium.org'],
     'blink_geolocation': ['timvolodine@chromium.org'],
-    'blink_heap': ['ager@chromium.org',
-                   'haraken@chromium.org',
+    'blink_heap': ['haraken@chromium.org',
                    'kouhei+heap@chromium.org',
                    'oilpan-reviews@chromium.org'],
     'blink_html': ['blink-reviews-html@chromium.org'],
@@ -1786,17 +1866,14 @@
     'blink_indexed_db': ['cmumford@chromium.org',
                          'jsbell+idb@chromium.org'],
     'blink_input': ['dtapuska+blinkwatch@chromium.org',
-                    'nzolghadr@chromium.org'],
+                    'nzolghadr+blinkwatch@chromium.org'],
     'blink_layers': ['blink-layers+watch@chromium.org'],
     'blink_layout': ['blink-reviews-layout@chromium.org',
                      'eae+blinkwatch@chromium.org',
-                     'jchaffraix+rendering@chromium.org',
-                     'leviw+renderwatch@chromium.org',
                      'pdr+renderingwatchlist@chromium.org',
                      'szager+layoutwatch@chromium.org',
                      'zoltan@webkit.org'],
-    'blink_layout_ng': ['ojan+watch@chromium.org',
-                        'cbiesinger@chromium.org',
+    'blink_layout_ng': ['cbiesinger@chromium.org',
                         'glebl+reviews@chromium.org',
                         'dgrogan+ng@chromium.org',
                         'atotic+reviews@chromium.org',
@@ -1827,9 +1904,8 @@
                                 'drott+blinkwatch@chromium.org',
                                 'dschulze@chromium.org',
                                 'fmalita+watch@chromium.org',
-                                'junov@chromium.org',
+                                'fserb@chromium.org',
                                 'pdr+graphicswatchlist@chromium.org',
-                                'rob.buis@samsung.com',
                                 'schenney@chromium.org'],
     'blink_preloadScanner': ['yoav@yoav.ws'],
     'blink_prerender': ['gavinp+prerender@chromium.org',
@@ -1838,36 +1914,31 @@
     'blink_quota': ['kinuko+fileapi@chromium.org',
                     'nhiroki@chromium.org',
                     'tzik@chromium.org'],
-    'blink_scheduler': ['scheduler-bugs@chromium.org'],
+    'blink_scheduler': ['scheduler-bugs+blink@chromium.org'],
     'blink_screen_orientation': ['mlamouri+watch-blink@chromium.org'],
     'blink_script': ['kouhei+script@chromium.org',
-                     'hiroshige+script@chromium.org',
-                     'kochi+script@chromium.org'],
+                     'hiroshige+script@chromium.org'],
     'blink_scroll': ['bokan@chromium.org'],
-    'blink_serviceworkers': ['falken+watch@chromium.org',
+    'blink_service_worker': ['falken+watch@chromium.org',
                              'horo+watch@chromium.org',
                              'jsbell+serviceworker@chromium.org',
                              'kinuko+serviceworker@chromium.org',
-                             'michaeln@chromium.org',
                              'nhiroki@chromium.org',
                              'serviceworker-reviews@chromium.org',
-                             'shimazu+serviceworker@chromium.org',
-                             'tzik@chromium.org'],
-    'blink_serviceworkers_tests': ['kenjibaheux+watch@chromium.org'],
+                             'shimazu+serviceworker@chromium.org'],
+    'blink_service_worker_tests': ['kenjibaheux+watch@chromium.org'],
     'blink_shadow_dom': ['hayato@chromium.org'],
     'blink_spellcheck' : ['groby+blinkspell@chromium.org',
                           'timvolodine@chromium.org',
                           'xiaochengh+watch@chromium.org'],
     'blink_spv2_layout_tests': ['pdr+virtualspv2watchlist@chromium.org'],
-    'blink_streams': ['tyoshino+watch@chromium.org'],
+    'blink_streams': ['ricea+watch@chromium.org'],
     'blink_style': ['blink-reviews-style@chromium.org'],
     'blink_svg': ['dschulze@chromium.org',
                   'fmalita+watch@chromium.org',
                   'fs@opera.com',
-                  'gyuyoung.kim@chromium.org',
                   'kouhei+svg@chromium.org',
                   'pdr+svgwatchlist@chromium.org',
-                  'rob.buis@samsung.com',
                   'schenney@chromium.org'],
     'blink_track': ['eric.carlson@apple.com',
                     'fs@opera.com',
@@ -1881,54 +1952,58 @@
     'blink_webp': ['jzern@chromium.org',
                    'skal@google.com',
                    'urvang@chromium.org'],
-    'blink_websockets': ['tyoshino+watch@chromium.org',
-                         'yhirano+watch@chromium.org'],
+    'blink_websockets': ['yhirano+watch@chromium.org',
+                         'ricea+watch@chromium.org'],
     'blink_workers': ['blink-worker-reviews@chromium.org',
                       'falken+watch@chromium.org',
                       'horo+watch@chromium.org',
                       'kinuko+worker@chromium.org',
                       'shimazu+worker@chromium.org'],
-    'blink_wtf': ['blink-reviews-wtf@chromium.org',
-                  'mikhail.pozdnyakov@intel.com'],
-    'blink_xml': ['dominicc+watchlist@chromium.org', 'joelhockey@chromium.org'],
+    'blink_wtf': ['blink-reviews-wtf@chromium.org'],
+    'blink_xml': ['dominicc+watchlist@chromium.org',
+                  'joelhockey+watch@chromium.org'],
     'bookmarks': ['tfarina@chromium.org'],
     'bottombar': ['donnd+watch@chromium.org',
                   'mdjones+watch@chromium.org'],
-    'browser_chromeos': ['davemoore+watch@chromium.org'],
+    'breve': ['breve-team-reviews@chromium.org'],
     'browser_components': ['browser-components-watch@chromium.org'],
     'browser_compositor': ['piman+watch@chromium.org',
                            'vollick@chromium.org'],
     'browser_resources_md': ['michaelpg+watch-md-ui@chromium.org'],
-    'browsing_data': ['markusheintz@chromium.org',
+    'browsing_data': ['dullweber+watch@chromium.org',
+                      'markusheintz@chromium.org',
                       'msramek+watch@chromium.org'],
-    'bubble': ['hcarmona+bubble@chromium.org',
-               'groby+bubble@chromium.org',
-               'rouslan+bubble@chromium.org'],
+    'bubble': ['hcarmona+bubble@chromium.org'],
     'cache_storage': ['nhiroki@chromium.org'],
-    'cast': ['amp+watch@chromium.org',
+    'cast': ['aburago+watch@chromium.org',
              'imcheng+watch@chromium.org',
              'isheriff+watch@chromium.org',
              'jasonroberts+watch@google.com',
              'miu+watch@chromium.org',
+             'pthatcher+watch@chromium.org',
              'xjz+watch@chromium.org'],
     'cast_certificate': ['dougsteed+watch@chromium.org',
                          'mfoltz+watch@chromium.org',
                          'ryanchung+watch@chromium.org'],
-    'cast_channel': ['amp+watch@chromium.org',
+    'cast_channel': ['imcheng+watch@chromium.org',
                      'mfoltz+watch@chromium.org',
                      'ryanchung+watch@chromium.org'],
     'cc': ['cc-bugs@chromium.org'],
+    'cc-animation': ['yigu@chromium.org',
+                     'majidvp@chromium.org'],
     'cc-contexts': ['danakj+watch@chromium.org'],
     'cc-display': ['danakj+watch@chromium.org'],
     'cc-paint': ['danakj+watch@chromium.org'],
     'cc-quads': ['danakj+watch@chromium.org'],
     'cc-resources': ['danakj+watch@chromium.org'],
+    'cc-scheduler': ['scheduler-bugs+cc@chromium.org'],
     'certificate_transparency': ['certificate-transparency-chrome@googlegroups.com',
                                  'eranm@chromium.org',
                                  'martijn+crwatch@martijnc.be',
                                  'rsleevi+watch@chromium.org'],
-    'chrome_elf': ['caitkp+watch@chromium.org',
-                   'pennymac+watch@chromium.org'],
+    'chrome_cleaner': ['csharp+watch@chromium.org',
+                       'joenotcharles+watch@chromium.org'],
+    'chrome_elf': ['caitkp+watch@chromium.org'],
     'chrome_grc': ['chrome-grc-reviews@chromium.org'],
     'chrome_views': ['tfarina@chromium.org'],
     'chromecast': ['alokp+watch@chromium.org',
@@ -1940,8 +2015,10 @@
     'chromeos': ['oshima+watch@chromium.org'],
     'chromeos_attestation': ['dkrahn+watch@chromium.org'],
     'chromeos_calculator': ['dharcourt@chromium.org'],
-    'chromeos_dbus': ['hashimoto+watch@chromium.org'],
     'chromeos_geolocation': ['alemate+watch@chromium.org'],
+    'chromeos_lkgm': ['achuith+watch@chromium.org',
+                      'bpastene+watch@chromium.org',
+                      'stevenjb+watch@chromium.org'],
     'chromeos_login': ['achuith+watch@chromium.org',
                        'alemate+watch@chromium.org'],
     'chromeos_net': ['stevenjb+watch@chromium.org'],
@@ -1952,8 +2029,11 @@
                      'dmikurube+clang@chromium.org',
                      'dsinclair@chromium.org',
                      'eugenis+clang@chromium.org',
+                     'gbiv+clang@chromium.org',
                      'glider+clang@chromium.org',
                      'hans@chromium.org',
+                     'ibiryukov@google.com',
+                     'pcc@chromium.org',
                      'rnk@chromium.org',
                      'thakis@chromium.org',
                      'thestig@chromium.org',
@@ -1965,18 +2045,13 @@
     'components_deps': ['blundell+watchlist@chromium.org',
                         'droger+watchlist@chromium.org',
                         'sdefresne+watchlist@chromium.org'],
-    'content': ['jam@chromium.org'],
-    'content_bluetooth': ['cco3+watch@chromium.org',
-                          'mattreynolds+watch@chromium.org',
+    'content_bluetooth': ['mattreynolds+watch@chromium.org',
                           'ortuno+watch@chromium.org'],
-    'content_loader': ['loading-reviews@chromium.org',
-                       'rdsmith+watch@chromium.org'],
+    'content_loader': ['loading-reviews@chromium.org'],
     'content_renderer': ['mlamouri+watch-content@chromium.org'],
     'content_shell': ['jochen+watch@chromium.org',
                       'mlamouri+watch-content@chromium.org',
                       'peter@chromium.org'],
-    'content_view_core': ['jinsukkim+watch@chromium.org'],
-    'content_websockets': ['tyoshino+watch@chromium.org'],
     'content_worker': ['blink-worker-reviews@chromium.org',
                        'kinuko+watch@chromium.org'],
     'contextual_search': ['donnd+watch@chromium.org',
@@ -1990,23 +2065,20 @@
            'yyanagisawa+cc@chromium.org'],
     'cr_elements': ['michaelpg+watch-elements@chromium.org',
                     'stevenjb+watch-md-settings@chromium.org'],
+    'cros_benchmarks': ['cros-perf-detectives@google.com',
+                        'cywang@chromium.org',
+                        'vovoy@chromium.org'],
+    'crostini': ['crostini-ui@chromium.org'],
     'custom_tabs': ['lizeb+watch-custom-tabs@chromium.org'],
-    'data_reduction_proxy': ['tbansal+watch-data-reduction-proxy@chromium.org'],
+    'dbus': ['hashimoto+watch@chromium.org'],
     'deep_memory_profiler': ['dmikurube@chromium.org'],
-    'device_bluetooth': ['cco3+watch@chromium.org',
-                         'mattreynolds+watch@chromium.org',
+    'device_bluetooth': ['mattreynolds+watch@chromium.org',
                          'ortuno+watch@chromium.org'],
-    'device_chooser': ['cco3+watch@chromium.org',
-                       'juncai+watch@chromium.org',
+    'device_chooser': ['juncai+watch@chromium.org',
                        'mattreynolds+watch@chromium.org'],
-    'device_sensors': ['juncai+watch@chromium.org',
-                       'mlamouri+watch-sensors@chromium.org',
-                       'rijubrata.bhaumik@intel.com',
-                       'timvolodine@chromium.org'],
     'devtools': ['devtools-reviews@chromium.org',
                  'pfeldman@chromium.org'],
-    'dial': ['amp+watch@chromium.org',
-             'mfoltz+watch@chromium.org',
+    'dial': ['mfoltz+watch@chromium.org',
              'zhaobin+watch@chromium.org'],
     'disk_cache': ['gavinp+disk@chromium.org'],
     'download': ['dtrainor+watch@chromium.org'],
@@ -2014,34 +2086,34 @@
     'drive': ['tfarina@chromium.org'],
     'drive_resource_metadata': ['hashimoto+watch@chromium.org'],
     'eme': ['eme-reviews@chromium.org'],
+    'explore_sites': ['chili+watch@chromium.org',
+                      'dewittj+watch@chromium.org',
+                      'dimich+watch@chromium.org',
+                      'freedjm+watch@chromium.org'],
     'extension': ['chromium-apps-reviews@chromium.org',
                   'extensions-reviews@chromium.org'],
     'feature_policy': ['loonybear@chromium.org',
                        'iclelland+watch@chromium.org',
-		       'jmedley@chromium.org'],
+                       'jmedley+watch@chromium.org'],
     'fileapi': ['kinuko+fileapi@chromium.org',
                 'nhiroki@chromium.org',
                 'tzik@chromium.org'],
     'filebrowse': ['rginda+watch@chromium.org'],
-    'filesapp': ['fukino+watch@chromium.org',
-                 'oka+watch@chromium.org',
+    'filesapp': ['filesapp-reviews@chromium.org',
+                 'fukino+watch@chromium.org',
                  'yamaguchi+watch@chromium.org'],
     'fsp': ['mtomasz+watch@chromium.org'],
     'fuchsia': ['sergeyu@chromium.org', 'wez@chromium.org'],
     'fuzzing': ['fuzzing@chromium.org'],
-    'gamepad': ['cco3+watch@chromium.org',
-                'mattreynolds+watch@chromium.org'],
+    'gamepad': ['mattreynolds+watch@chromium.org'],
     'gcm': ['peter@chromium.org',
             'zea+watch@chromium.org'],
     'generic_sensor': ['alexander.shalamov@intel.com',
-                       'cco3+watch@chromium.org',
                        'juncai+watch@chromium.org',
                        'mattreynolds+watch@chromium.org',
-                       'mikhail.pozdnyakov@intel.com',
                        'timvolodine@chromium.org',
                        'wanming.lin@intel.com'],
-    'geolocation': ['cco3+watch@chromium.org',
-                    'mattreynolds+watch@chromium.org',
+    'geolocation': ['mattreynolds+watch@chromium.org',
                     'mlamouri+watch-geolocation@chromium.org'],
     'gfx_geometry': ['cc-bugs@chromium.org'],
     'gfx_image': ['rsesek+watch@chromium.org'],
@@ -2049,8 +2121,8 @@
            'dpranke@chromium.org',
            'tfarina@chromium.org'],
     'gpu': ['piman+watch@chromium.org'],
-    'gpu_passthrough_cmd_decoder': ['cwallez+watch@chromium.org',
-                                    'geofflang+watch@chromium.org'],
+    'gpu_passthrough_cmd_decoder': ['geofflang+watch@chromium.org'],
+    'headless': ['headless-reviews@chromium.org'],
     'history_ui': ['pam+watch@chromium.org'],
     'i18n': ['jshin+watch@chromium.org'],
     'importer': ['tfarina@chromium.org'],
@@ -2059,11 +2131,10 @@
                    'jsbell+idb@chromium.org'],
     'ink_drop': ['bruthig+ink_drop@chromium.org'],
     'input': ['dtapuska+chromiumwatch@chromium.org'],
-    'installable': ['dominickn+watch@chromium.org'],
+    'installable': ['dominickn+watch-installable@chromium.org'],
     'installer_linux': ['mmoss@chromium.org',
                         'raphael.kubo.da.costa@intel.com'],
     'installer_win': ['grt+watch@chromium.org',
-                      'pennymac+watch@chromium.org',
                       'wfh+watch@chromium.org'],
     'instant': ['dcblack@chromium.org',
                 'donnd+watch@chromium.org',
@@ -2081,10 +2152,8 @@
                   'marq+scrutinize@chromium.org'],
     'ios_showcase': ['ios-reviews+showcase@chromium.org',
                      'marq+watch@chromium.org'],
-    'ios_test': ['huangml+watch@chromium.org'],
     'ios_web': ['ios-reviews+web@chromium.org',
                 'eugenebut@chromium.org'],
-    'ipc': ['jam@chromium.org'],
     'libaom': ['fgalligan@chromium.org',
                'johannkoenig@chromium.org',
                'jzern@chromium.org',
@@ -2106,6 +2175,8 @@
     'login': ['vabr+watchlistlogin@chromium.org'],
     'mac' : ['mac-reviews@chromium.org'],
     'manifest': ['mlamouri+watch-manifest@chromium.org'],
+    'mash_buildbot_filters': ['dxie+watch@chromium.org',
+                              'jamescook+watch@chromium.org'],
     'md_settings': ['michaelpg+watch-md-settings@chromium.org',
                     'stevenjb+watch-md-settings@chromium.org'],
     'media': ['feature-media-reviews@chromium.org'],
@@ -2113,46 +2184,51 @@
     'media_controls': ['steimel+watch-mediacontrols@chromium.org'],
     'media_galleries': ['thestig@chromium.org',
                         'tommycli@chromium.org'],
-    'media_mojo': ['alokp+watch@chromium.org'],
+    'media_mojo': ['alokp+watch@chromium.org',
+                   'xhwang+watch@chromium.org'],
     'media_recorder': ['emircan+watch+mediarecorder@chromium.org',
                        'mcasas+mediarecorder@chromium.org'],
-    'media_remoting': ['amp+watch@chromium.org',
-                       'apacible+watch@chromium.org',
+    'media_remoting': ['aburago+watch@chromium.org',
                        'erickung+watch@chromium.org',
                        'mfoltz+watch@chromium.org',
                        'miu+watch@chromium.org',
+                       'pthatcher+watch@chromium.org',
                        'xjz+watch@chromium.org'],
-    'media_router': ['amp+watch@chromium.org',
-                     'imcheng+watch@chromium.org',
-                     'mfoltz+watch@chromium.org'],
+    'media_router': ['imcheng+watch@chromium.org',
+                     'mfoltz+watch@chromium.org',
+                     'pthatcher+watch@chromium.org',
+                     'takumif+watch@chromium.org'],
+    'media_win': ['media-win-reviews@chromium.org'],
     'memory_coordinator': ['chrome-grc-reviews+memory@chromium.org'],
     'message_loop': ['sadrul@chromium.org'],
     'metrics': ['asvitkine+watch@chromium.org'],
     'metrics_xml_files': ['asvitkine+watch@chromium.org'],
     'midi': ['toyoshim+midi@chromium.org'],
-    'mojo': ['aa@chromium.org',
-             'darin@chromium.org',
-             'qsr+mojo@chromium.org',
-             'viettrungluu+watch@chromium.org'],
-    'mojo_top_level_directory': ['yzshen+watch@chromium.org'],
+    'mojo': ['darin@chromium.org'],
+    'multidevice': ['jhawkins+watch-multidevice@chromium.org',
+                    'jlklein+watch-multidevice@chromium.org',
+                    'jordynass+watch-multidevice@chromium.org',
+                    'khorimoto+watch-multidevice@chromium.org',
+                    'lesliewatkins+watch-multidevice@chromium.org'],
     'mus': ['rjkroege@chromium.org'],
     'nacl': ['native-client-reviews@googlegroups.com'],
     'native_client_sdk': ['binji+watch@chromium.org',
                           'sbc@chromium.org'],
-    'navigation': ['creis+watch@chromium.org',
+    'navigation': ['alexmos+watch@chromium.org',
+                   'creis+watch@chromium.org',
                    'nasko+codewatch@chromium.org'],
-    'net': ['cbentzel+watch@chromium.org',
-            'net-reviews@chromium.org'],
+    'net': ['net-reviews@chromium.org'],
     'net_base': ['bnc+watch@chromium.org'],
     'net_http2': ['bnc+watch@chromium.org'],
     'net_log': ['bnc+watch@chromium.org',
                 'eroman@chromium.org'],
+    'net_server': ['ricea+watch@chromium.org'],
     'net_spdy': ['bnc+watch@chromium.org'],
-    'net_websockets': ['tyoshino+watch@chromium.org'],
+    'net_websockets': ['ricea+watch@chromium.org'],
     'netinfo': ['jkarlin+watch@chromium.org'],
-    'nfc': ['cco3+watch@chromium.org',
-            'mattreynolds+watch@chromium.org'],
-    'notifications': ['awdf+watch@chromium.org', 'peter@chromium.org'],
+    'network_service': ['network-service-reviews@chromium.org'],
+    'nfc': ['mattreynolds+watch@chromium.org'],
+    'notifications': ['peter@chromium.org'],
     'nqe': ['tbansal+watch-nqe@chromium.org'],
     'ntp_snippets': ['ntp-dev+reviews@chromium.org',
                      'noyau+watch@chromium.org'],
@@ -2183,65 +2259,61 @@
                'jennb@chromium.org',
                'jianli@chromium.org'],
     'password_manager': ['gcasto+watchlist@chromium.org',
-                         'vabr+watchlistpasswordmanager@chromium.org'],
+                         'vabr+watchlistpasswordmanager@chromium.org',
+                         'vasilii+watchlistpasswordmanager@chromium.org'],
     'payments': ['rouslan+payments@chromium.org',
                  'sebsg+paymentswatch@chromium.org',
                  'gogerald+paymentswatch@chromium.org',
-                 'mahmadi+paymentswatch@chromium.org'],
+                 'mahmadi+paymentswatch@chromium.org',
+                 'anthonyvd+paymentswatch@chromium.org'],
     'payments_ios': ['mahmadi+paymentsioswatch@chromium.org'],
     'pepper_api': ['binji+watch@chromium.org',
                    'bradnelson+warch@chromium.org',
                    'ihf+watch@chromium.org',
                    'piman+watch@chromium.org',
                    'teravest+watch@chromium.org',
-                   'tzik@chromium.org',
                    'yusukes+watch@chromium.org'],
-    'permissions': ['dominickn+watch@chromium.org',
+    'permissions': ['dominickn+watch-permissions@chromium.org',
                     'hanxi+watch@chromium.org',
                     'mlamouri+watch-permissions@chromium.org',
                     'raymes+watch@chromium.org',
                     'timloh+watch@chromium.org'],
     'picture_in_picture': ['beaufort.francois+pip@gmail.com'],
-    'plugin': ['jam@chromium.org'],
+    'policy_templates': ['ljusten+watch@chromium.org'],
     'polymer': ['michaelpg+watch-polymer@chromium.org'],
     'popup_blocker': ['csharrison+watch-popups@chromium.org'],
     'precache': ['wifiprefetch-reviews@google.com'],
     'prepopulated_engines': ['vasilii+watch@chromium.org'],
-    'prerender': ['cbentzel+watch@chromium.org',
-                  'gavinp+prer@chromium.org',
+    'prerender': ['gavinp+prer@chromium.org',
                   'tburkard+watch@chromium.org'],
-    'presentation': ['amp+watch@chromium.org',
-                     'mfoltz+watch@chromium.org'],
-    'push_messaging': ['awdf+watch@chromium.org',
-                       'peter@chromium.org'],
+    'presentation': ['mfoltz+watch@chromium.org'],
+    'print_preview': ['rbpotter@chromium.org'],
+    'push_messaging': ['peter@chromium.org'],
     'reading_list': ['stkhapugin@chromium.org'],
     'remoting': ['chromoting-reviews@chromium.org'],
     'rlz_id': ['gab+watch@chromium.org',
                'robertshield+watch@chromium.org'],
-    'runtime_enabled_features': ['jmedley@chromium.org'],
+    'runtime_enabled_features': ['jmedley+watch@chromium.org'],
     'safe_browsing': ['timvolodine@chromium.org',
                       'vakh+watch@chromium.org'],
     'safe_browsing_db': ['timvolodine@chromium.org',
                          'vakh+watch@chromium.org'],
-    'scheduler': ['scheduler-bugs@chromium.org'],
     'screen_orientation': ['mlamouri+watch-screen-orientation@chromium.org'],
     'service_worker': ['horo+watch@chromium.org',
                        'jsbell+serviceworker@chromium.org',
                        'kinuko+serviceworker@chromium.org',
-                       'michaeln@chromium.org',
                        'nhiroki@chromium.org',
                        'serviceworker-reviews@chromium.org',
-                       'shimazu+serviceworker@chromium.org',
-                       'tzik@chromium.org'],
-    'services_network': ['yzshen+watch@chromium.org'],
+                       'shimazu+serviceworker@chromium.org'],
     'services_public': ['blundell+services-watchlist@chromium.org'],
     'settings_reset_prompt': ['alito+watch@chromium.org'],
-    'site_engagement': ['dominickn+watch@chromium.org'],
+    'site_engagement': ['dominickn+watch-engagement@chromium.org'],
     'site_instance': ['ajwong+watch@chromium.org',
+                      'alexmos+watch@chromium.org',
                       'creis+watch@chromium.org',
                       'nasko+codewatch@chromium.org'],
     'smb': ['cros-enterprise-lax+smbwatch@chromium.org'],
-    'source_idls': ['jmedley@chromium.org'],
+    'source_idls': ['jmedley+watch@chromium.org'],
     'spellcheck': ['groby+spellwatch@chromium.org',
                    'rlp+watch@chromium.org',
                    'rouslan+spell@chromium.org',
@@ -2254,16 +2326,13 @@
                    'vmpstr+watch@chromium.org'],
     'subresource_filter': ['subresource-filter-reviews@chromium.org'],
     'supervised_users': ['pam+watch@chromium.org'],
-    'swreporter': ['csharp+watch@chromium.org',
-                   'ftirelo+watch@chromium.org',
-                   'joenotcharles+watch@chromium.org'],
     'sync': ['sync-reviews@chromium.org'],
     'syncfs': ['kinuko+fileapi@chromium.org',
                'nhiroki@chromium.org',
                'tzik@chromium.org'],
     'tab_alert_indicators': ['miu+watch@chromium.org'],
-    'tab_capture': ['amp+watch@chromium.org',
-                    'miu+watch@chromium.org',
+    'tab_capture': ['miu+watch@chromium.org',
+                    'pthatcher+watch@chromium.org',
                     'xjz+watch@chromium.org'],
     'tab_contents': ['ajwong+watch@chromium.org',
                      'avi@chromium.org',
@@ -2292,37 +2361,39 @@
                            'yusukes+watch@chromium.org'],
     'timers': ['chirantan+watch@chromium.org'],
     'tools_win_chromeexts': ['robliao+watch@chromium.org'],
+    'touch_selection': ['ajith.v@samsung.com',
+                        'ajith.v@chromium.org'],
     'tracing': ['tracing+reviews@chromium.org',
                 'wfh+watch@chromium.org'],
     'ui_compositor': ['cc-bugs@chromium.org'],
     'ui_display_win': ['robliao+watch@chromium.org'],
     'ui_resources': ['oshima+watch@chromium.org'],
     'ui_strings': ['srahim+watch@chromium.org'],
-    'usb': ['cco3+watch@chromium.org',
-            'mattreynolds+watch@chromium.org'],
-    'v4l2': ['acourbot+watch@chromium.org'],
+    'usb': ['mattreynolds+watch@chromium.org'],
+    'v4l2': ['hiroh+watch@chromium.org'],
     'vaapi': ['vaapi-reviews@chromium.org'],
-    'valgrind': ['bruening+watch@chromium.org',
-                 'glider+watch@chromium.org'],
     'version_assembly': ['caitkp+watch@chromium.org',
                          'gab+watch@chromium.org'],
     'video': ['posciak+watch@chromium.org'],
     'video_capture': ['chfremer+watch@chromium.org'],
+    'video_gpu': ['acourbot+watch@chromium.org'],
     'views': ['tfarina@chromium.org'],
     'virtual_keyboard': ['blakeo+virtualkb@chromium.org',
                          'dfaden+virtualkb@google.com',
-                         'oka+watchvk@chromium.org',
                          'yhanada+watchvk@chromium.org'],
     'virtual_reality': ['feature-vr-reviews@chromium.org'],
-    'wake_lock': ['cco3+watch@chromium.org',
-                  'mattreynolds+watch@chromium.org'],
+    'wake_lock': ['mattreynolds+watch@chromium.org'],
+    'web_package': ['twifkak+watch@chromium.org'],
     'web_share': ['mgiuca+watch@chromium.org'],
+    'webauthn': ['webauthn-reviews@chromium.org'],
+    'webgpu': ['cwallez+watch@chromium.org',
+               'kainino+watch@chromium.org'],
     'webrtc_browser_tests': ['phoglund+watch@chromium.org'],
-    'website_settings': ['markusheintz@chromium.org',
+    'website_settings': ['dullweber+watch@chromium.org',
+                         'markusheintz@chromium.org',
                          'msramek+watch@chromium.org',
                          'raymes+watch@chromium.org'],
-    'windows_sandboxing': ['pennymac+watch@chromium.org',
-                           'wfh+watch@chromium.org'],
+    'windows_sandboxing': ['wfh+watch@chromium.org'],
     'x11': ['derat+watch@chromium.org',
             'sadrul@chromium.org',
             'yusukes+watch@chromium.org'],
diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn
index 513c529..04db3b4 100644
--- a/android_webview/BUILD.gn
+++ b/android_webview/BUILD.gn
@@ -5,12 +5,14 @@
 import("//android_webview/system_webview_apk_tmpl.gni")
 import("//android_webview/webview_repack_locales.gni")
 import("//android_webview/variables.gni")
+import("//build/config/android/chrome_version.gni")
 import("//build/config/android/config.gni")
 import("//build/config/android/rules.gni")
 import("//build/config/locales.gni")
 import("//components/spellcheck/spellcheck_build_features.gni")
 import("//tools/grit/repack.gni")
 import("//tools/resources/generate_resource_whitelist.gni")
+import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
 
 declare_args() {
   # Package name of the system_webview_apk target.
@@ -52,10 +54,12 @@
     "java/src/org/chromium/android_webview/AwPdfExporter.java",
     "java/src/org/chromium/android_webview/AwPicture.java",
     "java/src/org/chromium/android_webview/AwQuotaManagerBridge.java",
+    "java/src/org/chromium/android_webview/AwRenderProcess.java",
     "java/src/org/chromium/android_webview/AwResource.java",
     "java/src/org/chromium/android_webview/AwSettings.java",
     "java/src/org/chromium/android_webview/AwTokenBindingManager.java",
     "java/src/org/chromium/android_webview/AwTracingController.java",
+    "java/src/org/chromium/android_webview/AwVariationsSeedBridge.java",
     "java/src/org/chromium/android_webview/AwWebContentsDelegate.java",
     "java/src/org/chromium/android_webview/AwWebResourceResponse.java",
     "java/src/org/chromium/android_webview/InputStreamUtil.java",
@@ -102,10 +106,7 @@
 jinja_template("system_webview_manifest") {
   input = "apk/java/AndroidManifest.xml"
   output = system_webview_android_manifest
-  variables = [
-    "package=$system_webview_package_name",
-    "sandboxed_service_extra_flags=android:visibleToInstantApps=\"true\"",
-  ]
+  variables = [ "package=$system_webview_package_name" ]
 }
 
 webview_repack_locales("repack_locales") {
@@ -136,9 +137,9 @@
 
 repack("repack_pack") {
   sources = [
-    "$root_gen_dir/blink/public/resources/blink_resources.pak",
     "$root_gen_dir/content/content_resources.pak",
     "$root_gen_dir/net/net_resources.pak",
+    "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
     "$target_gen_dir/aw_resources.pak",
     "$target_gen_dir/components_resources.pak",
     "$target_gen_dir/webui_resources.pak",
@@ -149,7 +150,7 @@
     ":generate_webui_resources",
     "//content:resources",
     "//net:net_resources",
-    "//third_party/WebKit/public:resources",
+    "//third_party/blink/public:resources",
   ]
   output = "$target_gen_dir/resources.pak"
 
@@ -161,13 +162,13 @@
 
 repack("repack_100_percent") {
   sources = [
-    "$root_gen_dir/blink/public/resources/blink_scaled_resources_100_percent.pak",
     "$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
+    "$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_100_percent.pak",
     "$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
   ]
   deps = [
     "//content/app/resources",
-    "//third_party/WebKit/public:scaled_resources_100_percent",
+    "//third_party/blink/public:scaled_resources_100_percent",
     "//ui/resources",
   ]
   output = "$target_gen_dir/chrome_100_percent.pak"
@@ -195,8 +196,12 @@
 android_assets("monochrome_webview_assets") {
   deps = [
     "//third_party/icu:icu_assets",
-    "//v8:v8_external_startup_data_assets",
   ]
+  if (use_v8_context_snapshot) {
+    deps += [ "//tools/v8_context_snapshot:v8_context_snapshot_assets" ]
+  } else {
+    deps += [ "//v8:v8_external_startup_data_assets" ]
+  }
   if (android_64bit_target_cpu && build_apk_secondary_abi) {
     deps += [ ":v8_snapshot_secondary_abi_assets" ]
   }
@@ -387,9 +392,6 @@
   ]
   configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
   configs += [ "//build/config/android:hide_all_but_jni" ]
-  if (use_order_profiling) {
-    deps += [ "//tools/cygprofile" ]
-  }
 }
 
 if (android_64bit_target_cpu) {
@@ -399,10 +401,16 @@
     assert(android_64bit_target_cpu,
            "32-bit targets shouldn't have secondary abi")
     arch_suffix = "32"
-    renaming_sources = [ "$_secondary_abi_out_dir/snapshot_blob.bin" ]
-    renaming_destinations = [ "snapshot_blob_$arch_suffix.bin" ]
+    if (use_v8_context_snapshot) {
+      renaming_sources = [ "$_secondary_abi_out_dir/v8_context_snapshot.bin" ]
+      renaming_destinations = [ "v8_context_snapshot_$arch_suffix.bin" ]
+    } else {
+      renaming_sources = [ "$_secondary_abi_out_dir/snapshot_blob.bin" ]
+      renaming_destinations = [ "snapshot_blob_$arch_suffix.bin" ]
+    }
     disable_compression = true
     deps = [
+      "//tools/v8_context_snapshot($android_secondary_abi_toolchain)",
       "//v8($android_secondary_abi_toolchain)",
     ]
   }
@@ -416,6 +424,15 @@
     if (use_lld) {
       configs += [ "//build/config/android:lld_pack_relocations" ]
     }
+
+    if (target_cpu != "mipsel" && target_cpu != "mips64el") {
+      # .gnu.hash support added in Android M. Without this flag, library will also
+      # contain an unused .hash section. (http://crbug.com/742525#c28)
+      # Not to be used for MIPS arhitecture since MIPS does not
+      # support hashstyle gnu: http://crbug.com/811306
+      ldflags = [ "-Wl,--hash-style=gnu" ]
+    }
+
     public_configs = extra_chrome_shared_library_configs
     deps += extra_chrome_shared_library_deps
   }
@@ -501,6 +518,8 @@
     "browser/aw_quota_manager_bridge.h",
     "browser/aw_quota_permission_context.cc",
     "browser/aw_quota_permission_context.h",
+    "browser/aw_render_process.cc",
+    "browser/aw_render_process.h",
     "browser/aw_render_process_gone_delegate.h",
     "browser/aw_render_thread_context_provider.cc",
     "browser/aw_render_thread_context_provider.h",
@@ -509,8 +528,6 @@
     "browser/aw_resource_context.h",
     "browser/aw_safe_browsing_blocking_page.cc",
     "browser/aw_safe_browsing_blocking_page.h",
-    "browser/aw_safe_browsing_config_helper.cc",
-    "browser/aw_safe_browsing_config_helper.h",
     "browser/aw_safe_browsing_resource_throttle.cc",
     "browser/aw_safe_browsing_resource_throttle.h",
     "browser/aw_safe_browsing_ui_manager.cc",
@@ -523,6 +540,8 @@
     "browser/aw_ssl_host_state_delegate.h",
     "browser/aw_url_checker_delegate_impl.cc",
     "browser/aw_url_checker_delegate_impl.h",
+    "browser/aw_variations_seed_bridge.cc",
+    "browser/aw_variations_seed_bridge.h",
     "browser/aw_variations_service_client.cc",
     "browser/aw_variations_service_client.h",
     "browser/aw_web_contents_delegate.cc",
@@ -559,6 +578,8 @@
     "browser/java_browser_view_renderer_helper.h",
     "browser/net/android_stream_reader_url_request_job.cc",
     "browser/net/android_stream_reader_url_request_job.h",
+    "browser/net/aw_cookie_change_dispatcher_wrapper.cc",
+    "browser/net/aw_cookie_change_dispatcher_wrapper.h",
     "browser/net/aw_cookie_store_wrapper.cc",
     "browser/net/aw_cookie_store_wrapper.h",
     "browser/net/aw_http_user_agent_settings.cc",
@@ -627,6 +648,8 @@
     "browser/tracing/aw_tracing_delegate.h",
     "common/android_webview_message_generator.cc",
     "common/android_webview_message_generator.h",
+    "common/aw_channel.cc",
+    "common/aw_channel.h",
     "common/aw_content_client.cc",
     "common/aw_content_client.h",
     "common/aw_descriptors.h",
@@ -640,8 +663,8 @@
     "common/aw_resource.h",
     "common/aw_switches.cc",
     "common/aw_switches.h",
-    "common/crash_reporter/aw_microdump_crash_reporter.cc",
-    "common/crash_reporter/aw_microdump_crash_reporter.h",
+    "common/crash_reporter/aw_crash_reporter_client.cc",
+    "common/crash_reporter/aw_crash_reporter_client.h",
     "common/crash_reporter/crash_keys.cc",
     "common/crash_reporter/crash_keys.h",
     "common/devtools_instrumentation.h",
@@ -673,8 +696,12 @@
     "renderer/aw_render_view_ext.h",
     "renderer/aw_url_loader_throttle_provider.cc",
     "renderer/aw_url_loader_throttle_provider.h",
+    "renderer/aw_websocket_handshake_throttle_provider.cc",
+    "renderer/aw_websocket_handshake_throttle_provider.h",
     "renderer/print_render_frame_observer.cc",
     "renderer/print_render_frame_observer.h",
+    "utility/aw_content_utility_client.cc",
+    "utility/aw_content_utility_client.h",
   ]
 
   deps = [
@@ -682,7 +709,6 @@
     ":generate_aw_strings",
     ":generate_components_strings",
     ":native_jni",
-    "//android_webview:generate_components_strings",
     "//base",
     "//base/third_party/dynamic_annotations:dynamic_annotations",
     "//components/autofill/android:provider",
@@ -693,12 +719,15 @@
     "//components/crash/content/app",
     "//components/crash/content/browser",
     "//components/download/public/common:public",
+    "//components/embedder_support/android:web_contents_delegate",
     "//components/google/core/browser",
+    "//components/heap_profiling",
     "//components/keyed_service/content",
     "//components/metrics",
     "//components/metrics:gpu",
     "//components/metrics:net",
     "//components/metrics:ui",
+    "//components/minidump_uploader",
     "//components/navigation_interception",
     "//components/network_session_configurator/common",
     "//components/policy:generated",
@@ -716,16 +745,19 @@
     "//components/safe_browsing/renderer:throttles",
     "//components/safe_browsing/triggers",
     "//components/safe_browsing/web_ui",
-    "//components/spellcheck:build_features",
+    "//components/services/heap_profiling",
+    "//components/services/heap_profiling/public/cpp",
+    "//components/services/heap_profiling/public/mojom",
+    "//components/spellcheck:buildflags",
     "//components/supervised_user_error_page",
     "//components/supervised_user_error_page:gin",
     "//components/url_matcher",
     "//components/variations/service",
-    "//components/version_info",
+    "//components/version_info:channel",
+    "//components/version_info/android:channel_getter",
     "//components/visitedlink/browser",
     "//components/visitedlink/renderer",
     "//components/viz/service",
-    "//components/web_contents_delegate_android:web_contents_delegate_android",
     "//components/web_restrictions:browser",
     "//content",
     "//content/public/app:both",
@@ -748,7 +780,7 @@
     "//skia",
     "//storage/browser",
     "//storage/common",
-    "//third_party/WebKit/public:blink",
+    "//third_party/blink/public:blink",
     "//ui/base",
     "//ui/events:gesture_detection",
     "//ui/gfx",
@@ -765,7 +797,10 @@
     ]
   }
 
-  configs += [ "//v8:external_startup_data" ]
+  configs += [
+    "//tools/v8_context_snapshot:use_v8_context_snapshot",
+    "//v8:external_startup_data",
+  ]
 
   libs = [ "jnigraphics" ]
 }
@@ -778,9 +813,9 @@
     "java/src/org/chromium/android_webview/AwAutofillClient.java",
     "java/src/org/chromium/android_webview/AwAutofillManager.java",
     "java/src/org/chromium/android_webview/AwAutofillProvider.java",
+    "java/src/org/chromium/android_webview/AwAutofillUMA.java",
     "java/src/org/chromium/android_webview/AwBrowserContext.java",
     "java/src/org/chromium/android_webview/AwBrowserProcess.java",
-    "java/src/org/chromium/android_webview/AwContentVideoViewEmbedder.java",
     "java/src/org/chromium/android_webview/AwContents.java",
     "java/src/org/chromium/android_webview/AwConsoleMessage.java",
     "java/src/org/chromium/android_webview/AwContentsBackgroundThreadClient.java",
@@ -809,6 +844,7 @@
     "java/src/org/chromium/android_webview/AwQuotaManagerBridge.java",
     "java/src/org/chromium/android_webview/AwRenderProcessGoneDetail.java",
     "java/src/org/chromium/android_webview/AwResource.java",
+    "java/src/org/chromium/android_webview/AwRenderProcess.java",
     "java/src/org/chromium/android_webview/AwSafeBrowsingConversionHelper.java",
     "java/src/org/chromium/android_webview/AwScrollOffsetManager.java",
     "java/src/org/chromium/android_webview/AwServiceWorkerClient.java",
@@ -820,6 +856,7 @@
     "java/src/org/chromium/android_webview/AwTracingController.java",
     "java/src/org/chromium/android_webview/AwViewMethods.java",
     "java/src/org/chromium/android_webview/AwViewAndroidDelegate.java",
+    "java/src/org/chromium/android_webview/AwVariationsSeedBridge.java",
     "java/src/org/chromium/android_webview/AwWebContentsDelegate.java",
     "java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java",
     "java/src/org/chromium/android_webview/AwWebContentsObserver.java",
@@ -841,21 +878,21 @@
     "java/src/org/chromium/android_webview/OverScrollGlow.java",
     "java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java",
     "java/src/org/chromium/android_webview/ResourcesContextWrapperFactory.java",
+    "java/src/org/chromium/android_webview/ScopedSysTraceEvent.java",
     "java/src/org/chromium/android_webview/ScrollAccessibilityHelper.java",
     "java/src/org/chromium/android_webview/SslUtil.java",
+    "java/src/org/chromium/android_webview/VariationsSeedLoader.java",
+    "java/src/org/chromium/android_webview/ViewPositionObserver.java",
     "java/src/org/chromium/android_webview/WebViewChromiumRunQueue.java",
     "java/src/org/chromium/android_webview/permission/AwGeolocationCallback.java",
     "java/src/org/chromium/android_webview/permission/AwPermissionRequest.java",
     "java/src/org/chromium/android_webview/policy/AwPolicyProvider.java",
-    "java/src/org/chromium/android_webview/variations/AwVariationsConfigurationService.java",
-    "java/src/org/chromium/android_webview/variations/AwVariationsSeedFetchService.java",
-    "java/src/org/chromium/android_webview/variations/AwVariationsSeedHandler.java",
-    "java/src/org/chromium/android_webview/variations/AwVariationsUtils.java",
   ]
   deps = [
     ":android_webview_commandline_java",
-    ":android_webview_crash_services_java",
     ":android_webview_platform_services_java",
+    ":android_webview_services_java",
+    ":android_webview_variations_utils_java",
     ":resources",
     ":strings_grd",
     ":system_webview_manifest",
@@ -864,19 +901,20 @@
     "//components/autofill/android:provider_java",
     "//components/background_task_scheduler:background_task_scheduler_java",
     "//components/crash/android:java",
+    "//components/embedder_support/android:web_contents_delegate_java",
     "//components/minidump_uploader:minidump_uploader_java",
     "//components/navigation_interception/android:navigation_interception_java",
     "//components/policy/android:policy_java",
     "//components/safe_browsing/android:safe_browsing_java",
+    "//components/variations:load_seed_result_enum_java",
     "//components/variations/android:variations_java",
-    "//components/web_contents_delegate_android:web_contents_delegate_android_java",
+    "//components/version_info/android:version_constants_java",
     "//components/web_restrictions:client_java",
     "//content/public/android:content_java",
     "//device/gamepad:java",
-    "//device/geolocation:geolocation_java",
     "//net/android:net_java",
-    "//third_party/WebKit/public:blink_headers_java",
     "//third_party/android_tools:android_support_annotations_java",
+    "//third_party/blink/public:blink_headers_java",
     "//ui/android:ui_java",
   ]
 
@@ -895,6 +933,14 @@
   android_manifest_for_lint = system_webview_android_manifest
 }
 
+android_library("android_webview_variations_utils_java") {
+  java_files = [ "java/src/org/chromium/android_webview/VariationsUtils.java" ]
+  deps = [
+    "//android_webview/proto:aw_variations_seed_proto_java",
+    "//components/variations/android:variations_java",
+  ]
+}
+
 java_strings_grd("strings_grd") {
   grd_file = "java/strings/android_webview_strings.grd"
   outputs = [
@@ -946,15 +992,23 @@
 }
 
 # Separate target to allow for a dependency on GmsCore without pulling in all of
-# android_webview_java.
+# android_webview_java. It compiles the abstract class; implementations are
+# compiled separately.
 android_library("android_webview_platform_services_java") {
-  java_files =
-      [ "java/src/org/chromium/android_webview/PlatformServiceBridge.java" ]
+  java_files = [
+    "java/src/org/chromium/android_webview/PlatformServiceBridge.java",
+    "java/src/org/chromium/android_webview/PlatformServiceBridgeImpl.java",
+  ]
 
   deps = [
     "//base:base_java",
     "//third_party/android_tools:android_support_annotations_java",
   ]
+
+  # The appropriate .class file will be loaded via a dependency to a library
+  # like :platform_service_bridge_upstream_implementation_java below. We only include the
+  # .java file because other files in the target depend on it.
+  jar_excluded_patterns = [ "*/PlatformServiceBridgeImpl.class" ]
 }
 
 # This target compiles the implementation of PlatformServiceBridge for AOSP targets.
@@ -976,39 +1030,59 @@
   ]
 }
 
-# Keep crash services separate from other WebView code to keep their deps clean
+# Keep WebView's services separate from other WebView code to keep their deps clean
 # (and make them easy to move).
-android_library("android_webview_crash_services_java") {
+android_library("android_webview_services_java") {
   java_files = [
-    "java/src/org/chromium/android_webview/crash/AwMinidumpUploadJobService.java",
-    "java/src/org/chromium/android_webview/crash/AwMinidumpUploaderDelegate.java",
-    "java/src/org/chromium/android_webview/crash/CrashReceiverService.java",
+    "java/src/org/chromium/android_webview/services/AwMinidumpUploadJobService.java",
+    "java/src/org/chromium/android_webview/services/AwMinidumpUploaderDelegate.java",
+    "java/src/org/chromium/android_webview/services/CrashReceiverService.java",
+    "java/src/org/chromium/android_webview/services/ServiceInit.java",
+    "java/src/org/chromium/android_webview/services/AwVariationsSeedFetcher.java",
+    "java/src/org/chromium/android_webview/services/VariationsSeedHolder.java",
+    "java/src/org/chromium/android_webview/services/VariationsSeedServer.java",
   ]
   deps = [
     ":android_webview_commandline_java",
     ":android_webview_platform_services_java",
+    ":android_webview_variations_utils_java",
+    ":system_webview_manifest",
     "//base:base_java",
     "//components/background_task_scheduler:background_task_scheduler_java",
     "//components/minidump_uploader:minidump_uploader_java",
+    "//components/version_info/android:version_constants_java",
   ]
-
-  srcjar_deps = [ ":crash_receiver_aidl" ]
+  srcjar_deps = [
+    ":crash_receiver_aidl",
+    ":aw_variations_seed_server_aidl",
+  ]
+  android_manifest_for_lint = system_webview_android_manifest
 }
 
 android_aidl("crash_receiver_aidl") {
   import_include = [ "java/src" ]
   sources = [
-    "java/src/org/chromium/android_webview/crash/ICrashReceiverService.aidl",
+    "java/src/org/chromium/android_webview/services/ICrashReceiverService.aidl",
+  ]
+}
+
+android_aidl("aw_variations_seed_server_aidl") {
+  import_include = [ "java/src" ]
+  sources = [
+    "java/src/org/chromium/android_webview/services/IVariationsSeedServer.aidl",
   ]
 }
 
 if (public_android_sdk) {
   system_webview_apk_tmpl("system_webview_apk") {
+    version_name = chrome_version_name
     android_manifest = system_webview_android_manifest
     android_manifest_dep = ":system_webview_manifest"
     deps = [
+      ":platform_service_bridge_upstream_implementation_java",
       ":system_webview_resources",
       "//android_webview/glue",
+      "//android_webview/support_library:support_lib_glue_java",
     ]
     apk_name = "SystemWebView"
   }
diff --git a/android_webview/DEPS b/android_webview/DEPS
index 1fe149f..0b24be7 100644
--- a/android_webview/DEPS
+++ b/android_webview/DEPS
@@ -7,14 +7,16 @@
   # lib is the top-level target, and must remain a leaf in the dependency tree.
   "-android_webview/lib",
 
-  "+components/google/core/browser",
+  "+components/heap_profiling",
+  "+components/google/core",
   "+components/network_session_configurator/common",
   "+components/metrics",
   "+components/prefs",
+  "+components/services/heap_profiling/public",
   "+components/version_info",
   # Only allow this header in spellchecking since allowing all of spellchecking
   # would include both browser and renderer components.
-  "+components/spellcheck/spellcheck_build_features.h",
+  "+components/spellcheck/spellcheck_buildflags.h",
   "+components/supervised_user_error_page",
   "+components/web_restrictions",
   "+content/public/common",
@@ -22,9 +24,10 @@
   "+gpu",
   "+jni",
   # Only this one header in media which doesn't depend on anything else.
-  "+media/media_features.h",
+  "+media/media_buildflags.h",
   "+net",
   "+services/network/public/cpp",
+  "+services/service_manager/public",
   "+services/viz/public/interfaces",
   "+skia",
   "+third_party/skia/include",
diff --git a/android_webview/OWNERS b/android_webview/OWNERS
index 925cbe6..84a80b2 100644
--- a/android_webview/OWNERS
+++ b/android_webview/OWNERS
@@ -1,4 +1,5 @@
 boliu@chromium.org
+changwan@chromium.org
 michaelbai@chromium.org
 tobiasjs@chromium.org
 torne@chromium.org
diff --git a/android_webview/apk/java/AndroidManifest.xml b/android_webview/apk/java/AndroidManifest.xml
index 37bd82d..d948a86 100644
--- a/android_webview/apk/java/AndroidManifest.xml
+++ b/android_webview/apk/java/AndroidManifest.xml
@@ -9,18 +9,18 @@
     xmlns:tools="http://schemas.android.com/tools"
     package="{{package|default('com.android.webview')}}">
     <uses-sdk android:minSdkVersion="{{minsdk|default(21)}}"
-              android:targetSdkVersion="{{targetsdk|default(27)}}">
+              android:targetSdkVersion="{{targetsdk|default(28)}}">
     </uses-sdk>
 
     <uses-feature android:name="android.hardware.touchscreen"
-                  android:required="false"/>
+                  android:required="false" />
 
-    <uses-permission android:name="android.permission.INTERNET"/>
+    <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
 
     <application android:label="Android System WebView"
-                 android:icon="@drawable/icon_webview"
-                 android:name="com.android.webview.chromium.WebViewApplication"
+                 android:icon="@{{package|default('com.android.webview')}}:drawable/icon_webview"
+                 android:name="{{ application_name|default('com.android.webview.chromium.WebViewApplication') }}"
                  android:multiArch="true"
                  android:use32bitAbi="true">
         {# This part is shared between stand-alone WebView and Monochrome #}
@@ -40,20 +40,22 @@
                       android:exported="true"
                       android:authorities="{{ manifest_package }}.LicenseContentProvider" />
             {% if donor_package is not defined %}
-                <service android:name="org.chromium.android_webview.variations.AwVariationsConfigurationService"
+                <!-- If you change the variations services, also see
+                     android_webview/test/shell/AndroidManifest.xml. -->
+                <service android:name="org.chromium.android_webview.services.VariationsSeedServer"
                          android:exported="true"
-                         android:process=":variations_service"/>
-                <service android:name="org.chromium.android_webview.variations.AwVariationsSeedFetchService"
+                         android:process=":webview_service" />
+                <service android:name="org.chromium.android_webview.services.AwVariationsSeedFetcher"
+                         android:permission="android.permission.BIND_JOB_SERVICE"
+                         android:exported="false"
+                         android:process=":webview_service" />
+                <service android:name="org.chromium.android_webview.services.CrashReceiverService"
+                         android:exported="true"
+                         android:process=":webview_service" />
+                <service android:name="org.chromium.android_webview.services.AwMinidumpUploadJobService"
                          android:permission="android.permission.BIND_JOB_SERVICE"
                          android:exported="true"
-                         android:process=":variations_service"/>
-                <service android:name="org.chromium.android_webview.crash.CrashReceiverService"
-                         android:exported="true"
-                         android:process=":crash_receiver_service"/>
-                <service android:name="org.chromium.android_webview.crash.AwMinidumpUploadJobService"
-                         android:permission="android.permission.BIND_JOB_SERVICE"
-                         android:exported="true"
-                         android:process=":crash_receiver_service"/>
+                         android:process=":webview_service" />
             {% endif %}
         {% endmacro %}
         {{ common(package|default('com.android.webview'), library|default('libwebviewchromium.so')) }}
@@ -61,9 +63,9 @@
             <meta-data android:name="com.android.webview.WebViewDonorPackage"
                        android:value="{{ donor_package }}" />
         {% endif %}
-        {% set num_sandboxed_services = 20 %}
+        {% set num_sandboxed_services = 40 %}
         <meta-data android:name="org.chromium.content.browser.NUM_SANDBOXED_SERVICES"
-                   android:value="{{ num_sandboxed_services }}"/>
+                   android:value="{{ num_sandboxed_services }}" />
         {% for i in range(num_sandboxed_services) %}
             <service android:name="org.chromium.content.app.SandboxedProcessService{{ i }}"
                      android:process=":sandboxed_process{{ i }}"
@@ -71,9 +73,9 @@
                      android:exported="true"
                      android:externalService="true"
                      tools:ignore="ExportedService"
-                     {{sandboxed_service_extra_flags|default('')}} />
+                     android:visibleToInstantApps="true" />
         {% endfor %}
         <meta-data android:name="org.chromium.content.browser.NUM_PRIVILEGED_SERVICES"
-                   android:value="0"/>
+                   android:value="0" />
     </application>
 </manifest>
diff --git a/android_webview/browser/DEPS b/android_webview/browser/DEPS
index b107137..0b836c7 100644
--- a/android_webview/browser/DEPS
+++ b/android_webview/browser/DEPS
@@ -5,10 +5,7 @@
   "+android_webview/grit",
   "+android_webview/jni",
   "+android_webview/public/browser",
-
   "+cc",
-  "-cc/blink",
-
   "+components/autofill/android",
   "+components/autofill/content/browser",
   "+components/autofill/core/browser",
@@ -17,6 +14,7 @@
   "+components/crash/content/browser",
   "+components/crash/core",
   "+components/download/public/common",
+  "+components/heap_profiling",
   "+components/navigation_interception",
   "+components/policy/core/browser",
   "+components/policy/core/common",
@@ -41,8 +39,6 @@
   "+content/public/browser",
   "+content/public/test",
 
-  "+device/geolocation",
-
   # Explicitly disallow using SyncMessageFilter to prevent browser from
   # sending synchronous IPC messages on non-UI threads.
   "-ipc/ipc_sync_message_filter.h",
@@ -50,11 +46,11 @@
   "+media/base/android",
 
   "+components/policy/policy_constants.h",
-  "+components/web_contents_delegate_android",
+  "+components/embedder_support/android",
 
   "+printing",
 
-  "+services/network/public/cpp",
+  "+services/network/public",
   "+services/service_manager/public/cpp",
 
   "+storage/browser/quota",
@@ -70,9 +66,9 @@
 
 
   # QuotaStatusCode required by AwQuotaManagerBridge.
-  "+third_party/WebKit/common/quota",
+  "+third_party/blink/public/mojom/quota",
   # POD structure required by the find-in-page IPC messages.
-  "+third_party/WebKit/public/web/WebFindOptions.h",
+  "+third_party/blink/public/web/web_find_options.h",
   # Interface required for in-process input event handling.
-  "+third_party/WebKit/public/web/WebCompositorInputHandler.h"
+  "+third_party/blink/public/web/WebCompositorInputHandler.h"
 ]
diff --git a/android_webview/browser/OWNERS b/android_webview/browser/OWNERS
index b83a95b..14ba18b 100644
--- a/android_webview/browser/OWNERS
+++ b/android_webview/browser/OWNERS
@@ -4,4 +4,7 @@
 per-file aw_renderer_manifest_overlay.json=set noparent
 per-file aw_renderer_manifest_overlay.json=file://ipc/SECURITY_OWNERS
 
+per-file aw_utility_manifest_overlay.json=set noparent
+per-file aw_utility_manifest_overlay.json=file://ipc/SECURITY_OWNERS
+
 per-file aw_safe_browsing*=ntfschr@chromium.org
diff --git a/android_webview/browser/aw_autofill_client.cc b/android_webview/browser/aw_autofill_client.cc
index 8ddee2d..929bc18 100644
--- a/android_webview/browser/aw_autofill_client.cc
+++ b/android_webview/browser/aw_autofill_client.cc
@@ -15,7 +15,6 @@
 #include "components/autofill/core/browser/autofill_popup_delegate.h"
 #include "components/autofill/core/browser/suggestion.h"
 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
-#include "components/autofill/core/common/autofill_pref_names.h"
 #include "components/prefs/pref_registry_simple.h"
 #include "components/prefs/pref_service.h"
 #include "components/prefs/pref_service_factory.h"
@@ -33,8 +32,6 @@
 using base::android::ScopedJavaLocalRef;
 using content::WebContents;
 
-DEFINE_WEB_CONTENTS_USER_DATA_KEY(android_webview::AwAutofillClient);
-
 namespace android_webview {
 
 // Ownership: The native object is created (if autofill enabled) and owned by
@@ -74,7 +71,7 @@
   return nullptr;
 }
 
-IdentityProvider* AwAutofillClient::GetIdentityProvider() {
+identity::IdentityManager* AwAutofillClient::GetIdentityManager() {
   return nullptr;
 }
 
@@ -82,13 +79,20 @@
   return nullptr;
 }
 
+ukm::SourceId AwAutofillClient::GetUkmSourceId() {
+  // UKM recording is not supported for WebViews.
+  return ukm::kInvalidSourceId;
+}
+
 autofill::AddressNormalizer* AwAutofillClient::GetAddressNormalizer() {
   return nullptr;
 }
 
-autofill::SaveCardBubbleController*
-AwAutofillClient::GetSaveCardBubbleController() {
-  return nullptr;
+security_state::SecurityLevel
+AwAutofillClient::GetSecurityLevelForUmaHistograms() {
+  // The metrics are not recorded for Android webview, so return the count value
+  // which will not be recorded.
+  return security_state::SecurityLevel::SECURITY_LEVEL_COUNT;
 }
 
 autofill::PersonalDataManager* AwAutofillClient::GetPersonalDataManager() {
@@ -108,6 +112,7 @@
     const gfx::RectF& element_bounds,
     base::i18n::TextDirection text_direction,
     const std::vector<autofill::Suggestion>& suggestions,
+    bool /*unused_autoselect_first_suggestion*/,
     base::WeakPtr<autofill::AutofillPopupDelegate> delegate) {
   suggestions_ = suggestions;
   delegate_ = delegate;
@@ -223,6 +228,10 @@
   return true;
 }
 
+bool AwAutofillClient::AreServerCardsSupported() {
+  return true;
+}
+
 void AwAutofillClient::Dismissed(JNIEnv* env,
                                  const JavaParamRef<jobject>& obj) {
   anchor_view_.Reset();
@@ -238,7 +247,7 @@
   }
 }
 
-void AwAutofillClient::ShowAutofillSettings() {
+void AwAutofillClient::ShowAutofillSettings(bool show_credit_card_settings) {
   NOTIMPLEMENTED();
 }
 
@@ -253,6 +262,18 @@
   NOTIMPLEMENTED();
 }
 
+void AwAutofillClient::ShowLocalCardMigrationPrompt(base::OnceClosure closure) {
+  NOTIMPLEMENTED();
+}
+
+void AwAutofillClient::ConfirmSaveAutofillProfile(
+    const autofill::AutofillProfile& profile,
+    base::OnceClosure callback) {
+  // Since there is no confirmation needed to save an Autofill Profile,
+  // running |callback| will proceed with saving |profile|.
+  std::move(callback).Run();
+}
+
 void AwAutofillClient::ConfirmSaveCreditCardLocally(
     const autofill::CreditCard& card,
     const base::Closure& callback) {
@@ -262,8 +283,8 @@
 void AwAutofillClient::ConfirmSaveCreditCardToCloud(
     const autofill::CreditCard& card,
     std::unique_ptr<base::DictionaryValue> legal_message,
-    bool should_cvc_be_requested,
-    const base::Closure& callback) {
+    bool should_request_name_from_user,
+    base::OnceCallback<void(const base::string16&)> callback) {
   NOTIMPLEMENTED();
 }
 
diff --git a/android_webview/browser/aw_autofill_client.h b/android_webview/browser/aw_autofill_client.h
index 2173308..1416cdc 100644
--- a/android_webview/browser/aw_autofill_client.h
+++ b/android_webview/browser/aw_autofill_client.h
@@ -24,7 +24,6 @@
 class CreditCard;
 class FormStructure;
 class PersonalDataManager;
-class SaveCardBubbleController;
 }
 
 namespace content {
@@ -64,23 +63,27 @@
   scoped_refptr<autofill::AutofillWebDataService> GetDatabase() override;
   PrefService* GetPrefs() override;
   syncer::SyncService* GetSyncService() override;
-  IdentityProvider* GetIdentityProvider() override;
+  identity::IdentityManager* GetIdentityManager() override;
   ukm::UkmRecorder* GetUkmRecorder() override;
+  ukm::SourceId GetUkmSourceId() override;
   autofill::AddressNormalizer* GetAddressNormalizer() override;
-  autofill::SaveCardBubbleController* GetSaveCardBubbleController() override;
-  void ShowAutofillSettings() override;
+  security_state::SecurityLevel GetSecurityLevelForUmaHistograms() override;
+  void ShowAutofillSettings(bool show_credit_card_settings) override;
   void ShowUnmaskPrompt(
       const autofill::CreditCard& card,
       UnmaskCardReason reason,
       base::WeakPtr<autofill::CardUnmaskDelegate> delegate) override;
   void OnUnmaskVerificationResult(PaymentsRpcResult result) override;
+  void ShowLocalCardMigrationPrompt(base::OnceClosure closure) override;
+  void ConfirmSaveAutofillProfile(const autofill::AutofillProfile& profile,
+                                  base::OnceClosure callback) override;
   void ConfirmSaveCreditCardLocally(const autofill::CreditCard& card,
                                     const base::Closure& callback) override;
   void ConfirmSaveCreditCardToCloud(
       const autofill::CreditCard& card,
       std::unique_ptr<base::DictionaryValue> legal_message,
-      bool should_cvc_be_requested,
-      const base::Closure& callback) override;
+      bool should_request_name_from_user,
+      base::OnceCallback<void(const base::string16&)> callback) override;
   void ConfirmCreditCardFillAssist(const autofill::CreditCard& card,
                                    const base::Closure& callback) override;
   void LoadRiskData(
@@ -91,6 +94,7 @@
       const gfx::RectF& element_bounds,
       base::i18n::TextDirection text_direction,
       const std::vector<autofill::Suggestion>& suggestions,
+      bool /*unused_autoselect_first_suggestion*/,
       base::WeakPtr<autofill::AutofillPopupDelegate> delegate) override;
   void UpdateAutofillPopupDataListValues(
       const std::vector<base::string16>& values,
@@ -106,6 +110,7 @@
   bool IsContextSecure() override;
   bool ShouldShowSigninPromo() override;
   bool IsAutofillSupported() override;
+  bool AreServerCardsSupported() override;
   void ExecuteCommand(int id) override;
 
   void Dismissed(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index 9999713..fd7369c 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -22,8 +22,8 @@
 #include "base/bind.h"
 #include "base/path_service.h"
 #include "base/single_thread_task_runner.h"
-#include "base/task_scheduler/post_task.h"
-#include "components/autofill/core/common/autofill_pref_names.h"
+#include "base/task/post_task.h"
+#include "components/autofill/core/common/autofill_prefs.h"
 #include "components/metrics/metrics_service.h"
 #include "components/policy/core/browser/browser_policy_connector_base.h"
 #include "components/policy/core/browser/configuration_policy_pref_store.h"
@@ -42,7 +42,7 @@
 #include "content/public/browser/storage_partition.h"
 #include "content/public/browser/web_contents.h"
 #include "net/proxy_resolution/proxy_config_service_android.h"
-#include "net/proxy_resolution/proxy_service.h"
+#include "net/proxy_resolution/proxy_resolution_service.h"
 
 using base::FilePath;
 using content::BrowserThread;
@@ -75,17 +75,16 @@
 
 AwBrowserContext* g_browser_context = NULL;
 
-std::unique_ptr<net::ProxyConfigService> CreateProxyConfigService() {
-  std::unique_ptr<net::ProxyConfigService> config_service =
-      net::ProxyResolutionService::CreateSystemProxyConfigService(
-          BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
+std::unique_ptr<net::ProxyConfigServiceAndroid> CreateProxyConfigService() {
+  std::unique_ptr<net::ProxyConfigServiceAndroid> config_service_android =
+      std::make_unique<net::ProxyConfigServiceAndroid>(
+          BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
+          base::ThreadTaskRunnerHandle::Get());
 
   // TODO(csharrison) Architect the wrapper better so we don't need a cast for
   // android ProxyConfigServices.
-  net::ProxyConfigServiceAndroid* android_config_service =
-      static_cast<net::ProxyConfigServiceAndroid*>(config_service.get());
-  android_config_service->set_exclude_pac_url(true);
-  return config_service;
+  config_service_android->set_exclude_pac_url(true);
+  return config_service_android;
 }
 
 std::unique_ptr<AwSafeBrowsingWhitelistManager>
@@ -93,13 +92,21 @@
   // Should not be called until the end of PreMainMessageLoopRun,
   scoped_refptr<base::SequencedTaskRunner> background_task_runner =
       base::CreateSequencedTaskRunnerWithTraits(
-          {base::MayBlock(), base::TaskPriority::BACKGROUND});
+          {base::MayBlock(), base::TaskPriority::BEST_EFFORT});
   scoped_refptr<base::SingleThreadTaskRunner> io_task_runner =
       BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
   return std::make_unique<AwSafeBrowsingWhitelistManager>(
       background_task_runner, io_task_runner);
 }
 
+base::FilePath GetCacheDirForAw() {
+  FilePath cache_path;
+  base::PathService::Get(base::DIR_CACHE, &cache_path);
+  cache_path =
+      cache_path.Append(FILE_PATH_LITERAL("org.chromium.android_webview"));
+  return cache_path;
+}
+
 }  // namespace
 
 AwBrowserContext::AwBrowserContext(const FilePath path)
@@ -133,10 +140,7 @@
 }
 
 void AwBrowserContext::PreMainMessageLoopRun(net::NetLog* net_log) {
-  FilePath cache_path;
-  PathService::Get(base::DIR_CACHE, &cache_path);
-  cache_path =
-      cache_path.Append(FILE_PATH_LITERAL("org.chromium.android_webview"));
+  FilePath cache_path = GetCacheDirForAw();
 
   browser_policy_connector_.reset(new AwBrowserPolicyConnector());
 
@@ -148,7 +152,7 @@
 
   scoped_refptr<base::SequencedTaskRunner> db_task_runner =
       base::CreateSequencedTaskRunnerWithTraits(
-          {base::MayBlock(), base::TaskPriority::BACKGROUND,
+          {base::MayBlock(), base::TaskPriority::BEST_EFFORT,
            base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN});
   visitedlink_master_.reset(
       new visitedlink::VisitedLinkMaster(this, this, false));
@@ -168,8 +172,8 @@
       new web_restrictions::WebRestrictionsClient());
   pref_change_registrar_.Add(
       prefs::kWebRestrictionsAuthority,
-      base::Bind(&AwBrowserContext::OnWebRestrictionsAuthorityChanged,
-                 base::Unretained(this)));
+      base::BindRepeating(&AwBrowserContext::OnWebRestrictionsAuthorityChanged,
+                          base::Unretained(this)));
   web_restriction_provider_->SetAuthority(
       user_pref_service_->GetString(prefs::kWebRestrictionsAuthority));
 
@@ -179,7 +183,9 @@
       new safe_browsing::RemoteSafeBrowsingDatabaseManager();
   safe_browsing_trigger_manager_ =
       std::make_unique<safe_browsing::TriggerManager>(
-          safe_browsing_ui_manager_.get());
+          safe_browsing_ui_manager_.get(),
+          /*referrer_chain_provider=*/nullptr,
+          /*local_state_prefs=*/nullptr);
   safe_browsing_whitelist_manager_ = CreateSafeBrowsingWhitelistManager();
 
   content::WebUIControllerFactory::RegisterFactory(
@@ -237,7 +243,8 @@
           browser_policy_connector_->GetPolicyService(),
           browser_policy_connector_->GetHandlerList(),
           policy::POLICY_LEVEL_MANDATORY));
-  pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError));
+  pref_service_factory.set_read_error_callback(
+      base::BindRepeating(&HandleReadError));
   user_pref_service_ = pref_service_factory.Create(pref_registry);
   pref_change_registrar_.Init(user_pref_service_.get());
 
@@ -248,6 +255,10 @@
   return context_storage_path_;
 }
 
+base::FilePath AwBrowserContext::GetCachePath() const {
+  return GetCacheDirForAw();
+}
+
 bool AwBrowserContext::IsOffTheRecord() const {
   // Android WebView does not support off the record profile yet.
   return false;
@@ -292,7 +303,8 @@
   return ssl_host_state_delegate_.get();
 }
 
-content::PermissionManager* AwBrowserContext::GetPermissionManager() {
+content::PermissionControllerDelegate*
+AwBrowserContext::GetPermissionControllerDelegate() {
   if (!permission_manager_.get())
     permission_manager_.reset(new AwPermissionManager());
   return permission_manager_.get();
@@ -358,7 +370,6 @@
 }
 
 AwSafeBrowsingUIManager* AwBrowserContext::GetSafeBrowsingUIManager() const {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
   return safe_browsing_ui_manager_.get();
 }
 
@@ -369,7 +380,7 @@
     // V4ProtocolConfig is not used. Just create one with empty values..
     safe_browsing::V4ProtocolConfig config("", false, "", "");
     safe_browsing_db_manager_->StartOnIOThread(
-        url_request_context_getter_.get(), config);
+        safe_browsing_ui_manager_->GetURLLoaderFactoryOnIOThread(), config);
     safe_browsing_db_manager_started_ = true;
   }
   return safe_browsing_db_manager_.get();
diff --git a/android_webview/browser/aw_browser_context.h b/android_webview/browser/aw_browser_context.h
index b2a79c7..7fc8783 100644
--- a/android_webview/browser/aw_browser_context.h
+++ b/android_webview/browser/aw_browser_context.h
@@ -26,7 +26,7 @@
 class PrefService;
 
 namespace content {
-class PermissionManager;
+class PermissionControllerDelegate;
 class ResourceContext;
 class SSLHostStateDelegate;
 class WebContents;
@@ -92,6 +92,7 @@
 
   // content::BrowserContext implementation.
   base::FilePath GetPath() const override;
+  base::FilePath GetCachePath() const override;
   bool IsOffTheRecord() const override;
   content::ResourceContext* GetResourceContext() override;
   content::DownloadManagerDelegate* GetDownloadManagerDelegate() override;
@@ -99,7 +100,8 @@
   storage::SpecialStoragePolicy* GetSpecialStoragePolicy() override;
   content::PushMessagingService* GetPushMessagingService() override;
   content::SSLHostStateDelegate* GetSSLHostStateDelegate() override;
-  content::PermissionManager* GetPermissionManager() override;
+  content::PermissionControllerDelegate* GetPermissionControllerDelegate()
+      override;
   content::BackgroundFetchDelegate* GetBackgroundFetchDelegate() override;
   content::BackgroundSyncController* GetBackgroundSyncController() override;
   content::BrowsingDataRemoverDelegate* GetBrowsingDataRemoverDelegate()
@@ -142,7 +144,7 @@
   std::unique_ptr<PrefService> user_pref_service_;
   std::unique_ptr<policy::BrowserPolicyConnectorBase> browser_policy_connector_;
   std::unique_ptr<AwSSLHostStateDelegate> ssl_host_state_delegate_;
-  std::unique_ptr<content::PermissionManager> permission_manager_;
+  std::unique_ptr<content::PermissionControllerDelegate> permission_manager_;
   std::unique_ptr<web_restrictions::WebRestrictionsClient>
       web_restriction_provider_;
   PrefChangeRegistrar pref_change_registrar_;
diff --git a/android_webview/browser/aw_browser_main_parts.cc b/android_webview/browser/aw_browser_main_parts.cc
index 4ca3e47..4a37cc9f 100644
--- a/android_webview/browser/aw_browser_main_parts.cc
+++ b/android_webview/browser/aw_browser_main_parts.cc
@@ -15,7 +15,7 @@
 #include "android_webview/common/aw_paths.h"
 #include "android_webview/common/aw_resource.h"
 #include "android_webview/common/aw_switches.h"
-#include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h"
+#include "android_webview/common/crash_reporter/aw_crash_reporter_client.h"
 #include "base/android/apk_assets.h"
 #include "base/android/build_info.h"
 #include "base/android/locale_utils.h"
@@ -24,17 +24,23 @@
 #include "base/files/file_path.h"
 #include "base/i18n/rtl.h"
 #include "base/message_loop/message_loop.h"
+#include "base/message_loop/message_loop_current.h"
 #include "base/path_service.h"
+#include "components/crash/content/browser/child_exit_observer_android.h"
 #include "components/crash/content/browser/crash_dump_manager_android.h"
-#include "components/crash/content/browser/crash_dump_observer_android.h"
+#include "components/heap_profiling/supervisor.h"
+#include "components/services/heap_profiling/public/cpp/settings.h"
 #include "content/public/browser/android/synchronous_compositor.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/result_codes.h"
+#include "content/public/common/service_manager_connection.h"
+#include "content/public/common/service_names.mojom.h"
 #include "net/android/network_change_notifier_factory_android.h"
 #include "net/base/network_change_notifier.h"
+#include "services/service_manager/public/cpp/connector.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/layout.h"
 #include "ui/base/resource/resource_bundle.h"
@@ -51,6 +57,11 @@
 AwBrowserMainParts::~AwBrowserMainParts() {
 }
 
+bool AwBrowserMainParts::ShouldContentCreateFeatureList() {
+  // FeatureList will be created in AwFieldTrialCreator.
+  return false;
+}
+
 int AwBrowserMainParts::PreEarlyInitialization() {
   // Network change notifier factory must be singleton, only set factory
   // instance while it is not been created.
@@ -63,12 +74,11 @@
         new AwNetworkChangeNotifierFactory());
   }
 
-  // Android WebView does not use default MessageLoop. It has its own
-  // Android specific MessageLoop. Also see MainMessageLoopRun.
+  // Creates a MessageLoop for Android WebView if doesn't yet exist.
   DCHECK(!main_message_loop_.get());
-  main_message_loop_.reset(new base::MessageLoopForUI);
-  base::MessageLoopForUI::current()->Start();
-  return content::RESULT_CODE_NORMAL_EXIT;
+  if (!base::MessageLoopCurrent::IsSet())
+    main_message_loop_.reset(new base::MessageLoopForUI);
+  return service_manager::RESULT_CODE_NORMAL_EXIT;
 }
 
 int AwBrowserMainParts::PreCreateThreads() {
@@ -85,28 +95,28 @@
   // Try to directly mmap the resources.pak from the apk. Fall back to load
   // from file, using PATH_SERVICE, otherwise.
   base::FilePath pak_file_path;
-  PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_file_path);
+  base::PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_file_path);
   pak_file_path = pak_file_path.AppendASCII("resources.pak");
   ui::LoadMainAndroidPackFile("assets/resources.pak", pak_file_path);
 
-  base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(
+  base::android::MemoryPressureListenerAndroid::Initialize(
       base::android::AttachCurrentThread());
-  breakpad::CrashDumpObserver::Create();
+  ::crash_reporter::ChildExitObserver::Create();
 
   // We need to create the safe browsing specific directory even if the
   // AwSafeBrowsingConfigHelper::GetSafeBrowsingEnabled() is false
   // initially, because safe browsing can be enabled later at runtime
   // on a per-webview basis.
   base::FilePath safe_browsing_dir;
-  if (PathService::Get(android_webview::DIR_SAFE_BROWSING,
-                       &safe_browsing_dir)) {
+  if (base::PathService::Get(android_webview::DIR_SAFE_BROWSING,
+                             &safe_browsing_dir)) {
     if (!base::PathExists(safe_browsing_dir))
       base::CreateDirectory(safe_browsing_dir);
   }
 
   base::FilePath crash_dir;
   if (crash_reporter::IsCrashReporterEnabled()) {
-    if (PathService::Get(android_webview::DIR_CRASH_DUMPS, &crash_dir)) {
+    if (base::PathService::Get(android_webview::DIR_CRASH_DUMPS, &crash_dir)) {
       if (!base::PathExists(crash_dir))
         base::CreateDirectory(crash_dir);
     }
@@ -115,16 +125,13 @@
   if (base::CommandLine::ForCurrentProcess()->HasSwitch(
           switches::kWebViewSandboxedRenderer)) {
     // Create the renderers crash manager on the UI thread.
-    breakpad::CrashDumpObserver::GetInstance()->RegisterClient(
+    ::crash_reporter::ChildExitObserver::GetInstance()->RegisterClient(
         std::make_unique<AwBrowserTerminator>(crash_dir));
   }
 
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnableWebViewVariations)) {
-    aw_field_trial_creator_.SetUpFieldTrials();
-  }
+  aw_field_trial_creator_.SetUpFieldTrials();
 
-  return content::RESULT_CODE_NORMAL_EXIT;
+  return service_manager::RESULT_CODE_NORMAL_EXIT;
 }
 
 void AwBrowserMainParts::PreMainMessageLoopRun() {
@@ -132,9 +139,6 @@
       browser_client_->GetNetLog());
 
   content::RenderFrameHost::AllowInjectingJavaScriptForAndroidWebView();
-
-  // TODO(meacer): Remove when PlzNavigate ships.
-  content::RenderFrameHost::AllowDataUrlNavigationForAndroidWebView();
 }
 
 bool AwBrowserMainParts::MainMessageLoopRun(int* result_code) {
@@ -143,4 +147,13 @@
   return true;
 }
 
+void AwBrowserMainParts::ServiceManagerConnectionStarted(
+    content::ServiceManagerConnection* connection) {
+  heap_profiling::Mode mode = heap_profiling::GetModeForStartup();
+  if (mode != heap_profiling::Mode::kNone) {
+    heap_profiling::Supervisor::GetInstance()->Start(connection,
+                                                     base::OnceClosure());
+  }
+}
+
 }  // namespace android_webview
diff --git a/android_webview/browser/aw_browser_main_parts.h b/android_webview/browser/aw_browser_main_parts.h
index b3b28a4..22ddfcd 100644
--- a/android_webview/browser/aw_browser_main_parts.h
+++ b/android_webview/browser/aw_browser_main_parts.h
@@ -26,10 +26,13 @@
   ~AwBrowserMainParts() override;
 
   // Overriding methods from content::BrowserMainParts.
+  bool ShouldContentCreateFeatureList() override;
   int PreEarlyInitialization() override;
   int PreCreateThreads() override;
   void PreMainMessageLoopRun() override;
   bool MainMessageLoopRun(int* result_code) override;
+  void ServiceManagerConnectionStarted(
+      content::ServiceManagerConnection* connection) override;
 
  private:
   // Android specific UI MessageLoop.
diff --git a/android_webview/browser/aw_browser_manifest_overlay.json b/android_webview/browser/aw_browser_manifest_overlay.json
index c161781f..ae928e1 100644
--- a/android_webview/browser/aw_browser_manifest_overlay.json
+++ b/android_webview/browser/aw_browser_manifest_overlay.json
@@ -4,17 +4,25 @@
     "service_manager:connector": {
       "provides": {
         "renderer": [
-          "safe_browsing::mojom::SafeBrowsing"
+          "safe_browsing.mojom.SafeBrowsing",
+          "spellcheck.mojom.SpellCheckHost"
+        ],
+        "profiling_client": [
+          "heap_profiling.mojom.ProfilingClient"
         ]
+      },
+      "requires": {
+        "content_browser": [ "profiling_client" ],
+        "heap_profiling": [ "profiling", "heap_profiler" ]
       }
     },
     "navigation:frame": {
       "provides": {
         "renderer": [
-          "autofill::mojom::AutofillDriver",
-          "autofill::mojom::PasswordManagerDriver",
-          "blink::mojom::TextSuggestionHost",
-          "web_restrictions::mojom::WebRestrictions"
+          "autofill.mojom.AutofillDriver",
+          "autofill.mojom.PasswordManagerDriver",
+          "blink.mojom.TextSuggestionHost",
+          "web_restrictions.mojom.WebRestrictions"
         ]
       }
     }
diff --git a/android_webview/browser/aw_browser_permission_request_delegate.h b/android_webview/browser/aw_browser_permission_request_delegate.h
index a0144a1..4452a6f1 100644
--- a/android_webview/browser/aw_browser_permission_request_delegate.h
+++ b/android_webview/browser/aw_browser_permission_request_delegate.h
@@ -20,20 +20,20 @@
 
   virtual void RequestProtectedMediaIdentifierPermission(
       const GURL& origin,
-      const base::Callback<void(bool)>& callback) = 0;
+      base::OnceCallback<void(bool)> callback) = 0;
 
   virtual void CancelProtectedMediaIdentifierPermissionRequests(
       const GURL& origin) = 0;
 
   virtual void RequestGeolocationPermission(
       const GURL& origin,
-      const base::Callback<void(bool)>& callback) = 0;
+      base::OnceCallback<void(bool)> callback) = 0;
 
   virtual void CancelGeolocationPermissionRequests(const GURL& origin) = 0;
 
   virtual void RequestMIDISysexPermission(
       const GURL& origin,
-      const base::Callback<void(bool)>& callback) = 0;
+      base::OnceCallback<void(bool)> callback) = 0;
 
   virtual void CancelMIDISysexPermissionRequests(const GURL& origin) = 0;
 
diff --git a/android_webview/browser/aw_browser_policy_connector.cc b/android_webview/browser/aw_browser_policy_connector.cc
index 523da4a..ebbdd61 100644
--- a/android_webview/browser/aw_browser_policy_connector.cc
+++ b/android_webview/browser/aw_browser_policy_connector.cc
@@ -34,8 +34,8 @@
     const policy::Schema& chrome_schema) {
   std::unique_ptr<policy::ConfigurationPolicyHandlerList> handlers(
       new policy::ConfigurationPolicyHandlerList(
-          base::Bind(&PopulatePolicyHandlerParameters),
-          base::Bind(&GetChromePolicyDetails)));
+          base::BindRepeating(&PopulatePolicyHandlerParameters),
+          base::BindRepeating(&GetChromePolicyDetails)));
 
   // URL Filtering
   handlers->AddHandler(std::make_unique<policy::SimplePolicyHandler>(
@@ -62,7 +62,7 @@
 }  // namespace
 
 AwBrowserPolicyConnector::AwBrowserPolicyConnector()
-    : BrowserPolicyConnectorBase(base::Bind(&BuildHandlerList)) {}
+    : BrowserPolicyConnectorBase(base::BindRepeating(&BuildHandlerList)) {}
 
 AwBrowserPolicyConnector::~AwBrowserPolicyConnector() = default;
 
diff --git a/android_webview/browser/aw_browser_terminator.cc b/android_webview/browser/aw_browser_terminator.cc
index 8a0d1c3..d8373e8 100644
--- a/android_webview/browser/aw_browser_terminator.cc
+++ b/android_webview/browser/aw_browser_terminator.cc
@@ -9,14 +9,15 @@
 
 #include "android_webview/browser/aw_render_process_gone_delegate.h"
 #include "android_webview/common/aw_descriptors.h"
-#include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h"
+#include "android_webview/common/crash_reporter/aw_crash_reporter_client.h"
 #include "base/bind.h"
 #include "base/logging.h"
 #include "base/stl_util.h"
 #include "base/sync_socket.h"
-#include "base/task_scheduler/post_task.h"
+#include "base/task/post_task.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/child_process_data.h"
+#include "content/public/browser/child_process_launcher_utils.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/notification_types.h"
 #include "content/public/browser/render_process_host.h"
@@ -106,7 +107,7 @@
 void AwBrowserTerminator::OnChildStart(
     int process_host_id,
     content::PosixFileDescriptorInfo* mappings) {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::PROCESS_LAUNCHER);
+  DCHECK(content::CurrentlyOnProcessLauncherTaskRunner());
 
   base::AutoLock auto_lock(process_host_id_to_pipe_lock_);
   DCHECK(!ContainsKey(process_host_id_to_pipe_, process_host_id));
@@ -128,21 +129,15 @@
 }
 
 void AwBrowserTerminator::OnChildExitAsync(
-    int process_host_id,
-    base::ProcessHandle pid,
-    content::ProcessType process_type,
-    base::TerminationStatus termination_status,
-    base::android::ApplicationState app_state,
+    const ::crash_reporter::ChildExitObserver::TerminationInfo& info,
     base::FilePath crash_dump_dir,
     std::unique_ptr<base::SyncSocket> pipe) {
   if (crash_reporter::IsCrashReporterEnabled()) {
     breakpad::CrashDumpManager::GetInstance()->ProcessMinidumpFileFromChild(
-        crash_dump_dir, process_host_id, process_type, termination_status,
-        app_state);
+        crash_dump_dir, info);
   }
 
-  if (!pipe.get() ||
-      termination_status == base::TERMINATION_STATUS_NORMAL_TERMINATION)
+  if (!pipe.get() || info.normal_termination)
     return;
 
   bool crashed = false;
@@ -152,22 +147,19 @@
   if (pipe->Peek() >= sizeof(int)) {
     int exit_code;
     pipe->Receive(&exit_code, sizeof(exit_code));
-    LOG(ERROR) << "Renderer process (" << pid << ") crash detected (code "
+    LOG(ERROR) << "Renderer process (" << info.pid << ") crash detected (code "
                << exit_code << ").";
     crashed = true;
   }
 
   BrowserThread::PostTask(
       BrowserThread::UI, FROM_HERE,
-      base::Bind(&OnRenderProcessGoneDetail, process_host_id, pid, crashed));
+      base::BindOnce(&OnRenderProcessGoneDetail, info.process_host_id, info.pid,
+                     crashed));
 }
 
 void AwBrowserTerminator::OnChildExit(
-    int process_host_id,
-    base::ProcessHandle pid,
-    content::ProcessType process_type,
-    base::TerminationStatus termination_status,
-    base::android::ApplicationState app_state) {
+    const ::crash_reporter::ChildExitObserver::TerminationInfo& info) {
   std::unique_ptr<base::SyncSocket> pipe;
 
   {
@@ -175,7 +167,7 @@
     // We might get a NOTIFICATION_RENDERER_PROCESS_TERMINATED and a
     // NOTIFICATION_RENDERER_PROCESS_CLOSED. In that case we only want
     // to process the first notification.
-    const auto& iter = process_host_id_to_pipe_.find(process_host_id);
+    const auto& iter = process_host_id_to_pipe_.find(info.process_host_id);
     if (iter != process_host_id_to_pipe_.end()) {
       pipe = std::move(iter->second);
       DCHECK(pipe->handle() != base::SyncSocket::kInvalidHandle);
@@ -183,16 +175,15 @@
     }
   }
   if (pipe.get()) {
-    OnRenderProcessGone(process_host_id);
+    OnRenderProcessGone(info.process_host_id);
   }
 
   base::PostTaskWithTraits(
       FROM_HERE,
       {base::MayBlock(), base::TaskPriority::USER_VISIBLE,
        base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN},
-      base::Bind(&AwBrowserTerminator::OnChildExitAsync, process_host_id, pid,
-                 process_type, termination_status, app_state, crash_dump_dir_,
-                 base::Passed(std::move(pipe))));
+      base::BindOnce(&AwBrowserTerminator::OnChildExitAsync, info,
+                     crash_dump_dir_, std::move(pipe)));
 }
 
 }  // namespace android_webview
diff --git a/android_webview/browser/aw_browser_terminator.h b/android_webview/browser/aw_browser_terminator.h
index 3c2a299..047fb7c 100644
--- a/android_webview/browser/aw_browser_terminator.h
+++ b/android_webview/browser/aw_browser_terminator.h
@@ -8,8 +8,8 @@
 #include <map>
 
 #include "base/synchronization/lock.h"
+#include "components/crash/content/browser/child_exit_observer_android.h"
 #include "components/crash/content/browser/crash_dump_manager_android.h"
-#include "components/crash/content/browser/crash_dump_observer_android.h"
 
 namespace base {
 class SyncSocket;
@@ -25,28 +25,22 @@
 // processes of the browser, it can't access the exit code. Instead, the browser
 // uses a dedicated pipe in order to receive the information about the renderer
 // crash status.
-class AwBrowserTerminator : public breakpad::CrashDumpObserver::Client {
+class AwBrowserTerminator : public crash_reporter::ChildExitObserver::Client {
  public:
   AwBrowserTerminator(base::FilePath crash_dump_dir);
   ~AwBrowserTerminator() override;
 
-  // breakpad::CrashDumpObserver::Client implementation.
+  // crash_reporter::ChildExitObserver::Client implementation.
   void OnChildStart(int process_host_id,
                     content::PosixFileDescriptorInfo* mappings) override;
-  void OnChildExit(int process_host_id,
-                   base::ProcessHandle pid,
-                   content::ProcessType process_type,
-                   base::TerminationStatus termination_status,
-                   base::android::ApplicationState app_state) override;
+  void OnChildExit(
+      const crash_reporter::ChildExitObserver::TerminationInfo& info) override;
 
  private:
-  static void OnChildExitAsync(int process_host_id,
-                               base::ProcessHandle pid,
-                               content::ProcessType process_type,
-                               base::TerminationStatus termination_status,
-                               base::android::ApplicationState app_state,
-                               base::FilePath crash_dump_dir,
-                               std::unique_ptr<base::SyncSocket> pipe);
+  static void OnChildExitAsync(
+      const crash_reporter::ChildExitObserver::TerminationInfo& info,
+      base::FilePath crash_dump_dir,
+      std::unique_ptr<base::SyncSocket> pipe);
 
   base::FilePath crash_dump_dir_;
 
diff --git a/android_webview/browser/aw_content_browser_client.cc b/android_webview/browser/aw_content_browser_client.cc
index c0a4127..ce2403f 100644
--- a/android_webview/browser/aw_content_browser_client.cc
+++ b/android_webview/browser/aw_content_browser_client.cc
@@ -13,6 +13,7 @@
 #include "android_webview/browser/aw_contents_io_thread_client.h"
 #include "android_webview/browser/aw_cookie_access_policy.h"
 #include "android_webview/browser/aw_devtools_manager_delegate.h"
+#include "android_webview/browser/aw_login_delegate.h"
 #include "android_webview/browser/aw_printing_message_filter.h"
 #include "android_webview/browser/aw_quota_permission_context.h"
 #include "android_webview/browser/aw_settings.h"
@@ -23,13 +24,14 @@
 #include "android_webview/browser/tracing/aw_tracing_delegate.h"
 #include "android_webview/common/aw_descriptors.h"
 #include "android_webview/common/aw_switches.h"
-#include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h"
+#include "android_webview/common/crash_reporter/aw_crash_reporter_client.h"
 #include "android_webview/common/render_view_messages.h"
 #include "android_webview/common/url_constants.h"
 #include "android_webview/grit/aw_resources.h"
 #include "base/android/locale_utils.h"
 #include "base/base_paths_android.h"
 #include "base/base_switches.h"
+#include "base/bind.h"
 #include "base/command_line.h"
 #include "base/feature_list.h"
 #include "base/files/scoped_file.h"
@@ -39,13 +41,14 @@
 #include "base/strings/utf_string_conversions.h"
 #include "components/autofill/content/browser/content_autofill_driver_factory.h"
 #include "components/cdm/browser/cdm_message_filter_android.h"
-#include "components/crash/content/browser/crash_dump_observer_android.h"
+#include "components/crash/content/browser/child_exit_observer_android.h"
 #include "components/navigation_interception/intercept_navigation_delegate.h"
 #include "components/policy/content/policy_blacklist_navigation_throttle.h"
 #include "components/safe_browsing/browser/browser_url_loader_throttle.h"
 #include "components/safe_browsing/browser/mojo_safe_browsing_impl.h"
 #include "components/safe_browsing/features.h"
-#include "components/spellcheck/spellcheck_build_features.h"
+#include "components/services/heap_profiling/public/mojom/constants.mojom.h"
+#include "components/spellcheck/spellcheck_buildflags.h"
 #include "content/public/browser/browser_message_filter.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/child_process_security_policy.h"
@@ -75,7 +78,7 @@
 #include "ui/resources/grit/ui_resources.h"
 
 #if BUILDFLAG(ENABLE_SPELLCHECK)
-#include "components/spellcheck/browser/spellcheck_message_filter_platform.h"
+#include "components/spellcheck/browser/spell_check_host_impl.h"
 #include "components/spellcheck/common/spellcheck_switches.h"
 #endif
 
@@ -154,10 +157,12 @@
   AwContentsClientBridge* client =
       AwContentsClientBridge::FromID(process_id_, render_frame_id);
   if (client) {
-    *ignore_navigation = client->ShouldOverrideUrlLoading(
-        url, has_user_gesture, is_redirect, is_main_frame);
-    // If the shouldOverrideUrlLoading call caused a java exception we should
-    // always return immediately here!
+    if (!client->ShouldOverrideUrlLoading(url, has_user_gesture, is_redirect,
+                                          is_main_frame, ignore_navigation)) {
+      // If the shouldOverrideUrlLoading call caused a java exception we should
+      // always return immediately here!
+      return;
+    }
   } else {
     LOG(WARNING) << "Failed to find the associated render view host for url: "
                  << url;
@@ -197,20 +202,20 @@
 }
 
 AwContentBrowserClient::AwContentBrowserClient() : net_log_(new net::NetLog()) {
-  frame_interfaces_.AddInterface(
-      base::Bind(&autofill::ContentAutofillDriverFactory::BindAutofillDriver));
   // Although WebView does not support password manager feature, renderer code
   // could still request this interface, so we register a dummy binder which
   // just drops the incoming request, to avoid the 'Failed to locate a binder
   // for interface' error log..
-  frame_interfaces_.AddInterface(base::Bind(&DummyBindPasswordManagerDriver));
+  frame_interfaces_.AddInterface(
+      base::BindRepeating(&DummyBindPasswordManagerDriver));
+  sniff_file_urls_ = AwSettings::GetAllowSniffingFileUrls();
 }
 
 AwContentBrowserClient::~AwContentBrowserClient() {}
 
 AwBrowserContext* AwContentBrowserClient::InitBrowserContext() {
   base::FilePath user_data_dir;
-  if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) {
+  if (!base::PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) {
     NOTREACHED() << "Failed to get app data directory for Android WebView";
   }
   browser_context_.reset(new AwBrowserContext(user_data_dir));
@@ -234,17 +239,17 @@
   // Grant content: scheme access to the whole renderer process, since we impose
   // per-view access checks, and access is granted by default (see
   // AwSettings.mAllowContentUrlAccess).
-  content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
+  content::ChildProcessSecurityPolicy::GetInstance()->GrantRequestScheme(
       host->GetID(), url::kContentScheme);
 
   host->AddFilter(new AwContentsMessageFilter(host->GetID()));
   // WebView always allows persisting data.
   host->AddFilter(new cdm::CdmMessageFilterAndroid(true, false));
   host->AddFilter(new AwPrintingMessageFilter(host->GetID()));
+}
 
-#if BUILDFLAG(ENABLE_SPELLCHECK)
-  host->AddFilter(new SpellCheckMessageFilterPlatform(host->GetID()));
-#endif
+bool AwContentBrowserClient::ShouldUseMobileFlingCurve() const {
+  return true;
 }
 
 bool AwContentBrowserClient::IsHandledURL(const GURL& url) {
@@ -278,17 +283,19 @@
 }
 
 bool AwContentBrowserClient::ForceSniffingFileUrlsForHtml() {
-  // Needed to support legacy consumers.
-  return true;
+  return sniff_file_urls_;
 }
 
 void AwContentBrowserClient::AppendExtraCommandLineSwitches(
     base::CommandLine* command_line,
     int child_process_id) {
   if (!command_line->HasSwitch(switches::kSingleProcess)) {
-    // The only kind of a child process WebView can have is renderer.
-    DCHECK_EQ(switches::kRendererProcess,
-              command_line->GetSwitchValueASCII(switches::kProcessType));
+    // The only kind of a child process WebView can have is renderer or utility.
+    std::string process_type =
+        command_line->GetSwitchValueASCII(switches::kProcessType);
+    DCHECK(process_type == switches::kRendererProcess ||
+           process_type == switches::kUtilityProcess)
+        << process_type;
     // Pass crash reporter enabled state to renderer processes.
     if (crash_reporter::IsCrashReporterEnabled()) {
       command_line->AppendSwitch(::switches::kEnableCrashReporter);
@@ -339,11 +346,9 @@
                                             const net::CanonicalCookie& cookie,
                                             content::ResourceContext* context,
                                             int render_process_id,
-                                            int render_frame_id,
-                                            const net::CookieOptions& options) {
+                                            int render_frame_id) {
   return AwCookieAccessPolicy::GetInstance()->AllowSetCookie(
-      url, first_party, cookie, context, render_process_id, render_frame_id,
-      options);
+      url, first_party, cookie, context, render_process_id, render_frame_id);
 }
 
 void AwContentBrowserClient::AllowWorkerFileSystem(
@@ -503,8 +508,8 @@
   fd = ui::GetLocalePackFd(&region);
   mappings->ShareWithRegion(kAndroidWebViewLocalePakDescriptor, fd, region);
 
-  breakpad::CrashDumpObserver::GetInstance()->BrowserChildProcessStarted(
-      child_process_id, mappings);
+  ::crash_reporter::ChildExitObserver::GetInstance()
+      ->BrowserChildProcessStarted(child_process_id, mappings);
 }
 
 void AwContentBrowserClient::OverrideWebkitPrefs(
@@ -528,7 +533,7 @@
     throttles.push_back(
         navigation_interception::InterceptNavigationDelegate::CreateThrottleFor(
             navigation_handle));
-    throttles.push_back(base::MakeUnique<PolicyBlacklistNavigationThrottle>(
+    throttles.push_back(std::make_unique<PolicyBlacklistNavigationThrottle>(
         navigation_handle, browser_context_.get()));
   }
   return throttles;
@@ -546,6 +551,8 @@
     id = IDR_AW_BROWSER_MANIFEST_OVERLAY;
   else if (name == content::mojom::kRendererServiceName)
     id = IDR_AW_RENDERER_MANIFEST_OVERLAY;
+  else if (name == content::mojom::kUtilityServiceName)
+    id = IDR_AW_UTILITY_MANIFEST_OVERLAY;
   if (id == -1)
     return nullptr;
 
@@ -563,6 +570,20 @@
                                      render_frame_host);
 }
 
+bool AwContentBrowserClient::BindAssociatedInterfaceRequestFromFrame(
+    content::RenderFrameHost* render_frame_host,
+    const std::string& interface_name,
+    mojo::ScopedInterfaceEndpointHandle* handle) {
+  if (interface_name == autofill::mojom::AutofillDriver::Name_) {
+    autofill::ContentAutofillDriverFactory::BindAutofillDriver(
+        autofill::mojom::AutofillDriverAssociatedRequest(std::move(*handle)),
+        render_frame_host);
+    return true;
+  }
+
+  return false;
+}
+
 void AwContentBrowserClient::ExposeInterfacesToRenderer(
     service_manager::BinderRegistry* registry,
     blink::AssociatedInterfaceRegistry* associated_registry,
@@ -572,14 +593,19 @@
     content::ResourceContext* resource_context =
         render_process_host->GetBrowserContext()->GetResourceContext();
     registry->AddInterface(
-        base::Bind(
+        base::BindRepeating(
             &safe_browsing::MojoSafeBrowsingImpl::MaybeCreate,
             render_process_host->GetID(), resource_context,
-            base::Bind(
+            base::BindRepeating(
                 &AwContentBrowserClient::GetSafeBrowsingUrlCheckerDelegate,
                 base::Unretained(this))),
         BrowserThread::GetTaskRunnerForThread(BrowserThread::IO));
   }
+#if BUILDFLAG(ENABLE_SPELLCHECK)
+  registry->AddInterface(
+      base::BindRepeating(&SpellCheckHostImpl::Create),
+      BrowserThread::GetTaskRunnerForThread(BrowserThread::UI));
+#endif
 }
 
 std::vector<std::unique_ptr<content::URLLoaderThrottle>>
@@ -633,17 +659,20 @@
     bool has_user_gesture,
     bool is_redirect,
     bool is_main_frame,
-    ui::PageTransition transition) {
+    ui::PageTransition transition,
+    bool* ignore_navigation) {
+  *ignore_navigation = false;
+
   // Only GETs can be overridden.
   if (request_method != "GET")
-    return false;
+    return true;
 
   bool application_initiated =
       browser_initiated || transition & ui::PAGE_TRANSITION_FORWARD_BACK;
 
   // Don't offer application-initiated navigations unless it's a redirect.
   if (application_initiated && !is_redirect)
-    return false;
+    return true;
 
   // For HTTP schemes, only top-level navigations can be overridden. Similarly,
   // WebView Classic lets app override only top level about:blank navigations.
@@ -655,26 +684,61 @@
   if (!is_main_frame &&
       (gurl.SchemeIs(url::kHttpScheme) || gurl.SchemeIs(url::kHttpsScheme) ||
        gurl.SchemeIs(url::kAboutScheme)))
-    return false;
+    return true;
 
   WebContents* web_contents =
       WebContents::FromFrameTreeNodeId(frame_tree_node_id);
   if (web_contents == nullptr)
-    return false;
+    return true;
   AwContentsClientBridge* client_bridge =
       AwContentsClientBridge::FromWebContents(web_contents);
   if (client_bridge == nullptr)
-    return false;
+    return true;
 
   base::string16 url = base::UTF8ToUTF16(gurl.possibly_invalid_spec());
-  return client_bridge->ShouldOverrideUrlLoading(url, has_user_gesture,
-                                                 is_redirect, is_main_frame);
+  return client_bridge->ShouldOverrideUrlLoading(
+      url, has_user_gesture, is_redirect, is_main_frame, ignore_navigation);
 }
 
 bool AwContentBrowserClient::ShouldCreateTaskScheduler() {
   return g_should_create_task_scheduler;
 }
 
+scoped_refptr<content::LoginDelegate>
+AwContentBrowserClient::CreateLoginDelegate(
+    net::AuthChallengeInfo* auth_info,
+    content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
+    const content::GlobalRequestID& request_id,
+    bool is_main_frame,
+    const GURL& url,
+    scoped_refptr<net::HttpResponseHeaders> response_headers,
+    bool first_auth_attempt,
+    LoginAuthRequiredCallback auth_required_callback) {
+  return base::MakeRefCounted<AwLoginDelegate>(
+      auth_info, web_contents_getter, first_auth_attempt,
+      std::move(auth_required_callback));
+}
+
+bool AwContentBrowserClient::HandleExternalProtocol(
+    const GURL& url,
+    content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
+    int child_id,
+    content::NavigationUIData* navigation_data,
+    bool is_main_frame,
+    ui::PageTransition page_transition,
+    bool has_user_gesture) {
+  // The AwURLRequestJobFactory implementation should ensure this method never
+  // gets called.
+  NOTREACHED();
+  return false;
+}
+
+void AwContentBrowserClient::RegisterOutOfProcessServices(
+    OutOfProcessServiceMap* services) {
+  (*services)[heap_profiling::mojom::kServiceName] =
+      base::BindRepeating(&base::ASCIIToUTF16, "Heap Profiling Service");
+}
+
 // static
 void AwContentBrowserClient::DisableCreatingTaskScheduler() {
   g_should_create_task_scheduler = false;
diff --git a/android_webview/browser/aw_content_browser_client.h b/android_webview/browser/aw_content_browser_client.h
index e5542010..cca2d26 100644
--- a/android_webview/browser/aw_content_browser_client.h
+++ b/android_webview/browser/aw_content_browser_client.h
@@ -53,6 +53,7 @@
   void RenderProcessWillLaunch(
       content::RenderProcessHost* host,
       service_manager::mojom::ServiceRequest* service_request) override;
+  bool ShouldUseMobileFlingCurve() const override;
   bool IsHandledURL(const GURL& url) override;
   bool ForceSniffingFileUrlsForHtml() override;
   void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
@@ -74,8 +75,7 @@
                       const net::CanonicalCookie& cookie,
                       content::ResourceContext* context,
                       int render_process_id,
-                      int render_frame_id,
-                      const net::CookieOptions& options) override;
+                      int render_frame_id) override;
   void AllowWorkerFileSystem(
       const GURL& url,
       content::ResourceContext* context,
@@ -148,6 +148,10 @@
       content::RenderFrameHost* render_frame_host,
       const std::string& interface_name,
       mojo::ScopedMessagePipeHandle interface_pipe) override;
+  bool BindAssociatedInterfaceRequestFromFrame(
+      content::RenderFrameHost* render_frame_host,
+      const std::string& interface_name,
+      mojo::ScopedInterfaceEndpointHandle* handle) override;
   void ExposeInterfacesToRenderer(
       service_manager::BinderRegistry* registry,
       blink::AssociatedInterfaceRegistry* associated_registry,
@@ -166,8 +170,27 @@
                                 bool has_user_gesture,
                                 bool is_redirect,
                                 bool is_main_frame,
-                                ui::PageTransition transition) override;
+                                ui::PageTransition transition,
+                                bool* ignore_navigation) override;
   bool ShouldCreateTaskScheduler() override;
+  scoped_refptr<content::LoginDelegate> CreateLoginDelegate(
+      net::AuthChallengeInfo* auth_info,
+      content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
+      const content::GlobalRequestID& request_id,
+      bool is_main_frame,
+      const GURL& url,
+      scoped_refptr<net::HttpResponseHeaders> response_headers,
+      bool first_auth_attempt,
+      LoginAuthRequiredCallback auth_required_callback) override;
+  bool HandleExternalProtocol(
+      const GURL& url,
+      content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
+      int child_id,
+      content::NavigationUIData* navigation_data,
+      bool is_main_frame,
+      ui::PageTransition page_transition,
+      bool has_user_gesture) override;
+  void RegisterOutOfProcessServices(OutOfProcessServiceMap* services) override;
 
   static void DisableCreatingTaskScheduler();
 
@@ -186,6 +209,8 @@
   scoped_refptr<safe_browsing::UrlCheckerDelegate>
       safe_browsing_url_checker_delegate_;
 
+  bool sniff_file_urls_;
+
   DISALLOW_COPY_AND_ASSIGN(AwContentBrowserClient);
 };
 
diff --git a/android_webview/browser/aw_contents.cc b/android_webview/browser/aw_contents.cc
index e224b9d..6e4d9f4 100644
--- a/android_webview/browser/aw_contents.cc
+++ b/android_webview/browser/aw_contents.cc
@@ -17,6 +17,7 @@
 #include "android_webview/browser/aw_gl_functor.h"
 #include "android_webview/browser/aw_pdf_exporter.h"
 #include "android_webview/browser/aw_picture.h"
+#include "android_webview/browser/aw_render_process.h"
 #include "android_webview/browser/aw_renderer_priority.h"
 #include "android_webview/browser/aw_resource_context.h"
 #include "android_webview/browser/aw_web_contents_delegate.h"
@@ -44,6 +45,7 @@
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/command_line.h"
+#include "base/i18n/rtl.h"
 #include "base/json/json_writer.h"
 #include "base/location.h"
 #include "base/macros.h"
@@ -249,7 +251,7 @@
     compositor_id.process_id =
         web_contents_->GetRenderViewHost()->GetProcess()->GetID();
     compositor_id.routing_id =
-        web_contents_->GetRenderViewHost()->GetRoutingID();
+        web_contents_->GetRenderViewHost()->GetWidget()->GetRoutingID();
   }
 
   browser_view_renderer_.SetActiveCompositorID(compositor_id);
@@ -408,6 +410,20 @@
   SetAwGLFunctor(reinterpret_cast<AwGLFunctor*>(gl_functor));
 }
 
+ScopedJavaLocalRef<jobject> AwContents::GetRenderProcess(
+    JNIEnv* env,
+    const JavaParamRef<jobject>& obj) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  content::RenderProcessHost* host =
+      web_contents_->GetMainFrame()->GetProcess();
+  if (host->run_renderer_in_process()) {
+    return ScopedJavaLocalRef<jobject>();
+  }
+  AwRenderProcess* render_process =
+      AwRenderProcess::GetInstanceForRenderProcessHost(host);
+  return render_process->GetJavaObject();
+}
+
 void AwContents::Destroy(JNIEnv* env, const JavaParamRef<jobject>& obj) {
   java_ref_.reset();
   delete this;
@@ -453,6 +469,15 @@
   return base::subtle::NoBarrier_Load(&g_instance_count);
 }
 
+// static
+ScopedJavaLocalRef<jstring> JNI_AwContents_GetSafeBrowsingLocaleForTesting(
+    JNIEnv* env,
+    const JavaParamRef<jclass>&) {
+  ScopedJavaLocalRef<jstring> locale =
+      ConvertUTF8ToJavaString(env, base::i18n::GetConfiguredLocale());
+  return locale;
+}
+
 namespace {
 void DocumentHasImagesCallback(const ScopedJavaGlobalRef<jobject>& message,
                                bool has_images) {
@@ -468,7 +493,7 @@
   ScopedJavaGlobalRef<jobject> j_message;
   j_message.Reset(env, message);
   render_view_host_ext_->DocumentHasImages(
-      base::Bind(&DocumentHasImagesCallback, j_message));
+      base::BindOnce(&DocumentHasImagesCallback, j_message));
 }
 
 namespace {
@@ -490,8 +515,8 @@
   base::FilePath target_path(ConvertJavaStringToUTF8(env, jpath));
   web_contents_->GenerateMHTML(
       content::MHTMLGenerationParams(target_path),
-      base::Bind(&GenerateMHTMLCallback,
-                 ScopedJavaGlobalRef<jobject>(env, callback), target_path));
+      base::BindOnce(&GenerateMHTMLCallback,
+                     ScopedJavaGlobalRef<jobject>(env, callback), target_path));
 }
 
 void AwContents::CreatePdfExporter(JNIEnv* env,
@@ -563,19 +588,20 @@
   if (java_ref.get(env).obj()) {
     content::BrowserThread::PostTask(
         content::BrowserThread::UI, FROM_HERE,
-        base::Bind(&ShowGeolocationPromptHelperTask, java_ref, origin));
+        base::BindOnce(&ShowGeolocationPromptHelperTask, java_ref, origin));
   }
 }
 
 }  // anonymous namespace
 
-void AwContents::ShowGeolocationPrompt(const GURL& requesting_frame,
-                                       base::Callback<void(bool)> callback) {
+void AwContents::ShowGeolocationPrompt(
+    const GURL& requesting_frame,
+    base::OnceCallback<void(bool)> callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   GURL origin = requesting_frame.GetOrigin();
   bool show_prompt = pending_geolocation_prompts_.empty();
-  pending_geolocation_prompts_.push_back(OriginCallback(origin, callback));
+  pending_geolocation_prompts_.emplace_back(origin, std::move(callback));
   if (show_prompt) {
     ShowGeolocationPromptHelper(java_ref_, origin);
   }
@@ -594,7 +620,7 @@
   GURL callback_origin(base::android::ConvertJavaStringToUTF16(env, origin));
   if (callback_origin.GetOrigin() ==
       pending_geolocation_prompts_.front().first) {
-    pending_geolocation_prompts_.front().second.Run(value);
+    std::move(pending_geolocation_prompts_.front().second).Run(value);
     pending_geolocation_prompts_.pop_front();
     if (!pending_geolocation_prompts_.empty()) {
       ShowGeolocationPromptHelper(java_ref_,
@@ -670,10 +696,10 @@
 
 void AwContents::RequestProtectedMediaIdentifierPermission(
     const GURL& origin,
-    const base::Callback<void(bool)>& callback) {
+    base::OnceCallback<void(bool)> callback) {
   permission_request_handler_->SendRequest(
       std::unique_ptr<AwPermissionRequestDelegate>(new SimplePermissionRequest(
-          origin, AwPermissionRequest::ProtectedMediaId, callback)));
+          origin, AwPermissionRequest::ProtectedMediaId, std::move(callback))));
 }
 
 void AwContents::CancelProtectedMediaIdentifierPermissionRequests(
@@ -684,19 +710,19 @@
 
 void AwContents::RequestGeolocationPermission(
     const GURL& origin,
-    const base::Callback<void(bool)>& callback) {
+    base::OnceCallback<void(bool)> callback) {
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
   if (obj.is_null())
     return;
 
   if (Java_AwContents_useLegacyGeolocationPermissionAPI(env, obj)) {
-    ShowGeolocationPrompt(origin, callback);
+    ShowGeolocationPrompt(origin, std::move(callback));
     return;
   }
   permission_request_handler_->SendRequest(
       std::unique_ptr<AwPermissionRequestDelegate>(new SimplePermissionRequest(
-          origin, AwPermissionRequest::Geolocation, callback)));
+          origin, AwPermissionRequest::Geolocation, std::move(callback))));
 }
 
 void AwContents::CancelGeolocationPermissionRequests(const GURL& origin) {
@@ -715,10 +741,10 @@
 
 void AwContents::RequestMIDISysexPermission(
     const GURL& origin,
-    const base::Callback<void(bool)>& callback) {
+    base::OnceCallback<void(bool)> callback) {
   permission_request_handler_->SendRequest(
       std::unique_ptr<AwPermissionRequestDelegate>(new SimplePermissionRequest(
-          origin, AwPermissionRequest::MIDISysex, callback)));
+          origin, AwPermissionRequest::MIDISysex, std::move(callback))));
 }
 
 void AwContents::CancelMIDISysexPermissionRequests(const GURL& origin) {
@@ -1032,6 +1058,12 @@
   return browser_view_renderer_.OnDrawSoftware(canvas_holder->GetCanvas());
 }
 
+bool AwContents::NeedToDrawBackgroundColor(
+    JNIEnv* env,
+    const base::android::JavaParamRef<jobject>& obj) {
+  return browser_view_renderer_.NeedToDrawBackgroundColor();
+}
+
 void AwContents::SetPendingWebContentsForPopup(
     std::unique_ptr<content::WebContents> pending) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -1243,9 +1275,8 @@
 jint AwContents::GetEffectivePriority(
     JNIEnv* env,
     const base::android::JavaParamRef<jobject>& obj) {
-  switch (web_contents_->GetMainFrame()
-              ->GetProcess()
-              ->ComputeEffectiveImportance()) {
+  switch (
+      web_contents_->GetMainFrame()->GetProcess()->GetEffectiveImportance()) {
     case content::ChildProcessImportance::NORMAL:
       return static_cast<jint>(RendererPriority::WAIVED);
     case content::ChildProcessImportance::MODERATE:
@@ -1316,7 +1347,7 @@
 void AwContents::GrantFileSchemeAccesstoChildProcess(
     JNIEnv* env,
     const JavaParamRef<jobject>& obj) {
-  content::ChildProcessSecurityPolicy::GetInstance()->GrantScheme(
+  content::ChildProcessSecurityPolicy::GetInstance()->GrantRequestScheme(
       web_contents_->GetMainFrame()->GetProcess()->GetID(), url::kFileScheme);
 }
 
@@ -1343,7 +1374,7 @@
   DCHECK(new_host);
 
   int process_id = new_host->GetProcess()->GetID();
-  int routing_id = new_host->GetRoutingID();
+  int routing_id = new_host->GetWidget()->GetRoutingID();
 
   // At this point, the current RVH may or may not contain a compositor. So
   // compositor_ may be nullptr, in which case
@@ -1380,7 +1411,8 @@
   CompositorID compositor_id;
   RenderFrameHost* rfh = web_contents_->GetInterstitialPage()->GetMainFrame();
   compositor_id.process_id = rfh->GetProcess()->GetID();
-  compositor_id.routing_id = rfh->GetRenderViewHost()->GetRoutingID();
+  compositor_id.routing_id =
+      rfh->GetRenderViewHost()->GetWidget()->GetRoutingID();
   browser_view_renderer_.SetActiveCompositorID(compositor_id);
 }
 
@@ -1393,7 +1425,7 @@
     compositor_id.process_id =
         web_contents_->GetRenderViewHost()->GetProcess()->GetID();
     compositor_id.routing_id =
-        web_contents_->GetRenderViewHost()->GetRoutingID();
+        web_contents_->GetRenderViewHost()->GetWidget()->GetRoutingID();
   } else {
     LOG(WARNING) << "failed setting the compositor on detaching interstitital";
   }
diff --git a/android_webview/browser/aw_contents.h b/android_webview/browser/aw_contents.h
index ffb1ba7..dc5bcc9 100644
--- a/android_webview/browser/aw_contents.h
+++ b/android_webview/browser/aw_contents.h
@@ -114,6 +114,10 @@
                       const base::android::JavaParamRef<jobject>& obj,
                       jlong gl_functor);
 
+  base::android::ScopedJavaLocalRef<jobject> GetRenderProcess(
+      JNIEnv* env,
+      const base::android::JavaParamRef<jobject>& obj);
+
   void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj);
   void DocumentHasImages(JNIEnv* env,
                          const base::android::JavaParamRef<jobject>& obj,
@@ -191,6 +195,8 @@
               jint visible_right,
               jint visible_bottom,
               jboolean force_auxiliary_bitmap_rendering);
+  bool NeedToDrawBackgroundColor(JNIEnv* env,
+                               const base::android::JavaParamRef<jobject>& obj);
   jlong CapturePicture(JNIEnv* env,
                        const base::android::JavaParamRef<jobject>& obj,
                        int width,
@@ -237,16 +243,16 @@
   // AwBrowserPermissionRequestDelegate implementation.
   void RequestProtectedMediaIdentifierPermission(
       const GURL& origin,
-      const base::Callback<void(bool)>& callback) override;
+      base::OnceCallback<void(bool)> callback) override;
   void CancelProtectedMediaIdentifierPermissionRequests(
       const GURL& origin) override;
   void RequestGeolocationPermission(
       const GURL& origin,
-      const base::Callback<void(bool)>& callback) override;
+      base::OnceCallback<void(bool)> callback) override;
   void CancelGeolocationPermissionRequests(const GURL& origin) override;
   void RequestMIDISysexPermission(
       const GURL& origin,
-      const base::Callback<void(bool)>& callback) override;
+      base::OnceCallback<void(bool)> callback) override;
   void CancelMIDISysexPermissionRequests(const GURL& origin) override;
 
   // Find-in-page API and related methods.
@@ -366,7 +372,8 @@
   void InitAutofillIfNecessary(bool autocomplete_enabled);
 
   // Geolocation API support
-  void ShowGeolocationPrompt(const GURL& origin, base::Callback<void(bool)>);
+  void ShowGeolocationPrompt(const GURL& origin,
+                             base::OnceCallback<void(bool)>);
   void HideGeolocationPrompt(const GURL& origin);
 
   void SetDipScaleInternal(float dip_scale);
@@ -390,7 +397,7 @@
   // GURL is supplied by the content layer as requesting frame.
   // Callback is supplied by the content layer, and is invoked with the result
   // from the permission prompt.
-  typedef std::pair<const GURL, base::Callback<void(bool)>> OriginCallback;
+  typedef std::pair<const GURL, base::OnceCallback<void(bool)>> OriginCallback;
   // The first element in the list is always the currently pending request.
   std::list<OriginCallback> pending_geolocation_prompts_;
 
diff --git a/android_webview/browser/aw_contents_client_bridge.cc b/android_webview/browser/aw_contents_client_bridge.cc
index 8abb9c3..aeb0656 100644
--- a/android_webview/browser/aw_contents_client_bridge.cc
+++ b/android_webview/browser/aw_contents_client_bridge.cc
@@ -14,7 +14,7 @@
 #include "base/android/jni_string.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/message_loop/message_loop.h"
+#include "base/message_loop/message_loop_current.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/client_certificate_delegate.h"
 #include "content/public/browser/render_frame_host.h"
@@ -73,6 +73,10 @@
 
 }  // namespace
 
+AwContentsClientBridge::HttpErrorInfo::HttpErrorInfo() : status_code(0) {}
+
+AwContentsClientBridge::HttpErrorInfo::~HttpErrorInfo() {}
+
 // static
 void AwContentsClientBridge::Associate(WebContents* web_contents,
                                        AwContentsClientBridge* handler) {
@@ -125,12 +129,11 @@
   }
 }
 
-void AwContentsClientBridge::AllowCertificateError(
-    int cert_error,
-    net::X509Certificate* cert,
-    const GURL& request_url,
-    const base::Callback<void(content::CertificateRequestResultType)>& callback,
-    bool* cancel_request) {
+void AwContentsClientBridge::AllowCertificateError(int cert_error,
+                                                   net::X509Certificate* cert,
+                                                   const GURL& request_url,
+                                                   CertErrorCallback callback,
+                                                   bool* cancel_request) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   JNIEnv* env = AttachCurrentThread();
 
@@ -148,7 +151,7 @@
   // We need to add the callback before making the call to java side,
   // as it may do a synchronous callback prior to returning.
   int request_id = pending_cert_error_callbacks_.Add(
-      std::make_unique<CertErrorCallback>(callback));
+      std::make_unique<CertErrorCallback>(std::move(callback)));
   *cancel_request = !Java_AwContentsClientBridge_allowCertificateError(
       env, obj, cert_error, jcert, jurl, request_id);
   // if the request is cancelled, then cancel the stored callback
@@ -167,8 +170,9 @@
     LOG(WARNING) << "Ignoring unexpected ssl error proceed callback";
     return;
   }
-  callback->Run(proceed ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE
-                        : content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
+  std::move(*callback).Run(
+      proceed ? content::CERTIFICATE_REQUEST_RESULT_TYPE_CONTINUE
+              : content::CERTIFICATE_REQUEST_RESULT_TYPE_CANCEL);
   pending_cert_error_callbacks_.Remove(id);
 }
 
@@ -361,25 +365,28 @@
 bool AwContentsClientBridge::ShouldOverrideUrlLoading(const base::string16& url,
                                                       bool has_user_gesture,
                                                       bool is_redirect,
-                                                      bool is_main_frame) {
+                                                      bool is_main_frame,
+                                                      bool* ignore_navigation) {
+  *ignore_navigation = false;
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
   if (obj.is_null())
-    return false;
+    return true;
   ScopedJavaLocalRef<jstring> jurl = ConvertUTF16ToJavaString(env, url);
   devtools_instrumentation::ScopedEmbedderCallbackTask(
       "shouldOverrideUrlLoading");
-  bool did_override = Java_AwContentsClientBridge_shouldOverrideUrlLoading(
+  *ignore_navigation = Java_AwContentsClientBridge_shouldOverrideUrlLoading(
       env, obj, jurl, has_user_gesture, is_redirect, is_main_frame);
   if (HasException(env)) {
     // Tell the chromium message loop to not perform any tasks after the current
     // one - we want to make sure we return to Java cleanly without first making
     // any new JNI calls.
-    base::MessageLoopForUI::current()->Abort();
+    base::MessageLoopCurrentForUI::Get()->Abort();
     // If we crashed we don't want to continue the navigation.
-    return true;
+    *ignore_navigation = true;
+    return false;
   }
-  return did_override;
+  return true;
 }
 
 void AwContentsClientBridge::NewDownload(const GURL& url,
@@ -453,9 +460,9 @@
 void AwContentsClientBridge::OnSafeBrowsingHit(
     const AwWebResourceRequest& request,
     const safe_browsing::SBThreatType& threat_type,
-    const SafeBrowsingActionCallback& callback) {
+    SafeBrowsingActionCallback callback) {
   int request_id = safe_browsing_callbacks_.Add(
-      std::make_unique<SafeBrowsingActionCallback>(callback));
+      std::make_unique<SafeBrowsingActionCallback>(std::move(callback)));
 
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   JNIEnv* env = AttachCurrentThread();
@@ -475,7 +482,7 @@
 
 void AwContentsClientBridge::OnReceivedHttpError(
     const AwWebResourceRequest& request,
-    const scoped_refptr<const net::HttpResponseHeaders>& response_headers) {
+    std::unique_ptr<HttpErrorInfo> http_error_info) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   JNIEnv* env = AttachCurrentThread();
   ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
@@ -485,42 +492,48 @@
   AwWebResourceRequest::AwJavaWebResourceRequest java_web_resource_request;
   AwWebResourceRequest::ConvertToJava(env, request, &java_web_resource_request);
 
-  vector<std::string> response_header_names;
-  vector<std::string> response_header_values;
-
-  {
-    size_t headers_iterator = 0;
-    std::string header_name, header_value;
-    while (response_headers->EnumerateHeaderLines(
-        &headers_iterator, &header_name, &header_value)) {
-      response_header_names.push_back(header_name);
-      response_header_values.push_back(header_value);
-    }
-  }
-
-  std::string mime_type, encoding;
-  response_headers->GetMimeTypeAndCharset(&mime_type, &encoding);
   ScopedJavaLocalRef<jstring> jstring_mime_type =
-      ConvertUTF8ToJavaString(env, mime_type);
+      ConvertUTF8ToJavaString(env, http_error_info->mime_type);
   ScopedJavaLocalRef<jstring> jstring_encoding =
-      ConvertUTF8ToJavaString(env, encoding);
-  int status_code = response_headers->response_code();
+      ConvertUTF8ToJavaString(env, http_error_info->encoding);
   ScopedJavaLocalRef<jstring> jstring_reason =
-      ConvertUTF8ToJavaString(env, response_headers->GetStatusText());
+      ConvertUTF8ToJavaString(env, http_error_info->status_text);
   ScopedJavaLocalRef<jobjectArray> jstringArray_response_header_names =
-      ToJavaArrayOfStrings(env, response_header_names);
+      ToJavaArrayOfStrings(env, http_error_info->response_header_names);
   ScopedJavaLocalRef<jobjectArray> jstringArray_response_header_values =
-      ToJavaArrayOfStrings(env, response_header_values);
+      ToJavaArrayOfStrings(env, http_error_info->response_header_values);
 
   Java_AwContentsClientBridge_onReceivedHttpError(
       env, obj, java_web_resource_request.jurl, request.is_main_frame,
       request.has_user_gesture, java_web_resource_request.jmethod,
       java_web_resource_request.jheader_names,
       java_web_resource_request.jheader_values, jstring_mime_type,
-      jstring_encoding, status_code, jstring_reason,
+      jstring_encoding, http_error_info->status_code, jstring_reason,
       jstringArray_response_header_names, jstringArray_response_header_values);
 }
 
+// static
+std::unique_ptr<AwContentsClientBridge::HttpErrorInfo>
+AwContentsClientBridge::ExtractHttpErrorInfo(
+    const net::HttpResponseHeaders* response_headers) {
+  auto http_error_info = std::make_unique<HttpErrorInfo>();
+  {
+    size_t headers_iterator = 0;
+    std::string header_name, header_value;
+    while (response_headers->EnumerateHeaderLines(
+        &headers_iterator, &header_name, &header_value)) {
+      http_error_info->response_header_names.push_back(header_name);
+      http_error_info->response_header_values.push_back(header_value);
+    }
+  }
+
+  response_headers->GetMimeTypeAndCharset(&http_error_info->mime_type,
+                                          &http_error_info->encoding);
+  http_error_info->status_code = response_headers->response_code();
+  http_error_info->status_text = response_headers->GetStatusText();
+  return http_error_info;
+}
+
 void AwContentsClientBridge::ConfirmJsResult(JNIEnv* env,
                                              const JavaRef<jobject>&,
                                              int id,
@@ -551,7 +564,7 @@
     LOG(WARNING) << "Unexpected TakeSafeBrowsingAction. " << request_id;
     return;
   }
-  callback->Run(
+  std::move(*callback).Run(
       static_cast<AwUrlCheckerDelegateImpl::SafeBrowsingAction>(action),
       reporting);
   safe_browsing_callbacks_.Remove(request_id);
diff --git a/android_webview/browser/aw_contents_client_bridge.h b/android_webview/browser/aw_contents_client_bridge.h
index 0188c249..bbe9d38 100644
--- a/android_webview/browser/aw_contents_client_bridge.h
+++ b/android_webview/browser/aw_contents_client_bridge.h
@@ -43,6 +43,26 @@
 // any references.
 class AwContentsClientBridge {
  public:
+  // Used to package up information needed by OnReceivedHttpError for transfer
+  // between IO and UI threads.
+  struct HttpErrorInfo {
+    HttpErrorInfo();
+    ~HttpErrorInfo();
+
+    int status_code;
+    std::string status_text;
+    std::string mime_type;
+    std::string encoding;
+    std::vector<std::string> response_header_names;
+    std::vector<std::string> response_header_values;
+  };
+
+  using CertErrorCallback =
+      base::OnceCallback<void(content::CertificateRequestResultType)>;
+  using SafeBrowsingActionCallback =
+      base::OnceCallback<void(AwUrlCheckerDelegateImpl::SafeBrowsingAction,
+                              bool)>;
+
   // Adds the handler to the UserData registry.
   static void Associate(content::WebContents* web_contents,
                         AwContentsClientBridge* handler);
@@ -58,13 +78,11 @@
   ~AwContentsClientBridge();
 
   // AwContentsClientBridge implementation
-  void AllowCertificateError(
-      int cert_error,
-      net::X509Certificate* cert,
-      const GURL& request_url,
-      const base::Callback<void(content::CertificateRequestResultType)>&
-          callback,
-      bool* cancel_request);
+  void AllowCertificateError(int cert_error,
+                             net::X509Certificate* cert,
+                             const GURL& request_url,
+                             CertErrorCallback callback,
+                             bool* cancel_request);
   void SelectClientCertificate(
       net::SSLCertRequestInfo* cert_request_info,
       std::unique_ptr<content::ClientCertificateDelegate> delegate);
@@ -80,7 +98,8 @@
   bool ShouldOverrideUrlLoading(const base::string16& url,
                                 bool has_user_gesture,
                                 bool is_redirect,
-                                bool is_main_frame);
+                                bool is_main_frame,
+                                bool* ignore_navigation);
   void NewDownload(const GURL& url,
                    const std::string& user_agent,
                    const std::string& content_disposition,
@@ -100,16 +119,17 @@
                        int error_code,
                        bool safebrowsing_hit);
 
-  void OnSafeBrowsingHit(
-      const AwWebResourceRequest& request,
-      const safe_browsing::SBThreatType& threat_type,
-      const base::Callback<void(AwUrlCheckerDelegateImpl::SafeBrowsingAction,
-                                bool)>& callback);
+  void OnSafeBrowsingHit(const AwWebResourceRequest& request,
+                         const safe_browsing::SBThreatType& threat_type,
+                         SafeBrowsingActionCallback callback);
 
   // Called when a response from the server is received with status code >= 400.
-  void OnReceivedHttpError(
-      const AwWebResourceRequest& request,
-      const scoped_refptr<const net::HttpResponseHeaders>& response_headers);
+  void OnReceivedHttpError(const AwWebResourceRequest& request,
+                           std::unique_ptr<HttpErrorInfo> error_info);
+
+  // This should be called from IO thread.
+  static std::unique_ptr<HttpErrorInfo> ExtractHttpErrorInfo(
+      const net::HttpResponseHeaders* response_headers);
 
   // Methods called from Java.
   void ProceedSslError(JNIEnv* env,
@@ -137,11 +157,6 @@
  private:
   JavaObjectWeakGlobalRef java_ref_;
 
-  typedef const base::Callback<void(content::CertificateRequestResultType)>
-      CertErrorCallback;
-  typedef const base::Callback<
-      void(AwUrlCheckerDelegateImpl::SafeBrowsingAction, bool)>
-      SafeBrowsingActionCallback;
   base::IDMap<std::unique_ptr<CertErrorCallback>> pending_cert_error_callbacks_;
   base::IDMap<std::unique_ptr<SafeBrowsingActionCallback>>
       safe_browsing_callbacks_;
diff --git a/android_webview/browser/aw_contents_client_bridge_unittest.cc b/android_webview/browser/aw_contents_client_bridge_unittest.cc
index c24d1a7..592d310 100644
--- a/android_webview/browser/aw_contents_client_bridge_unittest.cc
+++ b/android_webview/browser/aw_contents_client_bridge_unittest.cc
@@ -11,6 +11,7 @@
 #include "base/android/scoped_java_ref.h"
 #include "base/bind.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
 #include "content/public/browser/client_certificate_delegate.h"
 #include "content/public/test/test_browser_thread_bundle.h"
diff --git a/android_webview/browser/aw_contents_io_thread_client.cc b/android_webview/browser/aw_contents_io_thread_client.cc
index 582fb97..f621a01 100644
--- a/android_webview/browser/aw_contents_io_thread_client.cc
+++ b/android_webview/browser/aw_contents_io_thread_client.cc
@@ -14,6 +14,7 @@
 #include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
 #include "base/android/jni_weak_ref.h"
+#include "base/containers/flat_set.h"
 #include "base/lazy_instance.h"
 #include "base/synchronization/lock.h"
 #include "content/public/browser/browser_thread.h"
@@ -58,10 +59,16 @@
 typedef map<pair<int, int>, IoThreadClientData>
     RenderFrameHostToIoThreadClientType;
 
+typedef pair<base::flat_set<RenderFrameHost*>, IoThreadClientData>
+    HostsAndClientDataPair;
+
 // When browser side navigation is enabled, RenderFrameIDs do not have
 // valid render process host and render frame ids for frame navigations.
-// We need to identify these by using Frame Tree Node ids.
-typedef map<int, IoThreadClientData> FrameTreeNodeToIoThreadClientType;
+// We need to identify these by using FrameTreeNodeIds. Furthermore, we need
+// to keep track of which RenderFrameHosts are associated with each
+// FrameTreeNodeId, so we know when the last RenderFrameHost is deleted (and
+// therefore the FrameTreeNodeId should be removed).
+typedef map<int, HostsAndClientDataPair> FrameTreeNodeToIoThreadClientType;
 
 static pair<int, int> GetRenderFrameHostIdPair(RenderFrameHost* rfh) {
   return pair<int, int>(rfh->GetProcess()->GetID(), rfh->GetRoutingID());
@@ -73,14 +80,19 @@
   static RfhToIoThreadClientMap* GetInstance();
   void Set(pair<int, int> rfh_id, const IoThreadClientData& client);
   bool Get(pair<int, int> rfh_id, IoThreadClientData* client);
-  void Erase(pair<int, int> rfh_id);
 
-  void Set(int frame_tree_node_id, const IoThreadClientData& client);
   bool Get(int frame_tree_node_id, IoThreadClientData* client);
-  void Erase(int frame_tree_node_id);
+
+  // Prefer to call these when RenderFrameHost* is available, because they
+  // update both maps at the same time.
+  void Set(RenderFrameHost* rfh, const IoThreadClientData& client);
+  void Erase(RenderFrameHost* rfh);
 
  private:
   base::Lock map_lock_;
+  // We maintain two maps simultaneously so that we can always get the correct
+  // IoThreadClientData, even when only HostIdPair or FrameTreeNodeId is
+  // available.
   RenderFrameHostToIoThreadClientType rfh_to_io_thread_client_;
   FrameTreeNodeToIoThreadClientType frame_tree_node_to_io_thread_client_;
 };
@@ -116,17 +128,6 @@
   return true;
 }
 
-void RfhToIoThreadClientMap::Erase(pair<int, int> rfh_id) {
-  base::AutoLock lock(map_lock_);
-  rfh_to_io_thread_client_.erase(rfh_id);
-}
-
-void RfhToIoThreadClientMap::Set(int frame_tree_node_id,
-                                 const IoThreadClientData& client) {
-  base::AutoLock lock(map_lock_);
-  frame_tree_node_to_io_thread_client_[frame_tree_node_id] = client;
-}
-
 bool RfhToIoThreadClientMap::Get(int frame_tree_node_id,
                                  IoThreadClientData* client) {
   base::AutoLock lock(map_lock_);
@@ -135,13 +136,47 @@
   if (iterator == frame_tree_node_to_io_thread_client_.end())
     return false;
 
-  *client = iterator->second;
+  *client = iterator->second.second;
   return true;
 }
 
-void RfhToIoThreadClientMap::Erase(int frame_tree_node_id) {
+void RfhToIoThreadClientMap::Set(RenderFrameHost* rfh,
+                                 const IoThreadClientData& client) {
+  int frame_tree_node_id = rfh->GetFrameTreeNodeId();
+  pair<int, int> rfh_id = GetRenderFrameHostIdPair(rfh);
   base::AutoLock lock(map_lock_);
-  frame_tree_node_to_io_thread_client_.erase(frame_tree_node_id);
+
+  // If this FrameTreeNodeId already has an associated IoThreadClientData, add
+  // this RenderFrameHost to the hosts set (it's harmless to overwrite the
+  // IoThreadClientData). Otherwise, operator[] creates a new map entry and we
+  // add this RenderFrameHost to the hosts set and insert |client| in the pair.
+  HostsAndClientDataPair& current_entry =
+      frame_tree_node_to_io_thread_client_[frame_tree_node_id];
+  current_entry.second = client;
+  current_entry.first.insert(rfh);
+
+  // Always add the entry to the HostIdPair map, since entries are 1:1 with
+  // RenderFrameHosts.
+  rfh_to_io_thread_client_[rfh_id] = client;
+}
+
+void RfhToIoThreadClientMap::Erase(RenderFrameHost* rfh) {
+  int frame_tree_node_id = rfh->GetFrameTreeNodeId();
+  pair<int, int> rfh_id = GetRenderFrameHostIdPair(rfh);
+  base::AutoLock lock(map_lock_);
+  HostsAndClientDataPair& current_entry =
+      frame_tree_node_to_io_thread_client_[frame_tree_node_id];
+  size_t num_erased = current_entry.first.erase(rfh);
+  DCHECK(num_erased == 1);
+  // Only remove this entry from the FrameTreeNodeId map if there are no more
+  // live RenderFrameHosts.
+  if (current_entry.first.empty()) {
+    frame_tree_node_to_io_thread_client_.erase(frame_tree_node_id);
+  }
+
+  // Always safe to remove the entry from the HostIdPair map, since entries are
+  // 1:1 with RenderFrameHosts.
+  rfh_to_io_thread_client_.erase(rfh_id);
 }
 
 // ClientMapEntryUpdater ------------------------------------------------------
@@ -175,15 +210,11 @@
   IoThreadClientData client_data;
   client_data.io_thread_client = jdelegate_;
   client_data.pending_association = false;
-  RfhToIoThreadClientMap::GetInstance()->Set(GetRenderFrameHostIdPair(rfh),
-                                             client_data);
-  RfhToIoThreadClientMap::GetInstance()->Set(rfh->GetFrameTreeNodeId(),
-                                             client_data);
+  RfhToIoThreadClientMap::GetInstance()->Set(rfh, client_data);
 }
 
 void ClientMapEntryUpdater::RenderFrameDeleted(RenderFrameHost* rfh) {
-  RfhToIoThreadClientMap::GetInstance()->Erase(GetRenderFrameHostIdPair(rfh));
-  RfhToIoThreadClientMap::GetInstance()->Erase(rfh->GetFrameTreeNodeId());
+  RfhToIoThreadClientMap::GetInstance()->Erase(rfh);
 }
 
 void ClientMapEntryUpdater::WebContentsDestroyed() {
@@ -341,10 +372,10 @@
 
 void AwContentsIoThreadClient::ShouldInterceptRequestAsync(
     const net::URLRequest* request,
-    const ShouldInterceptRequestResultCallback callback) {
+    ShouldInterceptRequestResultCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  base::Callback<std::unique_ptr<AwWebResourceResponse>()> get_response =
-      base::Bind(&ReturnNull);
+  base::OnceCallback<std::unique_ptr<AwWebResourceResponse>()> get_response =
+      base::BindOnce(&ReturnNull);
   JNIEnv* env = AttachCurrentThread();
   if (bg_thread_client_object_.is_null() && !java_object_.is_null()) {
     bg_thread_client_object_.Reset(
@@ -352,12 +383,13 @@
                                                                 java_object_));
   }
   if (!bg_thread_client_object_.is_null()) {
-    get_response = base::Bind(
+    get_response = base::BindOnce(
         &RunShouldInterceptRequest, AwWebResourceRequest(*request),
         JavaObjectWeakGlobalRef(env, bg_thread_client_object_.obj()));
   }
   base::PostTaskAndReplyWithResult(sequenced_task_runner_.get(), FROM_HERE,
-                                   get_response, callback);
+                                   std::move(get_response),
+                                   std::move(callback));
 }
 
 bool AwContentsIoThreadClient::ShouldBlockContentUrls() const {
diff --git a/android_webview/browser/aw_contents_io_thread_client.h b/android_webview/browser/aw_contents_io_thread_client.h
index c65a991..b994655 100644
--- a/android_webview/browser/aw_contents_io_thread_client.h
+++ b/android_webview/browser/aw_contents_io_thread_client.h
@@ -14,7 +14,7 @@
 #include "base/callback_forward.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/task_scheduler/post_task.h"
+#include "base/task/post_task.h"
 
 namespace content {
 class WebContents;
@@ -108,11 +108,11 @@
                               int child_render_frame_id);
 
   // This method is called on the IO thread only.
-  typedef base::Callback<void(std::unique_ptr<AwWebResourceResponse>)>
-      ShouldInterceptRequestResultCallback;
+  using ShouldInterceptRequestResultCallback =
+      base::OnceCallback<void(std::unique_ptr<AwWebResourceResponse>)>;
   void ShouldInterceptRequestAsync(
       const net::URLRequest* request,
-      const ShouldInterceptRequestResultCallback callback);
+      ShouldInterceptRequestResultCallback callback);
 
   // Retrieve the AllowContentAccess setting value of this AwContents.
   // This method is called on the IO thread only.
diff --git a/android_webview/browser/aw_contents_statics.cc b/android_webview/browser/aw_contents_statics.cc
index 9c2f675..6f9169e 100644
--- a/android_webview/browser/aw_contents_statics.cc
+++ b/android_webview/browser/aw_contents_statics.cc
@@ -5,14 +5,13 @@
 #include "android_webview/browser/aw_browser_context.h"
 #include "android_webview/browser/aw_contents.h"
 #include "android_webview/browser/aw_contents_io_thread_client.h"
-#include "android_webview/browser/aw_safe_browsing_config_helper.h"
 #include "android_webview/browser/aw_safe_browsing_whitelist_manager.h"
 #include "android_webview/browser/net/aw_url_request_context_getter.h"
 #include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
 #include "base/android/scoped_java_ref.h"
 #include "base/callback.h"
-#include "components/google/core/browser/google_util.h"
+#include "components/google/core/common/google_util.h"
 #include "components/security_interstitials/core/urls.h"
 #include "components/version_info/version_info.h"
 #include "content/public/browser/browser_thread.h"
@@ -41,7 +40,7 @@
 
 void NotifyClientCertificatesChanged() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  net::CertDatabase::GetInstance()->OnAndroidKeyStoreChanged();
+  net::CertDatabase::GetInstance()->NotifyObserversCertDBChanged();
 }
 
 void SafeBrowsingWhitelistAssigned(const JavaRef<jobject>& callback,
@@ -58,10 +57,13 @@
 JNI_AwContentsStatics_GetSafeBrowsingPrivacyPolicyUrl(
     JNIEnv* env,
     const JavaParamRef<jclass>&) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
   GURL privacy_policy_url(
       security_interstitials::kSafeBrowsingPrivacyPolicyUrl);
-  privacy_policy_url = google_util::AppendGoogleLocaleParam(
-      privacy_policy_url, AwContents::GetLocale());
+  std::string locale =
+      AwBrowserContext::GetDefault()->GetSafeBrowsingUIManager()->app_locale();
+  privacy_policy_url =
+      google_util::AppendGoogleLocaleParam(privacy_policy_url, locale);
   return base::android::ConvertUTF8ToJavaString(env, privacy_policy_url.spec());
 }
 
@@ -73,9 +75,9 @@
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
   BrowserThread::PostTaskAndReply(
       BrowserThread::IO, FROM_HERE,
-      base::Bind(&NotifyClientCertificatesChanged),
-      base::Bind(&ClientCertificatesCleared,
-                 ScopedJavaGlobalRef<jobject>(env, callback)));
+      base::BindOnce(&NotifyClientCertificatesChanged),
+      base::BindOnce(&ClientCertificatesCleared,
+                     ScopedJavaGlobalRef<jobject>(env, callback)));
 }
 
 // static
@@ -95,21 +97,6 @@
 }
 
 // static
-jboolean JNI_AwContentsStatics_GetSafeBrowsingEnabledByManifest(
-    JNIEnv* env,
-    const JavaParamRef<jclass>&) {
-  return AwSafeBrowsingConfigHelper::GetSafeBrowsingEnabledByManifest();
-}
-
-// static
-void JNI_AwContentsStatics_SetSafeBrowsingEnabledByManifest(
-    JNIEnv* env,
-    const JavaParamRef<jclass>&,
-    jboolean enable) {
-  AwSafeBrowsingConfigHelper::SetSafeBrowsingEnabledByManifest(enable);
-}
-
-// static
 void JNI_AwContentsStatics_SetSafeBrowsingWhitelist(
     JNIEnv* env,
     const JavaParamRef<jclass>&,
@@ -121,8 +108,8 @@
       AwBrowserContext::GetDefault()->GetSafeBrowsingWhitelistManager();
   whitelist_manager->SetWhitelistOnUIThread(
       std::move(rules),
-      base::Bind(&SafeBrowsingWhitelistAssigned,
-                 ScopedJavaGlobalRef<jobject>(env, callback)));
+      base::BindOnce(&SafeBrowsingWhitelistAssigned,
+                     ScopedJavaGlobalRef<jobject>(env, callback)));
 }
 
 // static
@@ -143,4 +130,29 @@
   AwURLRequestContextGetter::set_check_cleartext_permitted(permitted);
 }
 
+// static
+void JNI_AwContentsStatics_SetProxyOverride(
+    JNIEnv* env,
+    const JavaParamRef<jclass>&,
+    const base::android::JavaParamRef<jstring>& jhost,
+    jint port,
+    const base::android::JavaParamRef<jobjectArray>& jexclusion_list) {
+  std::string host;
+  base::android::ConvertJavaStringToUTF8(env, jhost, &host);
+  std::vector<std::string> exclusion_list;
+  base::android::AppendJavaStringArrayToStringVector(env, jexclusion_list,
+                                                     &exclusion_list);
+
+  AwBrowserContext::GetDefault()->GetAwURLRequestContext()->SetProxyOverride(
+      host, port, exclusion_list);
+}
+
+// static
+void JNI_AwContentsStatics_ClearProxyOverride(JNIEnv* env,
+                                              const JavaParamRef<jclass>&) {
+  AwBrowserContext::GetDefault()
+      ->GetAwURLRequestContext()
+      ->ClearProxyOverride();
+}
+
 }  // namespace android_webview
diff --git a/android_webview/browser/aw_cookie_access_policy.cc b/android_webview/browser/aw_cookie_access_policy.cc
index d7e564c..43c279d 100644
--- a/android_webview/browser/aw_cookie_access_policy.cc
+++ b/android_webview/browser/aw_cookie_access_policy.cc
@@ -120,8 +120,7 @@
                                           const net::CanonicalCookie& cookie,
                                           content::ResourceContext* context,
                                           int render_process_id,
-                                          int render_frame_id,
-                                          const net::CookieOptions& options) {
+                                          int render_frame_id) {
   bool global = GetShouldAcceptCookies();
   bool thirdParty = GetShouldAcceptThirdPartyCookies(
       render_process_id, render_frame_id,
diff --git a/android_webview/browser/aw_cookie_access_policy.h b/android_webview/browser/aw_cookie_access_policy.h
index 56fb8b4..257de77 100644
--- a/android_webview/browser/aw_cookie_access_policy.h
+++ b/android_webview/browser/aw_cookie_access_policy.h
@@ -16,10 +16,6 @@
 class ResourceContext;
 }
 
-namespace net {
-class CookieOptions;
-}
-
 class GURL;
 
 namespace android_webview {
@@ -65,8 +61,7 @@
                       const net::CanonicalCookie& cookie,
                       content::ResourceContext* context,
                       int render_process_id,
-                      int render_frame_id,
-                      const net::CookieOptions& options);
+                      int render_frame_id);
 
  private:
   friend struct base::LazyInstanceTraitsBase<AwCookieAccessPolicy>;
diff --git a/android_webview/browser/aw_debug.cc b/android_webview/browser/aw_debug.cc
index bd9cdf9..7b3abaf 100644
--- a/android_webview/browser/aw_debug.cc
+++ b/android_webview/browser/aw_debug.cc
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h"
+#include "android_webview/common/crash_reporter/aw_crash_reporter_client.h"
 #include "android_webview/common/crash_reporter/crash_keys.h"
 #include "base/android/jni_android.h"
 #include "base/android/jni_string.h"
diff --git a/android_webview/browser/aw_devtools_server.cc b/android_webview/browser/aw_devtools_server.cc
index dff0da1..86107a3 100644
--- a/android_webview/browser/aw_devtools_server.cc
+++ b/android_webview/browser/aw_devtools_server.cc
@@ -46,7 +46,7 @@
   std::unique_ptr<net::ServerSocket> CreateForHttpServer() override {
     std::unique_ptr<net::UnixDomainServerSocket> socket(
         new net::UnixDomainServerSocket(
-            base::Bind(&content::CanUserConnectToDevTools),
+            base::BindRepeating(&content::CanUserConnectToDevTools),
             true /* use_abstract_namespace */));
     if (socket->BindAndListen(socket_name_, kBackLog) != net::OK)
       return std::unique_ptr<net::ServerSocket>();
@@ -60,7 +60,7 @@
                                ++last_tethering_socket_);
     std::unique_ptr<net::UnixDomainServerSocket> socket(
         new net::UnixDomainServerSocket(
-            base::Bind(&content::CanUserConnectToDevTools),
+            base::BindRepeating(&content::CanUserConnectToDevTools),
             true /* use_abstract_namespace */));
     if (socket->BindAndListen(*name, kBackLog) != net::OK)
       return std::unique_ptr<net::ServerSocket>();
diff --git a/android_webview/browser/aw_field_trial_creator.cc b/android_webview/browser/aw_field_trial_creator.cc
index ff8e4b2..f491522 100644
--- a/android_webview/browser/aw_field_trial_creator.cc
+++ b/android_webview/browser/aw_field_trial_creator.cc
@@ -5,9 +5,15 @@
 #include "android_webview/browser/aw_field_trial_creator.h"
 
 #include <memory>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
 
 #include "android_webview/browser/aw_metrics_service_client.h"
+#include "android_webview/browser/aw_variations_seed_bridge.h"
 #include "base/base_switches.h"
+#include "base/command_line.h"
 #include "base/feature_list.h"
 #include "base/path_service.h"
 #include "base/strings/string_split.h"
@@ -19,7 +25,9 @@
 #include "components/prefs/pref_service_factory.h"
 #include "components/variations/entropy_provider.h"
 #include "components/variations/pref_names.h"
+#include "components/variations/seed_response.h"
 #include "components/variations/service/safe_seed_manager.h"
+#include "components/variations/service/variations_service.h"
 
 namespace android_webview {
 namespace {
@@ -27,24 +35,11 @@
 // TODO(kmilka): Update to work properly in environments both with and without
 // UMA enabled.
 std::unique_ptr<const base::FieldTrial::EntropyProvider>
-CreateLowEntropyProvider() {
+CreateLowEntropyProvider(const std::string& client_id) {
   return std::unique_ptr<const base::FieldTrial::EntropyProvider>(
       // Since variations are only enabled for users opted in to UMA, it is
       // acceptable to use the SHA1EntropyProvider for randomization.
-      new variations::SHA1EntropyProvider(
-          // Synchronous read of the client id is permitted as it is fast
-          // enough to have minimal impact on startup time, and is behind the
-          // webview-enable-finch flag.
-          android_webview::AwMetricsServiceClient::GetClientId()));
-}
-
-// Synchronous read of variations data is permitted as it is fast
-// enough to have minimal impact on startup time, and is behind the
-// webview-enable-finch flag.
-bool ReadVariationsSeedDataFromFile(PrefService* local_state) {
-  // TODO(kmilka): The data read is being moved to java and the data will be
-  // passed in via JNI.
-  return false;
+      new variations::SHA1EntropyProvider(client_id));
 }
 
 }  // anonymous namespace
@@ -54,51 +49,39 @@
 
 AwFieldTrialCreator::~AwFieldTrialCreator() {}
 
-std::unique_ptr<PrefService> AwFieldTrialCreator::CreateLocalState() {
-  scoped_refptr<PrefRegistrySimple> pref_registry =
-      base::MakeRefCounted<PrefRegistrySimple>();
+void AwFieldTrialCreator::SetUpFieldTrials() {
+  DoSetUpFieldTrials();
 
-  // Register the variations prefs with default values that must be overridden.
-  pref_registry->RegisterTimePref(variations::prefs::kVariationsSeedDate,
-                                  base::Time());
-  pref_registry->RegisterTimePref(variations::prefs::kVariationsLastFetchTime,
-                                  base::Time());
-  pref_registry->RegisterStringPref(variations::prefs::kVariationsCountry,
-                                    std::string());
-  pref_registry->RegisterStringPref(
-      variations::prefs::kVariationsCompressedSeed, std::string());
-  pref_registry->RegisterStringPref(variations::prefs::kVariationsSeedSignature,
-                                    std::string());
-  pref_registry->RegisterListPref(
-      variations::prefs::kVariationsPermanentConsistencyCountry,
-      std::make_unique<base::ListValue>());
-
-  variations::SafeSeedManager::RegisterPrefs(pref_registry.get());
-
-  pref_service_factory_.set_user_prefs(
-      base::MakeRefCounted<InMemoryPrefStore>());
-  return pref_service_factory_.Create(pref_registry.get());
+  // If DoSetUpFieldTrials failed, it might have skipped creating
+  // FeatureList. If so, create a FeatureList without field trials.
+  if (!base::FeatureList::GetInstance()) {
+    const base::CommandLine* command_line =
+        base::CommandLine::ForCurrentProcess();
+    auto feature_list = std::make_unique<base::FeatureList>();
+    feature_list->InitializeFromCommandLine(
+        command_line->GetSwitchValueASCII(switches::kEnableFeatures),
+        command_line->GetSwitchValueASCII(switches::kDisableFeatures));
+    base::FeatureList::SetInstance(std::move(feature_list));
+  }
 }
 
-void AwFieldTrialCreator::SetUpFieldTrials() {
-  AwMetricsServiceClient::LoadOrCreateClientId();
+void AwFieldTrialCreator::DoSetUpFieldTrials() {
+  // If the client ID isn't available yet, don't delay startup by creating it.
+  // Instead, variations will be disabled for this run.
+  std::string client_id;
+  if (!AwMetricsServiceClient::GetPreloadedClientId(&client_id))
+    return;
 
   DCHECK(!field_trial_list_);
-  // Set the FieldTrialList singleton.
-  field_trial_list_ =
-      std::make_unique<base::FieldTrialList>(CreateLowEntropyProvider());
-
-  std::unique_ptr<PrefService> local_state = CreateLocalState();
-
-  if (!ReadVariationsSeedDataFromFile(local_state.get()))
-    return;
+  field_trial_list_ = std::make_unique<base::FieldTrialList>(
+      CreateLowEntropyProvider(client_id));
 
   variations::UIStringOverrider ui_string_overrider;
   client_ = std::make_unique<AwVariationsServiceClient>();
   variations_field_trial_creator_ =
       std::make_unique<variations::VariationsFieldTrialCreator>(
-          local_state.get(), client_.get(), ui_string_overrider);
-
+          GetLocalState(), client_.get(), ui_string_overrider,
+          GetAndClearJavaSeed());
   variations_field_trial_creator_->OverrideVariationsPlatform(
       variations::Study::PLATFORM_ANDROID_WEBVIEW);
 
@@ -106,17 +89,28 @@
   // VariationsFieldTrialCreator::SetupFieldTrials().
   // TODO(isherman): We might want a more genuine SafeSeedManager:
   // https://crbug.com/801771
-  std::vector<std::string> variation_ids;
   std::set<std::string> unforceable_field_trials;
-  variations::SafeSeedManager ignored_safe_seed_manager(true,
-                                                        local_state.get());
-
+  variations::SafeSeedManager ignored_safe_seed_manager(true, GetLocalState());
   // Populates the FieldTrialList singleton via the static member functions.
   variations_field_trial_creator_->SetupFieldTrials(
       cc::switches::kEnableGpuBenchmarking, switches::kEnableFeatures,
       switches::kDisableFeatures, unforceable_field_trials,
-      CreateLowEntropyProvider(), std::make_unique<base::FeatureList>(),
-      &variation_ids, aw_field_trials_.get(), &ignored_safe_seed_manager);
+      std::vector<std::string>(), CreateLowEntropyProvider(client_id),
+      std::make_unique<base::FeatureList>(), aw_field_trials_.get(),
+      &ignored_safe_seed_manager);
+}
+
+PrefService* AwFieldTrialCreator::GetLocalState() {
+  if (!local_state_) {
+    scoped_refptr<PrefRegistrySimple> pref_registry =
+        base::MakeRefCounted<PrefRegistrySimple>();
+    variations::VariationsService::RegisterPrefs(pref_registry.get());
+
+    PrefServiceFactory factory;
+    factory.set_user_prefs(base::MakeRefCounted<InMemoryPrefStore>());
+    local_state_ = factory.Create(pref_registry.get());
+  }
+  return local_state_.get();
 }
 
 }  // namespace android_webview
diff --git a/android_webview/browser/aw_field_trial_creator.h b/android_webview/browser/aw_field_trial_creator.h
index 445b954..a1bd28a 100644
--- a/android_webview/browser/aw_field_trial_creator.h
+++ b/android_webview/browser/aw_field_trial_creator.h
@@ -23,14 +23,17 @@
   AwFieldTrialCreator();
   ~AwFieldTrialCreator();
 
-  // Creates the PrefService object that stores the variations prefs needed by
-  // VariationsFieldTrialCreator.
-  std::unique_ptr<PrefService> CreateLocalState();
-
   // Sets up the field trials and related initialization.
   void SetUpFieldTrials();
 
  private:
+  void DoSetUpFieldTrials();
+  PrefService* GetLocalState();
+
+  // Stores the seed. VariationsSeedStore keeps a raw pointer to this, so it
+  // must persist for the process lifetime. Not persisted accross runs.
+  std::unique_ptr<PrefService> local_state_;
+
   // A/B testing infrastructure for the entire application. empty until
   // |SetupFieldTrials()| is called.
   std::unique_ptr<base::FieldTrialList> field_trial_list_;
@@ -44,9 +47,6 @@
 
   std::unique_ptr<AwVariationsServiceClient> client_;
 
-  // Used to create a PrefService for variations prefs.
-  PrefServiceFactory pref_service_factory_;
-
   DISALLOW_COPY_AND_ASSIGN(AwFieldTrialCreator);
 };
 
diff --git a/android_webview/browser/aw_form_database_service.cc b/android_webview/browser/aw_form_database_service.cc
index b0efc43..bf5fb76c 100644
--- a/android_webview/browser/aw_form_database_service.cc
+++ b/android_webview/browser/aw_form_database_service.cc
@@ -7,7 +7,7 @@
 #include "base/bind_helpers.h"
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
-#include "base/task_scheduler/post_task.h"
+#include "base/task/post_task.h"
 #include "base/threading/thread_restrictions.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "components/autofill/core/browser/webdata/autofill_table.h"
@@ -80,8 +80,9 @@
   using awds = autofill::AutofillWebDataService;
   base::PostTask(
       FROM_HERE,
-      base::Bind(base::IgnoreResult(&awds::GetCountOfValuesContainedBetween),
-                 autofill_data_, base::Time(), base::Time::Max(), this));
+      base::BindOnce(
+          base::IgnoreResult(&awds::GetCountOfValuesContainedBetween),
+          autofill_data_, base::Time(), base::Time::Max(), this));
   {
     base::ThreadRestrictions::ScopedAllowWait wait;
     has_form_data_completion_.Wait();
diff --git a/android_webview/browser/aw_javascript_dialog_manager.cc b/android_webview/browser/aw_javascript_dialog_manager.cc
index 3e4a3be..b292468 100644
--- a/android_webview/browser/aw_javascript_dialog_manager.cc
+++ b/android_webview/browser/aw_javascript_dialog_manager.cc
@@ -8,6 +8,7 @@
 
 #include "android_webview/browser/aw_contents_client_bridge.h"
 #include "content/public/browser/javascript_dialog_manager.h"
+#include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents.h"
 
 namespace android_webview {
@@ -18,7 +19,7 @@
 
 void AwJavaScriptDialogManager::RunJavaScriptDialog(
     content::WebContents* web_contents,
-    const GURL& origin_url,
+    content::RenderFrameHost* render_frame_host,
     content::JavaScriptDialogType dialog_type,
     const base::string16& message_text,
     const base::string16& default_prompt_text,
@@ -31,8 +32,9 @@
     return;
   }
 
-  bridge->RunJavaScriptDialog(dialog_type, origin_url, message_text,
-                              default_prompt_text, std::move(callback));
+  bridge->RunJavaScriptDialog(
+      dialog_type, render_frame_host->GetLastCommittedURL(), message_text,
+      default_prompt_text, std::move(callback));
 }
 
 void AwJavaScriptDialogManager::RunBeforeUnloadDialog(
diff --git a/android_webview/browser/aw_javascript_dialog_manager.h b/android_webview/browser/aw_javascript_dialog_manager.h
index e31c967..c22258c 100644
--- a/android_webview/browser/aw_javascript_dialog_manager.h
+++ b/android_webview/browser/aw_javascript_dialog_manager.h
@@ -17,7 +17,7 @@
 
   // Overridden from content::JavaScriptDialogManager:
   void RunJavaScriptDialog(content::WebContents* web_contents,
-                           const GURL& origin_url,
+                           content::RenderFrameHost* render_frame_host,
                            content::JavaScriptDialogType dialog_type,
                            const base::string16& message_text,
                            const base::string16& default_prompt_text,
diff --git a/android_webview/browser/aw_login_delegate.cc b/android_webview/browser/aw_login_delegate.cc
index e172852..356e286 100644
--- a/android_webview/browser/aw_login_delegate.cc
+++ b/android_webview/browser/aw_login_delegate.cc
@@ -8,55 +8,29 @@
 #include "base/android/jni_android.h"
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
-#include "base/supports_user_data.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_frame_host.h"
-#include "content/public/browser/resource_dispatcher_host.h"
 #include "content/public/browser/web_contents.h"
 #include "net/base/auth.h"
-#include "net/url_request/url_request.h"
 
 using namespace base::android;
 
 using content::BrowserThread;
-using content::RenderFrameHost;
-using content::ResourceDispatcherHost;
-using content::ResourceRequestInfo;
 using content::WebContents;
 
-namespace {
-const char* kAuthAttemptsKey = "android_webview_auth_attempts";
-
-class UrlRequestAuthAttemptsData : public base::SupportsUserData::Data {
- public:
-  UrlRequestAuthAttemptsData() : auth_attempts_(0) { }
-  int auth_attempts_;
-};
-
-}  // namespace
-
 namespace android_webview {
 
-AwLoginDelegate::AwLoginDelegate(net::AuthChallengeInfo* auth_info,
-                                 net::URLRequest* request)
-    : auth_info_(auth_info), request_(request) {
-  UrlRequestAuthAttemptsData* count = static_cast<UrlRequestAuthAttemptsData*>(
-      request->GetUserData(kAuthAttemptsKey));
-
-  if (count == NULL) {
-    count = new UrlRequestAuthAttemptsData();
-    request->SetUserData(kAuthAttemptsKey, base::WrapUnique(count));
-  }
-
-  const content::ResourceRequestInfo* request_info =
-      content::ResourceRequestInfo::ForRequest(request);
-
+AwLoginDelegate::AwLoginDelegate(
+    net::AuthChallengeInfo* auth_info,
+    content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
+    bool first_auth_attempt,
+    LoginAuthRequiredCallback auth_required_callback)
+    : auth_info_(auth_info),
+      auth_required_callback_(std::move(auth_required_callback)) {
   BrowserThread::PostTask(
       BrowserThread::UI, FROM_HERE,
-      base::Bind(&AwLoginDelegate::HandleHttpAuthRequestOnUIThread, this,
-                 (count->auth_attempts_ == 0),
-                 request_info->GetWebContentsGetterForRequest()));
-  count->auth_attempts_++;
+      base::BindOnce(&AwLoginDelegate::HandleHttpAuthRequestOnUIThread, this,
+                     first_auth_attempt, web_contents_getter));
 }
 
 AwLoginDelegate::~AwLoginDelegate() {
@@ -69,14 +43,15 @@
                               const base::string16& password) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
-      base::Bind(&AwLoginDelegate::ProceedOnIOThread,
-                 this, user, password));
+                          base::BindOnce(&AwLoginDelegate::ProceedOnIOThread,
+                                         this, user, password));
 }
 
 void AwLoginDelegate::Cancel() {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
-      base::Bind(&AwLoginDelegate::CancelOnIOThread, this));
+  BrowserThread::PostTask(
+      BrowserThread::IO, FROM_HERE,
+      base::BindOnce(&AwLoginDelegate::CancelOnIOThread, this));
 }
 
 void AwLoginDelegate::HandleHttpAuthRequestOnUIThread(
@@ -96,35 +71,32 @@
 
 void AwLoginDelegate::CancelOnIOThread() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  if (request_) {
-    request_->CancelAuth();
-    ResourceDispatcherHost::Get()->ClearLoginDelegateForRequest(request_);
-    request_ = NULL;
-  }
+  if (!auth_required_callback_.is_null())
+    std::move(auth_required_callback_).Run(base::nullopt);
   DeleteAuthHandlerSoon();
 }
 
 void AwLoginDelegate::ProceedOnIOThread(const base::string16& user,
                                         const base::string16& password) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  if (request_) {
-    request_->SetAuth(net::AuthCredentials(user, password));
-    ResourceDispatcherHost::Get()->ClearLoginDelegateForRequest(request_);
-    request_ = NULL;
+  if (!auth_required_callback_.is_null()) {
+    std::move(auth_required_callback_)
+        .Run(net::AuthCredentials(user, password));
   }
   DeleteAuthHandlerSoon();
 }
 
 void AwLoginDelegate::OnRequestCancelled() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  request_ = NULL;
+  auth_required_callback_.Reset();
   DeleteAuthHandlerSoon();
 }
 
 void AwLoginDelegate::DeleteAuthHandlerSoon() {
   if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
-    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
-        base::Bind(&AwLoginDelegate::DeleteAuthHandlerSoon, this));
+    BrowserThread::PostTask(
+        BrowserThread::UI, FROM_HERE,
+        base::BindOnce(&AwLoginDelegate::DeleteAuthHandlerSoon, this));
     return;
   }
   aw_http_auth_handler_.reset();
diff --git a/android_webview/browser/aw_login_delegate.h b/android_webview/browser/aw_login_delegate.h
index cd43644..2b67cf3 100644
--- a/android_webview/browser/aw_login_delegate.h
+++ b/android_webview/browser/aw_login_delegate.h
@@ -8,29 +8,33 @@
 #include <memory>
 
 #include "android_webview/browser/aw_http_auth_handler.h"
+#include "base/callback.h"
 #include "base/memory/ref_counted.h"
+#include "base/optional.h"
 #include "base/strings/string16.h"
-#include "content/public/browser/resource_dispatcher_host_login_delegate.h"
+#include "content/public/browser/content_browser_client.h"
+#include "content/public/browser/login_delegate.h"
 #include "content/public/browser/resource_request_info.h"
 
 namespace net {
 class AuthChallengeInfo;
-class URLRequest;
 }
 
 namespace android_webview {
 
-class AwLoginDelegate :
-    public content::ResourceDispatcherHostLoginDelegate {
+class AwLoginDelegate : public content::LoginDelegate {
  public:
-  AwLoginDelegate(net::AuthChallengeInfo* auth_info,
-                  net::URLRequest* request);
+  AwLoginDelegate(
+      net::AuthChallengeInfo* auth_info,
+      content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
+      bool first_auth_attempt,
+      LoginAuthRequiredCallback auth_required_callback);
 
   virtual void Proceed(const base::string16& user,
                        const base::string16& password);
   virtual void Cancel();
 
-  // from ResourceDispatcherHostLoginDelegate
+  // content::LoginDelegate:
   void OnRequestCancelled() override;
 
  private:
@@ -46,7 +50,7 @@
 
   std::unique_ptr<AwHttpAuthHandler> aw_http_auth_handler_;
   scoped_refptr<net::AuthChallengeInfo> auth_info_;
-  net::URLRequest* request_;
+  LoginAuthRequiredCallback auth_required_callback_;
 };
 
 }  // namespace android_webview
diff --git a/android_webview/browser/aw_metrics_service_client.cc b/android_webview/browser/aw_metrics_service_client.cc
index 937d5a4..8156599 100644
--- a/android_webview/browser/aw_metrics_service_client.cc
+++ b/android_webview/browser/aw_metrics_service_client.cc
@@ -4,10 +4,16 @@
 
 #include "android_webview/browser/aw_metrics_service_client.h"
 
+#include <jni.h>
+#include <stdint.h>
+#include <vector>
+
 #include "android_webview/browser/aw_metrics_log_uploader.h"
 #include "android_webview/common/aw_switches.h"
 #include "android_webview/jni/AwMetricsServiceClient_jni.h"
 #include "base/android/build_info.h"
+#include "base/android/jni_android.h"
+#include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
 #include "base/bind.h"
 #include "base/files/file_util.h"
@@ -17,7 +23,7 @@
 #include "base/lazy_instance.h"
 #include "base/path_service.h"
 #include "base/strings/string16.h"
-#include "base/task_scheduler/post_task.h"
+#include "base/task/post_task.h"
 #include "components/metrics/call_stack_profile_metrics_provider.h"
 #include "components/metrics/enabled_state_provider.h"
 #include "components/metrics/gpu/gpu_metrics_provider.h"
@@ -29,7 +35,7 @@
 #include "components/metrics/url_constants.h"
 #include "components/metrics/version_utils.h"
 #include "components/prefs/pref_service.h"
-#include "components/version_info/channel_android.h"
+#include "components/version_info/android/channel_getter.h"
 #include "components/version_info/version_info.h"
 #include "content/public/browser/browser_thread.h"
 
@@ -41,8 +47,10 @@
 
 const int kUploadIntervalMinutes = 30;
 
-// A GUID in text form is composed of 32 hex digits and 4 hyphens.
-const size_t GUID_SIZE = 32 + 4;
+// A GUID in text form is composed of 32 hex digits and 4 hyphens. These values
+// must match those in AwMetricsServiceClient.java.
+const size_t kGuidSize = 32 + 4;
+const char* const kGuidFileName = "metrics_guid";
 
 // Client ID of the app, read and cached synchronously at startup
 base::LazyInstance<std::string>::Leaky g_client_id = LAZY_INSTANCE_INITIALIZER;
@@ -57,16 +65,8 @@
   return client_info;
 }
 
-version_info::Channel GetChannelFromPackageName() {
-  JNIEnv* env = base::android::AttachCurrentThread();
-  std::string package_name = base::android::ConvertJavaStringToUTF8(
-      env, Java_AwMetricsServiceClient_getWebViewPackageName(env));
-  // We can't determine the channel for stand-alone WebView, since it has the
-  // same package name across channels. It will always be "unknown".
-  return version_info::ChannelFromPackageName(package_name.c_str());
-}
-
-// WebView Metrics are sampled based on GUID value.
+// WebView Metrics are sampled based on GUID value. The sample rate must not
+// exceed 10%; see https://crbug.com/839646 for more info.
 // TODO(paulmiller) Sample with Finch, once we have Finch.
 bool IsInSample(const std::string& client_id) {
   // client_id comes from base::GenerateGUID(), so its value is random/uniform,
@@ -88,15 +88,28 @@
   return g_lazy_instance_.Pointer();
 }
 
+bool AwMetricsServiceClient::GetPreloadedClientId(std::string* client_id) {
+  JNIEnv* env = base::android::AttachCurrentThread();
+  base::android::ScopedJavaLocalRef<jbyteArray> client_id_java =
+      Java_AwMetricsServiceClient_getPreloadedClientId(env);
+  if (client_id_java.is_null())
+    return false;
+  std::vector<uint8_t> client_id_vector;
+  base::android::JavaByteArrayToByteVector(env, client_id_java.obj(),
+                                           &client_id_vector);
+  *client_id = std::string(client_id_vector.begin(), client_id_vector.end());
+  return true;
+}
+
 void AwMetricsServiceClient::LoadOrCreateClientId() {
   // This function should only be called once at start up.
-  DCHECK_NE(g_client_id.Get().length(), GUID_SIZE);
+  DCHECK_NE(g_client_id.Get().length(), kGuidSize);
 
   // UMA uses randomly-generated GUIDs (globally unique identifiers) to
   // anonymously identify logs. Every WebView-using app on every device
   // is given a GUID, stored in this file in the app's data directory.
   base::FilePath user_data_dir;
-  if (!PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) {
+  if (!base::PathService::Get(base::DIR_ANDROID_APP_DATA, &user_data_dir)) {
     LOG(ERROR) << "Failed to get app data directory for Android WebView";
 
     // Generate a 1-time GUID so metrics can still be collected
@@ -105,11 +118,12 @@
   }
 
   const base::FilePath guid_file_path =
-      user_data_dir.Append(FILE_PATH_LITERAL("metrics_guid"));
+      user_data_dir.Append(FILE_PATH_LITERAL(kGuidFileName));
 
-  // Try to read an existing GUID.
-  if (base::ReadFileToStringWithMaxSize(guid_file_path, &g_client_id.Get(),
-                                        GUID_SIZE)) {
+  // Try to get an existing GUID.
+  if (GetPreloadedClientId(&g_client_id.Get()) ||
+      base::ReadFileToStringWithMaxSize(guid_file_path, &g_client_id.Get(),
+                                        kGuidSize)) {
     if (base::IsValidGUID(g_client_id.Get()))
       return;
     LOG(ERROR) << "Overwriting invalid GUID";
@@ -128,7 +142,7 @@
 std::string AwMetricsServiceClient::GetClientId() {
   // This function should only be called if LoadOrCreateClientId() was
   // previously called.
-  DCHECK_EQ(g_client_id.Get().length(), GUID_SIZE);
+  DCHECK_EQ(g_client_id.Get().length(), kGuidSize);
 
   return g_client_id.Get();
 }
@@ -142,33 +156,23 @@
   DCHECK(request_context_ == nullptr);
   pref_service_ = pref_service;
   request_context_ = request_context;
-  channel_ = GetChannelFromPackageName();
 
-  // If variations are enabled for WebView the GUID will already have been read
-  // at startup
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kEnableWebViewVariations)) {
-    InitializeWithClientId();
-  } else {
-    base::PostTaskWithTraitsAndReply(
-        FROM_HERE, {base::MayBlock()},
-        base::Bind(&AwMetricsServiceClient::LoadOrCreateClientId),
-        base::Bind(&AwMetricsServiceClient::InitializeWithClientId,
-                   base::Unretained(this)));
-  }
+  base::PostTaskWithTraitsAndReply(
+      FROM_HERE, {base::MayBlock()},
+      base::BindOnce(&AwMetricsServiceClient::LoadOrCreateClientId),
+      base::BindOnce(&AwMetricsServiceClient::InitializeWithClientId,
+                     base::Unretained(this)));
 }
 
 void AwMetricsServiceClient::InitializeWithClientId() {
-  // The guid must have already been initialized at this point, either
-  // synchronously or asynchronously depending on the kEnableWebViewFinch flag
-  DCHECK_EQ(g_client_id.Get().length(), GUID_SIZE);
+  DCHECK_EQ(g_client_id.Get().length(), kGuidSize);  // Must have client ID
   pref_service_->SetString(metrics::prefs::kMetricsClientID, g_client_id.Get());
-
   in_sample_ = IsInSample(g_client_id.Get());
 
   metrics_state_manager_ = metrics::MetricsStateManager::Create(
-      pref_service_, this, base::string16(), base::Bind(&StoreClientInfo),
-      base::Bind(&LoadClientInfo));
+      pref_service_, this, base::string16(),
+      base::BindRepeating(&StoreClientInfo),
+      base::BindRepeating(&LoadClientInfo));
 
   metrics_service_.reset(new ::metrics::MetricsService(
       metrics_state_manager_.get(), this, pref_service_));
@@ -240,7 +244,7 @@
 }
 
 metrics::SystemProfileProto::Channel AwMetricsServiceClient::GetChannel() {
-  return metrics::AsProtobufChannel(channel_);
+  return metrics::AsProtobufChannel(version_info::GetChannel());
 }
 
 std::string AwMetricsServiceClient::GetVersionString() {
@@ -275,7 +279,6 @@
 AwMetricsServiceClient::AwMetricsServiceClient()
     : pref_service_(nullptr),
       request_context_(nullptr),
-      channel_(version_info::Channel::UNKNOWN),
       consent_(false),
       in_sample_(false) {}
 
diff --git a/android_webview/browser/aw_metrics_service_client.h b/android_webview/browser/aw_metrics_service_client.h
index c2262da..5880206 100644
--- a/android_webview/browser/aw_metrics_service_client.h
+++ b/android_webview/browser/aw_metrics_service_client.h
@@ -44,6 +44,10 @@
  public:
   static AwMetricsServiceClient* GetInstance();
 
+  // If the client ID was pre-loaded on the Java side, store it in "client_id"
+  // and return true; otherwise, return false.
+  static bool GetPreloadedClientId(std::string* client_id);
+
   // Retrieve the client ID or generate one if none exists.
   static void LoadOrCreateClientId();
 
@@ -90,7 +94,6 @@
   std::unique_ptr<metrics::MetricsService> metrics_service_;
   PrefService* pref_service_;
   net::URLRequestContextGetter* request_context_;
-  version_info::Channel channel_;
   bool consent_;    // = (user has consented) && !(app has opted out)
   bool in_sample_;  // Is this client enabled by sampling?
 
diff --git a/android_webview/browser/aw_permission_manager.cc b/android_webview/browser/aw_permission_manager.cc
index ad3d1f1..249176a 100644
--- a/android_webview/browser/aw_permission_manager.cc
+++ b/android_webview/browser/aw_permission_manager.cc
@@ -12,6 +12,7 @@
 #include "base/callback.h"
 #include "base/containers/hash_tables.h"
 #include "base/logging.h"
+#include "content/public/browser/permission_controller.h"
 #include "content/public/browser/permission_type.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_process_host.h"
@@ -21,7 +22,7 @@
 using content::PermissionType;
 
 using RequestPermissionsCallback =
-    base::Callback<void(const std::vector<PermissionStatus>&)>;
+    base::OnceCallback<void(const std::vector<PermissionStatus>&)>;
 
 namespace android_webview {
 
@@ -154,13 +155,13 @@
                  GURL embedding_origin,
                  int render_process_id,
                  int render_frame_id,
-                 const RequestPermissionsCallback callback)
+                 RequestPermissionsCallback callback)
       : permissions(permissions),
         requesting_origin(requesting_origin),
         embedding_origin(embedding_origin),
         render_process_id(render_process_id),
         render_frame_id(render_frame_id),
-        callback(callback),
+        callback(std::move(callback)),
         results(permissions.size(), PermissionStatus::DENIED),
         cancelled_(false) {
     for (size_t i = 0; i < permissions.size(); ++i)
@@ -220,10 +221,7 @@
 };
 
 AwPermissionManager::AwPermissionManager()
-  : content::PermissionManager(),
-    result_cache_(new LastRequestResultCache),
-    weak_ptr_factory_(this) {
-}
+    : result_cache_(new LastRequestResultCache), weak_ptr_factory_(this) {}
 
 AwPermissionManager::~AwPermissionManager() {
   CancelPermissionRequests();
@@ -250,7 +248,7 @@
         callback) {
   if (permissions.empty()) {
     callback.Run(std::vector<PermissionStatus>());
-    return kNoPendingOperation;
+    return content::PermissionController::kNoPendingOperation;
   }
 
   const GURL& embedding_origin = LastCommittedOrigin(render_frame_host);
@@ -302,37 +300,42 @@
       case PermissionType::GEOLOCATION:
         delegate->RequestGeolocationPermission(
             pending_request_raw->requesting_origin,
-            base::Bind(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(),
-                       request_id, permissions[i]));
+            base::BindOnce(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(),
+                           request_id, permissions[i]));
         break;
       case PermissionType::PROTECTED_MEDIA_IDENTIFIER:
         delegate->RequestProtectedMediaIdentifierPermission(
             pending_request_raw->requesting_origin,
-            base::Bind(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(),
-                       request_id, permissions[i]));
+            base::BindOnce(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(),
+                           request_id, permissions[i]));
         break;
       case PermissionType::MIDI_SYSEX:
         delegate->RequestMIDISysexPermission(
             pending_request_raw->requesting_origin,
-            base::Bind(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(),
-                       request_id, permissions[i]));
+            base::BindOnce(&OnRequestResponse, weak_ptr_factory_.GetWeakPtr(),
+                           request_id, permissions[i]));
         break;
       case PermissionType::AUDIO_CAPTURE:
       case PermissionType::VIDEO_CAPTURE:
       case PermissionType::NOTIFICATIONS:
       case PermissionType::DURABLE_STORAGE:
       case PermissionType::BACKGROUND_SYNC:
-      case PermissionType::SENSORS:
       case PermissionType::FLASH:
       case PermissionType::ACCESSIBILITY_EVENTS:
       case PermissionType::CLIPBOARD_READ:
       case PermissionType::CLIPBOARD_WRITE:
+      case PermissionType::PAYMENT_HANDLER:
         NOTIMPLEMENTED() << "RequestPermissions is not implemented for "
                          << static_cast<int>(permissions[i]);
         pending_request_raw->SetPermissionStatus(permissions[i],
                                                  PermissionStatus::DENIED);
         break;
       case PermissionType::MIDI:
+      case PermissionType::SENSORS:
+        // PermissionType::SENSORS requests are always granted so that access
+        // to device motion and device orientation data (and underlying
+        // sensors) works in the WebView. SensorProviderImpl::GetSensor()
+        // filters requests for other types of sensors.
         pending_request_raw->SetPermissionStatus(permissions[i],
                                                  PermissionStatus::GRANTED);
         break;
@@ -347,7 +350,7 @@
   // If delegate resolve the permission synchronously, all requests could be
   // already resolved here.
   if (!pending_requests_.Lookup(request_id))
-    return kNoPendingOperation;
+    return content::PermissionController::kNoPendingOperation;
 
   // If requests are resolved without calling delegate functions, e.g.
   // PermissionType::MIDI is permitted within the previous for-loop, all
@@ -357,7 +360,7 @@
     std::vector<PermissionStatus> results = pending_request_raw->results;
     pending_requests_.Remove(request_id);
     callback.Run(results);
-    return kNoPendingOperation;
+    return content::PermissionController::kNoPendingOperation;
   }
 
   return request_id;
@@ -383,8 +386,8 @@
                                     pending_request->embedding_origin, status);
 
   std::vector<int> complete_request_ids;
-  std::vector<std::pair<const RequestPermissionsCallback,
-                        std::vector<PermissionStatus>>>
+  std::vector<
+      std::pair<RequestPermissionsCallback, std::vector<PermissionStatus>>>
       complete_request_pairs;
   for (PendingRequestsMap::Iterator<PendingRequest> it(
            &manager->pending_requests_);
@@ -398,15 +401,16 @@
     if (it.GetCurrentValue()->IsCompleted()) {
       complete_request_ids.push_back(it.GetCurrentKey());
       if (!it.GetCurrentValue()->IsCancelled()) {
-        complete_request_pairs.push_back(std::make_pair(
-            it.GetCurrentValue()->callback, it.GetCurrentValue()->results));
+        complete_request_pairs.emplace_back(
+            std::move(it.GetCurrentValue()->callback),
+            std::move(it.GetCurrentValue()->results));
       }
     }
   }
   for (auto id : complete_request_ids)
     manager->pending_requests_.Remove(id);
-  for (auto pair : complete_request_pairs)
-    pair.first.Run(pair.second);
+  for (auto& pair : complete_request_pairs)
+    std::move(pair.first).Run(pair.second);
 }
 
 void AwPermissionManager::ResetPermission(PermissionType permission,
@@ -431,12 +435,23 @@
   return PermissionStatus::DENIED;
 }
 
+PermissionStatus AwPermissionManager::GetPermissionStatusForFrame(
+    PermissionType permission,
+    content::RenderFrameHost* render_frame_host,
+    const GURL& requesting_origin) {
+  return GetPermissionStatus(
+      permission, requesting_origin,
+      content::WebContents::FromRenderFrameHost(render_frame_host)
+          ->GetLastCommittedURL()
+          .GetOrigin());
+}
+
 int AwPermissionManager::SubscribePermissionStatusChange(
     PermissionType permission,
+    content::RenderFrameHost* render_frame_host,
     const GURL& requesting_origin,
-    const GURL& embedding_origin,
     const base::Callback<void(PermissionStatus)>& callback) {
-  return kNoPendingOperation;
+  return content::PermissionController::kNoPendingOperation;
 }
 
 void AwPermissionManager::UnsubscribePermissionStatusChange(
@@ -496,15 +511,16 @@
       case PermissionType::AUDIO_CAPTURE:
       case PermissionType::VIDEO_CAPTURE:
       case PermissionType::BACKGROUND_SYNC:
-      case PermissionType::SENSORS:
       case PermissionType::FLASH:
       case PermissionType::ACCESSIBILITY_EVENTS:
       case PermissionType::CLIPBOARD_READ:
       case PermissionType::CLIPBOARD_WRITE:
+      case PermissionType::PAYMENT_HANDLER:
         NOTIMPLEMENTED() << "CancelPermission not implemented for "
                          << static_cast<int>(permission);
         break;
       case PermissionType::MIDI:
+      case PermissionType::SENSORS:
         // There is nothing to cancel so this is simply ignored.
         break;
       case PermissionType::NUM:
diff --git a/android_webview/browser/aw_permission_manager.h b/android_webview/browser/aw_permission_manager.h
index 3d74862..d6ab44a 100644
--- a/android_webview/browser/aw_permission_manager.h
+++ b/android_webview/browser/aw_permission_manager.h
@@ -11,19 +11,19 @@
 #include "base/containers/id_map.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "content/public/browser/permission_manager.h"
+#include "content/public/browser/permission_controller_delegate.h"
 
 namespace android_webview {
 
 class AwBrowserPermissionRequestDelegate;
 class LastRequestResultCache;
 
-class AwPermissionManager : public content::PermissionManager {
+class AwPermissionManager : public content::PermissionControllerDelegate {
  public:
   AwPermissionManager();
   ~AwPermissionManager() override;
 
-  // PermissionManager implementation.
+  // PermissionControllerDelegate implementation.
   int RequestPermission(
       content::PermissionType permission,
       content::RenderFrameHost* render_frame_host,
@@ -46,10 +46,14 @@
       content::PermissionType permission,
       const GURL& requesting_origin,
       const GURL& embedding_origin) override;
+  blink::mojom::PermissionStatus GetPermissionStatusForFrame(
+      content::PermissionType permission,
+      content::RenderFrameHost* render_frame_host,
+      const GURL& requesting_origin) override;
   int SubscribePermissionStatusChange(
       content::PermissionType permission,
+      content::RenderFrameHost* render_frame_host,
       const GURL& requesting_origin,
-      const GURL& embedding_origin,
       const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
       override;
   void UnsubscribePermissionStatusChange(int subscription_id) override;
diff --git a/android_webview/browser/aw_permission_manager_unittest.cc b/android_webview/browser/aw_permission_manager_unittest.cc
index 41bc18a..ad058f8 100644
--- a/android_webview/browser/aw_permission_manager_unittest.cc
+++ b/android_webview/browser/aw_permission_manager_unittest.cc
@@ -10,7 +10,7 @@
 #include "android_webview/browser/aw_browser_permission_request_delegate.h"
 #include "base/bind.h"
 #include "base/bind_helpers.h"
-#include "content/public/browser/permission_manager.h"
+#include "content/public/browser/permission_controller.h"
 #include "content/public/browser/permission_type.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
@@ -39,9 +39,9 @@
     for (auto it = request_.begin(); it != request_.end(); ++it) {
       if ((*it)->type != type || (*it)->origin != origin)
         continue;
-      const base::Callback<void(bool)> callback = (*it)->callback;
+      base::OnceCallback<void(bool)> callback = std::move((*it)->callback);
       request_.erase(it);
-      callback.Run(grant);
+      std::move(callback).Run(grant);
       return;
     }
     response_.push_back(std::make_unique<Response>(origin, type, grant));
@@ -50,15 +50,15 @@
   // AwBrowserPermissionRequestDelegate:
   void RequestProtectedMediaIdentifierPermission(
       const GURL& origin,
-      const base::Callback<void(bool)>& callback) override {}
+      base::OnceCallback<void(bool)> callback) override {}
 
   void CancelProtectedMediaIdentifierPermissionRequests(
       const GURL& origin) override {}
 
   void RequestGeolocationPermission(
       const GURL& origin,
-      const base::Callback<void(bool)>& callback) override {
-    RequestPermission(origin, PermissionType::GEOLOCATION, callback);
+      base::OnceCallback<void(bool)> callback) override {
+    RequestPermission(origin, PermissionType::GEOLOCATION, std::move(callback));
   }
 
   void CancelGeolocationPermissionRequests(const GURL& origin) override {
@@ -67,8 +67,8 @@
 
   void RequestMIDISysexPermission(
       const GURL& origin,
-      const base::Callback<void(bool)>& callback) override {
-    RequestPermission(origin, PermissionType::MIDI_SYSEX, callback);
+      base::OnceCallback<void(bool)> callback) override {
+    RequestPermission(origin, PermissionType::MIDI_SYSEX, std::move(callback));
   }
 
   void CancelMIDISysexPermissionRequests(const GURL& origin) override {
@@ -78,16 +78,17 @@
  private:
   void RequestPermission(const GURL& origin,
                          PermissionType type,
-                         const base::Callback<void(bool)>& callback) {
+                         base::OnceCallback<void(bool)> callback) {
     for (auto it = response_.begin(); it != response_.end(); ++it) {
       if ((*it)->type != type || (*it)->origin != origin)
         continue;
       bool grant = (*it)->grant;
       response_.erase(it);
-      callback.Run(grant);
+      std::move(callback).Run(grant);
       return;
     }
-    request_.push_back(std::make_unique<Request>(origin, type, callback));
+    request_.push_back(
+        std::make_unique<Request>(origin, type, std::move(callback)));
   }
 
   void CancelPermission(const GURL& origin, PermissionType type) {
@@ -104,12 +105,12 @@
   struct Request {
     GURL origin;
     PermissionType type;
-    base::Callback<void(bool)> callback;
+    base::OnceCallback<void(bool)> callback;
 
     Request(const GURL& origin,
             PermissionType type,
-            const base::Callback<void(bool)>& callback)
-        : origin(origin), type(type), callback(callback) {}
+            base::OnceCallback<void(bool)> callback)
+        : origin(origin), type(type), callback(std::move(callback)) {}
   };
 
   struct Response {
diff --git a/android_webview/browser/aw_print_manager.cc b/android_webview/browser/aw_print_manager.cc
index 924193f3..221f47471 100644
--- a/android_webview/browser/aw_print_manager.cc
+++ b/android_webview/browser/aw_print_manager.cc
@@ -10,8 +10,6 @@
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_view_host.h"
 
-DEFINE_WEB_CONTENTS_USER_DATA_KEY(android_webview::AwPrintManager);
-
 namespace android_webview {
 
 struct AwPrintManager::FrameDispatchHelper {
@@ -35,22 +33,20 @@
     content::WebContents* contents,
     const printing::PrintSettings& settings,
     const base::FileDescriptor& file_descriptor,
-    const PrintManager::PdfWritingDoneCallback& callback) {
-  AwPrintManager* print_manager =
-      new AwPrintManager(contents, settings, file_descriptor, callback);
+    PrintManager::PdfWritingDoneCallback callback) {
+  AwPrintManager* print_manager = new AwPrintManager(
+      contents, settings, file_descriptor, std::move(callback));
   contents->SetUserData(UserDataKey(), base::WrapUnique(print_manager));
   return print_manager;
 }
 
-AwPrintManager::AwPrintManager(
-    content::WebContents* contents,
-    const printing::PrintSettings& settings,
-    const base::FileDescriptor& file_descriptor,
-    const PdfWritingDoneCallback& callback)
-    : PrintManager(contents),
-      settings_(settings) {
+AwPrintManager::AwPrintManager(content::WebContents* contents,
+                               const printing::PrintSettings& settings,
+                               const base::FileDescriptor& file_descriptor,
+                               PdfWritingDoneCallback callback)
+    : PrintManager(contents), settings_(settings) {
   set_file_descriptor(file_descriptor);
-  pdf_writing_done_callback_ = callback;
+  pdf_writing_done_callback_ = std::move(callback);
   cookie_ = 1;
 }
 
diff --git a/android_webview/browser/aw_print_manager.h b/android_webview/browser/aw_print_manager.h
index 12e4f19..b7bfb6f 100644
--- a/android_webview/browser/aw_print_manager.h
+++ b/android_webview/browser/aw_print_manager.h
@@ -22,7 +22,7 @@
       content::WebContents* contents,
       const printing::PrintSettings& settings,
       const base::FileDescriptor& file_descriptor,
-      const PdfWritingDoneCallback& callback);
+      PdfWritingDoneCallback callback);
 
   ~AwPrintManager() override;
 
@@ -34,7 +34,7 @@
   AwPrintManager(content::WebContents* contents,
                  const printing::PrintSettings& settings,
                  const base::FileDescriptor& file_descriptor,
-                 const PdfWritingDoneCallback& callback);
+                 PdfWritingDoneCallback callback);
 
   // printing::PrintManager:
   bool OnMessageReceived(const IPC::Message& message,
diff --git a/android_webview/browser/aw_printing_message_filter.cc b/android_webview/browser/aw_printing_message_filter.cc
index 91fe96c..0ba3d4f 100644
--- a/android_webview/browser/aw_printing_message_filter.cc
+++ b/android_webview/browser/aw_printing_message_filter.cc
@@ -6,7 +6,6 @@
 
 #include "android_webview/browser/aw_print_manager.h"
 #include "base/file_descriptor_posix.h"
-#include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents.h"
 
diff --git a/android_webview/browser/aw_printing_message_filter.h b/android_webview/browser/aw_printing_message_filter.h
index 338b985..236475c 100644
--- a/android_webview/browser/aw_printing_message_filter.h
+++ b/android_webview/browser/aw_printing_message_filter.h
@@ -7,6 +7,7 @@
 
 #include "base/macros.h"
 #include "content/public/browser/browser_message_filter.h"
+#include "content/public/browser/browser_thread.h"
 
 namespace base {
 struct FileDescriptor;
diff --git a/android_webview/browser/aw_quota_manager_bridge.cc b/android_webview/browser/aw_quota_manager_bridge.cc
index b10a864..56737fc 100644
--- a/android_webview/browser/aw_quota_manager_bridge.cc
+++ b/android_webview/browser/aw_quota_manager_bridge.cc
@@ -10,13 +10,14 @@
 #include "android_webview/browser/aw_content_browser_client.h"
 #include "base/android/jni_array.h"
 #include "base/android/jni_string.h"
+#include "base/memory/scoped_refptr.h"
 #include "base/synchronization/waitable_event.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/storage_partition.h"
 #include "content/public/common/content_client.h"
 #include "jni/AwQuotaManagerBridge_jni.h"
 #include "storage/browser/quota/quota_manager.h"
-#include "third_party/WebKit/common/quota/quota_types.mojom.h"
+#include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 #include "url/gurl.h"
 
 using base::android::AttachCurrentThread;
@@ -37,7 +38,7 @@
 // are destroyed at the end of DoneOnUIThread.
 class GetOriginsTask : public base::RefCountedThreadSafe<GetOriginsTask> {
  public:
-  GetOriginsTask(const AwQuotaManagerBridge::GetOriginsCallback& callback,
+  GetOriginsTask(AwQuotaManagerBridge::GetOriginsCallback callback,
                  QuotaManager* quota_manager);
 
   void Run();
@@ -71,9 +72,9 @@
 };
 
 GetOriginsTask::GetOriginsTask(
-    const AwQuotaManagerBridge::GetOriginsCallback& callback,
+    AwQuotaManagerBridge::GetOriginsCallback callback,
     QuotaManager* quota_manager)
-    : ui_callback_(callback), quota_manager_(quota_manager) {
+    : ui_callback_(std::move(callback)), quota_manager_(quota_manager) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 }
 
@@ -83,10 +84,10 @@
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   BrowserThread::PostTask(
       BrowserThread::IO, FROM_HERE,
-      base::Bind(&QuotaManager::GetOriginsModifiedSince, quota_manager_,
-                 blink::mojom::StorageType::kTemporary,
-                 base::Time() /* Since beginning of time. */,
-                 base::Bind(&GetOriginsTask::OnOriginsObtained, this)));
+      base::BindOnce(&QuotaManager::GetOriginsModifiedSince, quota_manager_,
+                     blink::mojom::StorageType::kTemporary,
+                     base::Time() /* Since beginning of time. */,
+                     base::BindOnce(&GetOriginsTask::OnOriginsObtained, this)));
 }
 
 void GetOriginsTask::OnOriginsObtained(const std::set<GURL>& origins,
@@ -99,7 +100,8 @@
        origin != origins.end(); ++origin) {
     quota_manager_->GetUsageAndQuota(
         *origin, type,
-        base::Bind(&GetOriginsTask::OnUsageAndQuotaObtained, this, *origin));
+        base::BindOnce(&GetOriginsTask::OnUsageAndQuotaObtained, this,
+                       *origin));
   }
 
   CheckDone();
@@ -124,8 +126,9 @@
 void GetOriginsTask::CheckDone() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (num_callbacks_received_ == num_callbacks_to_wait_) {
-    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
-                            base::Bind(&GetOriginsTask::DoneOnUIThread, this));
+    BrowserThread::PostTask(
+        BrowserThread::UI, FROM_HERE,
+        base::BindOnce(&GetOriginsTask::DoneOnUIThread, this));
   } else if (num_callbacks_received_ > num_callbacks_to_wait_) {
     NOTREACHED();
   }
@@ -134,14 +137,14 @@
 // This method is to avoid copying the 3 vector arguments into a bound callback.
 void GetOriginsTask::DoneOnUIThread() {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  ui_callback_.Run(origin_, usage_, quota_);
+  std::move(ui_callback_).Run(origin_, usage_, quota_);
 }
 
-void RunOnUIThread(const base::Closure& task) {
+void RunOnUIThread(base::OnceClosure task) {
   if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
-    task.Run();
+    std::move(task).Run();
   } else {
-    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, task);
+    BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, std::move(task));
   }
 }
 
@@ -197,7 +200,7 @@
 void AwQuotaManagerBridge::DeleteAllData(JNIEnv* env,
                                          const JavaParamRef<jobject>& object) {
   RunOnUIThread(
-      base::Bind(&AwQuotaManagerBridge::DeleteAllDataOnUiThread, this));
+      base::BindOnce(&AwQuotaManagerBridge::DeleteAllDataOnUiThread, this));
 }
 
 void AwQuotaManagerBridge::DeleteAllDataOnUiThread() {
@@ -211,7 +214,7 @@
           StoragePartition::REMOVE_DATA_MASK_WEBSQL,
       StoragePartition::QUOTA_MANAGED_STORAGE_MASK_TEMPORARY, GURL(),
       StoragePartition::OriginMatcherFunction(), base::Time(),
-      base::Time::Max(), base::Bind(&base::DoNothing));
+      base::Time::Max(), base::DoNothing());
 }
 
 void AwQuotaManagerBridge::DeleteOrigin(JNIEnv* env,
@@ -219,8 +222,8 @@
                                         const JavaParamRef<jstring>& origin) {
   base::string16 origin_string(
       base::android::ConvertJavaStringToUTF16(env, origin));
-  RunOnUIThread(base::Bind(&AwQuotaManagerBridge::DeleteOriginOnUiThread, this,
-                           origin_string));
+  RunOnUIThread(base::BindOnce(&AwQuotaManagerBridge::DeleteOriginOnUiThread,
+                               this, origin_string));
 }
 
 void AwQuotaManagerBridge::DeleteOriginOnUiThread(
@@ -239,18 +242,19 @@
 void AwQuotaManagerBridge::GetOrigins(JNIEnv* env,
                                       const JavaParamRef<jobject>& object,
                                       jint callback_id) {
-  RunOnUIThread(base::Bind(&AwQuotaManagerBridge::GetOriginsOnUiThread, this,
-                           callback_id));
+  RunOnUIThread(base::BindOnce(&AwQuotaManagerBridge::GetOriginsOnUiThread,
+                               this, callback_id));
 }
 
 void AwQuotaManagerBridge::GetOriginsOnUiThread(jint callback_id) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
-  const GetOriginsCallback ui_callback =
-      base::Bind(&AwQuotaManagerBridge::GetOriginsCallbackImpl,
-                 weak_factory_.GetWeakPtr(), callback_id);
-
-  (new GetOriginsTask(ui_callback, GetQuotaManager()))->Run();
+  GetOriginsCallback ui_callback =
+      base::BindOnce(&AwQuotaManagerBridge::GetOriginsCallbackImpl,
+                     weak_factory_.GetWeakPtr(), callback_id);
+  base::MakeRefCounted<GetOriginsTask>(std::move(ui_callback),
+                                       GetQuotaManager())
+      ->Run();
 }
 
 void AwQuotaManagerBridge::GetOriginsCallbackImpl(
@@ -273,7 +277,7 @@
 namespace {
 
 void OnUsageAndQuotaObtained(
-    const AwQuotaManagerBridge::QuotaUsageCallback& ui_callback,
+    AwQuotaManagerBridge::QuotaUsageCallback ui_callback,
     blink::mojom::QuotaStatusCode status_code,
     int64_t usage,
     int64_t quota) {
@@ -283,7 +287,7 @@
     quota = 0;
   }
   BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
-                          base::Bind(ui_callback, usage, quota));
+                          base::BindOnce(std::move(ui_callback), usage, quota));
 }
 
 }  // namespace
@@ -297,8 +301,8 @@
   base::string16 origin_string(
       base::android::ConvertJavaStringToUTF16(env, origin));
   RunOnUIThread(
-      base::Bind(&AwQuotaManagerBridge::GetUsageAndQuotaForOriginOnUiThread,
-                 this, origin_string, callback_id, is_quota));
+      base::BindOnce(&AwQuotaManagerBridge::GetUsageAndQuotaForOriginOnUiThread,
+                     this, origin_string, callback_id, is_quota));
 }
 
 void AwQuotaManagerBridge::GetUsageAndQuotaForOriginOnUiThread(
@@ -306,15 +310,16 @@
     jint callback_id,
     bool is_quota) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  const QuotaUsageCallback ui_callback =
-      base::Bind(&AwQuotaManagerBridge::QuotaUsageCallbackImpl,
-                 weak_factory_.GetWeakPtr(), callback_id, is_quota);
+  QuotaUsageCallback ui_callback =
+      base::BindOnce(&AwQuotaManagerBridge::QuotaUsageCallbackImpl,
+                     weak_factory_.GetWeakPtr(), callback_id, is_quota);
 
   BrowserThread::PostTask(
       BrowserThread::IO, FROM_HERE,
-      base::Bind(&QuotaManager::GetUsageAndQuota, GetQuotaManager(),
-                 GURL(origin), blink::mojom::StorageType::kTemporary,
-                 base::Bind(&OnUsageAndQuotaObtained, ui_callback)));
+      base::BindOnce(
+          &QuotaManager::GetUsageAndQuota, GetQuotaManager(), GURL(origin),
+          blink::mojom::StorageType::kTemporary,
+          base::BindOnce(&OnUsageAndQuotaObtained, std::move(ui_callback))));
 }
 
 void AwQuotaManagerBridge::QuotaUsageCallbackImpl(int jcallback_id,
diff --git a/android_webview/browser/aw_quota_manager_bridge.h b/android_webview/browser/aw_quota_manager_bridge.h
index 2df4e46..b65f4171 100644
--- a/android_webview/browser/aw_quota_manager_bridge.h
+++ b/android_webview/browser/aw_quota_manager_bridge.h
@@ -52,12 +52,12 @@
       jint callback_id,
       bool is_quota);
 
-  typedef base::Callback<void(const std::vector<std::string>& /* origin */,
+  using GetOriginsCallback =
+      base::OnceCallback<void(const std::vector<std::string>& /* origin */,
                               const std::vector<int64_t>& /* usaoge */,
-                              const std::vector<int64_t>& /* quota */)>
-      GetOriginsCallback;
-  typedef base::Callback<void(int64_t /* usage */, int64_t /* quota */)>
-      QuotaUsageCallback;
+                              const std::vector<int64_t>& /* quota */)>;
+  using QuotaUsageCallback =
+      base::OnceCallback<void(int64_t /* usage */, int64_t /* quota */)>;
 
  private:
   friend class base::RefCountedThreadSafe<AwQuotaManagerBridge>;
diff --git a/android_webview/browser/aw_render_process.cc b/android_webview/browser/aw_render_process.cc
new file mode 100644
index 0000000..7e1a25e
--- /dev/null
+++ b/android_webview/browser/aw_render_process.cc
@@ -0,0 +1,102 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "android_webview/browser/aw_render_process.h"
+
+#include "base/android/jni_android.h"
+#include "base/android/scoped_java_ref.h"
+
+#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/render_process_host.h"
+
+#include "jni/AwRenderProcess_jni.h"
+
+using base::android::AttachCurrentThread;
+using content::BrowserThread;
+using content::ChildProcessTerminationInfo;
+using content::RenderProcessHost;
+
+namespace android_webview {
+
+const void* const kAwRenderProcessKey = &kAwRenderProcessKey;
+
+// static
+AwRenderProcess* AwRenderProcess::GetInstanceForRenderProcessHost(
+    RenderProcessHost* host) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+  AwRenderProcess* render_process =
+      static_cast<AwRenderProcess*>(host->GetUserData(kAwRenderProcessKey));
+  if (!render_process) {
+    std::unique_ptr<AwRenderProcess> created_render_process =
+        std::make_unique<AwRenderProcess>(host);
+    render_process = created_render_process.get();
+    host->SetUserData(kAwRenderProcessKey, std::move(created_render_process));
+  }
+  return render_process;
+}
+
+AwRenderProcess::AwRenderProcess(RenderProcessHost* render_process_host)
+    : render_process_host_(render_process_host), weak_factory_(this) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+  java_obj_.Reset(Java_AwRenderProcess_create(AttachCurrentThread()));
+  CHECK(!java_obj_.is_null());
+  if (render_process_host_->IsReady()) {
+    Ready();
+  }
+  render_process_host->AddObserver(this);
+}
+
+AwRenderProcess::~AwRenderProcess() {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+  Java_AwRenderProcess_setNative(AttachCurrentThread(), java_obj_, 0);
+  java_obj_.Reset();
+}
+
+void AwRenderProcess::Ready() {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+  Java_AwRenderProcess_setNative(AttachCurrentThread(), java_obj_,
+                                 reinterpret_cast<jlong>(this));
+}
+
+void AwRenderProcess::Cleanup() {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+  render_process_host_->RemoveObserver(this);
+  render_process_host_->RemoveUserData(kAwRenderProcessKey);
+  // |this| is now deleted.
+}
+
+bool AwRenderProcess::TerminateChildProcess(
+    JNIEnv* env,
+    const base::android::JavaParamRef<jobject>& obj) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+  return render_process_host_->Shutdown(0);
+}
+
+base::android::ScopedJavaLocalRef<jobject> AwRenderProcess::GetJavaObject() {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+
+  return base::android::ScopedJavaLocalRef<jobject>(java_obj_);
+}
+
+void AwRenderProcess::RenderProcessReady(RenderProcessHost* host) {
+  DCHECK(host == render_process_host_);
+
+  Ready();
+}
+
+void AwRenderProcess::RenderProcessExited(
+    RenderProcessHost* host,
+    const ChildProcessTerminationInfo& info) {
+  DCHECK(host == render_process_host_);
+
+  Cleanup();
+}
+
+}  // namespace android_webview
diff --git a/android_webview/browser/aw_render_process.h b/android_webview/browser/aw_render_process.h
new file mode 100644
index 0000000..f05c94c
--- /dev/null
+++ b/android_webview/browser/aw_render_process.h
@@ -0,0 +1,51 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ANDROID_WEBVIEW_BROWSER_AW_RENDER_PROCESS_H_
+#define ANDROID_WEBVIEW_BROWSER_AW_RENDER_PROCESS_H_
+
+#include "base/android/scoped_java_ref.h"
+#include "base/memory/weak_ptr.h"
+#include "base/supports_user_data.h"
+
+#include "content/public/browser/render_process_host_observer.h"
+
+namespace android_webview {
+
+class AwRenderProcess : public content::RenderProcessHostObserver,
+                        public base::SupportsUserData::Data {
+ public:
+  static AwRenderProcess* GetInstanceForRenderProcessHost(
+      content::RenderProcessHost* host);
+
+  base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
+
+  bool TerminateChildProcess(JNIEnv* env,
+                             const base::android::JavaParamRef<jobject>& obj);
+
+  explicit AwRenderProcess(content::RenderProcessHost* render_process_host);
+  ~AwRenderProcess() override;
+
+ private:
+  void Ready();
+  void Cleanup();
+
+  // content::RenderProcessHostObserver implementation
+  void RenderProcessReady(content::RenderProcessHost* host) override;
+
+  void RenderProcessExited(
+      content::RenderProcessHost* host,
+      const content::ChildProcessTerminationInfo& info) override;
+
+  base::android::ScopedJavaGlobalRef<jobject> java_obj_;
+
+  content::RenderProcessHost* render_process_host_;
+
+  base::WeakPtrFactory<AwRenderProcess> weak_factory_;
+  DISALLOW_COPY_AND_ASSIGN(AwRenderProcess);
+};
+
+}  // namespace android_webview
+
+#endif
diff --git a/android_webview/browser/aw_render_thread_context_provider.cc b/android_webview/browser/aw_render_thread_context_provider.cc
index a860024..b4a2e95 100644
--- a/android_webview/browser/aw_render_thread_context_provider.cc
+++ b/android_webview/browser/aw_render_thread_context_provider.cc
@@ -4,6 +4,8 @@
 
 #include "android_webview/browser/aw_render_thread_context_provider.h"
 
+#include <utility>
+
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
@@ -26,13 +28,13 @@
 scoped_refptr<AwRenderThreadContextProvider>
 AwRenderThreadContextProvider::Create(
     scoped_refptr<gl::GLSurface> surface,
-    scoped_refptr<gpu::InProcessCommandBuffer::Service> service) {
-  return new AwRenderThreadContextProvider(surface, service);
+    scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor) {
+  return new AwRenderThreadContextProvider(surface, std::move(task_executor));
 }
 
 AwRenderThreadContextProvider::AwRenderThreadContextProvider(
     scoped_refptr<gl::GLSurface> surface,
-    scoped_refptr<gpu::InProcessCommandBuffer::Service> service) {
+    scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor) {
   DCHECK(main_thread_checker_.CalledOnValidThread());
 
   // This is an onscreen context, wrapping the GLSurface given to us from
@@ -63,12 +65,12 @@
   limits.start_transfer_buffer_size = 64 * 1024;
   limits.min_transfer_buffer_size = 64 * 1024;
 
-  context_ = gpu::GLInProcessContext::CreateWithoutInit();
-  context_->Initialize(service, surface, surface->IsOffscreen(),
-                       gpu::kNullSurfaceHandle, nullptr /* share_context */,
+  context_ = std::make_unique<gpu::GLInProcessContext>();
+  context_->Initialize(std::move(task_executor), surface,
+                       surface->IsOffscreen(), gpu::kNullSurfaceHandle,
                        attributes, limits, nullptr, nullptr, nullptr, nullptr);
 
-  context_->GetImplementation()->SetLostContextCallback(base::Bind(
+  context_->GetImplementation()->SetLostContextCallback(base::BindOnce(
       &AwRenderThreadContextProvider::OnLostContext, base::Unretained(this)));
 
   if (base::CommandLine::ForCurrentProcess()->HasSwitch(
@@ -140,8 +142,8 @@
   if (gr_context_)
     return gr_context_.get();
 
-  sk_sp<GrGLInterface> interface(
-      skia_bindings::CreateGLES2InterfaceBindings(ContextGL()));
+  sk_sp<GrGLInterface> interface(skia_bindings::CreateGLES2InterfaceBindings(
+      ContextGL(), ContextSupport()));
   gr_context_ = GrContext::MakeGL(std::move(interface));
   cache_controller_->SetGrContext(gr_context_.get());
   return gr_context_.get();
@@ -152,13 +154,6 @@
   return cache_controller_.get();
 }
 
-void AwRenderThreadContextProvider::InvalidateGrContext(uint32_t state) {
-  DCHECK(main_thread_checker_.CalledOnValidThread());
-
-  if (gr_context_)
-    gr_context_->resetContext(state);
-}
-
 base::Lock* AwRenderThreadContextProvider::GetLock() {
   // This context provider is not used on multiple threads.
   NOTREACHED();
diff --git a/android_webview/browser/aw_render_thread_context_provider.h b/android_webview/browser/aw_render_thread_context_provider.h
index 58a32e4..1826dba 100644
--- a/android_webview/browser/aw_render_thread_context_provider.h
+++ b/android_webview/browser/aw_render_thread_context_provider.h
@@ -36,7 +36,7 @@
  public:
   static scoped_refptr<AwRenderThreadContextProvider> Create(
       scoped_refptr<gl::GLSurface> surface,
-      scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
+      scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor);
 
   // Gives the GL internal format that should be used for calling CopyTexImage2D
   // on the default framebuffer.
@@ -52,7 +52,6 @@
   gpu::ContextSupport* ContextSupport() override;
   class GrContext* GrContext() override;
   viz::ContextCacheController* CacheController() override;
-  void InvalidateGrContext(uint32_t state) override;
   base::Lock* GetLock() override;
   void AddObserver(viz::ContextLostObserver* obs) override;
   void RemoveObserver(viz::ContextLostObserver* obs) override;
@@ -62,7 +61,7 @@
 
   AwRenderThreadContextProvider(
       scoped_refptr<gl::GLSurface> surface,
-      scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
+      scoped_refptr<gpu::CommandBufferTaskExecutor> task_executor);
   ~AwRenderThreadContextProvider() override;
 
  private:
diff --git a/android_webview/browser/aw_renderer_manifest_overlay.json b/android_webview/browser/aw_renderer_manifest_overlay.json
index 4ba8d17..ef3340e 100644
--- a/android_webview/browser/aw_renderer_manifest_overlay.json
+++ b/android_webview/browser/aw_renderer_manifest_overlay.json
@@ -4,9 +4,12 @@
     "navigation:frame": {
       "provides": {
         "browser": [
-          "autofill::mojom::AutofillAgent",
-          "autofill::mojom::PasswordAutofillAgent",
-          "autofill::mojom::PasswordGenerationAgent"
+          "autofill.mojom.AutofillAgent",
+          "autofill.mojom.PasswordAutofillAgent",
+          "autofill.mojom.PasswordGenerationAgent",
+          // TODO(crbug.com/811567): Remove this once AwSafeBrowsingBlockingPage
+          // no longer sends a GetThreatDOMDetails IPC.
+          "safe_browsing.mojom.ThreatReporter"
         ]
       }
     }
diff --git a/android_webview/browser/aw_resource_context.cc b/android_webview/browser/aw_resource_context.cc
index 65682f54..56c29cb 100644
--- a/android_webview/browser/aw_resource_context.cc
+++ b/android_webview/browser/aw_resource_context.cc
@@ -40,11 +40,6 @@
   return iter != extra_headers_.end() ? iter->second : std::string();
 }
 
-net::HostResolver* AwResourceContext::GetHostResolver() {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
-  return getter_->GetURLRequestContext()->host_resolver();
-}
-
 net::URLRequestContext* AwResourceContext::GetRequestContext() {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   return getter_->GetURLRequestContext();
diff --git a/android_webview/browser/aw_resource_context.h b/android_webview/browser/aw_resource_context.h
index 5763b17..fa60478 100644
--- a/android_webview/browser/aw_resource_context.h
+++ b/android_webview/browser/aw_resource_context.h
@@ -29,7 +29,6 @@
   std::string GetExtraHeaders(const GURL& url);
 
   // content::ResourceContext implementation.
-  net::HostResolver* GetHostResolver() override;
   net::URLRequestContext* GetRequestContext() override;
 
  private:
diff --git a/android_webview/browser/aw_safe_browsing_blocking_page.cc b/android_webview/browser/aw_safe_browsing_blocking_page.cc
index da19f09..d37765af 100644
--- a/android_webview/browser/aw_safe_browsing_blocking_page.cc
+++ b/android_webview/browser/aw_safe_browsing_blocking_page.cc
@@ -19,6 +19,7 @@
 #include "components/security_interstitials/core/safe_browsing_quiet_error_ui.h"
 #include "content/public/browser/interstitial_page.h"
 #include "content/public/browser/navigation_entry.h"
+#include "content/public/browser/storage_partition.h"
 #include "content/public/browser/web_contents.h"
 
 using content::InterstitialPage;
@@ -59,6 +60,9 @@
       ShouldReportThreatDetails(unsafe_resources[0].threat_type)) {
     AwBrowserContext* aw_browser_context =
         AwBrowserContext::FromWebContents(web_contents);
+    scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory =
+        content::BrowserContext::GetDefaultStoragePartition(aw_browser_context)
+            ->GetURLLoaderFactoryForBrowserProcess();
     // TODO(timvolodine): create a proper history service; currently the
     // HistoryServiceFactory lives in the chrome/ layer and relies on Profile
     // which we don't have in Android WebView (crbug.com/731744).
@@ -66,8 +70,7 @@
         aw_browser_context->GetSafeBrowsingTriggerManager()
             ->StartCollectingThreatDetails(
                 safe_browsing::TriggerType::SECURITY_INTERSTITIAL, web_contents,
-                unsafe_resources[0],
-                aw_browser_context->GetAwURLRequestContext(),
+                unsafe_resources[0], url_loader_factory,
                 /*history_service*/ nullptr,
                 sb_error_ui()->get_error_display_options());
   }
@@ -100,6 +103,7 @@
             false,  // is_off_the_record
             safe_browsing::IsExtendedReportingEnabled(*pref_service),
             safe_browsing::IsScout(*pref_service),
+            safe_browsing::IsExtendedReportingPolicyManaged(*pref_service),
             pref_service->GetBoolean(
                 ::prefs::kSafeBrowsingProceedAnywayDisabled),
             false,                    // should_open_links_in_new_tab
diff --git a/android_webview/browser/aw_safe_browsing_config_helper.cc b/android_webview/browser/aw_safe_browsing_config_helper.cc
deleted file mode 100644
index 8908f7b..0000000
--- a/android_webview/browser/aw_safe_browsing_config_helper.cc
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "android_webview/browser/aw_safe_browsing_config_helper.h"
-
-#include "base/android/scoped_java_ref.h"
-#include "base/lazy_instance.h"
-#include "base/synchronization/lock.h"
-
-namespace {
-// g_safebrowsing_enabled_by_manifest can be set and read from different
-// threads.
-base::LazyInstance<base::Lock>::Leaky g_safebrowsing_enabled_by_manifest_lock =
-    LAZY_INSTANCE_INITIALIZER;
-bool g_safebrowsing_enabled_by_manifest = false;
-}  // namespace
-
-namespace android_webview {
-
-// static
-void AwSafeBrowsingConfigHelper::SetSafeBrowsingEnabledByManifest(
-    bool enabled) {
-  base::AutoLock lock(g_safebrowsing_enabled_by_manifest_lock.Get());
-  g_safebrowsing_enabled_by_manifest = enabled;
-}
-
-// static
-bool AwSafeBrowsingConfigHelper::GetSafeBrowsingEnabledByManifest() {
-  base::AutoLock lock(g_safebrowsing_enabled_by_manifest_lock.Get());
-  return g_safebrowsing_enabled_by_manifest;
-}
-
-}  // namespace android_webview
diff --git a/android_webview/browser/aw_safe_browsing_config_helper.h b/android_webview/browser/aw_safe_browsing_config_helper.h
deleted file mode 100644
index a448c0e..0000000
--- a/android_webview/browser/aw_safe_browsing_config_helper.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2017 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef ANDROID_WEBVIEW_BROWSER_AW_SAFE_BROWSING_CONFIG_HELPER_H_
-#define ANDROID_WEBVIEW_BROWSER_AW_SAFE_BROWSING_CONFIG_HELPER_H_
-
-#include "base/macros.h"
-
-namespace android_webview {
-
-class AwSafeBrowsingConfigHelper {
- public:
-  static bool GetSafeBrowsingEnabledByManifest();
-  static void SetSafeBrowsingEnabledByManifest(bool enabled);
-
- private:
-  AwSafeBrowsingConfigHelper();
-  DISALLOW_COPY_AND_ASSIGN(AwSafeBrowsingConfigHelper);
-};
-
-}  // namespace android_webview
-
-#endif  // ANDROID_WEBVIEW_BROWSER_AW_SAFE_BROWSING_CONFIG_HELPER_H_
diff --git a/android_webview/browser/aw_safe_browsing_ui_manager.cc b/android_webview/browser/aw_safe_browsing_ui_manager.cc
index c08faff..aee9b17 100644
--- a/android_webview/browser/aw_safe_browsing_ui_manager.cc
+++ b/android_webview/browser/aw_safe_browsing_ui_manager.cc
@@ -6,20 +6,26 @@
 
 #include "android_webview/browser/aw_safe_browsing_blocking_page.h"
 #include "android_webview/browser/net/aw_url_request_context_getter.h"
+#include "android_webview/common/aw_content_client.h"
 #include "android_webview/common/aw_paths.h"
 #include "base/command_line.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/path_service.h"
 #include "components/prefs/pref_service.h"
-#include "components/safe_browsing/base_ping_manager.h"
 #include "components/safe_browsing/base_ui_manager.h"
+#include "components/safe_browsing/browser/safe_browsing_network_context.h"
 #include "components/safe_browsing/browser/safe_browsing_url_request_context_getter.h"
 #include "components/safe_browsing/common/safebrowsing_constants.h"
+#include "components/safe_browsing/ping_manager.h"
 #include "content/public/browser/browser_thread.h"
+#include "services/network/public/cpp/features.h"
+#include "services/network/public/mojom/network_service.mojom.h"
 
 using content::BrowserThread;
 using content::WebContents;
 
+namespace android_webview {
+
 namespace {
 
 std::string GetProtocolConfigClientName() {
@@ -32,9 +38,14 @@
   UMA_HISTOGRAM_BOOLEAN("SafeBrowsing.WebView.Viewable", isViewable);
 }
 
-}  // namespace
+network::mojom::NetworkContextParamsPtr CreateDefaultNetworkContextParams() {
+  network::mojom::NetworkContextParamsPtr network_context_params =
+      network::mojom::NetworkContextParams::New();
+  network_context_params->user_agent = GetUserAgent();
+  return network_context_params;
+}
 
-namespace android_webview {
+}  // namespace
 
 AwSafeBrowsingUIManager::AwSafeBrowsingUIManager(
     AwURLRequestContextGetter* browser_url_request_context_getter,
@@ -44,13 +55,20 @@
 
   // TODO(timvolodine): verify this is what we want regarding the directory.
   base::FilePath user_data_dir;
-  bool result =
-      PathService::Get(android_webview::DIR_SAFE_BROWSING, &user_data_dir);
+  bool result = base::PathService::Get(android_webview::DIR_SAFE_BROWSING,
+                                       &user_data_dir);
   DCHECK(result);
 
-  url_request_context_getter_ =
-      new safe_browsing::SafeBrowsingURLRequestContextGetter(
-          browser_url_request_context_getter, user_data_dir);
+  if (!base::FeatureList::IsEnabled(network::features::kNetworkService)) {
+    url_request_context_getter_ =
+        new safe_browsing::SafeBrowsingURLRequestContextGetter(
+            browser_url_request_context_getter, user_data_dir);
+  }
+
+  network_context_ =
+      std::make_unique<safe_browsing::SafeBrowsingNetworkContext>(
+          url_request_context_getter_, user_data_dir,
+          base::BindRepeating(CreateDefaultNetworkContextParams));
 }
 
 AwSafeBrowsingUIManager::~AwSafeBrowsingUIManager() {}
@@ -82,6 +100,21 @@
                             allowed);
 }
 
+scoped_refptr<network::SharedURLLoaderFactory>
+AwSafeBrowsingUIManager::GetURLLoaderFactoryOnIOThread() {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  if (!shared_url_loader_factory_on_io_) {
+    BrowserThread::PostTask(
+        BrowserThread::UI, FROM_HERE,
+        base::BindOnce(&AwSafeBrowsingUIManager::CreateURLLoaderFactoryForIO,
+                       this, MakeRequest(&url_loader_factory_on_io_)));
+    shared_url_loader_factory_on_io_ =
+        base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
+            url_loader_factory_on_io_.get());
+  }
+  return shared_url_loader_factory_on_io_;
+}
+
 int AwSafeBrowsingUIManager::GetErrorUiType(
     const UnsafeResource& resource) const {
   WebContents* web_contents = resource.web_contents_getter.Run();
@@ -92,7 +125,7 @@
 
 void AwSafeBrowsingUIManager::SendSerializedThreatDetails(
     const std::string& serialized) {
-  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   if (!ping_manager_) {
     // Lazy creation of ping manager, needs to happen on IO thread.
@@ -106,8 +139,8 @@
         ::safe_browsing::kSbBackupHttpErrorURLPrefix;
     config.backup_network_error_url_prefix =
         ::safe_browsing::kSbBackupNetworkErrorURLPrefix;
-    ping_manager_ = ::safe_browsing::BasePingManager::Create(
-        url_request_context_getter_.get(), config);
+    ping_manager_ = ::safe_browsing::PingManager::Create(
+        network_context_->GetURLLoaderFactory(), config);
   }
 
   if (!serialized.empty()) {
@@ -116,4 +149,15 @@
   }
 }
 
+void AwSafeBrowsingUIManager::CreateURLLoaderFactoryForIO(
+    network::mojom::URLLoaderFactoryRequest request) {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  auto url_loader_factory_params =
+      network::mojom::URLLoaderFactoryParams::New();
+  url_loader_factory_params->process_id = network::mojom::kBrowserProcessId;
+  url_loader_factory_params->is_corb_enabled = false;
+  network_context_->GetNetworkContext()->CreateURLLoaderFactory(
+      std::move(request), std::move(url_loader_factory_params));
+}
+
 }  // namespace android_webview
diff --git a/android_webview/browser/aw_safe_browsing_ui_manager.h b/android_webview/browser/aw_safe_browsing_ui_manager.h
index 3bfeb06..9c1f411 100644
--- a/android_webview/browser/aw_safe_browsing_ui_manager.h
+++ b/android_webview/browser/aw_safe_browsing_ui_manager.h
@@ -11,11 +11,17 @@
 
 #include "components/safe_browsing/base_ui_manager.h"
 #include "content/public/browser/web_contents.h"
+#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
 
 class PrefService;
 
+namespace network {
+class SharedURLLoaderFactory;
+}
+
 namespace safe_browsing {
-class BasePingManager;
+class PingManager;
+class SafeBrowsingNetworkContext;
 class SafeBrowsingURLRequestContextGetter;
 }  // namespace
 
@@ -36,7 +42,7 @@
   };
 
   // Construction needs to happen on the UI thread.
-  explicit AwSafeBrowsingUIManager(
+  AwSafeBrowsingUIManager(
       AwURLRequestContextGetter* browser_url_request_context_getter,
       PrefService* pref_service);
 
@@ -46,26 +52,48 @@
   // BaseUIManager methods:
   void DisplayBlockingPage(const UnsafeResource& resource) override;
 
-  // Called on the IO thread by the ThreatDetails with the serialized
+  // Called on the UI thread by the ThreatDetails with the serialized
   // protocol buffer, so the service can send it over.
   void SendSerializedThreatDetails(const std::string& serialized) override;
 
   void SetExtendedReportingAllowed(bool allowed);
 
+  // Called on the IO thread to get a SharedURLLoaderFactory that can be used on
+  // the IO thread.
+  scoped_refptr<network::SharedURLLoaderFactory>
+  GetURLLoaderFactoryOnIOThread();
+
  protected:
   ~AwSafeBrowsingUIManager() override;
 
   void ShowBlockingPageForResource(const UnsafeResource& resource) override;
 
  private:
+  // Called on the UI thread to create a URLLoaderFactory interface ptr for
+  // the IO thread.
+  void CreateURLLoaderFactoryForIO(
+      network::mojom::URLLoaderFactoryRequest request);
+
   // Provides phishing and malware statistics. Accessed on IO thread.
-  std::unique_ptr<safe_browsing::BasePingManager> ping_manager_;
+  std::unique_ptr<safe_browsing::PingManager> ping_manager_;
 
   // The SafeBrowsingURLRequestContextGetter used to access
   // |url_request_context_|. Accessed on UI thread.
+  // This is only valid if the network service is disabled.
   scoped_refptr<safe_browsing::SafeBrowsingURLRequestContextGetter>
       url_request_context_getter_;
 
+  // If the network service is disabled, this is a wrapper around
+  // |url_request_context_getter_|. Otherwise it's what owns the
+  // URLRequestContext inside the network service. This is used by
+  // SimpleURLLoader for safe browsing requests.
+  std::unique_ptr<safe_browsing::SafeBrowsingNetworkContext> network_context_;
+
+  // A SharedURLLoaderFactory and its interfaceptr used on the IO thread.
+  network::mojom::URLLoaderFactoryPtr url_loader_factory_on_io_;
+  scoped_refptr<network::WeakWrapperSharedURLLoaderFactory>
+      shared_url_loader_factory_on_io_;
+
   // non-owning
   PrefService* pref_service_;
 
diff --git a/android_webview/browser/aw_safe_browsing_whitelist_manager.cc b/android_webview/browser/aw_safe_browsing_whitelist_manager.cc
index 873eea2..24bfa09 100644
--- a/android_webview/browser/aw_safe_browsing_whitelist_manager.cc
+++ b/android_webview/browser/aw_safe_browsing_whitelist_manager.cc
@@ -197,7 +197,7 @@
 // A task that builds the whitelist on a background thread.
 void AwSafeBrowsingWhitelistManager::BuildWhitelist(
     const std::vector<std::string>& rules,
-    const base::Callback<void(bool)>& callback) {
+    base::OnceCallback<void(bool)> callback) {
   DCHECK(background_task_runner_->RunsTasksInCurrentSequence());
 
   std::unique_ptr<TrieNode> whitelist(std::make_unique<TrieNode>());
@@ -205,34 +205,34 @@
   DCHECK(!whitelist->is_terminal);
   DCHECK(!whitelist->match_prefix);
 
-  ui_task_runner_->PostTask(FROM_HERE, base::Bind(callback, success));
+  ui_task_runner_->PostTask(FROM_HERE,
+                            base::BindOnce(std::move(callback), success));
 
   if (success) {
     // use base::Unretained as AwSafeBrowsingWhitelistManager is a singleton and
     // not cleaned.
     io_task_runner_->PostTask(
         FROM_HERE,
-        base::Bind(&AwSafeBrowsingWhitelistManager::SetWhitelist,
-                   base::Unretained(this), base::Passed(std::move(whitelist))));
+        base::BindOnce(&AwSafeBrowsingWhitelistManager::SetWhitelist,
+                       base::Unretained(this), std::move(whitelist)));
   }
 }
 
 void AwSafeBrowsingWhitelistManager::SetWhitelistOnUIThread(
     std::vector<std::string>&& rules,
-    const base::Callback<void(bool)>& callback) {
+    base::OnceCallback<void(bool)> callback) {
   DCHECK(ui_task_runner_->RunsTasksInCurrentSequence());
   // use base::Unretained as AwSafeBrowsingWhitelistManager is a singleton and
   // not cleaned.
   background_task_runner_->PostTask(
-      FROM_HERE, base::Bind(&AwSafeBrowsingWhitelistManager::BuildWhitelist,
-                            base::Unretained(this),
-                            base::Passed(std::move(rules)), callback));
+      FROM_HERE, base::BindOnce(&AwSafeBrowsingWhitelistManager::BuildWhitelist,
+                                base::Unretained(this), std::move(rules),
+                                std::move(callback)));
 }
 
 bool AwSafeBrowsingWhitelistManager::IsURLWhitelisted(const GURL& url) const {
   DCHECK(io_task_runner_->RunsTasksInCurrentSequence());
-  if (!(url.SchemeIsHTTPOrHTTPS() || url.SchemeIsWSOrWSS() ||
-        url.SchemeIs(url::kFtpScheme))) {
+  if (!url.has_host()) {
     return false;
   }
   return IsWhitelisted(url, whitelist_.get());
diff --git a/android_webview/browser/aw_safe_browsing_whitelist_manager.h b/android_webview/browser/aw_safe_browsing_whitelist_manager.h
index e4dfcea..3d98ebb 100644
--- a/android_webview/browser/aw_safe_browsing_whitelist_manager.h
+++ b/android_webview/browser/aw_safe_browsing_whitelist_manager.h
@@ -66,12 +66,12 @@
 
   // Replace the current host whitelist with a new one.
   void SetWhitelistOnUIThread(std::vector<std::string>&& rules,
-                              const base::Callback<void(bool)>& callback);
+                              base::OnceCallback<void(bool)> callback);
 
  private:
   // Builds whitelist on background thread.
   void BuildWhitelist(const std::vector<std::string>& rules,
-                      const base::Callback<void(bool)>& callback);
+                      base::OnceCallback<void(bool)> callback);
   // Replaces the current whitelist. Must be called on the IO thread.
   void SetWhitelist(std::unique_ptr<TrieNode> whitelist);
 
diff --git a/android_webview/browser/aw_safe_browsing_whitelist_manager_unittest.cc b/android_webview/browser/aw_safe_browsing_whitelist_manager_unittest.cc
index b3097b8..c7b1f5e 100644
--- a/android_webview/browser/aw_safe_browsing_whitelist_manager_unittest.cc
+++ b/android_webview/browser/aw_safe_browsing_whitelist_manager_unittest.cc
@@ -40,8 +40,8 @@
 void AwSafeBrowsingWhitelistManagerTest::SetWhitelist(
     std::vector<std::string>&& whitelist,
     bool expected) {
-  wm_->SetWhitelistOnUIThread(std::move(whitelist),
-                              base::Bind(&VerifyWhitelistCallback, expected));
+  wm_->SetWhitelistOnUIThread(
+      std::move(whitelist), base::BindOnce(&VerifyWhitelistCallback, expected));
 }
 
 TEST_F(AwSafeBrowsingWhitelistManagerTest, WsSchemeCanBeWhitelisted) {
@@ -475,13 +475,28 @@
   EXPECT_FALSE(wm_->IsURLWhitelisted(GURL("http://com/")));
 }
 
-TEST_F(AwSafeBrowsingWhitelistManagerTest,
-       VerifyNonWsNonHttpSchemeInUrlsAreNotWhitelisted) {
+TEST_F(AwSafeBrowsingWhitelistManagerTest, VerifyInvalidUrlsAreNotWhitelisted) {
   std::vector<std::string> whitelist;
   whitelist.push_back("google.com");
   SetWhitelist(std::move(whitelist), true);
   base::RunLoop().RunUntilIdle();
-  EXPECT_FALSE(wm_->IsURLWhitelisted(GURL("file://a/b/test")));
+
+  GURL url = GURL("");
+  EXPECT_FALSE(url.is_valid());
+  EXPECT_FALSE(wm_->IsURLWhitelisted(url));
+
+  url = GURL("http;??www.google.com");
+  EXPECT_FALSE(url.is_valid());
+  EXPECT_FALSE(wm_->IsURLWhitelisted(url));
+}
+
+TEST_F(AwSafeBrowsingWhitelistManagerTest,
+       VerifyUrlsWithoutHostAreNotWhitelisted) {
+  std::vector<std::string> whitelist;
+  whitelist.push_back("google.com");
+  SetWhitelist(std::move(whitelist), true);
+  base::RunLoop().RunUntilIdle();
+  EXPECT_FALSE(wm_->IsURLWhitelisted(GURL("file:///google.com/test")));
   EXPECT_FALSE(wm_->IsURLWhitelisted(GURL("mailto:google.com/")));
   EXPECT_FALSE(wm_->IsURLWhitelisted(GURL("data:google.com/")));
 
diff --git a/android_webview/browser/aw_settings.cc b/android_webview/browser/aw_settings.cc
index 3055338..a98fd91 100644
--- a/android_webview/browser/aw_settings.cc
+++ b/android_webview/browser/aw_settings.cc
@@ -35,9 +35,6 @@
 namespace {
 
 void PopulateFixedRendererPreferences(RendererPreferences* prefs) {
-  prefs->tap_multiple_targets_strategy =
-      content::TAP_MULTIPLE_TARGETS_STRATEGY_NONE;
-
   // TODO(boliu): Deduplicate with chrome/ code.
   CR_DEFINE_STATIC_LOCAL(
       const gfx::FontRenderParams, params,
@@ -54,6 +51,7 @@
   web_prefs->shrinks_standalone_images_to_fit = false;
   web_prefs->should_clear_document_background = false;
   web_prefs->viewport_meta_enabled = true;
+  web_prefs->picture_in_picture_enabled = false;
 }
 
 const void* const kAwSettingsUserDataKey = &kAwSettingsUserDataKey;
@@ -112,6 +110,11 @@
   return AwSettingsUserData::GetSettings(web_contents);
 }
 
+bool AwSettings::GetAllowSniffingFileUrls() {
+  JNIEnv* env = base::android::AttachCurrentThread();
+  return Java_AwSettings_getAllowSniffingFileUrls(env);
+}
+
 AwRenderViewHostExt* AwSettings::GetAwRenderViewHostExt() {
   if (!web_contents())
     return NULL;
@@ -161,7 +164,7 @@
 
   if (ua_overidden) {
     std::string override = base::android::ConvertJavaStringToUTF8(str);
-    web_contents()->SetUserAgentOverride(override);
+    web_contents()->SetUserAgentOverride(override, true);
   }
 
   const content::NavigationController& controller =
@@ -360,8 +363,7 @@
   web_prefs->supports_multiple_windows =
       Java_AwSettings_getSupportMultipleWindowsLocked(env, obj);
 
-  web_prefs->plugins_enabled =
-      !Java_AwSettings_getPluginsDisabledLocked(env, obj);
+  web_prefs->plugins_enabled = false;
 
   web_prefs->application_cache_enabled =
       Java_AwSettings_getAppCacheEnabledLocked(env, obj);
@@ -412,7 +414,7 @@
   web_prefs->ignore_main_frame_overflow_hidden_quirk = support_quirks;
   web_prefs->report_screen_size_in_physical_pixels_quirk = support_quirks;
 
-  web_prefs->resue_global_for_unowned_main_frame =
+  web_prefs->reuse_global_for_unowned_main_frame =
       Java_AwSettings_getAllowEmptyDocumentPersistenceLocked(env, obj);
 
   web_prefs->password_echo_enabled =
diff --git a/android_webview/browser/aw_settings.h b/android_webview/browser/aw_settings.h
index 8b8e8543..baa101e3 100644
--- a/android_webview/browser/aw_settings.h
+++ b/android_webview/browser/aw_settings.h
@@ -22,6 +22,7 @@
 class AwSettings : public content::WebContentsObserver {
  public:
   static AwSettings* FromWebContents(content::WebContents* web_contents);
+  static bool GetAllowSniffingFileUrls();
 
   AwSettings(JNIEnv* env, jobject obj, content::WebContents* web_contents);
   ~AwSettings() override;
diff --git a/android_webview/browser/aw_ssl_host_state_delegate.cc b/android_webview/browser/aw_ssl_host_state_delegate.cc
index f1997e1..56f8ebf 100644
--- a/android_webview/browser/aw_ssl_host_state_delegate.cc
+++ b/android_webview/browser/aw_ssl_host_state_delegate.cc
@@ -21,8 +21,7 @@
 // For an allowance, we consider a given |cert| to be a match to a saved
 // allowed cert if the |error| is an exact match to or subset of the errors
 // in the saved CertStatus.
-bool CertPolicy::Check(const net::X509Certificate& cert,
-                       net::CertStatus error) const {
+bool CertPolicy::Check(const net::X509Certificate& cert, int error) const {
   net::SHA256HashValue fingerprint = cert.CalculateChainFingerprint256();
   auto allowed_iter = allowed_.find(fingerprint);
   if ((allowed_iter != allowed_.end()) && (allowed_iter->second & error) &&
@@ -32,8 +31,7 @@
   return false;
 }
 
-void CertPolicy::Allow(const net::X509Certificate& cert,
-                       net::CertStatus error) {
+void CertPolicy::Allow(const net::X509Certificate& cert, int error) {
   // If this same cert had already been saved with a different error status,
   // this will replace it with the new error status.
   net::SHA256HashValue fingerprint = cert.CalculateChainFingerprint256();
@@ -65,7 +63,7 @@
 
 void AwSSLHostStateDelegate::AllowCert(const std::string& host,
                                        const net::X509Certificate& cert,
-                                       net::CertStatus error) {
+                                       int error) {
   cert_policy_for_host_[host].Allow(cert, error);
 }
 
@@ -90,7 +88,7 @@
 SSLHostStateDelegate::CertJudgment AwSSLHostStateDelegate::QueryPolicy(
     const std::string& host,
     const net::X509Certificate& cert,
-    net::CertStatus error,
+    int error,
     bool* expired_previous_decision) {
   return cert_policy_for_host_[host].Check(cert, error)
              ? SSLHostStateDelegate::ALLOWED
diff --git a/android_webview/browser/aw_ssl_host_state_delegate.h b/android_webview/browser/aw_ssl_host_state_delegate.h
index f8b972d1..79f9bb3 100644
--- a/android_webview/browser/aw_ssl_host_state_delegate.h
+++ b/android_webview/browser/aw_ssl_host_state_delegate.h
@@ -11,7 +11,6 @@
 #include "base/macros.h"
 #include "content/public/browser/ssl_host_state_delegate.h"
 #include "net/base/hash_value.h"
-#include "net/cert/cert_status_flags.h"
 #include "net/cert/x509_certificate.h"
 
 namespace android_webview {
@@ -25,11 +24,11 @@
   // Returns true if the user has decided to proceed through the ssl error
   // before. For a certificate to be allowed, it must not have any
   // *additional* errors from when it was allowed.
-  bool Check(const net::X509Certificate& cert, net::CertStatus error) const;
+  bool Check(const net::X509Certificate& cert, int error) const;
 
   // Causes the policy to allow this certificate for a given |error|. And
   // remember the user's choice.
-  void Allow(const net::X509Certificate& cert, net::CertStatus error);
+  void Allow(const net::X509Certificate& cert, int error);
 
   // Returns true if and only if there exists a user allow exception for some
   // certificate.
@@ -37,7 +36,7 @@
 
  private:
   // The set of fingerprints of allowed certificates.
-  std::map<net::SHA256HashValue, net::CertStatus> allowed_;
+  std::map<net::SHA256HashValue, int> allowed_;
 };
 
 }  // namespace internal
@@ -51,7 +50,7 @@
   // a specified |error| type.
   void AllowCert(const std::string& host,
                  const net::X509Certificate& cert,
-                 net::CertStatus error) override;
+                 int error) override;
 
   void Clear(
       const base::Callback<bool(const std::string&)>& host_filter) override;
@@ -60,7 +59,7 @@
   content::SSLHostStateDelegate::CertJudgment QueryPolicy(
       const std::string& host,
       const net::X509Certificate& cert,
-      net::CertStatus error,
+      int error,
       bool* expired_previous_decision) override;
 
   // Records that a host has run insecure content.
diff --git a/android_webview/browser/aw_url_checker_delegate_impl.cc b/android_webview/browser/aw_url_checker_delegate_impl.cc
index 04b8625..0de75e6 100644
--- a/android_webview/browser/aw_url_checker_delegate_impl.cc
+++ b/android_webview/browser/aw_url_checker_delegate_impl.cc
@@ -47,8 +47,8 @@
 
   content::BrowserThread::PostTask(
       content::BrowserThread::UI, FROM_HERE,
-      base::Bind(&AwUrlCheckerDelegateImpl::StartApplicationResponse,
-                 ui_manager_, resource, std::move(request)));
+      base::BindOnce(&AwUrlCheckerDelegateImpl::StartApplicationResponse,
+                     ui_manager_, resource, std::move(request)));
 }
 
 bool AwUrlCheckerDelegateImpl::IsUrlWhitelisted(const GURL& url) {
@@ -77,6 +77,10 @@
   return client && !client->GetSafeBrowsingEnabled();
 }
 
+void AwUrlCheckerDelegateImpl::NotifySuspiciousSiteDetected(
+    const base::RepeatingCallback<content::WebContents*()>&
+        web_contents_getter) {}
+
 const safe_browsing::SBThreatTypeSet&
 AwUrlCheckerDelegateImpl::GetThreatTypes() {
   return threat_types_;
@@ -101,10 +105,12 @@
       AwContentsClientBridge::FromWebContents(web_contents);
 
   if (client) {
-    base::Callback<void(SafeBrowsingAction, bool)> callback = base::Bind(
-        &AwUrlCheckerDelegateImpl::DoApplicationResponse, ui_manager, resource);
+    base::OnceCallback<void(SafeBrowsingAction, bool)> callback =
+        base::BindOnce(&AwUrlCheckerDelegateImpl::DoApplicationResponse,
+                       ui_manager, resource);
 
-    client->OnSafeBrowsingHit(request, resource.threat_type, callback);
+    client->OnSafeBrowsingHit(request, resource.threat_type,
+                              std::move(callback));
   }
 }
 
@@ -123,7 +129,7 @@
     case SafeBrowsingAction::SHOW_INTERSTITIAL:
       content::BrowserThread::PostTask(
           content::BrowserThread::UI, FROM_HERE,
-          base::Bind(
+          base::BindOnce(
               &AwUrlCheckerDelegateImpl::StartDisplayingDefaultBlockingPage,
               ui_manager, resource));
       return;
@@ -169,7 +175,7 @@
 
   // Reporting back that it is not okay to proceed with loading the URL.
   content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
-                                   base::Bind(resource.callback, false));
+                                   base::BindOnce(resource.callback, false));
 }
 
 }  // namespace android_webview
diff --git a/android_webview/browser/aw_url_checker_delegate_impl.h b/android_webview/browser/aw_url_checker_delegate_impl.h
index a7cabfe..d97f52f 100644
--- a/android_webview/browser/aw_url_checker_delegate_impl.h
+++ b/android_webview/browser/aw_url_checker_delegate_impl.h
@@ -50,6 +50,9 @@
                               int render_process_id,
                               int render_frame_id,
                               bool originated_from_service_worker) override;
+  void NotifySuspiciousSiteDetected(
+      const base::RepeatingCallback<content::WebContents*()>&
+          web_contents_getter) override;
   const safe_browsing::SBThreatTypeSet& GetThreatTypes() override;
   safe_browsing::SafeBrowsingDatabaseManager* GetDatabaseManager() override;
   safe_browsing::BaseUIManager* GetUIManager() override;
diff --git a/android_webview/browser/aw_utility_manifest_overlay.json b/android_webview/browser/aw_utility_manifest_overlay.json
new file mode 100644
index 0000000..24a09c7
--- /dev/null
+++ b/android_webview/browser/aw_utility_manifest_overlay.json
@@ -0,0 +1,12 @@
+{
+  "name": "content_utility",
+  "interface_provider_specs": {
+    "service_manager:connector": {
+      "provides": {
+        "browser": [
+          "heap_profiling.mojom.ProfilingClient"
+        ]
+      }
+    }
+  }
+}
diff --git a/android_webview/browser/aw_variations_seed_bridge.cc b/android_webview/browser/aw_variations_seed_bridge.cc
new file mode 100644
index 0000000..aeee02e
--- /dev/null
+++ b/android_webview/browser/aw_variations_seed_bridge.cc
@@ -0,0 +1,51 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "android_webview/browser/aw_variations_seed_bridge.h"
+
+#include <jni.h>
+#include <stdint.h>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "base/android/jni_android.h"
+#include "base/android/jni_array.h"
+#include "base/android/jni_string.h"
+#include "components/variations/seed_response.h"
+#include "jni/AwVariationsSeedBridge_jni.h"
+
+namespace android_webview {
+
+std::unique_ptr<variations::SeedResponse> GetAndClearJavaSeed() {
+  using namespace base::android;
+
+  JNIEnv* env = AttachCurrentThread();
+  if (!Java_AwVariationsSeedBridge_haveSeed(env))
+    return nullptr;
+
+  ScopedJavaLocalRef<jstring> j_signature =
+      Java_AwVariationsSeedBridge_getSignature(env);
+  ScopedJavaLocalRef<jstring> j_country =
+      Java_AwVariationsSeedBridge_getCountry(env);
+  ScopedJavaLocalRef<jstring> j_date = Java_AwVariationsSeedBridge_getDate(env);
+  jboolean j_is_gzip_compressed =
+      Java_AwVariationsSeedBridge_getIsGzipCompressed(env);
+  ScopedJavaLocalRef<jbyteArray> j_data =
+      Java_AwVariationsSeedBridge_getData(env);
+  Java_AwVariationsSeedBridge_clearSeed(env);
+
+  std::vector<uint8_t> u8_data;
+  JavaByteArrayToByteVector(env, j_data.obj(), &u8_data);
+
+  auto java_seed = std::make_unique<variations::SeedResponse>();
+  java_seed->data = std::string(u8_data.begin(), u8_data.end());
+  java_seed->signature = ConvertJavaStringToUTF8(j_signature);
+  java_seed->country = ConvertJavaStringToUTF8(j_country);
+  java_seed->date = ConvertJavaStringToUTF8(j_date);
+  java_seed->is_gzip_compressed = static_cast<bool>(j_is_gzip_compressed);
+  return java_seed;
+}
+
+}  // namespace android_webview
diff --git a/android_webview/browser/aw_variations_seed_bridge.h b/android_webview/browser/aw_variations_seed_bridge.h
new file mode 100644
index 0000000..d0436fe
--- /dev/null
+++ b/android_webview/browser/aw_variations_seed_bridge.h
@@ -0,0 +1,21 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ANDROID_WEBVIEW_BROWSER_AW_VARIATIONS_SEED_BRIDGE_H_
+#define ANDROID_WEBVIEW_BROWSER_AW_VARIATIONS_SEED_BRIDGE_H_
+
+#include <memory>
+#include <string>
+
+#include "components/variations/seed_response.h"
+
+namespace android_webview {
+
+// If the Java side has a seed, return it and clear it from the Java side.
+// Otherwise, return null.
+std::unique_ptr<variations::SeedResponse> GetAndClearJavaSeed();
+
+}  // namespace android_webview
+
+#endif  // ANDROID_WEBVIEW_BROWSER_AW_VARIATIONS_SEED_BRIDGE_H_
diff --git a/android_webview/browser/aw_variations_service_client.cc b/android_webview/browser/aw_variations_service_client.cc
index 88112c9..fe14b44 100644
--- a/android_webview/browser/aw_variations_service_client.cc
+++ b/android_webview/browser/aw_variations_service_client.cc
@@ -4,10 +4,13 @@
 
 #include "android_webview/browser/aw_variations_service_client.h"
 
+#include "android_webview/common/aw_channel.h"
 #include "base/bind.h"
 #include "base/threading/thread_restrictions.h"
 #include "build/build_config.h"
-#include "components/version_info/version_info.h"
+#include "services/network/public/cpp/shared_url_loader_factory.h"
+
+using version_info::Channel;
 
 namespace android_webview {
 namespace {
@@ -16,7 +19,7 @@
 // on a thread where IO is allowed.
 base::Version GetVersionForSimulation() {
   base::AssertBlockingAllowed();
-  return base::Version(version_info::GetVersionNumber());
+  return version_info::GetVersion();
 }
 
 }  // namespace
@@ -31,11 +34,11 @@
 
 base::Callback<base::Version(void)>
 AwVariationsServiceClient::GetVersionForSimulationCallback() {
-  return base::Bind(&GetVersionForSimulation);
+  return base::BindRepeating(&GetVersionForSimulation);
 }
 
-net::URLRequestContextGetter*
-AwVariationsServiceClient::GetURLRequestContext() {
+scoped_refptr<network::SharedURLLoaderFactory>
+AwVariationsServiceClient::GetURLLoaderFactory() {
   return nullptr;
 }
 
@@ -44,10 +47,12 @@
   return nullptr;
 }
 
-version_info::Channel AwVariationsServiceClient::GetChannel() {
-  // TODO(kmilka): Investigate the proper value to return here so experiments
-  // are correctly filtered.
-  return version_info::Channel::UNKNOWN;
+Channel AwVariationsServiceClient::GetChannel() {
+  return android_webview::GetChannel();
+}
+
+bool AwVariationsServiceClient::GetSupportsPermanentConsistency() {
+  return false;
 }
 
 bool AwVariationsServiceClient::OverridesRestrictParameter(
diff --git a/android_webview/browser/aw_variations_service_client.h b/android_webview/browser/aw_variations_service_client.h
index 608121b..0caf0fd 100644
--- a/android_webview/browser/aw_variations_service_client.h
+++ b/android_webview/browser/aw_variations_service_client.h
@@ -8,8 +8,13 @@
 #include <string>
 
 #include "base/macros.h"
+#include "base/memory/scoped_refptr.h"
 #include "components/variations/service/variations_service_client.h"
 
+namespace network {
+class SharedURLLoaderFactory;
+}  // namespace network
+
 namespace android_webview {
 
 // AwVariationsServiceClient provides an implementation of
@@ -23,9 +28,10 @@
   std::string GetApplicationLocale() override;
   base::Callback<base::Version(void)> GetVersionForSimulationCallback()
       override;
-  net::URLRequestContextGetter* GetURLRequestContext() override;
+  scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactory() override;
   network_time::NetworkTimeTracker* GetNetworkTimeTracker() override;
   version_info::Channel GetChannel() override;
+  bool GetSupportsPermanentConsistency() override;
   bool OverridesRestrictParameter(std::string* parameter) override;
 
   DISALLOW_COPY_AND_ASSIGN(AwVariationsServiceClient);
diff --git a/android_webview/browser/aw_web_contents_delegate.cc b/android_webview/browser/aw_web_contents_delegate.cc
index 28eff59..cb84f9c 100644
--- a/android_webview/browser/aw_web_contents_delegate.cc
+++ b/android_webview/browser/aw_web_contents_delegate.cc
@@ -121,12 +121,13 @@
       params.capture);
 }
 
-void AwWebContentsDelegate::AddNewContents(WebContents* source,
-                                           WebContents* new_contents,
-                                           WindowOpenDisposition disposition,
-                                           const gfx::Rect& initial_rect,
-                                           bool user_gesture,
-                                           bool* was_blocked) {
+void AwWebContentsDelegate::AddNewContents(
+    WebContents* source,
+    std::unique_ptr<WebContents> new_contents,
+    WindowOpenDisposition disposition,
+    const gfx::Rect& initial_rect,
+    bool user_gesture,
+    bool* was_blocked) {
   JNIEnv* env = AttachCurrentThread();
 
   bool is_dialog = disposition == WindowOpenDisposition::NEW_POPUP;
@@ -144,17 +145,22 @@
     // it. The source AwContents takes ownership of the new WebContents
     // until then, and when the callback is made we will swap the WebContents
     // out into the new AwContents.
+    WebContents* raw_new_contents = new_contents.get();
     AwContents::FromWebContents(source)->SetPendingWebContentsForPopup(
-        base::WrapUnique(new_contents));
+        std::move(new_contents));
+    // It's possible that SetPendingWebContentsForPopup deletes |new_contents|,
+    // but it only does so asynchronously, so it's safe to use a raw pointer
+    // here.
     // Hide the WebContents for the pop up now, we will show it again
     // when the user calls us back with an AwContents to use to show it.
-    new_contents->WasHidden();
+    raw_new_contents->WasHidden();
   } else {
     // The embedder has forgone their chance to display this popup
     // window, so we're done with the WebContents now. We use
     // DeleteSoon as WebContentsImpl may call methods on |new_contents|
     // after this method returns.
-    base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, new_contents);
+    base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE,
+                                                    std::move(new_contents));
   }
 
   if (was_blocked) {
@@ -226,32 +232,34 @@
 void AwWebContentsDelegate::RequestMediaAccessPermission(
     WebContents* web_contents,
     const content::MediaStreamRequest& request,
-    const content::MediaResponseCallback& callback) {
+    content::MediaResponseCallback callback) {
   AwContents* aw_contents = AwContents::FromWebContents(web_contents);
   if (!aw_contents) {
-    callback.Run(content::MediaStreamDevices(),
-                 content::MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN,
-                 std::unique_ptr<content::MediaStreamUI>());
+    std::move(callback).Run(content::MediaStreamDevices(),
+                            content::MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN,
+                            std::unique_ptr<content::MediaStreamUI>());
     return;
   }
   aw_contents->GetPermissionRequestHandler()->SendRequest(
       std::unique_ptr<AwPermissionRequestDelegate>(
-          new MediaAccessPermissionRequest(request, callback)));
+          new MediaAccessPermissionRequest(request, std::move(callback))));
 }
 
 void AwWebContentsDelegate::EnterFullscreenModeForTab(
     content::WebContents* web_contents,
-    const GURL& origin) {
-  WebContentsDelegateAndroid::EnterFullscreenModeForTab(web_contents, origin);
+    const GURL& origin,
+    const blink::WebFullscreenOptions& options) {
+  WebContentsDelegateAndroid::EnterFullscreenModeForTab(web_contents, origin,
+                                                        options);
   is_fullscreen_ = true;
-  web_contents->GetRenderViewHost()->GetWidget()->WasResized();
+  web_contents->GetRenderViewHost()->GetWidget()->SynchronizeVisualProperties();
 }
 
 void AwWebContentsDelegate::ExitFullscreenModeForTab(
     content::WebContents* web_contents) {
   WebContentsDelegateAndroid::ExitFullscreenModeForTab(web_contents);
   is_fullscreen_ = false;
-  web_contents->GetRenderViewHost()->GetWidget()->WasResized();
+  web_contents->GetRenderViewHost()->GetWidget()->SynchronizeVisualProperties();
 }
 
 bool AwWebContentsDelegate::IsFullscreenForTabOrPending(
diff --git a/android_webview/browser/aw_web_contents_delegate.h b/android_webview/browser/aw_web_contents_delegate.h
index 86be13e..e78cab1 100644
--- a/android_webview/browser/aw_web_contents_delegate.h
+++ b/android_webview/browser/aw_web_contents_delegate.h
@@ -5,7 +5,7 @@
 #ifndef ANDROID_WEBVIEW_BROWSER_AW_WEB_CONTENTS_DELEGATE_H_
 #define ANDROID_WEBVIEW_BROWSER_AW_WEB_CONTENTS_DELEGATE_H_
 
-#include "components/web_contents_delegate_android/web_contents_delegate_android.h"
+#include "components/embedder_support/android/delegate/web_contents_delegate_android.h"
 
 namespace android_webview {
 
@@ -31,7 +31,7 @@
   void RunFileChooser(content::RenderFrameHost* render_frame_host,
                       const content::FileChooserParams& params) override;
   void AddNewContents(content::WebContents* source,
-                      content::WebContents* new_contents,
+                      std::unique_ptr<content::WebContents> new_contents,
                       WindowOpenDisposition disposition,
                       const gfx::Rect& initial_rect,
                       bool user_gesture,
@@ -54,9 +54,11 @@
   void RequestMediaAccessPermission(
       content::WebContents* web_contents,
       const content::MediaStreamRequest& request,
-      const content::MediaResponseCallback& callback) override;
-  void EnterFullscreenModeForTab(content::WebContents* web_contents,
-                                 const GURL& origin) override;
+      content::MediaResponseCallback callback) override;
+  void EnterFullscreenModeForTab(
+      content::WebContents* web_contents,
+      const GURL& origin,
+      const blink::WebFullscreenOptions& options) override;
   void ExitFullscreenModeForTab(content::WebContents* web_contents) override;
   bool IsFullscreenForTabOrPending(
       const content::WebContents* web_contents) const override;
diff --git a/android_webview/browser/aw_web_ui_controller_factory.cc b/android_webview/browser/aw_web_ui_controller_factory.cc
index 33bfdf5..29db65e 100644
--- a/android_webview/browser/aw_web_ui_controller_factory.cc
+++ b/android_webview/browser/aw_web_ui_controller_factory.cc
@@ -4,6 +4,7 @@
 
 #include "android_webview/browser/aw_web_ui_controller_factory.h"
 
+#include "base/memory/ptr_util.h"
 #include "components/safe_browsing/web_ui/constants.h"
 #include "components/safe_browsing/web_ui/safe_browsing_ui.h"
 #include "content/public/browser/web_ui.h"
@@ -73,14 +74,14 @@
   return UseWebUIForURL(browser_context, url);
 }
 
-WebUIController* AwWebUIControllerFactory::CreateWebUIControllerForURL(
-    WebUI* web_ui,
-    const GURL& url) const {
+std::unique_ptr<WebUIController>
+AwWebUIControllerFactory::CreateWebUIControllerForURL(WebUI* web_ui,
+                                                      const GURL& url) const {
   WebUIFactoryFunctionPointer function = GetWebUIFactoryFunctionPointer(url);
   if (!function)
     return nullptr;
 
-  return (*function)(web_ui, url);
+  return base::WrapUnique((*function)(web_ui, url));
 }
 
 }  // namespace android_webview
diff --git a/android_webview/browser/aw_web_ui_controller_factory.h b/android_webview/browser/aw_web_ui_controller_factory.h
index adbed53..d9f6008 100644
--- a/android_webview/browser/aw_web_ui_controller_factory.h
+++ b/android_webview/browser/aw_web_ui_controller_factory.h
@@ -22,7 +22,7 @@
                       const GURL& url) const override;
   bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
                               const GURL& url) const override;
-  content::WebUIController* CreateWebUIControllerForURL(
+  std::unique_ptr<content::WebUIController> CreateWebUIControllerForURL(
       content::WebUI* web_ui,
       const GURL& url) const override;
 
diff --git a/android_webview/browser/browser_view_renderer.cc b/android_webview/browser/browser_view_renderer.cc
index 3b3fbfd..2f87ef1 100644
--- a/android_webview/browser/browser_view_renderer.cc
+++ b/android_webview/browser/browser_view_renderer.cc
@@ -9,7 +9,6 @@
 
 #include "android_webview/browser/browser_view_renderer_client.h"
 #include "android_webview/browser/compositor_frame_consumer.h"
-#include "android_webview/common/aw_switches.h"
 #include "base/auto_reset.h"
 #include "base/command_line.h"
 #include "base/logging.h"
@@ -94,8 +93,6 @@
     const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner)
     : client_(client),
       ui_task_runner_(ui_task_runner),
-      sync_on_draw_hardware_(base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kSyncOnDrawHardware)),
       current_compositor_frame_consumer_(nullptr),
       compositor_(nullptr),
       is_paused_(false),
@@ -110,8 +107,7 @@
       max_page_scale_factor_(0.f),
       on_new_picture_enable_(false),
       clear_view_(false),
-      offscreen_pre_raster_(false),
-      allow_async_draw_(false) {}
+      offscreen_pre_raster_(false) {}
 
 BrowserViewRenderer::~BrowserViewRenderer() {
   DCHECK(compositor_map_.empty());
@@ -235,29 +231,13 @@
   gfx::Rect viewport_rect_for_tile_priority =
       ComputeViewportRectForTilePriority();
 
-  scoped_refptr<content::SynchronousCompositor::FrameFuture> future; // Async.
-  content::SynchronousCompositor::Frame frame; // Sync.
-  bool async = !sync_on_draw_hardware_ && allow_async_draw_;
-  if (async) {
-    future = compositor_->DemandDrawHwAsync(
-        size_, viewport_rect_for_tile_priority, transform_for_tile_priority);
-  } else {
-    frame = compositor_->DemandDrawHw(size_, viewport_rect_for_tile_priority,
-                                      transform_for_tile_priority);
-  }
-
-  if (!frame.frame && !future) {
-    TRACE_EVENT_INSTANT0("android_webview", "NoNewFrame",
-                         TRACE_EVENT_SCOPE_THREAD);
-    return current_compositor_frame_consumer_->HasFrameOnUI();
-  }
-
-  allow_async_draw_ = true;
+  scoped_refptr<content::SynchronousCompositor::FrameFuture> future =
+      compositor_->DemandDrawHwAsync(size_, viewport_rect_for_tile_priority,
+                                     transform_for_tile_priority);
   std::unique_ptr<ChildFrame> child_frame = std::make_unique<ChildFrame>(
-      std::move(future), frame.layer_tree_frame_sink_id, std::move(frame.frame),
-      compositor_id_, viewport_rect_for_tile_priority.IsEmpty(),
-      transform_for_tile_priority, offscreen_pre_raster_,
-      external_draw_constraints_.is_layer);
+      std::move(future), compositor_id_,
+      viewport_rect_for_tile_priority.IsEmpty(), transform_for_tile_priority,
+      offscreen_pre_raster_, external_draw_constraints_.is_layer);
 
   ReturnUnusedResource(
       current_compositor_frame_consumer_->SetFrameOnUI(std::move(child_frame)));
@@ -282,9 +262,12 @@
   DCHECK(compositor_frame_consumer);
   if (compositor_frame_consumer != current_compositor_frame_consumer_)
     return;
-  PostInvalidate(compositor_);
-  external_draw_constraints_ =
+  ParentCompositorDrawConstraints new_constraints =
       current_compositor_frame_consumer_->GetParentDrawConstraintsOnUI();
+  if (external_draw_constraints_ == new_constraints)
+    return;
+  external_draw_constraints_ = new_constraints;
+  PostInvalidate(compositor_);
   UpdateMemoryPolicy();
 }
 
@@ -340,6 +323,8 @@
       compositor->ReturnResources(pair.second.layer_tree_frame_sink_id,
                                   resources);
     }
+
+    has_rendered_frame_ = true;
   }
 }
 
@@ -347,6 +332,10 @@
   return CanOnDraw() && CompositeSW(canvas);
 }
 
+bool BrowserViewRenderer::NeedToDrawBackgroundColor() {
+  return !has_rendered_frame_;
+}
+
 sk_sp<SkPicture> BrowserViewRenderer::CapturePicture(int width,
                                                      int height) {
   TRACE_EVENT0("android_webview", "BrowserViewRenderer::CapturePicture");
@@ -486,6 +475,7 @@
     DCHECK(compositor_frame_consumer->ReturnedResourcesEmptyOnUI());
   }
   hardware_enabled_ = false;
+  has_rendered_frame_ = false;
   UpdateMemoryPolicy();
 }
 
@@ -525,8 +515,8 @@
   // At this point, the RVHChanged event for the new RVH that contains the
   // |compositor| might have been fired already, in which case just set the
   // current compositor with the new compositor.
-  if (!compositor_ && compositor_id.Equals(compositor_id_))
-    compositor_ = compositor;
+  if (compositor_id.Equals(compositor_id_))
+    SetActiveCompositor(compositor);
 }
 
 void BrowserViewRenderer::DidDestroyCompositor(
@@ -547,24 +537,22 @@
 
 void BrowserViewRenderer::SetActiveCompositorID(
     const CompositorID& compositor_id) {
-  // Set the old compositor memory policy to 0.
-  if (!compositor_id_.Equals(compositor_id) && compositor_)
-    compositor_->SetMemoryPolicy(0u);
-
-  if (content::SynchronousCompositor* compositor =
-          FindCompositor(compositor_id)) {
-    compositor_ = compositor;
-    UpdateMemoryPolicy();
-    gfx::Vector2dF scroll_offset =
-        content::IsUseZoomForDSFEnabled()
-            ? gfx::ScaleVector2d(scroll_offset_dip_, dip_scale_)
-            : scroll_offset_dip_;
-    compositor_->DidChangeRootLayerScrollOffset(
-        gfx::ScrollOffset(scroll_offset));
-  } else {
-    compositor_ = nullptr;
-  }
   compositor_id_ = compositor_id;
+  SetActiveCompositor(FindCompositor(compositor_id));
+}
+
+void BrowserViewRenderer::SetActiveCompositor(
+    content::SynchronousCompositor* compositor) {
+  if (compositor_ == compositor)
+    return;
+
+  if (compositor_)
+    compositor_->SetMemoryPolicy(0u);
+  compositor_ = compositor;
+  if (compositor_) {
+    UpdateMemoryPolicy();
+    compositor_->DidBecomeActive();
+  }
 }
 
 void BrowserViewRenderer::SetDipScale(float dip_scale) {
diff --git a/android_webview/browser/browser_view_renderer.h b/android_webview/browser/browser_view_renderer.h
index f68131c..bfb23dd 100644
--- a/android_webview/browser/browser_view_renderer.h
+++ b/android_webview/browser/browser_view_renderer.h
@@ -75,6 +75,8 @@
   bool OnDrawHardware();
   bool OnDrawSoftware(SkCanvas* canvas);
 
+  bool NeedToDrawBackgroundColor();
+
   // CapturePicture API methods.
   sk_sp<SkPicture> CapturePicture(int width, int height);
   void EnableOnNewPicture(bool enabled);
@@ -153,6 +155,7 @@
   bool window_visible_for_tests() const { return window_visible_; }
 
  private:
+  void SetActiveCompositor(content::SynchronousCompositor* compositor);
   void SetTotalRootLayerScrollOffset(const gfx::Vector2dF& new_value_dip);
   bool CanOnDraw();
   bool CompositeSW(SkCanvas* canvas);
@@ -179,7 +182,6 @@
 
   BrowserViewRendererClient* const client_;
   const scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
-  const bool sync_on_draw_hardware_;
   CompositorFrameConsumer* current_compositor_frame_consumer_;
   std::set<CompositorFrameConsumer*> compositor_frame_consumers_;
 
@@ -209,15 +211,11 @@
   bool on_new_picture_enable_;
   bool clear_view_;
 
-  bool offscreen_pre_raster_;
+  // Approximates whether render thread functor has a frame to draw. It is safe
+  // for Java side to stop blitting the background color once this is true.
+  bool has_rendered_frame_ = false;
 
-  // Must do a synchronous draw first to ensure GL bindings are initialized.
-  // TODO(boliu): Wait on render thread and remove this. When the
-  // first synchronous draw requirement is removed,
-  // RenderThreadManager::DeleteHardwareRendererOnUI will need to
-  // change, because it will no longer be true that having received a
-  // frame means that GL bindings have been initialized.
-  bool allow_async_draw_;
+  bool offscreen_pre_raster_;
 
   gfx::Vector2d last_on_draw_scroll_offset_;
   gfx::Rect last_on_draw_global_visible_rect_;
diff --git a/android_webview/browser/browser_view_renderer_unittest.cc b/android_webview/browser/browser_view_renderer_unittest.cc
index 3e67083..6d7b50d 100644
--- a/android_webview/browser/browser_view_renderer_unittest.cc
+++ b/android_webview/browser/browser_view_renderer_unittest.cc
@@ -186,9 +186,9 @@
   bool WillDrawOnRT(AwDrawGLInfo* draw_info) override {
     if (draw_gl_count_on_rt_ == 1) {
       draw_gl_count_on_rt_++;
-      ui_task_runner_->PostTask(
-          FROM_HERE,
-          base::Bind(&RenderingTest::PostInvalidate, base::Unretained(this)));
+      ui_task_runner_->PostTask(FROM_HERE,
+                                base::BindOnce(&RenderingTest::PostInvalidate,
+                                               base::Unretained(this)));
       return false;
     }
 
@@ -269,17 +269,13 @@
   }
 
   void DidOnDraw(bool success) override {
+    // OnDraw should succeed even when there are no frames from compositor.
+    EXPECT_TRUE(success);
     if (0 == on_draw_count_) {
-      // Should fail as there has been no frames from compositor.
-      EXPECT_FALSE(success);
       browser_view_renderer_->PostInvalidate(ActiveCompositor());
     } else if (1 == on_draw_count_) {
-      // Should succeed with frame from compositor.
-      EXPECT_TRUE(success);
       browser_view_renderer_->PostInvalidate(ActiveCompositor());
     } else if (2 == on_draw_count_) {
-      // Should still succeed with last frame, even if no frame from compositor.
-      EXPECT_TRUE(success);
       EndTest();
     }
     on_draw_count_++;
@@ -363,9 +359,9 @@
   void DidOnDraw(bool success) override {
     EXPECT_EQ(next_frame_ != nullptr, success);
     if (!AdvanceFrame()) {
-      ui_task_runner_->PostTask(FROM_HERE,
-                                base::Bind(&ResourceRenderingTest::CheckResults,
-                                           base::Unretained(this)));
+      ui_task_runner_->PostTask(
+          FROM_HERE, base::BindOnce(&ResourceRenderingTest::CheckResults,
+                                    base::Unretained(this)));
     }
   }
 
diff --git a/android_webview/browser/child_frame.cc b/android_webview/browser/child_frame.cc
index 86dd2ff..551aba8 100644
--- a/android_webview/browser/child_frame.cc
+++ b/android_webview/browser/child_frame.cc
@@ -13,16 +13,12 @@
 
 ChildFrame::ChildFrame(
     scoped_refptr<content::SynchronousCompositor::FrameFuture> frame_future,
-    uint32_t layer_tree_frame_sink_id,
-    std::unique_ptr<viz::CompositorFrame> frame,
     const CompositorID& compositor_id,
     bool viewport_rect_for_tile_priority_empty,
     const gfx::Transform& transform_for_tile_priority,
     bool offscreen_pre_raster,
     bool is_layer)
     : frame_future(std::move(frame_future)),
-      layer_tree_frame_sink_id(layer_tree_frame_sink_id),
-      frame(std::move(frame)),
       compositor_id(compositor_id),
       viewport_rect_for_tile_priority_empty(
           viewport_rect_for_tile_priority_empty),
diff --git a/android_webview/browser/child_frame.h b/android_webview/browser/child_frame.h
index c28ee25..aea082d 100644
--- a/android_webview/browser/child_frame.h
+++ b/android_webview/browser/child_frame.h
@@ -25,8 +25,6 @@
  public:
   ChildFrame(
       scoped_refptr<content::SynchronousCompositor::FrameFuture> frame_future,
-      uint32_t layer_tree_frame_sink_id,
-      std::unique_ptr<viz::CompositorFrame> frame,
       const CompositorID& compositor_id,
       bool viewport_rect_for_tile_priority_empty,
       const gfx::Transform& transform_for_tile_priority,
@@ -37,11 +35,10 @@
   // Helper to move frame from |frame_future| to |frame|.
   void WaitOnFutureIfNeeded();
 
-  // This is used in async ondraw path. The frame is either in |frame_future|
-  // or |frame|. It's illegal if both are non-null.
+  // The frame is either in |frame_future| or |frame|. It's illegal if both
+  // are non-null.
   scoped_refptr<content::SynchronousCompositor::FrameFuture> frame_future;
-  // These two fields are not const to make async path easier.
-  uint32_t layer_tree_frame_sink_id;
+  uint32_t layer_tree_frame_sink_id = 0u;
   std::unique_ptr<viz::CompositorFrame> frame;
   // The id of the compositor this |frame| comes from.
   const CompositorID compositor_id;
diff --git a/android_webview/browser/compositor_frame_consumer.h b/android_webview/browser/compositor_frame_consumer.h
index 4d51c92..b3f763a 100644
--- a/android_webview/browser/compositor_frame_consumer.h
+++ b/android_webview/browser/compositor_frame_consumer.h
@@ -51,7 +51,6 @@
       ReturnedResourcesMap* returned_resource_map) = 0;
   virtual bool ReturnedResourcesEmptyOnUI() const = 0;
   virtual ChildFrameQueue PassUncommittedFrameOnUI() = 0;
-  virtual bool HasFrameOnUI() const = 0;
   virtual void DeleteHardwareRendererOnUI() = 0;
 
  protected:
diff --git a/android_webview/browser/cookie_manager.cc b/android_webview/browser/cookie_manager.cc
index 2f7bbe8..0b33a05 100644
--- a/android_webview/browser/cookie_manager.cc
+++ b/android_webview/browser/cookie_manager.cc
@@ -31,6 +31,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/cookie_store_factory.h"
 #include "jni/AwCookieManager_jni.h"
+#include "net/cookies/canonical_cookie.h"
 #include "net/cookies/cookie_monster.h"
 #include "net/cookies/cookie_options.h"
 #include "net/cookies/cookie_store.h"
@@ -63,8 +64,8 @@
 
 namespace {
 
-typedef base::Callback<void(bool)> BoolCallback;
-typedef base::Callback<void(int)> IntCallback;
+using BoolCallback = base::RepeatingCallback<void(bool)>;
+using IntCallback = base::RepeatingCallback<void(int)>;
 
 // Holds a Java BooleanCookieCallback, knows how to invoke it and turn it
 // into a base callback.
@@ -83,8 +84,8 @@
 
   static BoolCallback ConvertToCallback(
       std::unique_ptr<BoolCookieCallbackHolder> me) {
-    return base::Bind(&BoolCookieCallbackHolder::Invoke,
-                      base::Owned(me.release()));
+    return base::BindRepeating(&BoolCookieCallbackHolder::Invoke,
+                               base::Owned(me.release()));
   }
 
  private:
@@ -94,31 +95,32 @@
 
 // Construct a closure which signals a waitable event if and when the closure
 // is called the waitable event must still exist.
-static base::Closure SignalEventClosure(WaitableEvent* completion) {
-  return base::Bind(&WaitableEvent::Signal, base::Unretained(completion));
+static base::RepeatingClosure SignalEventClosure(WaitableEvent* completion) {
+  return base::BindRepeating(&WaitableEvent::Signal,
+                             base::Unretained(completion));
 }
 
-static void DiscardBool(const base::Closure& f, bool b) {
+static void DiscardBool(base::RepeatingClosure f, bool b) {
   f.Run();
 }
 
-static BoolCallback BoolCallbackAdapter(const base::Closure& f) {
-  return base::Bind(&DiscardBool, f);
+static BoolCallback BoolCallbackAdapter(base::RepeatingClosure f) {
+  return base::BindRepeating(&DiscardBool, std::move(f));
 }
 
-static void DiscardInt(const base::Closure& f, int i) {
+static void DiscardInt(base::RepeatingClosure f, int i) {
   f.Run();
 }
 
-static IntCallback IntCallbackAdapter(const base::Closure& f) {
-  return base::Bind(&DiscardInt, f);
+static IntCallback IntCallbackAdapter(base::RepeatingClosure f) {
+  return base::BindRepeating(&DiscardInt, std::move(f));
 }
 
 // Are cookies allowed for file:// URLs by default?
 const bool kDefaultFileSchemeAllowed = false;
 
 void GetUserDataDir(FilePath* user_data_dir) {
-  if (!PathService::Get(base::DIR_ANDROID_APP_DATA, user_data_dir)) {
+  if (!base::PathService::Get(base::DIR_ANDROID_APP_DATA, user_data_dir)) {
     NOTREACHED() << "Failed to get app data directory for Android WebView";
   }
 }
@@ -164,30 +166,30 @@
   CookieManager();
   ~CookieManager();
 
-  void ExecCookieTaskSync(const base::Callback<void(BoolCallback)>& task);
-  void ExecCookieTaskSync(const base::Callback<void(IntCallback)>& task);
-  void ExecCookieTaskSync(const base::Callback<void(base::Closure)>& task);
-  void ExecCookieTask(const base::Closure& task);
+  void ExecCookieTaskSync(base::OnceCallback<void(BoolCallback)> task);
+  void ExecCookieTaskSync(base::OnceCallback<void(IntCallback)> task);
+  void ExecCookieTaskSync(base::OnceCallback<void(base::OnceClosure)> task);
+  void ExecCookieTask(base::OnceClosure task);
 
   void SetCookieHelper(const GURL& host,
                        const std::string& value,
                        BoolCallback callback);
 
-  void GetCookieValueAsyncHelper(const GURL& host,
-                                 std::string* result,
-                                 base::Closure complete);
-  void GetCookieValueCompleted(base::Closure complete,
-                               std::string* result,
-                               const std::string& value);
+  void GetCookieListAsyncHelper(const GURL& host,
+                                net::CookieList* result,
+                                base::OnceClosure complete);
+  void GetCookieListCompleted(base::OnceClosure complete,
+                              net::CookieList* result,
+                              const net::CookieList& value);
 
   void RemoveSessionCookiesHelper(BoolCallback callback);
   void RemoveAllCookiesHelper(BoolCallback callback);
   void RemoveCookiesCompleted(BoolCallback callback, uint32_t num_deleted);
 
-  void FlushCookieStoreAsyncHelper(base::Closure complete);
+  void FlushCookieStoreAsyncHelper(base::OnceClosure complete);
 
-  void HasCookiesAsyncHelper(bool* result, base::Closure complete);
-  void HasCookiesCompleted(base::Closure complete,
+  void HasCookiesAsyncHelper(bool* result, base::OnceClosure complete);
+  void HasCookiesCompleted(base::OnceClosure complete,
                            bool* result,
                            const net::CookieList& cookies);
 
@@ -242,22 +244,22 @@
 //
 // Ignore a bool callback.
 void CookieManager::ExecCookieTaskSync(
-    const base::Callback<void(BoolCallback)>& task) {
+    base::OnceCallback<void(BoolCallback)> task) {
   WaitableEvent completion(base::WaitableEvent::ResetPolicy::AUTOMATIC,
                            base::WaitableEvent::InitialState::NOT_SIGNALED);
-  ExecCookieTask(
-      base::Bind(task, BoolCallbackAdapter(SignalEventClosure(&completion))));
+  ExecCookieTask(base::BindOnce(
+      std::move(task), BoolCallbackAdapter(SignalEventClosure(&completion))));
   base::ThreadRestrictions::ScopedAllowWait wait;
   completion.Wait();
 }
 
 // Ignore an int callback.
 void CookieManager::ExecCookieTaskSync(
-    const base::Callback<void(IntCallback)>& task) {
+    base::OnceCallback<void(IntCallback)> task) {
   WaitableEvent completion(base::WaitableEvent::ResetPolicy::AUTOMATIC,
                            base::WaitableEvent::InitialState::NOT_SIGNALED);
-  ExecCookieTask(
-      base::Bind(task, IntCallbackAdapter(SignalEventClosure(&completion))));
+  ExecCookieTask(base::BindOnce(
+      std::move(task), IntCallbackAdapter(SignalEventClosure(&completion))));
   base::ThreadRestrictions::ScopedAllowWait wait;
   completion.Wait();
 }
@@ -265,17 +267,18 @@
 // Call the supplied closure when you want to signal that the blocked code can
 // continue.
 void CookieManager::ExecCookieTaskSync(
-    const base::Callback<void(base::Closure)>& task) {
+    base::OnceCallback<void(base::OnceClosure)> task) {
   WaitableEvent completion(base::WaitableEvent::ResetPolicy::AUTOMATIC,
                            base::WaitableEvent::InitialState::NOT_SIGNALED);
-  ExecCookieTask(base::Bind(task, SignalEventClosure(&completion)));
+  ExecCookieTask(
+      base::BindOnce(std::move(task), SignalEventClosure(&completion)));
   base::ThreadRestrictions::ScopedAllowWait wait;
   completion.Wait();
 }
 
 // Executes the |task| using |cookie_store_task_runner_|.
-void CookieManager::ExecCookieTask(const base::Closure& task) {
-  cookie_store_task_runner_->PostTask(FROM_HERE, task);
+void CookieManager::ExecCookieTask(base::OnceClosure task) {
+  cookie_store_task_runner_->PostTask(FROM_HERE, std::move(task));
 }
 
 base::SingleThreadTaskRunner* CookieManager::GetCookieStoreTaskRunner() {
@@ -336,15 +339,16 @@
     std::unique_ptr<BoolCookieCallbackHolder> callback_holder) {
   BoolCallback callback =
       BoolCookieCallbackHolder::ConvertToCallback(std::move(callback_holder));
-  ExecCookieTask(base::Bind(&CookieManager::SetCookieHelper,
-                            base::Unretained(this), host, cookie_value,
-                            callback));
+  ExecCookieTask(base::BindOnce(&CookieManager::SetCookieHelper,
+                                base::Unretained(this), host, cookie_value,
+                                callback));
 }
 
 void CookieManager::SetCookieSync(const GURL& host,
                                   const std::string& cookie_value) {
-  ExecCookieTaskSync(base::Bind(&CookieManager::SetCookieHelper,
-                                base::Unretained(this), host, cookie_value));
+  ExecCookieTaskSync(base::BindOnce(&CookieManager::SetCookieHelper,
+                                    base::Unretained(this), host,
+                                    cookie_value));
 }
 
 void CookieManager::SetCookieHelper(const GURL& host,
@@ -375,48 +379,49 @@
 }
 
 std::string CookieManager::GetCookie(const GURL& host) {
-  std::string cookie_value;
-  ExecCookieTaskSync(base::Bind(&CookieManager::GetCookieValueAsyncHelper,
-                                base::Unretained(this), host, &cookie_value));
-  return cookie_value;
+  net::CookieList cookie_list;
+  ExecCookieTaskSync(base::BindOnce(&CookieManager::GetCookieListAsyncHelper,
+                                    base::Unretained(this), host,
+                                    &cookie_list));
+  return net::CanonicalCookie::BuildCookieLine(cookie_list);
 }
 
-void CookieManager::GetCookieValueAsyncHelper(const GURL& host,
-                                              std::string* result,
-                                              base::Closure complete) {
+void CookieManager::GetCookieListAsyncHelper(const GURL& host,
+                                             net::Cooki