diff --git a/DEPS b/DEPS
index ffef584..b53c722 100644
--- a/DEPS
+++ b/DEPS
@@ -40,11 +40,11 @@
   # 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': '5aa3a84d27ddaa787b301428940ec3035d7c0bef',
+  'skia_revision': '9d7e57d509149dd2fcb3ba73ea8f4cdce11f84bd',
   # 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': '314b5db3a09db13b98bab13c67690ab45d5f0195',
+  'v8_revision': '255b03c11f25b8ddd746a0220dbcbc5c44843e28',
   # 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.
@@ -64,7 +64,7 @@
   # 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': '7bec2ff744a71a0a7e0fec86be13095a323375ab',
+  'pdfium_revision': '31f7e4bb502e617a54da04a7600e8be7e2b62756',
   # 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.
@@ -96,7 +96,7 @@
   # 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': '49e6028206d64e387ac202af7ee064e5a1348922',
+  'catapult_revision': 'eebaedf9bcacd089d8561842ce75b64ebf71a26b',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -238,7 +238,7 @@
     Var('chromium_git') + '/native_client/src/third_party/scons-2.0.1.git' + '@' + '1c1550e17fc26355d08627fbdec13d8291227067',
 
   'src/third_party/webrtc':
-    Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + '158b11dcb395f29dafc49467606accb5f14bddb8', # commit position 19571
+    Var('chromium_git') + '/external/webrtc/trunk/webrtc.git' + '@' + '320b4cdda07345a8c2fdf93588de39b1301177b2', # commit position 19581
 
   'src/third_party/openmax_dl':
     Var('chromium_git') + '/external/webrtc/deps/third_party/openmax.git' + '@' +  Var('openmax_dl_revision'),
diff --git a/android_webview/BUILD.gn b/android_webview/BUILD.gn
index 82232b3..e3896eb0 100644
--- a/android_webview/BUILD.gn
+++ b/android_webview/BUILD.gn
@@ -58,7 +58,6 @@
     "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/AwRendererPriorityManager.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",
@@ -87,9 +86,9 @@
   ]
 }
 
-java_cpp_enum("aw_renderer_priority_manager_renderer_priority") {
+java_cpp_enum("android_webview_java_enums_srcjar") {
   sources = [
-    "browser/aw_renderer_priority_manager.h",
+    "browser/aw_renderer_priority.h",
   ]
 }
 
@@ -502,8 +501,7 @@
     "browser/aw_render_process_gone_delegate.h",
     "browser/aw_render_thread_context_provider.cc",
     "browser/aw_render_thread_context_provider.h",
-    "browser/aw_renderer_priority_manager.cc",
-    "browser/aw_renderer_priority_manager.h",
+    "browser/aw_renderer_priority.h",
     "browser/aw_resource_context.cc",
     "browser/aw_resource_context.h",
     "browser/aw_result_codes.h",
@@ -798,7 +796,6 @@
     "java/src/org/chromium/android_webview/AwSafeBrowsingConfigHelper.java",
     "java/src/org/chromium/android_webview/AwSafeBrowsingResponse.java",
     "java/src/org/chromium/android_webview/AwQuotaManagerBridge.java",
-    "java/src/org/chromium/android_webview/AwRendererPriorityManager.java",
     "java/src/org/chromium/android_webview/AwRenderProcessGoneDetail.java",
     "java/src/org/chromium/android_webview/AwResource.java",
     "java/src/org/chromium/android_webview/AwSafeBrowsingConversionHelper.java",
@@ -875,7 +872,7 @@
 
   srcjar_deps = [
     ":aw_permission_request_resource",
-    ":aw_renderer_priority_manager_renderer_priority",
+    ":android_webview_java_enums_srcjar",
     ":aw_error_ui",
     ":aw_safe_browsing_action",
     "//components/safe_browsing_db:sb_threat_values",
diff --git a/android_webview/browser/aw_contents.cc b/android_webview/browser/aw_contents.cc
index 9570c4a..b827a89a 100644
--- a/android_webview/browser/aw_contents.cc
+++ b/android_webview/browser/aw_contents.cc
@@ -16,7 +16,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_renderer_priority_manager.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"
 #include "android_webview/browser/browser_view_renderer.h"
@@ -57,6 +57,7 @@
 #include "components/autofill/core/browser/autofill_manager.h"
 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
 #include "components/navigation_interception/intercept_navigation_delegate.h"
+#include "content/public/browser/android/child_process_importance.h"
 #include "content/public/browser/android/synchronous_compositor.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/browsing_data_remover.h"
@@ -214,10 +215,7 @@
           this,
           BrowserThread::GetTaskRunnerForThread(BrowserThread::UI)),
       web_contents_(std::move(web_contents)),
-      renderer_manager_key_(GLViewRendererManager::GetInstance()->NullKey()),
-      renderer_requested_priority_(
-          AwRendererPriorityManager::RENDERER_PRIORITY_HIGH),
-      renderer_priority_waived_when_not_visible_(false) {
+      renderer_manager_key_(GLViewRendererManager::GetInstance()->NullKey()) {
   base::subtle::NoBarrier_AtomicIncrement(&g_instance_count, 1);
   icon_helper_.reset(new IconHelper(web_contents_.get()));
   icon_helper_->SetListener(this);
@@ -246,8 +244,6 @@
     InitAutofillIfNecessary(autofill_manager_delegate->GetSaveFormData());
   content::SynchronousCompositor::SetClientForWebContents(
       web_contents_.get(), &browser_view_renderer_);
-  UpdateRendererPriority();
-  web_contents_->GetRenderProcessHost()->AddObserver(this);
   AwContentsLifecycleNotifier::OnWebViewCreated();
 }
 
@@ -341,8 +337,6 @@
 
 AwContents::~AwContents() {
   DCHECK_EQ(this, AwContents::FromWebContents(web_contents_.get()));
-  web_contents_->GetRenderProcessHost()->RemoveObserver(this);
-  UpdateRendererPriority(AwRendererPriorityManager::RENDERER_PRIORITY_WAIVED);
   web_contents_->RemoveUserData(kAwContentsUserDataKey);
   if (find_helper_.get())
     find_helper_->SetListener(NULL);
@@ -902,7 +896,6 @@
                                    bool visible) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   browser_view_renderer_.SetViewVisibility(visible);
-  UpdateRendererPriority();
 }
 
 void AwContents::SetWindowVisibility(JNIEnv* env,
@@ -910,7 +903,6 @@
                                      bool visible) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   browser_view_renderer_.SetWindowVisibility(visible);
-  UpdateRendererPriority();
 }
 
 void AwContents::SetIsPaused(JNIEnv* env,
@@ -918,7 +910,6 @@
                              bool paused) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   browser_view_renderer_.SetIsPaused(paused);
-  UpdateRendererPriority();
 }
 
 void AwContents::OnAttachedToWindow(JNIEnv* env,
@@ -927,14 +918,12 @@
                                     int h) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   browser_view_renderer_.OnAttachedToWindow(w, h);
-  UpdateRendererPriority();
 }
 
 void AwContents::OnDetachedFromWindow(JNIEnv* env,
                                       const JavaParamRef<jobject>& obj) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   browser_view_renderer_.OnDetachedFromWindow();
-  UpdateRendererPriority();
 }
 
 bool AwContents::IsVisible(JNIEnv* env, const JavaParamRef<jobject>& obj) {
@@ -1222,92 +1211,22 @@
                  ScopedJavaGlobalRef<jobject>(env, callback)));
 }
 
-void AwContents::UpdateRendererPriority(
-    AwRendererPriorityManager::RendererPriority base_priority) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  content::RenderProcessHost* rph = web_contents_->GetRenderProcessHost();
-  AwRendererPriorityManager::RendererPriority computed_priority = base_priority;
-
-  std::unique_ptr<content::RenderWidgetHostIterator> widgets(
-      content::RenderWidgetHost::GetRenderWidgetHosts());
-  content::RenderWidgetHost* widget;
-  while ((widget = widgets->GetNextHost()) != nullptr &&
-         computed_priority <
-             AwRendererPriorityManager::RENDERER_PRIORITY_HIGH) {
-    content::RenderViewHost* view = content::RenderViewHost::From(widget);
-    if (view && rph == view->GetProcess()) {
-      content::WebContents* wc = content::WebContents::FromRenderViewHost(view);
-      if (wc && wc != web_contents_.get()) {
-        AwContents* aw_contents = FromWebContents(wc);
-        if (aw_contents) {
-          computed_priority = std::max(
-              aw_contents->GetComputedRendererPriority(), computed_priority);
-        }
-      }
-    }
-  }
-  GetAwRendererPriorityManager()->SetRendererPriority(computed_priority);
-}
-
-AwRendererPriorityManager::RendererPriority
-AwContents::GetComputedRendererPriority() {
-  if (renderer_priority_waived_when_not_visible_ &&
-      !browser_view_renderer_.IsClientVisible()) {
-    return AwRendererPriorityManager::RENDERER_PRIORITY_WAIVED;
-  }
-  return renderer_requested_priority_;
-}
-
-void AwContents::UpdateRendererPriority() {
-  UpdateRendererPriority(GetComputedRendererPriority());
-}
-
-AwRendererPriorityManager* AwContents::GetAwRendererPriorityManager() {
-  content::RenderProcessHost* rph = web_contents_->GetRenderProcessHost();
-  AwRendererPriorityManager* manager = static_cast<AwRendererPriorityManager*>(
-      rph->GetUserData(kComputedRendererPriorityUserDataKey));
-  if (manager == nullptr) {
-    manager = new AwRendererPriorityManager(rph);
-    rph->SetUserData(kComputedRendererPriorityUserDataKey,
-                     base::WrapUnique(manager));
-  }
-  return manager;
-}
-
-AwRendererPriorityManager::RendererPriority
-AwContents::GetCurrentRendererPriority() {
-  return GetAwRendererPriorityManager()->GetRendererPriority();
-}
-
-jint AwContents::GetRendererCurrentPriority(
+jint AwContents::GetEffectivePriority(
     JNIEnv* env,
     const base::android::JavaParamRef<jobject>& obj) {
-  return GetCurrentRendererPriority();
-}
-
-jint AwContents::GetRendererRequestedPriority(
-    JNIEnv* env,
-    const base::android::JavaParamRef<jobject>& obj) {
-  return renderer_requested_priority_;
-}
-
-jboolean AwContents::GetRendererPriorityWaivedWhenNotVisible(
-    JNIEnv* env,
-    const base::android::JavaParamRef<jobject>& obj) {
-  return renderer_priority_waived_when_not_visible_;
-}
-
-void AwContents::SetRendererPriorityPolicy(
-    JNIEnv* env,
-    const JavaParamRef<jobject>& obj,
-    jint renderer_requested_priority,
-    jboolean renderer_priority_waived_when_not_visible) {
-  renderer_requested_priority_ =
-      static_cast<AwRendererPriorityManager::RendererPriority>(
-          renderer_requested_priority);
-  renderer_priority_waived_when_not_visible_ =
-      renderer_priority_waived_when_not_visible;
-  UpdateRendererPriority(renderer_requested_priority_);
+  switch (web_contents_->GetRenderProcessHost()->ComputeEffectiveImportance()) {
+    case content::ChildProcessImportance::NORMAL:
+      return static_cast<jint>(RendererPriority::WAIVED);
+    case content::ChildProcessImportance::MODERATE:
+      return static_cast<jint>(RendererPriority::LOW);
+    case content::ChildProcessImportance::IMPORTANT:
+      return static_cast<jint>(RendererPriority::HIGH);
+    case content::ChildProcessImportance::COUNT:
+      NOTREACHED();
+      return 0;
+  }
+  NOTREACHED();
+  return 0;
 }
 
 void AwContents::ClearView(JNIEnv* env, const JavaParamRef<jobject>& obj) {
@@ -1489,8 +1408,4 @@
                                                    crashed);
 }
 
-void AwContents::RenderProcessReady(content::RenderProcessHost* host) {
-  UpdateRendererPriority();
-}
-
 }  // namespace android_webview
diff --git a/android_webview/browser/aw_contents.h b/android_webview/browser/aw_contents.h
index e2ed417..3ec1f4f9 100644
--- a/android_webview/browser/aw_contents.h
+++ b/android_webview/browser/aw_contents.h
@@ -12,7 +12,6 @@
 
 #include "android_webview/browser/aw_browser_permission_request_delegate.h"
 #include "android_webview/browser/aw_render_process_gone_delegate.h"
-#include "android_webview/browser/aw_renderer_priority_manager.h"
 #include "android_webview/browser/aw_safe_browsing_ui_manager.h"
 #include "android_webview/browser/browser_view_renderer.h"
 #include "android_webview/browser/browser_view_renderer_client.h"
@@ -27,7 +26,6 @@
 #include "base/android/scoped_java_ref.h"
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "content/public/browser/render_process_host_observer.h"
 #include "content/public/browser/web_contents_observer.h"
 
 class SkBitmap;
@@ -71,7 +69,6 @@
                    public AwBrowserPermissionRequestDelegate,
                    public AwRenderProcessGoneDelegate,
                    public content::WebContentsObserver,
-                   public content::RenderProcessHostObserver,
                    public AwSafeBrowsingUIManager::UIManagerClient {
  public:
   // Returns the AwContents instance associated with |web_contents|, or NULL.
@@ -219,21 +216,8 @@
       jboolean value,
       const base::android::JavaParamRef<jstring>& origin);
 
-  AwRendererPriorityManager::RendererPriority GetCurrentRendererPriority();
-  jint GetRendererCurrentPriority(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& obj);
-  jint GetRendererRequestedPriority(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& obj);
-  jboolean GetRendererPriorityWaivedWhenNotVisible(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& obj);
-  void SetRendererPriorityPolicy(
-      JNIEnv* env,
-      const base::android::JavaParamRef<jobject>& obj,
-      jint rendererRequestedPriority,
-      jboolean waivedhenNotVisible);
+  jint GetEffectivePriority(JNIEnv* env,
+                            const base::android::JavaParamRef<jobject>& obj);
 
   // PermissionRequestHandlerClient implementation.
   void OnPermissionRequest(base::android::ScopedJavaLocalRef<jobject> j_request,
@@ -359,9 +343,6 @@
   void DidAttachInterstitialPage() override;
   void DidDetachInterstitialPage() override;
 
-  // content::RenderProcessHostObserver overrides
-  void RenderProcessReady(content::RenderProcessHost* host) override;
-
   // AwSafeBrowsingUIManager::UIManagerClient implementation
   bool CanShowInterstitial() override;
   int GetErrorUiType() override;
@@ -387,12 +368,6 @@
 
   void SetAwGLFunctor(AwGLFunctor* functor);
 
-  AwRendererPriorityManager* GetAwRendererPriorityManager();
-  AwRendererPriorityManager::RendererPriority GetComputedRendererPriority();
-  void UpdateRendererPriority(
-      AwRendererPriorityManager::RendererPriority base_priority);
-  void UpdateRendererPriority();
-
   JavaObjectWeakGlobalRef java_ref_;
   AwGLFunctor* functor_;
   BrowserViewRenderer browser_view_renderer_;  // Must outlive |web_contents_|.
@@ -416,9 +391,6 @@
 
   GLViewRendererManager::Key renderer_manager_key_;
 
-  AwRendererPriorityManager::RendererPriority renderer_requested_priority_;
-  bool renderer_priority_waived_when_not_visible_;
-
   DISALLOW_COPY_AND_ASSIGN(AwContents);
 };
 
diff --git a/android_webview/browser/aw_renderer_priority.h b/android_webview/browser/aw_renderer_priority.h
new file mode 100644
index 0000000..12e77c9
--- /dev/null
+++ b/android_webview/browser/aw_renderer_priority.h
@@ -0,0 +1,16 @@
+// 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_RENDERER_PRIORITY_H_
+#define ANDROID_WEBVIEW_BROWSER_AW_RENDERER_PRIORITY_H_
+
+namespace android_webview {
+
+// TODO(boliu): Remove INITIAL.
+// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.android_webview.renderer_priority
+enum class RendererPriority { INITIAL = -1, WAIVED = 0, LOW = 1, HIGH = 2 };
+
+}  // namespace android_webview
+
+#endif  // ANDROID_WEBVIEW_BROWSER_AW_RENDERER_PRIORITY_H_
diff --git a/android_webview/browser/aw_renderer_priority_manager.cc b/android_webview/browser/aw_renderer_priority_manager.cc
deleted file mode 100644
index a062988..0000000
--- a/android_webview/browser/aw_renderer_priority_manager.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2012 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_renderer_priority_manager.h"
-
-#include "base/android/jni_android.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/browser/render_process_host.h"
-#include "jni/AwRendererPriorityManager_jni.h"
-
-namespace android_webview {
-
-AwRendererPriorityManager::AwRendererPriorityManager(
-    content::RenderProcessHost* host)
-    : host_(host), renderer_priority_(RENDERER_PRIORITY_INITIAL) {}
-
-void AwRendererPriorityManager::SetRendererPriority(
-    RendererPriority renderer_priority) {
-  if (host_->GetHandle() == 0) {
-    return;
-  }
-  if (renderer_priority_ != renderer_priority) {
-    renderer_priority_ = renderer_priority;
-    content::BrowserThread::PostTask(
-        content::BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
-        base::Bind(&SetRendererPriorityOnLauncherThread, host_->GetHandle(),
-                   renderer_priority_));
-  }
-}
-
-// static
-void AwRendererPriorityManager::SetRendererPriorityOnLauncherThread(
-    int pid,
-    RendererPriority renderer_priority) {
-  JNIEnv* env = base::android::AttachCurrentThread();
-  DCHECK(env);
-  Java_AwRendererPriorityManager_setRendererPriority(
-      env, static_cast<jint>(pid), static_cast<jint>(renderer_priority));
-}
-
-}  // namespace android_webview
diff --git a/android_webview/browser/aw_renderer_priority_manager.h b/android_webview/browser/aw_renderer_priority_manager.h
deleted file mode 100644
index 6569d259..0000000
--- a/android_webview/browser/aw_renderer_priority_manager.h
+++ /dev/null
@@ -1,42 +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_RENDERER_PRIORITY_MANAGER_H_
-#define ANDROID_WEBVIEW_BROWSER_AW_RENDERER_PRIORITY_MANAGER_H_
-
-#include "base/supports_user_data.h"
-
-namespace content {
-class RenderProcessHost;
-}
-
-namespace android_webview {
-
-class AwRendererPriorityManager : public base::SupportsUserData::Data {
- public:
-  // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.android_webview.renderer_priority
-  enum RendererPriority {
-    RENDERER_PRIORITY_INITIAL = -1,
-    RENDERER_PRIORITY_WAIVED = 0,
-    RENDERER_PRIORITY_LOW = 1,
-    RENDERER_PRIORITY_HIGH = 2
-  };
-
-  explicit AwRendererPriorityManager(content::RenderProcessHost* host);
-
-  RendererPriority GetRendererPriority() const { return renderer_priority_; }
-  void SetRendererPriority(RendererPriority renderer_priority);
-
- private:
-  static void SetRendererPriorityOnLauncherThread(
-      int pid,
-      RendererPriority renderer_priority);
-
-  content::RenderProcessHost* host_;
-  RendererPriority renderer_priority_;
-};
-
-}  // namespace android_webview
-
-#endif  // ANDROID_WEBVIEW_BROWSER_AW_RENDERER_PRIORITY_MANAGER_H_
diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
index 7c689c8..25d6d16 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
@@ -80,8 +80,10 @@
     public static void configureChildProcessLauncher(String packageName,
             boolean isExternalService) {
         final boolean bindToCaller = true;
+        final boolean ignoreVisibilityForImportance = true;
         ChildProcessCreationParams.registerDefault(new ChildProcessCreationParams(packageName,
-                isExternalService, LibraryProcessType.PROCESS_WEBVIEW_CHILD, bindToCaller));
+                isExternalService, LibraryProcessType.PROCESS_WEBVIEW_CHILD, bindToCaller,
+                ignoreVisibilityForImportance));
     }
 
     /**
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index f2b2a978..6090015 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -66,6 +66,7 @@
 import org.chromium.content.browser.ContentViewCore;
 import org.chromium.content.browser.ContentViewStatics;
 import org.chromium.content.browser.SmartClipProvider;
+import org.chromium.content_public.browser.ChildProcessImportance;
 import org.chromium.content_public.browser.GestureStateListener;
 import org.chromium.content_public.browser.JavaScriptCallback;
 import org.chromium.content_public.browser.LoadUrlParams;
@@ -318,6 +319,9 @@
     private boolean mIsUpdateVisibilityTaskPending;
     private Runnable mUpdateVisibilityRunnable;
 
+    private @RendererPriority int mRendererPriority;
+    private boolean mRendererPriorityWaivedWhenNotVisible;
+
     private Bitmap mFavicon;
     private boolean mHasRequestedVisitedHistoryFromClient;
     // Whether this WebView is a popup.
@@ -751,6 +755,7 @@
             InternalAccessDelegate internalAccessAdapter,
             NativeDrawGLFunctorFactory nativeDrawGLFunctorFactory, AwContentsClient contentsClient,
             AwSettings settings, DependencyFactory dependencyFactory) {
+        mRendererPriority = RendererPriority.HIGH;
         updateDefaultLocale();
         settings.updateAcceptLanguages();
 
@@ -1191,7 +1196,13 @@
     protected boolean onRenderProcessGoneDetail(int childProcessID, boolean crashed) {
         if (isDestroyed(NO_WARN)) return true;
         return mContentsClient.onRenderProcessGone(new AwRenderProcessGoneDetail(
-                crashed, nativeGetRendererCurrentPriority(mNativeAwContents)));
+                crashed, nativeGetEffectivePriority(mNativeAwContents)));
+    }
+
+    @VisibleForTesting
+    public @RendererPriority int getEffectivePriorityForTesting() {
+        assert !isDestroyed(NO_WARN);
+        return nativeGetEffectivePriority(mNativeAwContents);
     }
 
     private boolean isNoOperation() {
@@ -2509,6 +2520,7 @@
             mContentViewCore.onHide();
         }
         mIsContentViewCoreVisible = contentViewCoreVisible;
+        updateChildProcessImportance();
     }
 
     /**
@@ -2677,19 +2689,44 @@
         return mIsPopupWindow;
     }
 
+    private void updateChildProcessImportance() {
+        @ChildProcessImportance
+        int effectiveImportance = ChildProcessImportance.IMPORTANT;
+        if (mRendererPriorityWaivedWhenNotVisible && !mIsContentViewCoreVisible) {
+            effectiveImportance = ChildProcessImportance.NORMAL;
+        } else {
+            switch (mRendererPriority) {
+                case RendererPriority.INITIAL:
+                case RendererPriority.HIGH:
+                    effectiveImportance = ChildProcessImportance.IMPORTANT;
+                    break;
+                case RendererPriority.LOW:
+                    effectiveImportance = ChildProcessImportance.MODERATE;
+                    break;
+                case RendererPriority.WAIVED:
+                    effectiveImportance = ChildProcessImportance.NORMAL;
+                    break;
+                default:
+                    assert false;
+            }
+        }
+        mWebContents.setImportance(effectiveImportance);
+    }
+
     @RendererPriority
     public int getRendererRequestedPriority() {
-        return nativeGetRendererRequestedPriority(mNativeAwContents);
+        return mRendererPriority;
     }
 
     public boolean getRendererPriorityWaivedWhenNotVisible() {
-        return nativeGetRendererPriorityWaivedWhenNotVisible(mNativeAwContents);
+        return mRendererPriorityWaivedWhenNotVisible;
     }
 
     public void setRendererPriorityPolicy(
             @RendererPriority int rendererRequestedPriority, boolean waivedWhenNotVisible) {
-        nativeSetRendererPriorityPolicy(
-                mNativeAwContents, rendererRequestedPriority, waivedWhenNotVisible);
+        mRendererPriority = rendererRequestedPriority;
+        mRendererPriorityWaivedWhenNotVisible = waivedWhenNotVisible;
+        updateChildProcessImportance();
     }
 
     // TODO(timav): Use |TextClassifier| instead of |Object| after we switch to Android SDK 26.
@@ -3512,12 +3549,7 @@
 
     private native void nativeInvokeGeolocationCallback(
             long nativeAwContents, boolean value, String requestingFrame);
-
-    private native int nativeGetRendererRequestedPriority(long nativeAwContents);
-    private native boolean nativeGetRendererPriorityWaivedWhenNotVisible(long nativeAwContents);
-    private native int nativeGetRendererCurrentPriority(long nativeAwContents);
-    private native void nativeSetRendererPriorityPolicy(
-            long nativeAwContents, int rendererRequestedPriority, boolean waivedWhenNotVisible);
+    private native int nativeGetEffectivePriority(long nativeAwContents);
 
     private native void nativeSetJsOnlineProperty(long nativeAwContents, boolean networkUp);
 
diff --git a/android_webview/java/src/org/chromium/android_webview/AwRendererPriorityManager.java b/android_webview/java/src/org/chromium/android_webview/AwRendererPriorityManager.java
deleted file mode 100644
index 9905204..0000000
--- a/android_webview/java/src/org/chromium/android_webview/AwRendererPriorityManager.java
+++ /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.
-
-package org.chromium.android_webview;
-
-import org.chromium.android_webview.renderer_priority.RendererPriority;
-import org.chromium.base.annotations.CalledByNative;
-import org.chromium.base.annotations.JNINamespace;
-import org.chromium.content.browser.ChildProcessLauncherHelper;
-
-/**
- * Exposes an interface via which native code can manage the priority
- * of a renderer process.
- */
-@JNINamespace("android_webview")
-public class AwRendererPriorityManager {
-    @CalledByNative
-    private static void setRendererPriority(int pid, @RendererPriority int rendererPriority) {
-        // TODO(tobiasjs): handle RendererPriority.LOW separately from WAIVED.
-        ChildProcessLauncherHelper.getBindingManager().setPriority(
-                pid, rendererPriority == RendererPriority.HIGH, false /* boostForPendingViews */);
-    }
-}
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
index 3028a39..c9e55e7 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
@@ -6,7 +6,6 @@
 
 import static org.chromium.android_webview.test.AwTestCommon.WAIT_TIMEOUT_MS;
 
-import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.Canvas;
@@ -32,15 +31,12 @@
 import org.chromium.android_webview.renderer_priority.RendererPriority;
 import org.chromium.android_webview.test.TestAwContentsClient.OnDownloadStartHelper;
 import org.chromium.android_webview.test.util.CommonResources;
-import org.chromium.android_webview.test.util.JSUtils;
 import org.chromium.base.annotations.SuppressFBWarnings;
-import org.chromium.base.process_launcher.ChildProcessConnection;
 import org.chromium.base.test.util.CallbackHelper;
 import org.chromium.base.test.util.CommandLineFlags;
 import org.chromium.base.test.util.Feature;
 import org.chromium.base.test.util.parameter.SkipCommandLineParameterization;
-import org.chromium.content.browser.BindingManager;
-import org.chromium.content.browser.ChildProcessLauncherHelper;
+import org.chromium.content.common.ContentSwitches;
 import org.chromium.content_public.common.ContentUrlConstants;
 import org.chromium.net.test.EmbeddedTestServer;
 import org.chromium.net.test.util.TestWebServer;
@@ -588,177 +584,119 @@
                         awContents, mContentsClient, script));
     }
 
-    private static class MockBindingManager implements BindingManager {
-        private boolean mIsChildProcessCreated;
-
-        private Object mForegroundStateLock;
-        private ArrayList<Boolean> mForegroundState;
-
-        public MockBindingManager() {
-            super();
-            mForegroundStateLock = new Object();
-            mForegroundState = new ArrayList<Boolean>();
-        }
-
-        boolean isChildProcessCreated() {
-            return mIsChildProcessCreated;
-        }
-
-        void assertSetInForegroundCall(boolean inForeground) {
-            synchronized (mForegroundStateLock) {
-                if (mForegroundState.size() == 0) {
-                    try {
-                        mForegroundStateLock.wait(WAIT_TIMEOUT_MS);
-                    } catch (InterruptedException e) {
-                    }
-                }
-                Assert.assertNotEquals(mForegroundState.size(), 0);
-                Assert.assertEquals(inForeground, mForegroundState.get(0));
-                mForegroundState.remove(0);
-                return;
-            }
-        }
-
-        @Override
-        public void addNewConnection(int pid, ChildProcessConnection connection) {
-            mIsChildProcessCreated = true;
-        }
-
-        @Override
-        public void setPriority(int pid, boolean foreground, boolean boostForPendingView) {
-            synchronized (mForegroundStateLock) {
-                mForegroundState.add(foreground);
-                mForegroundStateLock.notifyAll();
-            }
-        }
-
-        @Override
-        public void onSentToBackground() {}
-
-        @Override
-        public void onBroughtToForeground() {}
-
-        @Override
-        public void removeConnection(int pid) {}
-
-        @Override
-        public void startModerateBindingManagement(Context context, int maxSize) {}
-
-        @Override
-        public void releaseAllModerateBindings() {}
+    private @RendererPriority int getRendererPriorityOnUiThread(final AwContents awContents)
+            throws Exception {
+        return mActivityTestRule.runTestOnUiThreadAndGetResult(
+                () -> awContents.getEffectivePriorityForTesting());
     }
 
-    /**
-     * Verifies that a child process is actually gets created with WEBVIEW_SANDBOXED_RENDERER flag.
-     */
+    private void setRendererPriorityOnUiThread(final AwContents awContents,
+            final @RendererPriority int priority, final boolean waivedWhenNotVisible)
+            throws Throwable {
+        mActivityTestRule.runOnUiThread(
+                () -> awContents.setRendererPriorityPolicy(priority, waivedWhenNotVisible));
+    }
+
     @Test
     @Feature({"AndroidWebView"})
     @SmallTest
-    @CommandLineFlags.Add(AwSwitches.WEBVIEW_SANDBOXED_RENDERER)
     @SkipCommandLineParameterization
-    public void testSandboxedRendererWorks() throws Throwable {
-        MockBindingManager bindingManager = new MockBindingManager();
-        ChildProcessLauncherHelper.setBindingManagerForTesting(bindingManager);
-        Assert.assertFalse(bindingManager.isChildProcessCreated());
-
-        AwTestContainerView testView =
+    @CommandLineFlags.Add({
+            AwSwitches.WEBVIEW_SANDBOXED_RENDERER, ContentSwitches.RENDER_PROCESS_LIMIT + "=1"})
+    public void testForegroundPriorityOneProcess() throws Throwable {
+        final AwTestContainerView view1 =
                 mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient);
-        AwContents awContents = testView.getAwContents();
-        final String pageTitle = "I am sandboxed";
-        mActivityTestRule.loadDataSync(awContents, mContentsClient.getOnPageFinishedHelper(),
-                "<html><head><title>" + pageTitle + "</title></head></html>", "text/html", false);
-        Assert.assertEquals(pageTitle, mActivityTestRule.getTitleOnUiThread(awContents));
+        final AwContents contents1 = view1.getAwContents();
+        final AwTestContainerView view2 =
+                mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient);
+        final AwContents contents2 = view2.getAwContents();
 
-        Assert.assertTrue(bindingManager.isChildProcessCreated());
+        mActivityTestRule.loadUrlSync(contents1, mContentsClient.getOnPageFinishedHelper(),
+                ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
+        mActivityTestRule.loadUrlSync(contents2, mContentsClient.getOnPageFinishedHelper(),
+                ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
 
-        // Test end-to-end interaction with the renderer.
-        AwSettings awSettings = mActivityTestRule.getAwSettingsOnUiThread(awContents);
-        awSettings.setJavaScriptEnabled(true);
-        Assert.assertEquals("42",
-                JSUtils.executeJavaScriptAndWaitForResult(
-                        InstrumentationRegistry.getInstrumentation(), awContents,
-                        mContentsClient.getOnEvaluateJavaScriptResultHelper(), "21 + 21"));
+        // Process should start out high.
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(contents1));
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(contents2));
+
+        // Set one to low. Process should take max priority of contents, so still high.
+        setRendererPriorityOnUiThread(contents1, RendererPriority.LOW, false);
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(contents1));
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(contents2));
+
+        // Set both to low and check.
+        setRendererPriorityOnUiThread(contents2, RendererPriority.LOW, false);
+        Assert.assertEquals(RendererPriority.LOW, getRendererPriorityOnUiThread(contents1));
+        Assert.assertEquals(RendererPriority.LOW, getRendererPriorityOnUiThread(contents2));
+
+        // Set both to waive and check.
+        setRendererPriorityOnUiThread(contents1, RendererPriority.WAIVED, false);
+        setRendererPriorityOnUiThread(contents2, RendererPriority.WAIVED, false);
+        Assert.assertEquals(RendererPriority.WAIVED, getRendererPriorityOnUiThread(contents1));
+        Assert.assertEquals(RendererPriority.WAIVED, getRendererPriorityOnUiThread(contents2));
+
+        // Set one to high and check.
+        setRendererPriorityOnUiThread(contents1, RendererPriority.HIGH, false);
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(contents1));
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(contents2));
+
+        // Destroy contents with high priority, and process should fall back to low.
+        // Destroy posts on UI, but getRendererPriorityOnUiThread posts after, so there should
+        // be no flakiness and no need for polling.
+        mActivityTestRule.destroyAwContentsOnMainSync(contents1);
+        Assert.assertEquals(RendererPriority.WAIVED, getRendererPriorityOnUiThread(contents2));
     }
 
-    /**
-     * By default the renderer should be considererd to be in the
-     * foreground.
-     */
     @Test
     @Feature({"AndroidWebView"})
     @SmallTest
-    @CommandLineFlags.Add(AwSwitches.WEBVIEW_SANDBOXED_RENDERER)
     @SkipCommandLineParameterization
-    public void testRendererPriorityStartsHigh() throws Throwable {
-        MockBindingManager bindingManager = new MockBindingManager();
-        ChildProcessLauncherHelper.setBindingManagerForTesting(bindingManager);
-        Assert.assertFalse(bindingManager.isChildProcessCreated());
-
-        AwTestContainerView testView =
+    @CommandLineFlags.Add({
+            AwSwitches.WEBVIEW_SANDBOXED_RENDERER, ContentSwitches.RENDER_PROCESS_LIMIT + "=2"})
+    public void testForegroundPriorityTwoProcesses() throws Throwable {
+        final AwTestContainerView view1 =
                 mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient);
-        AwContents awContents = testView.getAwContents();
-        mActivityTestRule.loadDataSync(awContents, mContentsClient.getOnPageFinishedHelper(),
-                "<html></html>", "text/html", false);
+        final AwContents contents1 = view1.getAwContents();
+        final AwTestContainerView view2 =
+                mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient);
+        final AwContents contents2 = view2.getAwContents();
 
-        Assert.assertTrue(bindingManager.isChildProcessCreated());
-        bindingManager.assertSetInForegroundCall(true);
+        mActivityTestRule.loadUrlSync(contents1, mContentsClient.getOnPageFinishedHelper(),
+                ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
+        mActivityTestRule.loadUrlSync(contents2, mContentsClient.getOnPageFinishedHelper(),
+                ContentUrlConstants.ABOUT_BLANK_DISPLAY_URL);
+
+        // Process should start out high.
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(contents1));
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(contents2));
+
+        // Set one to low. Other should not be affected.
+        setRendererPriorityOnUiThread(contents1, RendererPriority.LOW, false);
+        Assert.assertEquals(RendererPriority.LOW, getRendererPriorityOnUiThread(contents1));
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(contents2));
     }
 
-    /**
-     * If we specify that the priority is WAIVED, then the renderer
-     * should not be in the foreground.
-     */
     @Test
     @Feature({"AndroidWebView"})
     @SmallTest
-    @CommandLineFlags.Add(AwSwitches.WEBVIEW_SANDBOXED_RENDERER)
     @SkipCommandLineParameterization
-    public void testRendererPriorityLow() throws Throwable {
-        MockBindingManager bindingManager = new MockBindingManager();
-        ChildProcessLauncherHelper.setBindingManagerForTesting(bindingManager);
-        Assert.assertFalse(bindingManager.isChildProcessCreated());
-
-        final AwTestContainerView testView =
-                mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient);
-        final AwContents awContents = testView.getAwContents();
-        InstrumentationRegistry.getInstrumentation().runOnMainSync(
-                () -> awContents.setRendererPriorityPolicy(RendererPriority.WAIVED, false));
-        mActivityTestRule.loadDataSync(awContents, mContentsClient.getOnPageFinishedHelper(),
-                "<html></html>", "text/html", false);
-
-        Assert.assertTrue(awContents.isPageVisible());
-        Assert.assertTrue(bindingManager.isChildProcessCreated());
-        bindingManager.assertSetInForegroundCall(false);
-    }
-
-    /**
-     * If we specify that the priority is HIGH, but WAIVED when in the
-     * background, then pausing the view should send the renderer to
-     * the background.
-     */
-    @Test
-    @Feature({"AndroidWebView"})
-    @SmallTest
     @CommandLineFlags.Add(AwSwitches.WEBVIEW_SANDBOXED_RENDERER)
-    @SkipCommandLineParameterization
-    public void testRendererPriorityManaged() throws Throwable {
-        MockBindingManager bindingManager = new MockBindingManager();
-        ChildProcessLauncherHelper.setBindingManagerForTesting(bindingManager);
-        Assert.assertFalse(bindingManager.isChildProcessCreated());
+    public void testBackgroundPriority() throws Throwable {
+        final AwContents awContents =
+                mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient)
+                        .getAwContents();
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(awContents));
 
-        final AwTestContainerView testView =
-                mActivityTestRule.createAwTestContainerViewOnMainSync(mContentsClient);
-        final AwContents awContents = testView.getAwContents();
-        InstrumentationRegistry.getInstrumentation().runOnMainSync(
-                () -> awContents.setRendererPriorityPolicy(RendererPriority.HIGH, true));
-        mActivityTestRule.loadDataSync(awContents, mContentsClient.getOnPageFinishedHelper(),
-                "<html></html>", "text/html", false);
+        mActivityTestRule.runOnUiThread(() -> awContents.onPause());
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(awContents));
 
-        Assert.assertTrue(awContents.isPageVisible());
-        Assert.assertTrue(bindingManager.isChildProcessCreated());
-        bindingManager.assertSetInForegroundCall(true);
-        InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> awContents.onPause());
-        bindingManager.assertSetInForegroundCall(false);
+        setRendererPriorityOnUiThread(
+                awContents, RendererPriority.HIGH, true /* waivedWhenNotVisible */);
+        Assert.assertEquals(RendererPriority.WAIVED, getRendererPriorityOnUiThread(awContents));
+
+        mActivityTestRule.runOnUiThread(() -> awContents.onResume());
+        Assert.assertEquals(RendererPriority.HIGH, getRendererPriorityOnUiThread(awContents));
     }
 
     @Test
diff --git a/android_webview/lib/aw_main_delegate.cc b/android_webview/lib/aw_main_delegate.cc
index 93590bc8..60f5efd1 100644
--- a/android_webview/lib/aw_main_delegate.cc
+++ b/android_webview/lib/aw_main_delegate.cc
@@ -137,7 +137,6 @@
   if (cl->HasSwitch(switches::kWebViewSandboxedRenderer)) {
     content::RenderProcessHost::SetMaxRendererProcessCount(1u);
     cl->AppendSwitch(switches::kInProcessGPU);
-    cl->AppendSwitch(switches::kDisableRendererPriorityManagement);
   }
 
   CommandLineHelper::AddEnabledFeature(
diff --git a/ash/app_list/app_list_presenter_delegate_unittest.cc b/ash/app_list/app_list_presenter_delegate_unittest.cc
index 44121b5..7fcb574 100644
--- a/ash/app_list/app_list_presenter_delegate_unittest.cc
+++ b/ash/app_list/app_list_presenter_delegate_unittest.cc
@@ -34,6 +34,8 @@
 namespace ash {
 namespace {
 
+constexpr int kAppListBezelMargin = 50;
+
 int64_t GetPrimaryDisplayId() {
   return display::Screen::GetScreen()->GetPrimaryDisplay().id();
 }
@@ -931,11 +933,16 @@
               view->app_list_state());
   }
 
-  // Drag the app list to 50 DIPs from the bottom bezel, relies on the test
-  // display set to 1024x768. Drag slowly in order to not trigger a fling.
+  // Drag the app list to 50 DIPs from the bottom bezel.
   ui::test::EventGenerator& generator = GetEventGenerator();
-  generator.GestureScrollSequence(gfx::Point(0, 700), gfx::Point(0, 750),
-                                  base::TimeDelta::FromMilliseconds(1500), 100);
+  const int bezel_y = display::Screen::GetScreen()
+                          ->GetDisplayNearestView(view->parent_window())
+                          .bounds()
+                          .bottom();
+  generator.GestureScrollSequence(
+      gfx::Point(0, bezel_y - (kAppListBezelMargin + 100)),
+      gfx::Point(0, bezel_y - (kAppListBezelMargin)),
+      base::TimeDelta::FromMilliseconds(1500), 100);
 
   ASSERT_EQ(app_list::AppListView::CLOSED, view->app_list_state());
 }
diff --git a/base/android/java/src/org/chromium/base/process_launcher/ChildConnectionAllocator.java b/base/android/java/src/org/chromium/base/process_launcher/ChildConnectionAllocator.java
index 7ea2c02f..9eacf14 100644
--- a/base/android/java/src/org/chromium/base/process_launcher/ChildConnectionAllocator.java
+++ b/base/android/java/src/org/chromium/base/process_launcher/ChildConnectionAllocator.java
@@ -249,7 +249,7 @@
             listener.onConnectionAllocated(this, connection);
         }
 
-        connection.start(mUseStrongBinding, serviceCallbackWrapper, false /* retryOnTimeout */);
+        connection.start(mUseStrongBinding, serviceCallbackWrapper);
         Log.d(TAG, "Allocator allocated and bound a connection, name: %s, slot: %d",
                 mServiceClassName, slot);
         return connection;
diff --git a/base/android/java/src/org/chromium/base/process_launcher/ChildProcessConnection.java b/base/android/java/src/org/chromium/base/process_launcher/ChildProcessConnection.java
index 62bb5310..8406b759 100644
--- a/base/android/java/src/org/chromium/base/process_launcher/ChildProcessConnection.java
+++ b/base/android/java/src/org/chromium/base/process_launcher/ChildProcessConnection.java
@@ -13,15 +13,12 @@
 import android.os.IBinder;
 import android.os.Looper;
 import android.os.RemoteException;
-import android.os.SystemClock;
 
 import org.chromium.base.Log;
 import org.chromium.base.TraceEvent;
 import org.chromium.base.VisibleForTesting;
-import org.chromium.base.metrics.CachedMetrics;
 
 import java.util.List;
-import java.util.concurrent.TimeUnit;
 
 import javax.annotation.Nullable;
 
@@ -31,8 +28,6 @@
 public class ChildProcessConnection {
     private static final String TAG = "ChildProcessConn";
 
-    private static final int BIND_SERVICE_TIMEOUT_IN_MS = 10 * 1000;
-
     /**
      * Used to notify the consumer about the process start. These callbacks will be invoked before
      * the ConnectionCallbacks.
@@ -149,16 +144,6 @@
         }
     }
 
-    // CachedMetrics used from this class, because this class can run before native library is
-    // loaded.
-    private static final CachedMetrics.TimesHistogramSample sOnServiceConnectedTimesMetric =
-            new CachedMetrics.TimesHistogramSample(
-                    "Android.ChildProcessLauncher.OnServiceConnectedTime", TimeUnit.MILLISECONDS);
-    private static final CachedMetrics
-            .BooleanHistogramSample sOnServiceConnectedTimesMetricTimedOut =
-            new CachedMetrics.BooleanHistogramSample(
-                    "Android.ChildProcessLauncher.OnServiceConnectedTimedOut");
-
     private final Handler mLauncherHandler;
     private final ComponentName mServiceName;
 
@@ -194,11 +179,6 @@
     // call.
     private ConnectionCallback mConnectionCallback;
 
-    // Workaround bug on some android versions where bindService does not result in
-    // onServiceConnected for sandboxed services; see crbug.com/736066 for details.
-    // This is a delayed callback that will retry bindService with a delay.
-    private Runnable mOnServiceConnectedWatchDog;
-
     private IChildProcessService mService;
 
     // Set to true when the service connection callback runs. This differs from
@@ -240,9 +220,6 @@
     // Set to true once unbind() was called.
     private boolean mUnbound;
 
-    // Timestamp when watchdog was last reset, which is equivalent to when start was called.
-    private long mLastWatchdogResetTimestamp;
-
     public ChildProcessConnection(Context context, ComponentName serviceName, boolean bindToCaller,
             boolean bindAsExternalService, Bundle serviceBundle) {
         this(context, serviceName, bindToCaller, bindAsExternalService, serviceBundle,
@@ -341,8 +318,7 @@
      * @param serviceCallback (optional) callbacks invoked when the child process starts or fails to
      * start and when the service stops.
      */
-    public void start(
-            boolean useStrongBinding, ServiceCallback serviceCallback, boolean retryOnTimeout) {
+    public void start(boolean useStrongBinding, ServiceCallback serviceCallback) {
         try {
             TraceEvent.begin("ChildProcessConnection.start");
             assert isRunningOnLauncherThread();
@@ -351,10 +327,8 @@
 
             mServiceCallback = serviceCallback;
 
-            resetWatchdog(useStrongBinding, serviceCallback, retryOnTimeout);
             if (!bind(useStrongBinding)) {
                 Log.e(TAG, "Failed to establish the service connection.");
-                cancelWatchDog();
                 // We have to notify the caller so that they can free-up associated resources.
                 // TODO(ppi): Can we hard-fail here?
                 notifyChildProcessDied();
@@ -406,10 +380,8 @@
         notifyChildProcessDied();
     }
 
-    @VisibleForTesting
-    public void onServiceConnectedOnLauncherThread(IBinder service) {
+    private void onServiceConnectedOnLauncherThread(IBinder service) {
         assert isRunningOnLauncherThread();
-        cancelWatchDog();
         // A flag from the parent class ensures we run the post-connection logic only once
         // (instead of once per each ChildServiceConnection).
         if (mDidOnServiceConnected) {
@@ -417,10 +389,6 @@
         }
         try {
             TraceEvent.begin("ChildProcessConnection.ChildServiceConnection.onServiceConnected");
-            sOnServiceConnectedTimesMetric.record(
-                    SystemClock.elapsedRealtime() - mLastWatchdogResetTimestamp);
-            sOnServiceConnectedTimesMetricTimedOut.record(false);
-
             mDidOnServiceConnected = true;
             mService = IChildProcessService.Stub.asInterface(service);
 
@@ -535,20 +503,15 @@
     @VisibleForTesting
     protected void unbind() {
         assert isRunningOnLauncherThread();
-        cancelWatchDog();
         mService = null;
         mConnectionParams = null;
         mUnbound = true;
-        unbindAll();
-        // Note that we don't update the waived bound only state here as to preserve the state when
-        // disconnected.
-    }
-
-    private void unbindAll() {
         mStrongBinding.unbind();
         mWaivedBinding.unbind();
         mModerateBinding.unbind();
         mInitialBinding.unbind();
+        // Note that we don't update the waived bound only state here as to preserve the state when
+        // disconnected.
     }
 
     public boolean isInitialBindingBound() {
@@ -660,35 +623,6 @@
         }
     }
 
-    private void resetWatchdog(final boolean useStrongBinding,
-            final ServiceCallback serviceCallback, final boolean retryOnTimeout) {
-        assert isRunningOnLauncherThread();
-        cancelWatchDog();
-        assert mOnServiceConnectedWatchDog == null;
-        mOnServiceConnectedWatchDog = new Runnable() {
-            @Override
-            public void run() {
-                assert mOnServiceConnectedWatchDog == this;
-                assert !mDidOnServiceConnected;
-                assert mServiceCallback == null;
-                mOnServiceConnectedWatchDog = null;
-                sOnServiceConnectedTimesMetricTimedOut.record(true);
-                if (!retryOnTimeout) return;
-                unbindAll();
-                start(useStrongBinding, serviceCallback, retryOnTimeout);
-            }
-        };
-        mLastWatchdogResetTimestamp = SystemClock.elapsedRealtime();
-        mLauncherHandler.postDelayed(mOnServiceConnectedWatchDog, BIND_SERVICE_TIMEOUT_IN_MS);
-    }
-
-    private void cancelWatchDog() {
-        assert isRunningOnLauncherThread();
-        if (mOnServiceConnectedWatchDog == null) return;
-        mLauncherHandler.removeCallbacks(mOnServiceConnectedWatchDog);
-        mOnServiceConnectedWatchDog = null;
-    }
-
     private boolean isRunningOnLauncherThread() {
         return mLauncherHandler.getLooper() == Looper.myLooper();
     }
diff --git a/base/android/junit/src/org/chromium/base/process_launcher/ChildConnectionAllocatorTest.java b/base/android/junit/src/org/chromium/base/process_launcher/ChildConnectionAllocatorTest.java
index 982daaa..b2d4f85 100644
--- a/base/android/junit/src/org/chromium/base/process_launcher/ChildConnectionAllocatorTest.java
+++ b/base/android/junit/src/org/chromium/base/process_launcher/ChildConnectionAllocatorTest.java
@@ -77,8 +77,7 @@
                     }
                 })
                         .when(mConnection)
-                        .start(anyBoolean(), any(ChildProcessConnection.ServiceCallback.class),
-                                anyBoolean());
+                        .start(anyBoolean(), any(ChildProcessConnection.ServiceCallback.class));
             }
             return mConnection;
         }
@@ -113,8 +112,7 @@
                 }
             })
                     .when(mConnection)
-                    .start(anyBoolean(), any(ChildProcessConnection.ServiceCallback.class),
-                            anyBoolean());
+                    .start(anyBoolean(), any(ChildProcessConnection.ServiceCallback.class));
         }
 
         public void simulateServiceStartFailed() {
@@ -155,7 +153,7 @@
 
         verify(connection, times(1))
                 .start(eq(false) /* useStrongBinding */,
-                        any(ChildProcessConnection.ServiceCallback.class), anyBoolean());
+                        any(ChildProcessConnection.ServiceCallback.class));
         verify(listener, times(1)).onConnectionAllocated(mAllocator, connection);
         assertTrue(mAllocator.anyConnectionAllocated());
     }
@@ -193,8 +191,7 @@
             allocator.setConnectionFactoryForTesting(mTestConnectionFactory);
             ChildProcessConnection connection = allocator.allocate(
                     null /* context */, null /* serviceBundle */, mServiceCallback);
-            verify(connection, never())
-                    .start(useStrongBinding, mServiceCallback, false /* retryOnTimeout */);
+            verify(connection, times(0)).start(useStrongBinding, mServiceCallback);
         }
     }
 
@@ -258,7 +255,7 @@
         ComponentName serviceName = mTestConnectionFactory.getAndResetLastServiceName();
         verify(connection, times(1))
                 .start(eq(false) /* useStrongBinding */,
-                        any(ChildProcessConnection.ServiceCallback.class), anyBoolean());
+                        any(ChildProcessConnection.ServiceCallback.class));
         assertTrue(mAllocator.anyConnectionAllocated());
         int onChildStartFailedExpectedCount = 0;
         int onChildProcessDiedExpectedCount = 0;
diff --git a/base/android/junit/src/org/chromium/base/process_launcher/ChildProcessConnectionTest.java b/base/android/junit/src/org/chromium/base/process_launcher/ChildProcessConnectionTest.java
index e2921b0..3c6dd3e4 100644
--- a/base/android/junit/src/org/chromium/base/process_launcher/ChildProcessConnectionTest.java
+++ b/base/android/junit/src/org/chromium/base/process_launcher/ChildProcessConnectionTest.java
@@ -157,13 +157,11 @@
     @Test
     public void testStrongBinding() {
         ChildProcessConnection connection = createDefaultTestConnection();
-        connection.start(true /* useStrongBinding */, null /* serviceCallback */,
-                false /* retryOnTimeout */);
+        connection.start(true /* useStrongBinding */, null /* serviceCallback */);
         assertTrue(connection.isStrongBindingBound());
 
         connection = createDefaultTestConnection();
-        connection.start(false /* useStrongBinding */, null /* serviceCallback */,
-                false /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, null /* serviceCallback */);
         assertFalse(connection.isStrongBindingBound());
     }
 
@@ -181,8 +179,7 @@
         ChildProcessConnection connection = createTestConnection(
                 false /* bindToCaller */, false /* bindAsExternalService */, serviceBundle);
         // Start the connection without the ChildServiceConnection connecting.
-        connection.start(false /* useStrongBinding */, null /* serviceCallback */,
-                true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, null /* serviceCallback */);
         assertNotNull(mFirstServiceConnection);
         Intent bindIntent = mFirstServiceConnection.getBindIntent();
         assertNotNull(bindIntent);
@@ -194,7 +191,7 @@
     public void testServiceStartsSuccessfully() {
         ChildProcessConnection connection = createDefaultTestConnection();
         assertNotNull(mFirstServiceConnection);
-        connection.start(false /* useStrongBinding */, mServiceCallback, true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, mServiceCallback);
         Assert.assertTrue(connection.isInitialBindingBound());
         Assert.assertFalse(connection.didOnServiceConnectedForTesting());
         verify(mServiceCallback, never()).onChildStarted();
@@ -216,7 +213,7 @@
         // Note we use doReturn so the actual bind() method is not called (it would with
         // when(mFirstServiceConnection.bind()).thenReturn(false).
         doReturn(false).when(mFirstServiceConnection).bind();
-        connection.start(false /* useStrongBinding */, mServiceCallback, true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, mServiceCallback);
 
         Assert.assertFalse(connection.isInitialBindingBound());
         Assert.assertFalse(connection.didOnServiceConnectedForTesting());
@@ -229,7 +226,7 @@
     public void testServiceStops() {
         ChildProcessConnection connection = createDefaultTestConnection();
         assertNotNull(mFirstServiceConnection);
-        connection.start(false /* useStrongBinding */, mServiceCallback, true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, mServiceCallback);
         mFirstServiceConnection.notifyServiceConnected(null /* iBinder */);
         connection.stop();
         verify(mServiceCallback, times(1)).onChildStarted();
@@ -241,7 +238,7 @@
     public void testServiceDisconnects() {
         ChildProcessConnection connection = createDefaultTestConnection();
         assertNotNull(mFirstServiceConnection);
-        connection.start(false /* useStrongBinding */, mServiceCallback, true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, mServiceCallback);
         mFirstServiceConnection.notifyServiceConnected(null /* iBinder */);
         mFirstServiceConnection.notifyServiceDisconnected();
         verify(mServiceCallback, times(1)).onChildStarted();
@@ -254,7 +251,7 @@
         ChildProcessConnection connection = createTestConnection(false /* bindToCaller */,
                 false /* bindAsExternalService */, null /* serviceBundle */);
         assertNotNull(mFirstServiceConnection);
-        connection.start(false /* useStrongBinding */, mServiceCallback, true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, mServiceCallback);
         mFirstServiceConnection.notifyServiceConnected(mChildProcessServiceBinder);
         // Service is started and bindToCallback is not called.
         verify(mServiceCallback, times(1)).onChildStarted();
@@ -268,7 +265,7 @@
         ChildProcessConnection connection = createTestConnection(true /* bindToCaller */,
                 false /* bindAsExternalService */, null /* serviceBundle */);
         assertNotNull(mFirstServiceConnection);
-        connection.start(false /* useStrongBinding */, mServiceCallback, true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, mServiceCallback);
         when(mIChildProcessService.bindToCaller()).thenReturn(true);
         mFirstServiceConnection.notifyServiceConnected(mChildProcessServiceBinder);
         // Service is started and bindToCallback is called.
@@ -283,7 +280,7 @@
         ChildProcessConnection connection = createTestConnection(true /* bindToCaller */,
                 false /* bindAsExternalService */, null /* serviceBundle */);
         assertNotNull(mFirstServiceConnection);
-        connection.start(false /* useStrongBinding */, mServiceCallback, true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, mServiceCallback);
         // Pretend bindToCaller returns false, i.e. the service is already bound to a different
         // service.
         when(mIChildProcessService.bindToCaller()).thenReturn(false);
@@ -299,8 +296,7 @@
     public void testSetupConnectionBeforeServiceConnected() throws RemoteException {
         ChildProcessConnection connection = createDefaultTestConnection();
         assertNotNull(mFirstServiceConnection);
-        connection.start(false /* useStrongBinding */, null /* serviceCallback */,
-                true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, null /* serviceCallback */);
         connection.setupConnection(
                 null /* connectionBundle */, null /* callback */, mConnectionCallback);
         verify(mConnectionCallback, never()).onConnected(any());
@@ -315,8 +311,7 @@
     public void testSetupConnectionAfterServiceConnected() throws RemoteException {
         ChildProcessConnection connection = createDefaultTestConnection();
         assertNotNull(mFirstServiceConnection);
-        connection.start(false /* useStrongBinding */, null /* serviceCallback */,
-                true /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, null /* serviceCallback */);
         mFirstServiceConnection.notifyServiceConnected(mChildProcessServiceBinder);
         connection.setupConnection(
                 null /* connectionBundle */, null /* callback */, mConnectionCallback);
@@ -326,87 +321,4 @@
         mConnectionPidCallback.call(34 /* pid */);
         verify(mConnectionCallback, times(1)).onConnected(connection);
     }
-
-    @Test
-    public void testWatchdog() {
-        ChildProcessConnection connection = createDefaultTestConnection();
-        // Start the connection without the ChildServiceConnection connecting.
-        connection.start(false /* useStrongBinding */, null /* serviceCallback */,
-                true /* retryOnTimeout */);
-        assertNotNull(mFirstServiceConnection);
-        verify(mFirstServiceConnection, times(1)).bind();
-        Assert.assertTrue(connection.isInitialBindingBound());
-
-        ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
-        // The watchdog should have attempted to reconnect.
-        Assert.assertTrue(connection.isInitialBindingBound());
-        verify(mFirstServiceConnection, times(1)).unbind();
-        verify(mFirstServiceConnection, times(2)).bind();
-    }
-
-    @Test
-    public void testWatchdogDisabled() {
-        ChildProcessConnection connection = createDefaultTestConnection();
-        connection.start(false /* useStrongBinding */, null /* serviceCallback */,
-                false /* retryOnTimeout */);
-        assertNotNull(mFirstServiceConnection);
-        verify(mFirstServiceConnection, times(1)).bind();
-        Assert.assertTrue(connection.isInitialBindingBound());
-
-        ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
-        // No retry should have been attempted.
-        Assert.assertTrue(connection.isInitialBindingBound());
-        verify(mFirstServiceConnection, never()).unbind();
-        verify(mFirstServiceConnection, times(1)).bind();
-    }
-
-    @Test
-    public void testWatchdogCancelledOnConnection() {
-        ChildProcessConnection connection = createDefaultTestConnection();
-        connection.start(false /* useStrongBinding */, null /* serviceCallback */,
-                true /* retryOnTimeout */);
-        assertNotNull(mFirstServiceConnection);
-        ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
-        Assert.assertTrue(connection.isInitialBindingBound());
-        Assert.assertFalse(connection.didOnServiceConnectedForTesting());
-        // bind() is call twice: once on start and then when the watchdog runs (after an unbind).
-        verify(mFirstServiceConnection, times(2)).bind();
-        verify(mFirstServiceConnection, times(1)).unbind();
-
-        ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
-        // Watchdog should have attempted to connect again.
-        verify(mFirstServiceConnection, times(3)).bind();
-        verify(mFirstServiceConnection, times(2)).unbind();
-
-        // Simulate the connection succeeding.
-        mFirstServiceConnection.notifyServiceConnected(null /* iBinder */);
-
-        ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
-        Assert.assertTrue(connection.isInitialBindingBound());
-        Assert.assertTrue(connection.didOnServiceConnectedForTesting());
-        // Watchdog should not have attempted anymore reconnection.
-        verify(mFirstServiceConnection, times(3)).bind();
-        verify(mFirstServiceConnection, times(2)).unbind();
-    }
-
-    @Test
-    public void testWatchdogCancelledOnStop() {
-        ChildProcessConnection connection = createDefaultTestConnection();
-        connection.start(false /* useStrongBinding */, null /* serviceCallback */,
-                true /* retryOnTimeout */);
-        assertNotNull(mFirstServiceConnection);
-        ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
-        Assert.assertTrue(connection.isInitialBindingBound());
-        Assert.assertFalse(connection.didOnServiceConnectedForTesting());
-        // bind() is call twice: once on start and then when the watchdog runs (after an unbind).
-        verify(mFirstServiceConnection, times(2)).bind();
-        verify(mFirstServiceConnection, times(1)).unbind();
-
-        connection.stop();
-        ShadowLooper.runUiThreadTasksIncludingDelayedTasks();
-        Assert.assertFalse(connection.isInitialBindingBound());
-        // Watchdog should not have attempted anymore reconnection.
-        verify(mFirstServiceConnection, times(2)).bind();
-        verify(mFirstServiceConnection, times(2)).unbind();
-    }
 }
diff --git a/base/test/android/javatests/src/org/chromium/base/test/TestChildProcessConnection.java b/base/test/android/javatests/src/org/chromium/base/test/TestChildProcessConnection.java
index 3cbfb34..ae91b44 100644
--- a/base/test/android/javatests/src/org/chromium/base/test/TestChildProcessConnection.java
+++ b/base/test/android/javatests/src/org/chromium/base/test/TestChildProcessConnection.java
@@ -64,9 +64,8 @@
 
     // We don't have a real service so we have to mock the connection status.
     @Override
-    public void start(
-            boolean useStrongBinding, ServiceCallback serviceCallback, boolean retryOnTimeout) {
-        super.start(useStrongBinding, serviceCallback, retryOnTimeout);
+    public void start(boolean useStrongBinding, ServiceCallback serviceCallback) {
+        super.start(useStrongBinding, serviceCallback);
         mConnected = true;
         mServiceCallback = serviceCallback;
     }
diff --git a/base/trace_event/memory_allocator_dump.cc b/base/trace_event/memory_allocator_dump.cc
index 73fbbaff..7d91119 100644
--- a/base/trace_event/memory_allocator_dump.cc
+++ b/base/trace_event/memory_allocator_dump.cc
@@ -74,16 +74,6 @@
   attributes_->EndDictionary();
 }
 
-void MemoryAllocatorDump::AddScalarF(const char* name,
-                                     const char* units,
-                                     double value) {
-  attributes_->BeginDictionary(name);
-  attributes_->SetString("type", kTypeScalar);
-  attributes_->SetString("units", units);
-  attributes_->SetDouble("value", value);
-  attributes_->EndDictionary();
-}
-
 void MemoryAllocatorDump::AddString(const char* name,
                                     const char* units,
                                     const std::string& value) {
diff --git a/base/trace_event/memory_allocator_dump.h b/base/trace_event/memory_allocator_dump.h
index 71d24e96..f7d94e5fb 100644
--- a/base/trace_event/memory_allocator_dump.h
+++ b/base/trace_event/memory_allocator_dump.h
@@ -63,10 +63,9 @@
   //     AddScalar(kNameSize, kUnitsBytes, 1234);
   // - Some extra-column reporting internal details of the subsystem:
   //    AddScalar("number_of_freelist_entires", kUnitsObjects, 42)
-  // - Other informational column (will not be auto-added in the UI)
-  //    AddScalarF("kittens_ratio", "ratio", 42.0f)
+  // - Other informational column:
+  //    AddString("kitten", "name", "shadow");
   void AddScalar(const char* name, const char* units, uint64_t value);
-  void AddScalarF(const char* name, const char* units, double value);
   void AddString(const char* name, const char* units, const std::string& value);
 
   // Absolute name, unique within the scope of an entire ProcessMemoryDump.
diff --git a/base/trace_event/memory_allocator_dump_unittest.cc b/base/trace_event/memory_allocator_dump_unittest.cc
index 734c1c8..03805162 100644
--- a/base/trace_event/memory_allocator_dump_unittest.cc
+++ b/base/trace_event/memory_allocator_dump_unittest.cc
@@ -35,7 +35,6 @@
                          MemoryAllocatorDump::kUnitsObjects, 42);
     root_heap->AddScalar("attr1", "units1", 1234);
     root_heap->AddString("attr2", "units2", "string_value");
-    root_heap->AddScalarF("attr3", "units3", 42.5f);
 
     MemoryAllocatorDump* sub_heap =
         pmd->CreateAllocatorDump("foobar_allocator/sub_heap");
@@ -91,17 +90,6 @@
               StringPrintf("%" PRIx64, expected_value));
 }
 
-void CheckScalarF(const MemoryAllocatorDump* dump,
-                  const std::string& name,
-                  const char* expected_units,
-                  double expected_value) {
-  auto attr_value = CheckAttribute(dump, name, MemoryAllocatorDump::kTypeScalar,
-                                   expected_units);
-  double attr_double_value;
-  EXPECT_TRUE(attr_value->GetAsDouble(&attr_double_value));
-  EXPECT_EQ(expected_value, attr_double_value);
-}
-
 }  // namespace
 
 TEST(MemoryAllocatorDumpTest, GuidGeneration) {
@@ -148,7 +136,6 @@
   CheckScalar(root_heap, "attr1", "units1", 1234);
   CheckString(root_heap, "attr2", MemoryAllocatorDump::kTypeString, "units2",
               "string_value");
-  CheckScalarF(root_heap, "attr3", "units3", 42.5f);
 
   const MemoryAllocatorDump* sub_heap =
       pmd.GetAllocatorDump("foobar_allocator/sub_heap");
diff --git a/build/android/apk_operations.py b/build/android/apk_operations.py
index e543fd3b..09b097b9 100755
--- a/build/android/apk_operations.py
+++ b/build/android/apk_operations.py
@@ -506,11 +506,12 @@
               "App's package name."))
 
     if self.needs_apk_path or self.needs_package_name:
-      # When passed by wrapper script, don't show in --help.
-      group.add_argument('--apk-path',
-          required=self.needs_apk_path and not self._from_wrapper_script,
-          help=argparse.SUPPRESS if self._from_wrapper_script else (
-              'Path to .apk'))
+      # Adding this argument to the subparser would override the set_defaults()
+      # value set by on the parent parser (even if None).
+      if not self._from_wrapper_script:
+        group.add_argument('--apk-path',
+                           required=self.needs_apk_path,
+                           help='Path to .apk')
 
     if self.supports_incremental:
       group.add_argument('--incremental',
@@ -575,23 +576,30 @@
         if args.apk_path and args.incremental_json:
           self._parser.error('Both incremental and non-incremental apks exist. '
                              'Select using --incremental or --non-incremental')
-        elif not args.apk_path and not args.incremental_json:
-          self._parser.error(
-              'Neither incremental nor non-incremental apk is built.')
 
-      if self.needs_apk_path or args.apk_path:
+      if self.needs_apk_path or args.apk_path or args.incremental_json:
         if args.incremental_json:
           with open(args.incremental_json) as f:
-            self.install_dict = json.load(f)
-          self.apk_helper = apk_helper.ToHelper(
-              os.path.join(args.output_directory,
-                           self.install_dict['apk_path']))
-        else:
+            install_dict = json.load(f)
+          apk_path = os.path.join(args.output_directory,
+                                  install_dict['apk_path'])
+          if os.path.exists(apk_path):
+            self.install_dict = install_dict
+            self.apk_helper = apk_helper.ToHelper(
+                os.path.join(args.output_directory,
+                             self.install_dict['apk_path']))
+        if not self.apk_helper and args.apk_path:
           self.apk_helper = apk_helper.ToHelper(args.apk_path)
+        else:
+          self._parser.error(
+              'Neither incremental nor non-incremental apk is built.')
 
       if self.needs_package_name and not args.package_name:
         if self.apk_helper:
           args.package_name = self.apk_helper.GetPackageName()
+        elif self._from_wrapper_script:
+          self._parser.error(
+              'Neither incremental nor non-incremental apk is built.')
         else:
           self._parser.error('One of --package-name or --apk-path is required.')
 
@@ -789,6 +797,7 @@
     _InstallCommand,
     _UninstallCommand,
     _LaunchCommand,
+    _RunCommand,
     _StopCommand,
     _ClearDataCommand,
     _ArgvCommand,
@@ -836,12 +845,12 @@
   constants.SetOutputDirectory(output_directory)
   devil_chromium.Initialize(output_directory=output_directory)
   parser = argparse.ArgumentParser()
-  exists_or_None = lambda p: p if p and os.path.exists(p) else None
+  exists_or_none = lambda p: p if p and os.path.exists(p) else None
   parser.set_defaults(
       command_line_flags_file=command_line_flags_file,
       target_cpu=target_cpu,
-      apk_path=exists_or_None(apk_path),
-      incremental_json=exists_or_None(incremental_json))
+      apk_path=exists_or_none(apk_path),
+      incremental_json=exists_or_none(incremental_json))
   _RunInternal(parser, output_directory=output_directory)
 
 
diff --git a/build/util/lib/common/chrome_test_server_spawner.py b/build/util/lib/common/chrome_test_server_spawner.py
index d30a4a7..39b5528 100644
--- a/build/util/lib/common/chrome_test_server_spawner.py
+++ b/build/util/lib/common/chrome_test_server_spawner.py
@@ -445,4 +445,4 @@
       for port in self.server.test_servers:
         logging.warning('Stopping test server on port %d' % port)
         self.server.test_servers[port].Stop()
-      self.server.test_servers = []
+      self.server.test_servers = {}
diff --git a/cc/input/browser_controls_offset_manager.cc b/cc/input/browser_controls_offset_manager.cc
index bbd2a78..7d34cc3 100644
--- a/cc/input/browser_controls_offset_manager.cc
+++ b/cc/input/browser_controls_offset_manager.cc
@@ -109,7 +109,7 @@
     SetupAnimation(final_shown_ratio ? SHOWING_CONTROLS : HIDING_CONTROLS);
   } else {
     ResetAnimations();
-    client_->SetCurrentBrowserControlsShownRatio(final_shown_ratio);
+    // We depend on the main thread to push the new ratio.  crbug.com/754346 .
   }
 }
 
diff --git a/cc/input/browser_controls_offset_manager_unittest.cc b/cc/input/browser_controls_offset_manager_unittest.cc
index 0d436502..9493480 100644
--- a/cc/input/browser_controls_offset_manager_unittest.cc
+++ b/cc/input/browser_controls_offset_manager_unittest.cc
@@ -486,26 +486,6 @@
 }
 
 TEST(BrowserControlsOffsetManagerTest,
-     GrowingHeightKeepsBrowserControlsHidden) {
-  MockBrowserControlsOffsetManagerClient client(0.f, 0.5f, 0.5f);
-  BrowserControlsOffsetManager* manager = client.manager();
-  client.SetBrowserControlsHeight(1.f);
-  manager->UpdateBrowserControlsState(HIDDEN, HIDDEN, false);
-  EXPECT_EQ(-1.f, manager->ControlsTopOffset());
-  EXPECT_EQ(0.f, manager->ContentTopOffset());
-
-  client.SetBrowserControlsHeight(50.f);
-  EXPECT_FALSE(manager->has_animation());
-  EXPECT_EQ(-50.f, manager->ControlsTopOffset());
-  EXPECT_EQ(0.f, manager->ContentTopOffset());
-
-  client.SetBrowserControlsHeight(100.f);
-  EXPECT_FALSE(manager->has_animation());
-  EXPECT_EQ(-100.f, manager->ControlsTopOffset());
-  EXPECT_EQ(0.f, manager->ContentTopOffset());
-}
-
-TEST(BrowserControlsOffsetManagerTest,
      ShrinkingHeightKeepsBrowserControlsHidden) {
   MockBrowserControlsOffsetManagerClient client(100.f, 0.5f, 0.5f);
   BrowserControlsOffsetManager* manager = client.manager();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/MonochromeApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/MonochromeApplication.java
index fddb44e..055a760 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/MonochromeApplication.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/MonochromeApplication.java
@@ -25,7 +25,9 @@
         // ChildProcessCreationParams is only needed for browser process, though it is
         // created and set in all processes.
         boolean bindToCaller = false;
+        boolean ignoreVisibilityForImportance = false;
         ChildProcessCreationParams.registerDefault(new ChildProcessCreationParams(getPackageName(),
-                true /* isExternalService */, LibraryProcessType.PROCESS_CHILD, bindToCaller));
+                true /* isExternalService */, LibraryProcessType.PROCESS_CHILD, bindToCaller,
+                ignoreVisibilityForImportance));
     }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
index 8f41ccd..ec93ec62 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManager.java
@@ -670,6 +670,7 @@
         boolean receivedCaptionOrThumbnail = !TextUtils.isEmpty(caption)
                 || !TextUtils.isEmpty(thumbnailUrl);
 
+        assert mSearchPanel != null;
         mSearchPanel.onSearchTermResolved(message, thumbnailUrl, quickActionUri,
                 quickActionCategory);
         if (!TextUtils.isEmpty(caption)) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
index 69285698..441f0b1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivity.java
@@ -104,6 +104,13 @@
     private static final int WEBCONTENTS_STATE_TRANSFERRED_WEBCONTENTS = 3;
     private static final int WEBCONTENTS_STATE_MAX = 4;
 
+    // For CustomTabs.ConnectionStatusOnReturn, see histograms.xml. Append only.
+    private static final int CONNECTION_STATUS_DISCONNECTED = 0;
+    private static final int CONNECTION_STATUS_DISCONNECTED_KEEP_ALIVE = 1;
+    private static final int CONNECTION_STATUS_CONNECTED = 2;
+    private static final int CONNECTION_STATUS_CONNECTED_KEEP_ALIVE = 3;
+    private static final int CONNECTION_STATUS_MAX = 4;
+
     private static CustomTabContentHandler sActiveContentHandler;
 
     private CustomTabIntentDataProvider mIntentDataProvider;
@@ -131,6 +138,7 @@
     private boolean mUsingHiddenTab;
 
     private boolean mIsClosing;
+    private boolean mIsKeepAlive;
 
     // This boolean is used to do a hack in navigation history for
     // prerender and hidden tab loads with unmatching fragments.
@@ -353,7 +361,7 @@
     public void onStart() {
         super.onStart();
         mIsClosing = false;
-        mConnection.keepAliveForSession(
+        mIsKeepAlive = mConnection.keepAliveForSession(
                 mIntentDataProvider.getSession(), mIntentDataProvider.getKeepAliveServiceIntent());
     }
 
@@ -361,6 +369,7 @@
     public void onStop() {
         super.onStop();
         mConnection.dontKeepAliveForSession(mIntentDataProvider.getSession());
+        mIsKeepAlive = false;
     }
 
     @Override
@@ -505,6 +514,7 @@
                         if (mIntentDataProvider.shouldEnableEmbeddedMediaExperience()) {
                             RecordUserAction.record("CustomTabs.CloseButtonClicked.DownloadsUI");
                         }
+                        recordClientConnectionStatus();
                         finishAndClose(false);
                     }
                 });
@@ -927,7 +937,6 @@
     @Override
     protected boolean handleBackPressed() {
         RecordUserAction.record("CustomTabs.SystemBack");
-
         if (getActivityTab() == null) return false;
 
         if (exitFullscreenIfShowing()) return true;
@@ -936,12 +945,44 @@
             if (getCurrentTabModel().getCount() > 1) {
                 getCurrentTabModel().closeTab(getActivityTab(), false, false, false);
             } else {
+                recordClientConnectionStatus();
                 finishAndClose(false);
             }
         }
         return true;
     }
 
+    private void recordClientConnectionStatus() {
+        String packageName = getActivityTab().getAppAssociatedWith();
+        if (packageName == null) return; // No associated package
+
+        boolean isConnected = packageName.equals(
+                CustomTabsConnection.getInstance().getClientPackageNameForSession(mSession));
+        int status = -1;
+        if (isConnected) {
+            if (mIsKeepAlive) {
+                status = CONNECTION_STATUS_CONNECTED_KEEP_ALIVE;
+            } else {
+                status = CONNECTION_STATUS_CONNECTED;
+            }
+        } else {
+            if (mIsKeepAlive) {
+                status = CONNECTION_STATUS_DISCONNECTED_KEEP_ALIVE;
+            } else {
+                status = CONNECTION_STATUS_DISCONNECTED;
+            }
+        }
+        assert status >= 0;
+
+        if (GSAState.isGsaPackageName(packageName)) {
+            RecordHistogram.recordEnumeratedHistogram(
+                    "CustomTabs.ConnectionStatusOnReturn.GSA", status, CONNECTION_STATUS_MAX);
+        } else {
+            RecordHistogram.recordEnumeratedHistogram(
+                    "CustomTabs.ConnectionStatusOnReturn.NonGSA", status, CONNECTION_STATUS_MAX);
+        }
+    }
+
     /**
      * Configures the custom button on toolbar. Does nothing if invalid data is provided by clients.
      */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java
index 2f62dd5c..18d2fa1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManager.java
@@ -110,6 +110,7 @@
         if (!immediateNotificationUpdateNeeded(action)) return;
 
         final DownloadSharedPreferenceEntry entry = getDownloadEntryFromIntent(intent);
+        if (entry == null) return;
 
         switch (action) {
             case ACTION_DOWNLOAD_PAUSE:
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
index 11e63ac..b389d76 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
@@ -408,9 +408,7 @@
 
     @Override
     public void abortFirstRunExperience() {
-        Intent intent = new Intent();
-        if (mFreProperties != null) intent.putExtras(mFreProperties);
-        finishAllTheActivities(getLocalClassName(), Activity.RESULT_CANCELED, intent);
+        finishAllTheActivities(getLocalClassName());
 
         sendPendingIntentIfNecessary(false);
         if (sObserver != null) sObserver.onAbortFirstRunExperience();
@@ -458,17 +456,13 @@
         if (sObserver != null) sObserver.onUpdateCachedEngineName();
 
         if (!sendPendingIntentIfNecessary(true)) {
-            Intent resultData = new Intent();
-            resultData.putExtras(mFreProperties);
-            finishAllTheActivities(getLocalClassName(), Activity.RESULT_OK, resultData);
+            finishAllTheActivities(getLocalClassName());
         } else {
             ApplicationStatus.registerStateListenerForActivity(new ActivityStateListener() {
                 @Override
                 public void onActivityStateChange(Activity activity, int newState) {
                     if (newState == ActivityState.STOPPED || newState == ActivityState.DESTROYED) {
-                        Intent resultData = new Intent();
-                        resultData.putExtras(mFreProperties);
-                        finishAllTheActivities(getLocalClassName(), Activity.RESULT_OK, resultData);
+                        finishAllTheActivities(getLocalClassName());
                         ApplicationStatus.unregisterActivityStateListener(this);
                     }
                 }
@@ -526,15 +520,12 @@
     /**
     * Finish all the instances of the given Activity.
     * @param targetActivity The class name of the target Activity.
-    * @param result The result code to propagate back to the originating activity.
-    * @param data The data to propagate back to the originating activity.
     */
-    protected static void finishAllTheActivities(String targetActivity, int result, Intent data) {
+    protected static void finishAllTheActivities(String targetActivity) {
         List<WeakReference<Activity>> activities = ApplicationStatus.getRunningActivities();
         for (WeakReference<Activity> weakActivity : activities) {
             Activity activity = weakActivity.get();
             if (activity != null && activity.getLocalClassName().equals(targetActivity)) {
-                activity.setResult(result, data);
                 activity.finish();
             }
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/LightweightFirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/LightweightFirstRunActivity.java
index 4192cc1..d5912b0e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/LightweightFirstRunActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/LightweightFirstRunActivity.java
@@ -4,8 +4,6 @@
 
 package org.chromium.chrome.browser.firstrun;
 
-import android.app.Activity;
-import android.content.Intent;
 import android.text.method.LinkMovementMethod;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -92,9 +90,7 @@
     @Override
     public void completeFirstRunExperience() {
         FirstRunStatus.setLightweightFirstRunFlowComplete(true);
-        Intent intent = new Intent();
-        intent.putExtras(mFreProperties);
-        finishAllTheActivities(getLocalClassName(), Activity.RESULT_OK, intent);
+        finishAllTheActivities(getLocalClassName());
 
         sendPendingIntentIfNecessary(true);
     }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java
index f9c7582..70b919b1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/instantapps/InstantAppsHandler.java
@@ -214,7 +214,7 @@
             Context context, Intent intent, boolean isCustomTabsIntent, long startTime,
             boolean isRedirect) {
         if (!isRedirect && !isCustomTabsIntent && BuildInfo.isAtLeastO()) {
-            Log.i(TAG, "Disabled for Android O+");
+            Log.i(TAG, "Package manager handles intents on O+, not handling in Chrome");
             return false;
         }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java
index df6d3546..b2b1d976 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentInstrument.java
@@ -6,6 +6,7 @@
 
 import android.graphics.drawable.Drawable;
 
+import org.chromium.base.ThreadUtils;
 import org.chromium.chrome.browser.payments.ui.PaymentOption;
 import org.chromium.payments.mojom.PaymentDetailsModifier;
 import org.chromium.payments.mojom.PaymentItem;
@@ -46,6 +47,16 @@
         void onInstrumentDetailsError();
     }
 
+    /** The interface for the requester to abort payment. */
+    public interface AbortCallback {
+        /**
+         * Called after aborting payment is finished.
+         *
+         * @param abortSucceeded Indicates whether abort is succeed.
+         */
+        void onInstrumentAbortResult(boolean abortSucceeded);
+    }
+
     protected PaymentInstrument(String id, String label, String sublabel, Drawable icon) {
         super(id, label, sublabel, icon);
     }
@@ -144,6 +155,20 @@
             InstrumentDetailsCallback callback);
 
     /**
+     * Abort invocation of the payment app.
+     *
+     * @param callback The callback to return abort result.
+     */
+    public void abortPaymentApp(AbortCallback callback) {
+        ThreadUtils.postOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                callback.onInstrumentAbortResult(false);
+            }
+        });
+    }
+
+    /**
      * Cleans up any resources held by the payment instrument. For example, closes server
      * connections.
      */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
index e3e28f3..05dc343 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java
@@ -87,12 +87,12 @@
  * Android implementation of the PaymentRequest service defined in
  * components/payments/content/payment_request.mojom.
  */
-public class PaymentRequestImpl implements PaymentRequest, PaymentRequestUI.Client,
-                                           PaymentApp.InstrumentsCallback,
-                                           PaymentInstrument.InstrumentDetailsCallback,
-                                           PaymentAppFactory.PaymentAppCreatedCallback,
-                                           PaymentResponseHelper.PaymentResponseRequesterDelegate,
-                                           FocusChangedObserver, NormalizedAddressRequestDelegate {
+public class PaymentRequestImpl
+        implements PaymentRequest, PaymentRequestUI.Client, PaymentApp.InstrumentsCallback,
+                   PaymentInstrument.AbortCallback, PaymentInstrument.InstrumentDetailsCallback,
+                   PaymentAppFactory.PaymentAppCreatedCallback,
+                   PaymentResponseHelper.PaymentResponseRequesterDelegate, FocusChangedObserver,
+                   NormalizedAddressRequestDelegate {
     /**
      * A test-only observer for the PaymentRequest service implementation.
      */
@@ -1426,13 +1426,24 @@
     @Override
     public void abort() {
         if (mClient == null) return;
-        mClient.onAbort(!mPaymentAppRunning);
+
         if (mPaymentAppRunning) {
-            if (sObserverForTest != null) sObserverForTest.onPaymentRequestServiceUnableToAbort();
-        } else {
+            ((PaymentInstrument) mPaymentMethodsSection.getSelectedItem()).abortPaymentApp(this);
+            return;
+        }
+        onInstrumentAbortResult(true);
+    }
+
+    /** Called by the payment app in response to an abort request. */
+    @Override
+    public void onInstrumentAbortResult(boolean abortSucceeded) {
+        mClient.onAbort(abortSucceeded);
+        if (abortSucceeded) {
             closeClient();
             closeUI(true);
             mJourneyLogger.setAborted(AbortReason.ABORTED_BY_MERCHANT);
+        } else {
+            if (sObserverForTest != null) sObserverForTest.onPaymentRequestServiceUnableToAbort();
         }
     }
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java
index 2a23b11f4..a13e09f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentApp.java
@@ -126,6 +126,11 @@
     }
 
     @Override
+    public void abortPaymentApp(AbortCallback callback) {
+        ServiceWorkerPaymentAppBridge.abortPaymentApp(mWebContents, mRegistrationId, callback);
+    }
+
+    @Override
     public void dismissInstrument() {}
 
     @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
index 02293cf..c6ec3f9 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/ServiceWorkerPaymentAppBridge.java
@@ -63,6 +63,18 @@
                 modifiers.toArray(new PaymentDetailsModifier[0]), callback);
     }
 
+    /**
+     * Abort invocation of the payment app.
+     *
+     * @param webContents      The web contents that invoked PaymentRequest.
+     * @param registrationId   The service worker registration ID of the Payment App.
+     * @param callback         Called after abort invoke payment app is finished running.
+     */
+    public static void abortPaymentApp(WebContents webContents, long registrationId,
+            PaymentInstrument.AbortCallback callback) {
+        nativeAbortPaymentApp(webContents, registrationId, callback);
+    }
+
     @CalledByNative
     private static String[] getSupportedMethodsFromMethodData(PaymentMethodData data) {
         return data.supportedMethods;
@@ -140,6 +152,12 @@
         }
     }
 
+    @CalledByNative
+    private static void onPaymentAppAborted(Object callback, boolean result) {
+        assert callback instanceof PaymentInstrument.AbortCallback;
+        ((PaymentInstrument.AbortCallback) callback).onInstrumentAbortResult(result);
+    }
+
     /*
      * TODO(tommyt): crbug.com/505554. Change the |callback| parameter below to
      * be of type PaymentInstrument.InstrumentDetailsCallback, once this JNI bug
@@ -156,4 +174,12 @@
             String topLevelOrigin, String paymentRequestOrigin, String paymentRequestId,
             PaymentMethodData[] methodData, PaymentItem total, PaymentDetailsModifier[] modifiers,
             Object callback);
+
+    /*
+     * TODO(tommyt): crbug.com/505554. Change the |callback| parameter below to
+     * be of type PaymentInstrument.InstrumentDetailsCallback, once this JNI bug
+     * has been resolved.
+     */
+    private static native void nativeAbortPaymentApp(
+            WebContents webContents, long registrationId, Object callback);
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/ProfileDataCache.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/ProfileDataCache.java
index 3366951..5f86525 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/ProfileDataCache.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/ProfileDataCache.java
@@ -27,9 +27,12 @@
 import org.chromium.chrome.R;
 import org.chromium.chrome.browser.profiles.Profile;
 import org.chromium.chrome.browser.profiles.ProfileDownloader;
+import org.chromium.components.signin.AccountManagerFacade;
+import org.chromium.components.signin.ProfileDataSource;
 
 import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * Fetches and caches Google Account profile images and full names for the accounts on the device.
@@ -37,7 +40,7 @@
  * should be provided by calling {@link #update(List)}
  */
 @MainThread
-public class ProfileDataCache implements ProfileDownloader.Observer {
+public class ProfileDataCache implements ProfileDownloader.Observer, ProfileDataSource.Observer {
     /**
      * Observer to get notifications about changes in profile data.
      */
@@ -107,6 +110,8 @@
     private final Drawable mPlaceholderImage;
     private final ObserverList<Observer> mObservers = new ObserverList<>();
     private final HashMap<String, CacheEntry> mCacheEntries = new HashMap<>();
+    @Nullable
+    private final ProfileDataSource mProfileDataSource;
 
     public ProfileDataCache(Context context, Profile profile, int imageSize) {
         this(context, profile, imageSize, null);
@@ -121,6 +126,8 @@
 
         mPlaceholderImage =
                 AppCompatResources.getDrawable(context, R.drawable.logo_avatar_anonymous);
+
+        mProfileDataSource = AccountManagerFacade.get().getProfileDataSource();
     }
 
     /**
@@ -132,6 +139,9 @@
         ThreadUtils.assertOnUiThread();
         assert !mObservers.isEmpty();
 
+        // ProfileDataSource is updated automatically.
+        if (mProfileDataSource != null) return;
+
         for (int i = 0; i < accounts.size(); i++) {
             if (mCacheEntries.get(accounts.get(i)) == null) {
                 ProfileDownloader.startFetchingAccountInfoFor(
@@ -179,7 +189,12 @@
     public void addObserver(Observer observer) {
         ThreadUtils.assertOnUiThread();
         if (mObservers.isEmpty()) {
-            ProfileDownloader.addObserver(this);
+            if (mProfileDataSource != null) {
+                mProfileDataSource.addObserver(this);
+                populateCacheFromProfileDataSource();
+            } else {
+                ProfileDownloader.addObserver(this);
+            }
         }
         mObservers.addObserver(observer);
     }
@@ -191,10 +206,26 @@
         ThreadUtils.assertOnUiThread();
         mObservers.removeObserver(observer);
         if (mObservers.isEmpty()) {
-            ProfileDownloader.removeObserver(this);
+            if (mProfileDataSource != null) {
+                mProfileDataSource.removeObserver(this);
+            } else {
+                ProfileDownloader.removeObserver(this);
+            }
         }
     }
 
+    private void populateCacheFromProfileDataSource() {
+        for (Map.Entry<String, ProfileDataSource.ProfileData> entry :
+                mProfileDataSource.getProfileDataMap().entrySet()) {
+            mCacheEntries.put(entry.getKey(), createCacheEntryFromProfileData(entry.getValue()));
+        }
+    }
+
+    private CacheEntry createCacheEntryFromProfileData(ProfileDataSource.ProfileData profileData) {
+        return new CacheEntry(prepareAvatar(profileData.getAvatar()), profileData.getFullName(),
+                profileData.getGivenName());
+    }
+
     @Override
     public void onProfileDownloaded(String accountId, String fullName, String givenName,
             Bitmap bitmap) {
@@ -205,6 +236,22 @@
         }
     }
 
+    @Override
+    public void onProfileDataUpdated(String accountId) {
+        assert mProfileDataSource != null;
+        ProfileDataSource.ProfileData profileData =
+                mProfileDataSource.getProfileDataForAccount(accountId);
+        if (profileData == null) {
+            mCacheEntries.remove(accountId);
+        } else {
+            mCacheEntries.put(accountId, createCacheEntryFromProfileData(profileData));
+        }
+
+        for (Observer observer : mObservers) {
+            observer.onProfileDataUpdated(accountId);
+        }
+    }
+
     /**
      * Crops avatar image into a circle.
      */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/NavigationRecorder.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/NavigationRecorder.java
index 1bcb5be5..08cb9ea 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/NavigationRecorder.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/NavigationRecorder.java
@@ -5,16 +5,17 @@
 package org.chromium.chrome.browser.suggestions;
 
 import android.os.SystemClock;
+import android.support.annotation.Nullable;
 
 import org.chromium.base.Callback;
 import org.chromium.chrome.browser.tab.EmptyTabObserver;
 import org.chromium.chrome.browser.tab.Tab;
 import org.chromium.content_public.browser.LoadUrlParams;
 import org.chromium.content_public.browser.NavigationController;
+import org.chromium.content_public.browser.WebContents;
 import org.chromium.content_public.browser.WebContentsObserver;
 import org.chromium.ui.base.PageTransition;
 
-import javax.annotation.Nullable;
 
 /**
  * Records stats related to a page visit, such as the time spent on the website, or if the user
@@ -22,7 +23,8 @@
  */
 public class NavigationRecorder extends EmptyTabObserver {
     private final Callback<VisitData> mVisitEndCallback;
-    private final int mNavigationStackIndex;
+
+    @Nullable
     private final WebContentsObserver mWebContentsObserver;
 
     private long mStartTimeMs;
@@ -38,23 +40,30 @@
 
     /** Private because users should not hold to references to the instance. */
     private NavigationRecorder(final Tab tab, Callback<VisitData> visitEndCallback) {
-        assert tab.getWebContents() != null;
-
         mVisitEndCallback = visitEndCallback;
 
         // onLoadUrl below covers many exit conditions to stop recording but not all,
         // such as navigating back. We therefore stop recording if a navigation stack change
         // indicates we are back to our starting point.
-        final NavigationController navController = tab.getWebContents().getNavigationController();
-        mNavigationStackIndex = navController.getLastCommittedEntryIndex();
-        mWebContentsObserver = new WebContentsObserver() {
-            @Override
-            public void navigationEntryCommitted() {
-                if (mNavigationStackIndex != navController.getLastCommittedEntryIndex()) return;
-                endRecording(tab, tab.getUrl());
-            }
-        };
-        tab.getWebContents().addObserver(mWebContentsObserver);
+        WebContents webContents = tab.getWebContents();
+        if (webContents != null) {
+            // if no WebContents is available now, the navigation has been started in a new tab.
+            // Svelte devices do not start loading until we switch to the new tab, see
+            // https://crbug.com/748916. In that case, closing or moving away will be the end
+            // trigger anyway, no need to care about the navigation stack.
+            final NavigationController navController = webContents.getNavigationController();
+            int startStackIndex = navController.getLastCommittedEntryIndex();
+            mWebContentsObserver = new WebContentsObserver() {
+                @Override
+                public void navigationEntryCommitted() {
+                    if (startStackIndex != navController.getLastCommittedEntryIndex()) return;
+                    endRecording(tab, tab.getUrl());
+                }
+            };
+            webContents.addObserver(mWebContentsObserver);
+        } else {
+            mWebContentsObserver = null;
+        }
 
         if (!tab.isHidden()) mStartTimeMs = SystemClock.elapsedRealtime();
     }
@@ -88,7 +97,7 @@
     private void endRecording(@Nullable Tab removeObserverFromTab, @Nullable String endUrl) {
         if (removeObserverFromTab != null) {
             removeObserverFromTab.removeObserver(this);
-            if (removeObserverFromTab.getWebContents() != null) {
+            if (removeObserverFromTab.getWebContents() != null && mWebContentsObserver != null) {
                 removeObserverFromTab.getWebContents().removeObserver(mWebContentsObserver);
             }
         }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
index d0e6dadf..489d7db4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsBottomSheetContent.java
@@ -299,6 +299,9 @@
         // Do nothing if there are already suggestions in the carousel for the current context.
         if (TextUtils.equals(url, mSuggestionsCarousel.getCurrentCarouselContextUrl())) return;
 
+        // Context has changed, so we want to remove any old suggestions from the carousel.
+        mSuggestionsCarousel.clearSuggestions();
+
         String text = String.format(Locale.US, "Fetching contextual suggestions...");
         Toast.makeText(mRecyclerView.getContext(), text, Toast.LENGTH_SHORT).show();
         mSuggestionsUiDelegate.getSuggestionsSource().fetchContextualSuggestions(
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegateImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegateImpl.java
index dab5a3e..07461ba 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegateImpl.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsNavigationDelegateImpl.java
@@ -142,11 +142,7 @@
         }
 
         Tab loadingTab = openUrl(windowOpenDisposition, loadUrlParams);
-        if (loadingTab != null && loadingTab.getWebContents() != null) {
-            // TODO(https://crbug.com/665915): Handle cases where webcontents is null by waiting
-            // for it to be added, probably using TabObserver#webContentsCreated().
-            SuggestionsMetrics.recordVisit(loadingTab, article);
-        }
+        if (loadingTab != null) SuggestionsMetrics.recordVisit(loadingTab, article);
     }
 
     @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index 8103456..82e6608 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -2574,8 +2574,9 @@
     public void updateFullscreenEnabledState() {
         if (isFrozen()) return;
 
+        int constraints = getBrowserControlsStateConstraints();
         updateBrowserControlsState(
-                getBrowserControlsStateConstraints(), BrowserControlsState.BOTH, true);
+                constraints, BrowserControlsState.BOTH, constraints != BrowserControlsState.HIDDEN);
 
         if (getContentViewCore() != null && mFullscreenManager != null) {
             getContentViewCore().updateMultiTouchZoomSupport(
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
index 20e259f..66cc9d79 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
@@ -344,8 +344,10 @@
         if (isForWebApk) {
             boolean isExternalService = false;
             boolean bindToCaller = false;
+            boolean ignoreVisibilityForImportance = false;
             params = new ChildProcessCreationParams(getWebappInfo().webApkPackageName(),
-                    isExternalService, LibraryProcessType.PROCESS_CHILD, bindToCaller);
+                    isExternalService, LibraryProcessType.PROCESS_CHILD, bindToCaller,
+                    ignoreVisibilityForImportance);
         }
         ChildProcessCreationParams.registerDefault(params);
     }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
index 7b5c3a5..e5b801d 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/BindingManagerIntegrationTest.java
@@ -38,6 +38,7 @@
 import org.chromium.content.browser.test.util.Criteria;
 import org.chromium.content.browser.test.util.CriteriaHelper;
 import org.chromium.content.browser.test.util.TouchCommon;
+import org.chromium.content_public.browser.ChildProcessImportance;
 import org.chromium.content_public.browser.LoadUrlParams;
 import org.chromium.net.test.EmbeddedTestServer;
 import org.chromium.ui.base.DeviceFormFactor;
@@ -182,6 +183,7 @@
             // trigger the load manually.
             tabs[1].show(TabSelectionType.FROM_USER);
             tabs[1].hide();
+            tabs[1].setImportance(ChildProcessImportance.NORMAL);
         });
         ChromeTabUtils.waitForTabPageLoaded(tabs[0], mTestServer.getURL(FILE_PATH));
         ChromeTabUtils.waitForTabPageLoaded(tabs[1], mTestServer.getURL(FILE_PATH));
@@ -249,6 +251,7 @@
             // trigger the load manually.
             tabs[1].show(TabSelectionType.FROM_USER);
             tabs[1].hide();
+            tabs[1].setImportance(ChildProcessImportance.NORMAL);
         });
         ChromeTabUtils.waitForTabPageLoaded(tabs[0], mTestServer.getURL(FILE_PATH));
         ChromeTabUtils.waitForTabPageLoaded(tabs[1], mTestServer.getURL(FILE_PATH));
@@ -481,6 +484,7 @@
             mBindingManager.assertIsInForeground(
                     tabs[1].getContentViewCore().getCurrentRenderProcessId());
             tabs[1].hide();
+            tabs[1].setImportance(ChildProcessImportance.NORMAL);
             mBindingManager.assertIsInBackground(
                     tabs[1].getContentViewCore().getCurrentRenderProcessId());
         });
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index dd657ca..9c8ff6f8 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -192,6 +192,11 @@
 extern int NaClMain(const content::MainFunctionParams&);
 extern int CloudPrintServiceProcessMain(const content::MainFunctionParams&);
 
+const char* const ChromeMainDelegate::kNonWildcardDomainNonPortSchemes[] = {
+    extensions::kExtensionScheme, chrome::kChromeSearchScheme};
+const size_t ChromeMainDelegate::kNonWildcardDomainNonPortSchemesSize =
+    arraysize(kNonWildcardDomainNonPortSchemes);
+
 namespace {
 
 base::LazyInstance<ChromeMainDelegate::ServiceCatalogFactory>::Leaky
@@ -598,8 +603,8 @@
   nacl::RegisterPathProvider();
 #endif
 
-  ContentSettingsPattern::SetNonWildcardDomainNonPortScheme(
-      extensions::kExtensionScheme);
+  ContentSettingsPattern::SetNonWildcardDomainNonPortSchemes(
+      kNonWildcardDomainNonPortSchemes, kNonWildcardDomainNonPortSchemesSize);
 
 // No support for ANDROID yet as DiagnosticsController needs wchar support.
 // TODO(gspencer): That's not true anymore, or at least there are no w-string
diff --git a/chrome/app/chrome_main_delegate.h b/chrome/app/chrome_main_delegate.h
index aaf785e1..01fc44af 100644
--- a/chrome/app/chrome_main_delegate.h
+++ b/chrome/app/chrome_main_delegate.h
@@ -21,6 +21,9 @@
 // Chrome implementation of ContentMainDelegate.
 class ChromeMainDelegate : public content::ContentMainDelegate {
  public:
+  static const char* const kNonWildcardDomainNonPortSchemes[];
+  static const size_t kNonWildcardDomainNonPortSchemesSize;
+
   ChromeMainDelegate();
 
   // |exe_entry_point_ticks| is the time at which the main function of the
diff --git a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
index 50c9860..d9ff094 100644
--- a/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
+++ b/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
@@ -85,6 +85,15 @@
       ConvertUTF8ToJavaString(env, handler_response->stringified_details));
 }
 
+void OnPaymentAppAborted(const JavaRef<jobject>& jweb_contents,
+                         const JavaRef<jobject>& jcallback,
+                         bool result) {
+  JNIEnv* env = AttachCurrentThread();
+
+  Java_ServiceWorkerPaymentAppBridge_onPaymentAppAborted(env, jcallback,
+                                                         result);
+}
+
 }  // namespace
 
 static void GetAllPaymentApps(JNIEnv* env,
@@ -202,3 +211,18 @@
                      ScopedJavaGlobalRef<jobject>(env, jweb_contents),
                      ScopedJavaGlobalRef<jobject>(env, jcallback)));
 }
+
+static void AbortPaymentApp(JNIEnv* env,
+                            const JavaParamRef<jclass>& jcaller,
+                            const JavaParamRef<jobject>& jweb_contents,
+                            jlong registration_id,
+                            const JavaParamRef<jobject>& jcallback) {
+  content::WebContents* web_contents =
+      content::WebContents::FromJavaWebContents(jweb_contents);
+
+  content::PaymentAppProvider::GetInstance()->AbortPayment(
+      web_contents->GetBrowserContext(), registration_id,
+      base::BindOnce(&OnPaymentAppAborted,
+                     ScopedJavaGlobalRef<jobject>(env, jweb_contents),
+                     ScopedJavaGlobalRef<jobject>(env, jcallback)));
+}
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
index 3ad0d4a..b4f35b15 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
@@ -85,18 +85,14 @@
   ArcDocumentsProviderRootMap* roots =
       ArcDocumentsProviderRootMap::GetForArcBrowserContext();
   if (!roots) {
-    OnReadDirectoryOnUIThread(
-        callback, base::File::FILE_ERROR_SECURITY,
-        std::vector<ArcDocumentsProviderRoot::ThinFileInfo>());
+    OnReadDirectoryOnUIThread(callback, base::File::FILE_ERROR_SECURITY, {});
     return;
   }
 
   base::FilePath path;
   ArcDocumentsProviderRoot* root = roots->ParseAndLookup(url, &path);
   if (!root) {
-    OnReadDirectoryOnUIThread(
-        callback, base::File::FILE_ERROR_NOT_FOUND,
-        std::vector<ArcDocumentsProviderRoot::ThinFileInfo>());
+    OnReadDirectoryOnUIThread(callback, base::File::FILE_ERROR_NOT_FOUND, {});
     return;
   }
 
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
index 9cf4877..74bbb02 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.cc
@@ -250,8 +250,7 @@
     const std::string& document_id) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   if (document_id.empty()) {
-    std::move(callback).Run(base::File::FILE_ERROR_NOT_FOUND,
-                            std::vector<ThinFileInfo>());
+    std::move(callback).Run(base::File::FILE_ERROR_NOT_FOUND, {});
     return;
   }
   ReadDirectoryInternal(
@@ -267,7 +266,7 @@
     const NameToDocumentMap& mapping) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   if (error != base::File::FILE_OK) {
-    std::move(callback).Run(error, std::vector<ThinFileInfo>());
+    std::move(callback).Run(error, {});
     return;
   }
 
diff --git a/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc b/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
index 3ce3d960..191e2a1 100644
--- a/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
+++ b/chrome/browser/chromeos/fileapi/recent_arc_media_source.cc
@@ -193,8 +193,7 @@
     // We already checked ARC is allowed for this profile (indirectly), so
     // this should never happen.
     LOG(ERROR) << "ArcDocumentsProviderRootMap is not available";
-    OnReadDirectory(path, base::File::FILE_ERROR_FAILED,
-                    std::vector<arc::ArcDocumentsProviderRoot::ThinFileInfo>());
+    OnReadDirectory(path, base::File::FILE_ERROR_FAILED, {});
     return;
   }
 
@@ -203,8 +202,7 @@
   if (!root) {
     // Media roots should always exist.
     LOG(ERROR) << "ArcDocumentsProviderRoot is missing";
-    OnReadDirectory(path, base::File::FILE_ERROR_NOT_FOUND,
-                    std::vector<arc::ArcDocumentsProviderRoot::ThinFileInfo>());
+    OnReadDirectory(path, base::File::FILE_ERROR_NOT_FOUND, {});
     return;
   }
 
@@ -307,7 +305,7 @@
   // ArcFileSystemOperationRunner's deferring state switches from disabled to
   // enabled (one such case is when ARC container crashes).
   if (!WillArcFileSystemOperationsRunImmediately()) {
-    std::move(params.callback()).Run(std::vector<RecentFile>());
+    std::move(params.callback()).Run({});
     return;
   }
 
diff --git a/chrome/browser/extensions/content_script_apitest.cc b/chrome/browser/extensions/content_script_apitest.cc
index 5f761322..8144584 100644
--- a/chrome/browser/extensions/content_script_apitest.cc
+++ b/chrome/browser/extensions/content_script_apitest.cc
@@ -432,6 +432,39 @@
   ASSERT_TRUE(RunExtensionTest("content_scripts/policy")) << message_;
 }
 
+IN_PROC_BROWSER_TEST_F(ExtensionApiTestWithManagementPolicy,
+                       ContentScriptPolicyByExtensionId) {
+  ASSERT_TRUE(StartEmbeddedTestServer());
+  base::FilePath extension_path =
+      test_data_dir_.AppendASCII("content_scripts/policy");
+  // Pack extension because by-extension policies aren't applied to unpacked
+  // "transient" extensions.
+  base::FilePath crx_path = PackExtension(extension_path);
+  EXPECT_FALSE(crx_path.empty());
+
+  // Load first time to get extension id.
+  const Extension* extension = LoadExtensionWithFlags(
+      crx_path, ExtensionBrowserTest::kFlagEnableFileAccess);
+  ASSERT_TRUE(extension);
+  auto extension_id = extension->id();
+  UnloadExtension(extension_id);
+
+  // Set enterprise policy to block injection of specified extension to policy
+  // specified host.
+  {
+    ExtensionManagementPolicyUpdater pref(&policy_provider_);
+    pref.AddRuntimeBlockedHost(extension_id, "*://example.com");
+  }
+  // Some policy updating operations are performed asynchronuosly. Wait for them
+  // to complete before installing extension.
+  base::RunLoop().RunUntilIdle();
+
+  extensions::ResultCatcher catcher;
+  EXPECT_TRUE(LoadExtensionWithFlags(
+      crx_path, ExtensionBrowserTest::kFlagEnableFileAccess));
+  EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+}
+
 IN_PROC_BROWSER_TEST_P(ContentScriptApiTest, ContentScriptBypassPageCSP) {
   ASSERT_TRUE(StartEmbeddedTestServer());
   ASSERT_TRUE(RunExtensionTest("content_scripts/bypass_page_csp")) << message_;
diff --git a/chrome/browser/extensions/events_apitest.cc b/chrome/browser/extensions/events_apitest.cc
index 3e0f4bb..d6ad0400 100644
--- a/chrome/browser/extensions/events_apitest.cc
+++ b/chrome/browser/extensions/events_apitest.cc
@@ -270,11 +270,6 @@
       if (extension)
         observed_extension_names_.insert(extension->name());
     }
-
-    updates_listener_ =
-        base::MakeUnique<ExtensionTestMessageListener>("update event", false);
-    failure_listener_ =
-        base::MakeUnique<ExtensionTestMessageListener>("not listening", false);
   }
 
   void TearDownOnMainThread() override {
@@ -288,20 +283,11 @@
     observed_extension_names_.insert(host->extension()->name());
   }
 
-  ExtensionTestMessageListener* updates_listener() {
-    return updates_listener_.get();
-  }
-  ExtensionTestMessageListener* failure_listener() {
-    return failure_listener_.get();
-  }
   const std::set<std::string> observed_extension_names() const {
     return observed_extension_names_;
   }
 
  private:
-  std::unique_ptr<ExtensionTestMessageListener> updates_listener_;
-  std::unique_ptr<ExtensionTestMessageListener> failure_listener_;
-
   std::set<std::string> observed_extension_names_;
 
   DISALLOW_COPY_AND_ASSIGN(ChromeUpdatesEventsApiTest);
@@ -332,17 +318,15 @@
   ChromeExtensionTestNotificationObserver(browser())
       .WaitForExtensionViewsToLoad();
 
+  content::RunAllPendingInMessageLoop();
+  content::RunAllBlockingPoolTasksUntilIdle();
+
   // "chrome updates listener" registerd a listener for the onInstalled event,
   // whereas "chrome updates non listener" did not. Only the
   // "chrome updates listener" extension should have been woken up for the
   // chrome update event.
   EXPECT_TRUE(observed_extension_names().count("chrome updates listener"));
   EXPECT_FALSE(observed_extension_names().count("chrome updates non listener"));
-
-  EXPECT_TRUE(updates_listener()->WaitUntilSatisfied());
-  content::RunAllPendingInMessageLoop();
-  content::RunAllBlockingPoolTasksUntilIdle();
-  EXPECT_FALSE(failure_listener()->was_satisfied());
 }
 
 }  // namespace extensions
diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc
index 6bf0922..2099076 100644
--- a/chrome/browser/extensions/permissions_updater.cc
+++ b/chrome/browser/extensions/permissions_updater.cc
@@ -9,6 +9,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/values.h"
 #include "chrome/browser/extensions/api/permissions/permissions_api_helpers.h"
+#include "chrome/browser/extensions/extension_management.h"
 #include "chrome/browser/extensions/scripting_permissions_modifier.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/common/extensions/api/permissions.h"
@@ -242,6 +243,17 @@
   if (g_delegate)
     g_delegate->InitializePermissions(extension, &granted_permissions);
 
+  if ((init_flag_ & INIT_FLAG_TRANSIENT) == 0) {
+    // Apply per-extension policy if set.
+    ExtensionManagement* management =
+        ExtensionManagementFactory::GetForBrowserContext(browser_context_);
+    if (!management->UsesDefaultRuntimeHostRestrictions(extension)) {
+      SetPolicyHostRestrictions(extension,
+                                management->GetRuntimeBlockedHosts(extension),
+                                management->GetRuntimeAllowedHosts(extension));
+    }
+  }
+
   SetPermissions(extension, std::move(granted_permissions),
                  std::move(withheld_permissions));
 }
diff --git a/chrome/browser/media/android/router/media_router_dialog_controller_android.cc b/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
index e71ff69..243d78a0 100644
--- a/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
+++ b/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
@@ -48,13 +48,12 @@
     const JavaParamRef<jobject>& obj,
     const JavaParamRef<jstring>& jsource_id,
     const JavaParamRef<jstring>& jsink_id) {
-  std::unique_ptr<CreatePresentationConnectionRequest>
-      create_connection_request = TakeCreateConnectionRequest();
-  if (!create_connection_request)
+  auto start_presentation_context = std::move(start_presentation_context_);
+  if (!start_presentation_context)
     return;
 
   const auto& presentation_request =
-      create_connection_request->presentation_request();
+      start_presentation_context->presentation_request();
 
   const MediaSource::Id source_id = ConvertJavaStringToUTF8(env, jsource_id);
 
@@ -75,8 +74,8 @@
 
   std::vector<MediaRouteResponseCallback> route_response_callbacks;
   route_response_callbacks.push_back(
-      base::Bind(&CreatePresentationConnectionRequest::HandleRouteResponse,
-                 base::Passed(&create_connection_request)));
+      base::BindOnce(&StartPresentationContext::HandleRouteResponse,
+                     std::move(start_presentation_context)));
 
   content::BrowserContext* browser_context = initiator()->GetBrowserContext();
   MediaRouter* router = MediaRouterFactory::GetApiForBrowserContext(
@@ -110,8 +109,7 @@
 void MediaRouterDialogControllerAndroid::OnMediaSourceNotSupported(
     JNIEnv* env,
     const JavaParamRef<jobject>& obj) {
-  std::unique_ptr<CreatePresentationConnectionRequest> request =
-      TakeCreateConnectionRequest();
+  auto request = std::move(start_presentation_context_);
   if (!request)
     return;
 
@@ -120,8 +118,7 @@
 }
 
 void MediaRouterDialogControllerAndroid::CancelPresentationRequest() {
-  std::unique_ptr<CreatePresentationConnectionRequest> request =
-      TakeCreateConnectionRequest();
+  auto request = std::move(start_presentation_context_);
   if (!request)
     return;
 
@@ -151,7 +148,7 @@
   JNIEnv* env = base::android::AttachCurrentThread();
 
   auto sources = MediaSourcesForPresentationUrls(
-      create_connection_request()->presentation_request().presentation_urls);
+      start_presentation_context_->presentation_request().presentation_urls);
 
   // If it's a single route with the same source, show the controller dialog
   // instead of the device picker.
diff --git a/chrome/browser/media/router/BUILD.gn b/chrome/browser/media/router/BUILD.gn
index 9c8a96b..650d762 100644
--- a/chrome/browser/media/router/BUILD.gn
+++ b/chrome/browser/media/router/BUILD.gn
@@ -24,8 +24,6 @@
   sources = [
     "browser_presentation_connection_proxy.cc",
     "browser_presentation_connection_proxy.h",
-    "create_presentation_connection_request.cc",
-    "create_presentation_connection_request.h",
     "issue_manager.cc",
     "issue_manager.h",
     "issues_observer.cc",
diff --git a/chrome/browser/media/router/create_presentation_connection_request.cc b/chrome/browser/media/router/create_presentation_connection_request.cc
deleted file mode 100644
index 8d48894..0000000
--- a/chrome/browser/media/router/create_presentation_connection_request.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2015 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 "chrome/browser/media/router/create_presentation_connection_request.h"
-
-#include "chrome/common/media_router/media_route.h"
-#include "chrome/common/media_router/media_source_helper.h"
-#include "chrome/common/media_router/route_request_result.h"
-#include "url/origin.h"
-
-using content::PresentationInfo;
-using content::PresentationError;
-
-namespace media_router {
-
-CreatePresentationConnectionRequest::CreatePresentationConnectionRequest(
-    const content::PresentationRequest& presentation_request,
-    PresentationConnectionCallback success_cb,
-    PresentationConnectionErrorCallback error_cb)
-    : presentation_request_(presentation_request),
-      success_cb_(std::move(success_cb)),
-      error_cb_(std::move(error_cb)),
-      cb_invoked_(false) {
-  DCHECK(!success_cb_.is_null());
-  DCHECK(!error_cb_.is_null());
-}
-
-CreatePresentationConnectionRequest::~CreatePresentationConnectionRequest() {
-  if (!cb_invoked_) {
-    std::move(error_cb_).Run(content::PresentationError(
-        content::PRESENTATION_ERROR_UNKNOWN, "Unknown error."));
-  }
-}
-
-void CreatePresentationConnectionRequest::InvokeSuccessCallback(
-    const std::string& presentation_id,
-    const GURL& presentation_url,
-    const MediaRoute& route) {
-  DCHECK(!cb_invoked_);
-  if (!cb_invoked_) {
-    std::move(success_cb_)
-        .Run(content::PresentationInfo(presentation_url, presentation_id),
-             route);
-    cb_invoked_ = true;
-  }
-}
-
-void CreatePresentationConnectionRequest::InvokeErrorCallback(
-    const content::PresentationError& error) {
-  DCHECK(!cb_invoked_);
-  if (!cb_invoked_) {
-    std::move(error_cb_).Run(error);
-    cb_invoked_ = true;
-  }
-}
-
-// static
-void CreatePresentationConnectionRequest::HandleRouteResponse(
-    std::unique_ptr<CreatePresentationConnectionRequest> presentation_request,
-    const RouteRequestResult& result) {
-  if (!result.route()) {
-    presentation_request->InvokeErrorCallback(content::PresentationError(
-        content::PRESENTATION_ERROR_UNKNOWN, result.error()));
-  } else {
-    presentation_request->InvokeSuccessCallback(
-        result.presentation_id(), result.presentation_url(), *result.route());
-  }
-}
-
-}  // namespace media_router
diff --git a/chrome/browser/media/router/create_presentation_connection_request.h b/chrome/browser/media/router/create_presentation_connection_request.h
deleted file mode 100644
index c9a281c3..0000000
--- a/chrome/browser/media/router/create_presentation_connection_request.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2015 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 CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_
-#define CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_
-
-#include <memory>
-#include <string>
-#include <vector>
-
-#include "base/macros.h"
-#include "content/public/browser/presentation_request.h"
-#include "content/public/browser/presentation_service_delegate.h"
-
-namespace content {
-struct PresentationError;
-struct PresentationInfo;
-}  // namespace content
-
-namespace media_router {
-
-class MediaRoute;
-class RouteRequestResult;
-
-// Holds parameters for creating a presentation.  A request object is created by
-// presentation_service_delegate_impl, which is then passed to and owned by the
-// MediaRouterUI. |success_cb| will be invoked when create-session succeeds, or
-// |error_cb| will be invoked when create-session fails or the UI closes.
-// TODO(mfoltz): Combine this with PresentationRequest as it's largely
-// redundant.
-class CreatePresentationConnectionRequest {
- public:
-  using PresentationConnectionCallback =
-      base::OnceCallback<void(const content::PresentationInfo&,
-                              const MediaRoute&)>;
-  using PresentationConnectionErrorCallback =
-      content::PresentationConnectionErrorCallback;
-  // |presentation_request|: Request object containing the presentation URLs,
-  //     and the ID and origin of the initiating frame.
-  // |success_cb|: Callback to invoke when the request succeeds. Must be valid.
-  // |error_cb|: Callback to invoke when the request fails. Must be valid.
-  CreatePresentationConnectionRequest(
-      const content::PresentationRequest& presentation_request,
-      PresentationConnectionCallback success_cb,
-      PresentationConnectionErrorCallback error_cb);
-  ~CreatePresentationConnectionRequest();
-
-  const content::PresentationRequest& presentation_request() const {
-    return presentation_request_;
-  }
-
-  // Invokes |success_cb_| or |error_cb_| with the given arguments.
-  // These functions can only be invoked once per instance. It is an error
-  // to invoke these functions more than once.
-  void InvokeSuccessCallback(const std::string& presentation_id,
-                             const GURL& presentation_url,
-                             const MediaRoute& route);
-  void InvokeErrorCallback(const content::PresentationError& error);
-
-  // Handle route creation/joining response by invoking the right callback.
-  static void HandleRouteResponse(
-      std::unique_ptr<CreatePresentationConnectionRequest> presentation_request,
-      const RouteRequestResult& result);
-
- private:
-  content::PresentationRequest presentation_request_;
-  PresentationConnectionCallback success_cb_;
-  PresentationConnectionErrorCallback error_cb_;
-  bool cb_invoked_;
-
-  DISALLOW_COPY_AND_ASSIGN(CreatePresentationConnectionRequest);
-};
-
-}  // namespace media_router
-
-#endif  // CHROME_BROWSER_MEDIA_ROUTER_CREATE_PRESENTATION_CONNECTION_REQUEST_H_
diff --git a/chrome/browser/media/router/create_presentation_connection_request_unittest.cc b/chrome/browser/media/router/create_presentation_connection_request_unittest.cc
deleted file mode 100644
index 3a8b491..0000000
--- a/chrome/browser/media/router/create_presentation_connection_request_unittest.cc
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright 2015 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 "chrome/browser/media/router/create_presentation_connection_request.h"
-
-#include "base/bind.h"
-#include "chrome/common/media_router/media_route.h"
-#include "chrome/common/media_router/media_source_helper.h"
-#include "content/public/browser/presentation_service_delegate.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace media_router {
-
-namespace {
-
-constexpr char kPresentationUrl1[] = "http://www.example.com/presentation.html";
-constexpr char kPresentationUrl2[] = "http://www.example.net/alternate.html";
-constexpr char kFrameUrl[] = "http://google.com";
-constexpr char kPresentationId[] = "presentationId";
-constexpr char kRouteId[] =
-    "urn:x-org.chromium:media:route:presentationId/cast-sink1/"
-    "http://www.example.com/presentation.html";
-
-}  // namespace
-
-class CreatePresentationConnectionRequestTest : public ::testing::Test {
- public:
-  CreatePresentationConnectionRequestTest()
-      : cb_invoked_(false),
-        presentation_url_(kPresentationUrl1),
-        presentation_request_({1, 2},
-                              {presentation_url_, GURL(kPresentationUrl2)},
-                              url::Origin(GURL(kFrameUrl))) {}
-
-  ~CreatePresentationConnectionRequestTest() override {}
-
-  void OnSuccess(const content::PresentationInfo& expected_info,
-                 const content::PresentationInfo& actual_info,
-                 const MediaRoute& route) {
-    cb_invoked_ = true;
-    EXPECT_EQ(expected_info.presentation_url, actual_info.presentation_url);
-    EXPECT_EQ(expected_info.presentation_id, actual_info.presentation_id);
-    EXPECT_EQ(route.media_route_id(), kRouteId);
-  }
-
-  void OnError(const content::PresentationError& expected_error,
-               const content::PresentationError& actual_error) {
-    cb_invoked_ = true;
-    EXPECT_EQ(expected_error.error_type, actual_error.error_type);
-    EXPECT_EQ(expected_error.message, actual_error.message);
-  }
-
-  void FailOnSuccess(const content::PresentationInfo& info,
-                     const MediaRoute& route) {
-    FAIL() << "Success callback should not have been called.";
-  }
-
-  void FailOnError(const content::PresentationError& error) {
-    FAIL() << "Error should not have been called.";
-  }
-
-  bool cb_invoked_;
-  GURL presentation_url_;
-  content::PresentationRequest presentation_request_;
-};
-
-TEST_F(CreatePresentationConnectionRequestTest, ErrorCallbackInvokedByDefault) {
-  content::PresentationError error(content::PRESENTATION_ERROR_UNKNOWN,
-                                   "Unknown error.");
-  CreatePresentationConnectionRequest request(
-      presentation_request_,
-      base::BindOnce(&CreatePresentationConnectionRequestTest::FailOnSuccess,
-                     base::Unretained(this)),
-      base::BindOnce(&CreatePresentationConnectionRequestTest::OnError,
-                     base::Unretained(this), error));
-
-  // Since we didn't explicitly call Invoke*, the error callback will be
-  // invoked when |request| is destroyed.
-}
-
-TEST_F(CreatePresentationConnectionRequestTest, SuccessCallback) {
-  content::PresentationInfo presentation_info(presentation_url_,
-                                              kPresentationId);
-  CreatePresentationConnectionRequest request(
-      presentation_request_,
-      base::BindOnce(&CreatePresentationConnectionRequestTest::OnSuccess,
-                     base::Unretained(this), presentation_info),
-      base::BindOnce(&CreatePresentationConnectionRequestTest::FailOnError,
-                     base::Unretained(this)));
-  MediaRoute route(kRouteId, MediaSourceForTab(1), "sinkId", "Description",
-                   false, "", false);
-  request.InvokeSuccessCallback(kPresentationId, presentation_url_, route);
-  EXPECT_TRUE(cb_invoked_);
-}
-
-TEST_F(CreatePresentationConnectionRequestTest, ErrorCallback) {
-  content::PresentationError error(
-      content::PRESENTATION_ERROR_PRESENTATION_REQUEST_CANCELLED,
-      "This is an error message");
-  CreatePresentationConnectionRequest request(
-      presentation_request_,
-      base::BindOnce(&CreatePresentationConnectionRequestTest::FailOnSuccess,
-                     base::Unretained(this)),
-      base::BindOnce(&CreatePresentationConnectionRequestTest::OnError,
-                     base::Unretained(this), error));
-  request.InvokeErrorCallback(error);
-  EXPECT_TRUE(cb_invoked_);
-}
-
-}  // namespace media_router
diff --git a/chrome/browser/media/router/media_router_dialog_controller.cc b/chrome/browser/media/router/media_router_dialog_controller.cc
index 31cdd96..8d7527c 100644
--- a/chrome/browser/media/router/media_router_dialog_controller.cc
+++ b/chrome/browser/media/router/media_router_dialog_controller.cc
@@ -7,9 +7,12 @@
 #include <utility>
 
 #include "chrome/browser/media/router/media_router_metrics.h"
+#include "chrome/common/media_router/media_route.h"
+#include "chrome/common/media_router/route_request_result.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_contents_delegate.h"
+#include "content/public/common/presentation_info.h"
 
 #if defined(OS_ANDROID)
 #include "chrome/browser/media/android/router/media_router_dialog_controller_android.h"
@@ -62,6 +65,57 @@
   MediaRouterDialogController* const dialog_controller_;
 };
 
+StartPresentationContext::StartPresentationContext(
+    const content::PresentationRequest& presentation_request,
+    PresentationConnectionCallback success_cb,
+    PresentationConnectionErrorCallback error_cb)
+    : presentation_request_(presentation_request),
+      success_cb_(std::move(success_cb)),
+      error_cb_(std::move(error_cb)) {
+  DCHECK(success_cb_);
+  DCHECK(error_cb_);
+}
+
+StartPresentationContext::~StartPresentationContext() {
+  if (!cb_invoked_) {
+    std::move(error_cb_).Run(content::PresentationError(
+        content::PRESENTATION_ERROR_UNKNOWN, "Unknown error."));
+  }
+}
+
+void StartPresentationContext::InvokeSuccessCallback(
+    const std::string& presentation_id,
+    const GURL& presentation_url,
+    const MediaRoute& route) {
+  if (!cb_invoked_) {
+    std::move(success_cb_)
+        .Run(content::PresentationInfo(presentation_url, presentation_id),
+             route);
+    cb_invoked_ = true;
+  }
+}
+
+void StartPresentationContext::InvokeErrorCallback(
+    const content::PresentationError& error) {
+  if (!cb_invoked_) {
+    std::move(error_cb_).Run(error);
+    cb_invoked_ = true;
+  }
+}
+
+// static
+void StartPresentationContext::HandleRouteResponse(
+    std::unique_ptr<StartPresentationContext> context,
+    const RouteRequestResult& result) {
+  if (!result.route()) {
+    context->InvokeErrorCallback(content::PresentationError(
+        content::PRESENTATION_ERROR_UNKNOWN, result.error()));
+  } else {
+    context->InvokeSuccessCallback(result.presentation_id(),
+                                   result.presentation_url(), *result.route());
+  }
+}
+
 MediaRouterDialogController::MediaRouterDialogController(
     content::WebContents* initiator)
     : initiator_(initiator) {
@@ -74,17 +128,24 @@
 }
 
 bool MediaRouterDialogController::ShowMediaRouterDialogForPresentation(
-    std::unique_ptr<CreatePresentationConnectionRequest> request) {
+    const content::PresentationRequest& presentation_request,
+    StartPresentationContext::PresentationConnectionCallback success_cb,
+    StartPresentationContext::PresentationConnectionErrorCallback error_cb) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
-  bool dialog_needs_creation = !IsShowingMediaRouterDialog();
-  if (dialog_needs_creation) {
-    create_connection_request_ = std::move(request);
-    MediaRouterMetrics::RecordMediaRouterDialogOrigin(
-        MediaRouterDialogOpenOrigin::PAGE);
+  if (IsShowingMediaRouterDialog()) {
+    std::move(error_cb).Run(content::PresentationError(
+        content::PRESENTATION_ERROR_UNKNOWN,
+        "Unable to create dialog: dialog already shown"));
+    return false;
   }
-  FocusOnMediaRouterDialog(dialog_needs_creation);
-  return dialog_needs_creation;
+
+  start_presentation_context_ = base::MakeUnique<StartPresentationContext>(
+      presentation_request, std::move(success_cb), std::move(error_cb));
+  MediaRouterMetrics::RecordMediaRouterDialogOrigin(
+      MediaRouterDialogOpenOrigin::PAGE);
+  FocusOnMediaRouterDialog(true);
+  return true;
 }
 
 bool MediaRouterDialogController::ShowMediaRouterDialog() {
@@ -111,14 +172,9 @@
   initiator_->GetDelegate()->ActivateContents(initiator_);
 }
 
-std::unique_ptr<CreatePresentationConnectionRequest>
-MediaRouterDialogController::TakeCreateConnectionRequest() {
-  return std::move(create_connection_request_);
-}
-
 void MediaRouterDialogController::Reset() {
   initiator_observer_.reset();
-  create_connection_request_.reset();
+  start_presentation_context_.reset();
 }
 
 }  // namespace media_router
diff --git a/chrome/browser/media/router/media_router_dialog_controller.h b/chrome/browser/media/router/media_router_dialog_controller.h
index 61d52f6..816a8d1 100644
--- a/chrome/browser/media/router/media_router_dialog_controller.h
+++ b/chrome/browser/media/router/media_router_dialog_controller.h
@@ -9,15 +9,60 @@
 #include <string>
 
 #include "base/macros.h"
-#include "chrome/browser/media/router/create_presentation_connection_request.h"
+#include "content/public/browser/presentation_request.h"
+#include "content/public/browser/presentation_service_delegate.h"
 #include "content/public/browser/web_contents_observer.h"
 
 namespace content {
 class WebContents;
+struct PresentationInfo;
 }  // namespace content
 
 namespace media_router {
 
+class MediaRoute;
+class RouteRequestResult;
+
+// Helper data structure to hold information for a dialog initiated via the
+// Presentation API. Contains information on the PresentationRequest, and
+// success / error callbacks. Depending on the route creation outcome,
+// only one of the callbacks will be invoked exactly once.
+class StartPresentationContext {
+ public:
+  using PresentationConnectionCallback =
+      base::OnceCallback<void(const content::PresentationInfo&,
+                              const MediaRoute&)>;
+  using PresentationConnectionErrorCallback =
+      content::PresentationConnectionErrorCallback;
+
+  // Handle route creation/joining response by invoking the right callback.
+  static void HandleRouteResponse(
+      std::unique_ptr<StartPresentationContext> presentation_request,
+      const RouteRequestResult& result);
+
+  StartPresentationContext(
+      const content::PresentationRequest& presentation_request,
+      PresentationConnectionCallback success_cb,
+      PresentationConnectionErrorCallback error_cb);
+  ~StartPresentationContext();
+
+  const content::PresentationRequest& presentation_request() const {
+    return presentation_request_;
+  }
+
+  // Invokes |success_cb_| or |error_cb_| with the given arguments.
+  void InvokeSuccessCallback(const std::string& presentation_id,
+                             const GURL& presentation_url,
+                             const MediaRoute& route);
+  void InvokeErrorCallback(const content::PresentationError& error);
+
+ private:
+  content::PresentationRequest presentation_request_;
+  PresentationConnectionCallback success_cb_;
+  PresentationConnectionErrorCallback error_cb_;
+  bool cb_invoked_ = false;
+};
+
 // An abstract base class for Media Router dialog controllers. Tied to a
 // WebContents known as the |initiator|, and is lazily created when a Media
 // Router dialog needs to be shown. The MediaRouterDialogController allows
@@ -33,13 +78,16 @@
   static MediaRouterDialogController* GetOrCreateForWebContents(
       content::WebContents* web_contents);
 
-  // Shows the media router dialog modal to |initiator_| and the parameters
-  // specified in |request|.
-  // Creates the dialog if it did not exist prior to this call, returns true.
-  // If the dialog already exists, brings it to the front but doesn't change the
-  // dialog with |request|, returns false and |request| is deleted.
+  // Shows the media router dialog modal to |initiator_|, with additional
+  // context for a PresentationRequest coming from the page given by the input
+  // parameters.
+  // Returns true if the dialog is created as a result of this call.
+  // If the dialog already exists, or dialog cannot be created, then false is
+  // returned, and |error_cb| will be invoked.
   bool ShowMediaRouterDialogForPresentation(
-      std::unique_ptr<CreatePresentationConnectionRequest> request);
+      const content::PresentationRequest& presentation_request,
+      StartPresentationContext::PresentationConnectionCallback success_cb,
+      StartPresentationContext::PresentationConnectionErrorCallback error_cb);
 
   // Shows the media router dialog modal to |initiator_|.
   // Creates the dialog if it did not exist prior to this call, returns true.
@@ -62,17 +110,6 @@
   // that initiated the dialog, e.g. focuses the tab.
   void FocusOnMediaRouterDialog(bool dialog_needs_creation);
 
-  // Passes the ownership of the CreatePresentationConnectionRequest to the
-  // caller.
-  std::unique_ptr<CreatePresentationConnectionRequest>
-  TakeCreateConnectionRequest();
-
-  // Returns the CreatePresentationConnectionRequest to the caller but keeps the
-  // ownership with the MediaRouterDialogController.
-  const CreatePresentationConnectionRequest* create_connection_request() const {
-    return create_connection_request_.get();
-  }
-
   // Returns the WebContents that initiated showing the dialog.
   content::WebContents* initiator() const { return initiator_; }
 
@@ -83,6 +120,10 @@
   // Closes the media router dialog if it exists.
   virtual void CloseMediaRouterDialog() = 0;
 
+  // Data for dialogs created at the request of the Presentation API.
+  // Created from arguments passed in via ShowMediaRouterDialogForPresentation.
+  std::unique_ptr<StartPresentationContext> start_presentation_context_;
+
  private:
   class InitiatorWebContentsObserver;
 
@@ -91,12 +132,6 @@
   std::unique_ptr<InitiatorWebContentsObserver> initiator_observer_;
   content::WebContents* const initiator_;
 
-  // Data for dialogs created at the request of the Presentation API.
-  // Passed from the caller via ShowMediaRouterDialogForPresentation to the
-  // dialog when it is initialized.
-  std::unique_ptr<CreatePresentationConnectionRequest>
-      create_connection_request_;
-
   DISALLOW_COPY_AND_ASSIGN(MediaRouterDialogController);
 };
 
diff --git a/chrome/browser/media/router/media_router_dialog_controller_unittest.cc b/chrome/browser/media/router/media_router_dialog_controller_unittest.cc
index 8fce9e3..4df61ab 100644
--- a/chrome/browser/media/router/media_router_dialog_controller_unittest.cc
+++ b/chrome/browser/media/router/media_router_dialog_controller_unittest.cc
@@ -5,9 +5,11 @@
 #include <memory>
 #include <vector>
 
-#include "chrome/browser/media/router/create_presentation_connection_request.h"
 #include "chrome/browser/media/router/media_router_dialog_controller.h"
 #include "chrome/browser/profiles/profile.h"
+#include "chrome/common/media_router/media_route.h"
+#include "chrome/common/media_router/media_source_helper.h"
+#include "chrome/common/media_router/route_request_result.h"
 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/web_contents.h"
@@ -15,6 +17,7 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
+using ::testing::_;
 using ::testing::Return;
 
 namespace media_router {
@@ -42,6 +45,11 @@
 };
 
 class MediaRouterDialogControllerTest : public ChromeRenderViewHostTestHarness {
+ public:
+  MOCK_METHOD2(RequestSuccess,
+               void(const content::PresentationInfo&, const MediaRoute&));
+  MOCK_METHOD1(RequestError, void(const content::PresentationError& error));
+
  protected:
   MediaRouterDialogControllerTest() {}
   ~MediaRouterDialogControllerTest() override {}
@@ -61,20 +69,15 @@
     ChromeRenderViewHostTestHarness::TearDown();
   }
 
-  void RequestSuccess(const content::PresentationInfo&, const MediaRoute&) {}
-  void RequestError(const content::PresentationError& error) {}
-
-  std::unique_ptr<CreatePresentationConnectionRequest> GetRequest() {
-    return std::unique_ptr<CreatePresentationConnectionRequest>(
-        new CreatePresentationConnectionRequest(
-            content::PresentationRequest(
-                {1, 2},
-                {GURL("http://example.com"), GURL("http://example2.com")},
-                url::Origin(GURL("http://google.com"))),
-            base::BindOnce(&MediaRouterDialogControllerTest::RequestSuccess,
-                           base::Unretained(this)),
-            base::BindOnce(&MediaRouterDialogControllerTest::RequestError,
-                           base::Unretained(this))));
+  bool ShowMediaRouterDialogForPresentation() {
+    return dialog_controller_->ShowMediaRouterDialogForPresentation(
+        content::PresentationRequest(
+            {1, 2}, {GURL("http://example.com"), GURL("http://example2.com")},
+            url::Origin(GURL("http://google.com"))),
+        base::BindOnce(&MediaRouterDialogControllerTest::RequestSuccess,
+                       base::Unretained(this)),
+        base::BindOnce(&MediaRouterDialogControllerTest::RequestError,
+                       base::Unretained(this)));
   }
 
   std::unique_ptr<TestMediaRouterDialogController> dialog_controller_;
@@ -111,15 +114,35 @@
 
 TEST_F(MediaRouterDialogControllerTest, ShowDialogForPresentation) {
   EXPECT_CALL(*web_contents_delegate_, ActivateContents(web_contents()));
-  EXPECT_TRUE(
-      dialog_controller_->ShowMediaRouterDialogForPresentation(GetRequest()));
+  EXPECT_TRUE(ShowMediaRouterDialogForPresentation());
   EXPECT_TRUE(dialog_controller_->IsShowingMediaRouterDialog());
 
   // If a dialog is already shown, ShowMediaRouterDialogForPresentation() should
   // return false.
-  EXPECT_CALL(*web_contents_delegate_, ActivateContents(web_contents()));
-  EXPECT_FALSE(
-      dialog_controller_->ShowMediaRouterDialogForPresentation(GetRequest()));
+  EXPECT_FALSE(ShowMediaRouterDialogForPresentation());
+
+  // The error callback is invoked automatically if StartPresentationContext is
+  // destroyed without a response.
+  EXPECT_CALL(*this, RequestError(_)).Times(1);
+}
+
+TEST_F(MediaRouterDialogControllerTest, StartPresentationContext) {
+  auto context = base::MakeUnique<StartPresentationContext>(
+      content::PresentationRequest(
+          {1, 2}, {GURL("http://example.com"), GURL("http://example2.com")},
+          url::Origin(GURL("http://google.com"))),
+      base::BindOnce(&MediaRouterDialogControllerTest::RequestSuccess,
+                     base::Unretained(this)),
+      base::BindOnce(&MediaRouterDialogControllerTest::RequestError,
+                     base::Unretained(this)));
+
+  MediaRoute route("routeId", MediaSourceForTab(1), "sinkId", "Description",
+                   false, "", false);
+  auto result = RouteRequestResult::FromSuccess(route, "presentationId");
+
+  EXPECT_CALL(*this, RequestSuccess(_, _)).Times(1);
+  EXPECT_CALL(*this, RequestError(_)).Times(0);
+  StartPresentationContext::HandleRouteResponse(std::move(context), *result);
 }
 
 }  // namespace media_router
diff --git a/chrome/browser/media/router/presentation_service_delegate_impl.cc b/chrome/browser/media/router/presentation_service_delegate_impl.cc
index db3816ef..9d059ac 100644
--- a/chrome/browser/media/router/presentation_service_delegate_impl.cc
+++ b/chrome/browser/media/router/presentation_service_delegate_impl.cc
@@ -14,7 +14,6 @@
 #include "base/memory/ptr_util.h"
 #include "base/strings/string_util.h"
 #include "chrome/browser/media/router/browser_presentation_connection_proxy.h"
-#include "chrome/browser/media/router/create_presentation_connection_request.h"
 #include "chrome/browser/media/router/media_router.h"
 #include "chrome/browser/media/router/media_router_dialog_controller.h"
 #include "chrome/browser/media/router/media_router_factory.h"
@@ -467,22 +466,16 @@
     return;
   }
 
-  std::unique_ptr<CreatePresentationConnectionRequest> start_request(
-      new CreatePresentationConnectionRequest(
+  MediaRouterDialogController* controller =
+      MediaRouterDialogController::GetOrCreateForWebContents(web_contents_);
+  if (!controller->ShowMediaRouterDialogForPresentation(
           request,
           base::BindOnce(
               &PresentationServiceDelegateImpl::OnStartPresentationSucceeded,
               GetWeakPtr(), render_frame_host_id, std::move(success_cb)),
-          std::move(error_cb)));
-  MediaRouterDialogController* controller =
-      MediaRouterDialogController::GetOrCreateForWebContents(web_contents_);
-  if (!controller->ShowMediaRouterDialogForPresentation(
-          std::move(start_request))) {
+          std::move(error_cb))) {
     LOG(ERROR)
-        << "Media router dialog already exists. Ignoring StartPresentation.";
-    std::move(error_cb).Run(content::PresentationError(
-        content::PRESENTATION_ERROR_UNKNOWN, "Unable to create dialog."));
-    return;
+        << "StartPresentation failed: unable to create Media Router dialog.";
   }
 }
 
diff --git a/chrome/browser/ntp_snippets/download_suggestions_provider.cc b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
index dce4356..c14512ab 100644
--- a/chrome/browser/ntp_snippets/download_suggestions_provider.cc
+++ b/chrome/browser/ntp_snippets/download_suggestions_provider.cc
@@ -119,7 +119,10 @@
 }
 
 bool IsAssetDownloadCompleted(const DownloadItem& item) {
-  return item.GetState() == DownloadItem::DownloadState::COMPLETE &&
+  // Transient downloads are cleaned up after completion, therefore, they should
+  // be ignored.
+  return !item.IsTransient() &&
+         item.GetState() == DownloadItem::DownloadState::COMPLETE &&
          !item.GetFileExternallyRemoved();
 }
 
diff --git a/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc b/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc
index ba5aa5fb..a8c68400 100644
--- a/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc
+++ b/chrome/browser/ntp_snippets/download_suggestions_provider_unittest.cc
@@ -1146,3 +1146,19 @@
   CreateLoadedProvider(/*show_assets=*/true, /*show_offline_pages=*/false,
                        std::move(test_clock));
 }
+
+TEST_F(DownloadSuggestionsProviderTest, ShouldIgnoreTransientDownloads) {
+  IgnoreOnCategoryStatusChangedToAvailable();
+
+  *(downloads_manager()->mutable_items()) = CreateDummyAssetDownloads({1});
+  downloads_manager()->mutable_items()->at(0)->SetIsTransient(true);
+  EXPECT_CALL(*observer(),
+              OnNewSuggestions(_, downloads_category(), IsEmpty()));
+  CreateLoadedProvider(/*show_assets=*/true, /*show_offline_pages=*/true,
+                       base::MakeUnique<base::DefaultClock>());
+
+  EXPECT_CALL(*observer(), OnNewSuggestions(_, _, _)).Times(0);
+  EXPECT_CALL(*observer(), OnSuggestionInvalidated(_, _)).Times(0);
+  // |OnDownloadItemDestroyed| is called from items's destructor.
+  downloads_manager()->mutable_items()->clear();
+}
diff --git a/chrome/browser/search_engines/chrome_template_url_service_client.cc b/chrome/browser/search_engines/chrome_template_url_service_client.cc
index 6653ee6c..c66c4e4 100644
--- a/chrome/browser/search_engines/chrome_template_url_service_client.cc
+++ b/chrome/browser/search_engines/chrome_template_url_service_client.cc
@@ -7,7 +7,6 @@
 #include "base/memory/ptr_util.h"
 #include "components/history/core/browser/history_service.h"
 #include "components/search_engines/template_url_service.h"
-#include "extensions/common/constants.h"
 
 ChromeTemplateURLServiceClient::ChromeTemplateURLServiceClient(
     history::HistoryService* history_service)
@@ -63,11 +62,6 @@
                               history::SOURCE_BROWSED, false);
 }
 
-bool ChromeTemplateURLServiceClient::IsOmniboxExtensionURL(
-    const std::string& url) {
-  return GURL(url).SchemeIs(extensions::kExtensionScheme);
-}
-
 void ChromeTemplateURLServiceClient::OnURLVisited(
     history::HistoryService* history_service,
     ui::PageTransition transition,
diff --git a/chrome/browser/search_engines/chrome_template_url_service_client.h b/chrome/browser/search_engines/chrome_template_url_service_client.h
index de0bfbf..8d849393a 100644
--- a/chrome/browser/search_engines/chrome_template_url_service_client.h
+++ b/chrome/browser/search_engines/chrome_template_url_service_client.h
@@ -31,7 +31,6 @@
                                    TemplateURLID id,
                                    const base::string16& term) override;
   void AddKeywordGeneratedVisit(const GURL& url) override;
-  bool IsOmniboxExtensionURL(const std::string& url) override;
 
   // history::HistoryServiceObserver:
   void OnURLVisited(history::HistoryService* history_service,
diff --git a/chrome/browser/search_engines/template_url_service_sync_unittest.cc b/chrome/browser/search_engines/template_url_service_sync_unittest.cc
index cfa9691..5309ac9 100644
--- a/chrome/browser/search_engines/template_url_service_sync_unittest.cc
+++ b/chrome/browser/search_engines/template_url_service_sync_unittest.cc
@@ -163,7 +163,6 @@
        TemplateURLID id,
        const base::string16& term) override {}
    void AddKeywordGeneratedVisit(const GURL& url) override {}
-   bool IsOmniboxExtensionURL(const std::string& url) override { return false; }
 };
 
 }  // namespace
diff --git a/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc b/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc
index 6b7c28c6..3f47bc77 100644
--- a/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc
+++ b/chrome/browser/subresource_filter/chrome_subresource_filter_client.cc
@@ -106,34 +106,30 @@
   web_contents_->GetController().Reload(content::ReloadType::NORMAL, true);
 }
 
-void ChromeSubresourceFilterClient::ToggleNotificationVisibility(
-    bool visibility) {
+void ChromeSubresourceFilterClient::ShowNotification() {
   // Do not show the UI if we're forcing activation due to a devtools toggle.
   // This complicates the meaning of our persistent storage (e.g. our metadata
   // that assumes showing UI implies site is blacklisted).
   if (activated_via_devtools_) {
-    if (visibility)
-      LogAction(kActionForcedActivationNoUIResourceBlocked);
+    LogAction(kActionForcedActivationNoUIResourceBlocked);
     return;
   }
-
-  if (did_show_ui_for_navigation_ && visibility)
+  if (did_show_ui_for_navigation_)
     return;
-  did_show_ui_for_navigation_ = false;
 
-  // |visibility| is false when a new navigation starts.
-  if (visibility) {
-    const GURL& top_level_url = web_contents_->GetLastCommittedURL();
-    if (settings_manager_->ShouldShowUIForSite(top_level_url)) {
-      ShowUI(top_level_url);
-    } else {
-      LogAction(kActionUISuppressed);
-    }
+  const GURL& top_level_url = web_contents_->GetLastCommittedURL();
+  if (settings_manager_->ShouldShowUIForSite(top_level_url)) {
+    ShowUI(top_level_url);
   } else {
-    LogAction(kActionNavigationStarted);
+    LogAction(kActionUISuppressed);
   }
 }
 
+void ChromeSubresourceFilterClient::OnNewNavigationStarted() {
+  did_show_ui_for_navigation_ = false;
+  LogAction(kActionNavigationStarted);
+}
+
 bool ChromeSubresourceFilterClient::OnPageActivationComputed(
     content::NavigationHandle* navigation_handle,
     bool activated) {
diff --git a/chrome/browser/subresource_filter/chrome_subresource_filter_client.h b/chrome/browser/subresource_filter/chrome_subresource_filter_client.h
index 821d4ca4..22a17f68 100644
--- a/chrome/browser/subresource_filter/chrome_subresource_filter_client.h
+++ b/chrome/browser/subresource_filter/chrome_subresource_filter_client.h
@@ -108,7 +108,8 @@
   void OnReloadRequested();
 
   // SubresourceFilterClient:
-  void ToggleNotificationVisibility(bool visibility) override;
+  void ShowNotification() override;
+  void OnNewNavigationStarted() override;
   bool OnPageActivationComputed(content::NavigationHandle* navigation_handle,
                                 bool activated) override;
   void WhitelistInCurrentWebContents(const GURL& url) override;
diff --git a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
index 83da136..d20560b 100644
--- a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl.cc
@@ -327,15 +327,14 @@
       media_router_dialog->GetWebUI()->GetController());
   DCHECK(media_router_ui);
 
-  std::unique_ptr<CreatePresentationConnectionRequest>
-      create_connection_request(TakeCreateConnectionRequest());
+  auto start_presentation_context = std::move(start_presentation_context_);
   PresentationServiceDelegateImpl* delegate =
       PresentationServiceDelegateImpl::FromWebContents(initiator());
-  if (!create_connection_request.get()) {
+  if (!start_presentation_context) {
     media_router_ui->InitWithDefaultMediaSource(initiator(), delegate);
   } else {
-    media_router_ui->InitWithPresentationSessionRequest(
-        initiator(), delegate, std::move(create_connection_request));
+    media_router_ui->InitWithStartPresentationContext(
+        initiator(), delegate, std::move(start_presentation_context));
   }
 }
 
diff --git a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl_unittest.cc b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl_unittest.cc
index ebedb4d1..9197befe 100644
--- a/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl_unittest.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_dialog_controller_impl_unittest.cc
@@ -252,18 +252,16 @@
   dialog_controller_->HideMediaRouterDialog();
 
   EXPECT_CALL(*action_controller, OnDialogShown());
-  dialog_controller_->ShowMediaRouterDialogForPresentation(
-      std::unique_ptr<CreatePresentationConnectionRequest>(
-          new CreatePresentationConnectionRequest(
-              content::PresentationRequest(
-                  {1, 2}, {GURL("http://test.com"), GURL("http://test2.com")},
-                  url::Origin(GURL("http://example.com"))),
-              base::Bind(&MediaRouterDialogControllerImplTest::
-                             PresentationSuccessCallback,
-                         base::Unretained(this)),
-              base::Bind(&MediaRouterDialogControllerImplTest::
-                             PresentationErrorCallback,
-                         base::Unretained(this)))));
+  EXPECT_TRUE(dialog_controller_->ShowMediaRouterDialogForPresentation(
+      content::PresentationRequest(
+          {1, 2}, {GURL("http://test.com"), GURL("http://test2.com")},
+          url::Origin(GURL("http://example.com"))),
+      base::Bind(
+          &MediaRouterDialogControllerImplTest::PresentationSuccessCallback,
+          base::Unretained(this)),
+      base::Bind(
+          &MediaRouterDialogControllerImplTest::PresentationErrorCallback,
+          base::Unretained(this))));
 
   // When |dialog_controller_| is destroyed with its dialog open,
   // |action_controller| should be notified.
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.cc b/chrome/browser/ui/webui/media_router/media_router_ui.cc
index fe2d12f..5de68ca2 100644
--- a/chrome/browser/ui/webui/media_router/media_router_ui.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_ui.cc
@@ -17,7 +17,6 @@
 #include "base/trace_event/trace_event.h"
 #include "build/build_config.h"
 #include "chrome/browser/browser_process.h"
-#include "chrome/browser/media/router/create_presentation_connection_request.h"
 #include "chrome/browser/media/router/event_page_request_manager.h"
 #include "chrome/browser/media/router/event_page_request_manager_factory.h"
 #include "chrome/browser/media/router/issues_observer.h"
@@ -259,22 +258,24 @@
   if (presentation_service_delegate_.get())
     presentation_service_delegate_->RemoveDefaultPresentationRequestObserver(
         this);
-  // If |create_session_request_| still exists, then it means presentation route
-  // request was never attempted.
-  if (create_session_request_) {
+  // If |start_presentation_context_| still exists, then it means presentation
+  // route request was never attempted.
+  if (start_presentation_context_) {
     bool presentation_sinks_available = std::any_of(
         sinks_.begin(), sinks_.end(), [](const MediaSinkWithCastModes& sink) {
           return base::ContainsKey(sink.cast_modes,
                                    MediaCastMode::PRESENTATION);
         });
     if (presentation_sinks_available) {
-      create_session_request_->InvokeErrorCallback(content::PresentationError(
-          content::PRESENTATION_ERROR_PRESENTATION_REQUEST_CANCELLED,
-          "Dialog closed."));
+      start_presentation_context_->InvokeErrorCallback(
+          content::PresentationError(
+              content::PRESENTATION_ERROR_PRESENTATION_REQUEST_CANCELLED,
+              "Dialog closed."));
     } else {
-      create_session_request_->InvokeErrorCallback(content::PresentationError(
-          content::PRESENTATION_ERROR_NO_AVAILABLE_SCREENS,
-          "No screens found."));
+      start_presentation_context_->InvokeErrorCallback(
+          content::PresentationError(
+              content::PRESENTATION_ERROR_NO_AVAILABLE_SCREENS,
+              "No screens found."));
     }
   }
 }
@@ -302,22 +303,22 @@
   }
 }
 
-void MediaRouterUI::InitWithPresentationSessionRequest(
+void MediaRouterUI::InitWithStartPresentationContext(
     content::WebContents* initiator,
     PresentationServiceDelegateImpl* delegate,
-    std::unique_ptr<CreatePresentationConnectionRequest>
-        create_session_request) {
+    std::unique_ptr<StartPresentationContext> context) {
   DCHECK(initiator);
   DCHECK(delegate);
-  DCHECK(create_session_request);
-  DCHECK(!create_session_request_);
+  DCHECK(context);
+  DCHECK(!start_presentation_context_);
   DCHECK(!query_result_manager_);
 
-  create_session_request_ = std::move(create_session_request);
+  start_presentation_context_ = std::move(context);
   presentation_service_delegate_ = delegate->GetWeakPtr();
 
   InitCommon(initiator);
-  OnDefaultPresentationChanged(create_session_request_->presentation_request());
+  OnDefaultPresentationChanged(
+      start_presentation_context_->presentation_request());
 }
 
 void MediaRouterUI::InitCommon(content::WebContents* initiator) {
@@ -329,7 +330,7 @@
 
   // Presentation requests from content must show the origin requesting
   // presentation: crbug.com/704964
-  if (create_session_request_)
+  if (start_presentation_context_)
     forced_cast_mode_ = MediaCastMode::PRESENTATION;
 
   router_->OnUserGesture();
@@ -380,16 +381,16 @@
     MediaRouter* router,
     content::WebContents* initiator,
     MediaRouterWebUIMessageHandler* handler,
-    std::unique_ptr<CreatePresentationConnectionRequest> create_session_request,
+    std::unique_ptr<StartPresentationContext> context,
     std::unique_ptr<MediaRouterFileDialog> file_dialog) {
   router_ = router;
   handler_ = handler;
-  create_session_request_ = std::move(create_session_request);
+  start_presentation_context_ = std::move(context);
   InitForTest(std::move(file_dialog));
   InitCommon(initiator);
-  if (create_session_request_) {
+  if (start_presentation_context_) {
     OnDefaultPresentationChanged(
-        create_session_request_->presentation_request());
+        start_presentation_context_->presentation_request());
   }
 }
 
@@ -559,26 +560,25 @@
   // notified. In case (2) the dialog will be closed.
   // (1) Non-presentation route request (e.g., mirroring). No additional
   // notification necessary.
-  // (2) Presentation route request for a Presentation API startSession call.
-  // The startSession (CreatePresentationConnectionRequest) will need to be
-  // answered with the route response.
-  // (3) Browser-initiated presentation route request. If successful,
+  // (2) Presentation route request for a PresentationRequest.start() call.
+  // The StartPresentationContext will need to be answered with the route
+  // response. (3) Browser-initiated presentation route request. If successful,
   // PresentationServiceDelegateImpl will have to be notified. Note that we
   // treat subsequent route requests from a Presentation API-initiated dialogs
   // as browser-initiated.
-  if (!for_presentation_source || !create_session_request_) {
+  if (!for_presentation_source || !start_presentation_context_) {
     route_response_callbacks->push_back(base::BindOnce(
         &MediaRouterUI::OnRouteResponseReceived, weak_factory_.GetWeakPtr(),
         current_route_request_id_, sink_id, cast_mode,
         base::UTF8ToUTF16(GetTruncatedPresentationRequestSourceName())));
   }
   if (for_presentation_source) {
-    if (create_session_request_) {
-      // |create_session_request_| will be nullptr after this call, as the
+    if (start_presentation_context_) {
+      // |start_presentation_context_| will be nullptr after this call, as the
       // object will be transferred to the callback.
-      route_response_callbacks->push_back(base::BindOnce(
-          &CreatePresentationConnectionRequest::HandleRouteResponse,
-          base::Passed(&create_session_request_)));
+      route_response_callbacks->push_back(
+          base::BindOnce(&StartPresentationContext::HandleRouteResponse,
+                         std::move(start_presentation_context_)));
       route_response_callbacks->push_back(base::BindOnce(
           &MediaRouterUI::HandleCreateSessionRequestRouteResponse,
           weak_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui.h b/chrome/browser/ui/webui/media_router/media_router_ui.h
index 5bda61b0..808a967e 100644
--- a/chrome/browser/ui/webui/media_router/media_router_ui.h
+++ b/chrome/browser/ui/webui/media_router/media_router_ui.h
@@ -14,6 +14,7 @@
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/timer/timer.h"
+#include "chrome/browser/media/router/media_router_dialog_controller.h"
 #include "chrome/browser/media/router/mojo/media_route_controller.h"
 #include "chrome/browser/media/router/presentation_service_delegate_impl.h"
 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
@@ -44,7 +45,6 @@
 
 namespace media_router {
 
-class CreatePresentationConnectionRequest;
 class EventPageRequestManager;
 class IssuesObserver;
 class MediaRoute;
@@ -83,7 +83,7 @@
                                   PresentationServiceDelegateImpl* delegate);
 
   // Initializes internal state targeting the presentation specified in
-  // |request|. Also sets up mirroring sources based on |initiator|.
+  // |context|. Also sets up mirroring sources based on |initiator|.
   // This is different from |InitWithDefaultMediaSource| in that it does not
   // listen for default media source changes, as the UI is fixed to the source
   // in |request|.
@@ -92,13 +92,13 @@
   //              Must not be null.
   // |delegate|: PresentationServiceDelegateImpl of the initiator tab.
   //             Must not be null.
-  // |presentation_request|: The presentation request. This instance will take
+  // |context|: Context object for the PresentationRequest. This instance will
+  // take
   //                         ownership of it. Must not be null.
-  void InitWithPresentationSessionRequest(
+  void InitWithStartPresentationContext(
       content::WebContents* initiator,
       PresentationServiceDelegateImpl* delegate,
-      std::unique_ptr<CreatePresentationConnectionRequest>
-          presentation_request);
+      std::unique_ptr<StartPresentationContext> context);
 
   // Closes the media router UI.
   void Close();
@@ -190,8 +190,7 @@
   void InitForTest(MediaRouter* router,
                    content::WebContents* initiator,
                    MediaRouterWebUIMessageHandler* handler,
-                   std::unique_ptr<CreatePresentationConnectionRequest>
-                       create_session_request,
+                   std::unique_ptr<StartPresentationContext> context,
                    std::unique_ptr<MediaRouterFileDialog> file_dialog);
 
   void InitForTest(std::unique_ptr<MediaRouterFileDialog> file_dialog);
@@ -305,8 +304,8 @@
   void MaybeReportFileInformation(const RouteRequestResult& result);
 
   // Closes the dialog after receiving a route response when using
-  // |create_session_request_|. This prevents the dialog from trying to use the
-  // same presentation request again.
+  // |start_presentation_context_|. This prevents the dialog from trying to use
+  // the same presentation request again.
   void HandleCreateSessionRequestRouteResponse(const RouteRequestResult&);
 
   // Callback passed to MediaRouter to receive the sink ID of the sink found by
@@ -407,7 +406,7 @@
 
   // If set, then the result of the next presentation route request will
   // be handled by this object.
-  std::unique_ptr<CreatePresentationConnectionRequest> create_session_request_;
+  std::unique_ptr<StartPresentationContext> start_presentation_context_;
 
   // Set to the presentation request corresponding to the presentation cast
   // mode, if supported. Otherwise set to nullptr.
diff --git a/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc b/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
index b6bf2b7b..920c64e 100644
--- a/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
+++ b/chrome/browser/ui/webui/media_router/media_router_ui_unittest.cc
@@ -10,7 +10,6 @@
 #include "base/memory/ptr_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/scoped_feature_list.h"
-#include "chrome/browser/media/router/create_presentation_connection_request.h"
 #include "chrome/browser/media/router/event_page_request_manager_factory.h"
 #include "chrome/browser/media/router/media_router_factory.h"
 #include "chrome/browser/media/router/mock_media_router.h"
@@ -121,7 +120,7 @@
     EXPECT_CALL(*mock_router_, UnregisterMediaRoutesObserver(_))
         .Times(AnyNumber());
     web_ui_contents_.reset();
-    create_session_request_.reset();
+    start_presentation_context_.reset();
     media_router_ui_.reset();
     message_handler_.reset();
     ChromeRenderViewHostTestHarness::TearDown();
@@ -156,7 +155,7 @@
         .Times(AnyNumber());
     media_router_ui_->InitForTest(
         mock_router_, web_contents(), message_handler_.get(),
-        std::move(create_session_request_), std::move(file_dialog));
+        std::move(start_presentation_context_), std::move(file_dialog));
     message_handler_->SetWebUIForTest(&web_ui_);
   }
 
@@ -190,7 +189,7 @@
   MockMediaRouter* mock_router_ = nullptr;
   content::TestWebUI web_ui_;
   std::unique_ptr<WebContents> web_ui_contents_;
-  std::unique_ptr<CreatePresentationConnectionRequest> create_session_request_;
+  std::unique_ptr<StartPresentationContext> start_presentation_context_;
   std::unique_ptr<MediaRouterUI> media_router_ui_;
   std::unique_ptr<MockMediaRouterWebUIMessageHandler> message_handler_;
   MockMediaRouterFileDialog* mock_file_dialog_ = nullptr;
@@ -559,12 +558,12 @@
       content::PresentationErrorType::PRESENTATION_ERROR_NO_AVAILABLE_SCREENS,
       "No screens found.");
   PresentationRequestCallbacks request_callbacks(expected_error);
-  create_session_request_.reset(new CreatePresentationConnectionRequest(
+  start_presentation_context_ = base::MakeUnique<StartPresentationContext>(
       presentation_request_,
       base::Bind(&PresentationRequestCallbacks::Success,
                  base::Unretained(&request_callbacks)),
       base::Bind(&PresentationRequestCallbacks::Error,
-                 base::Unretained(&request_callbacks))));
+                 base::Unretained(&request_callbacks)));
   CreateMediaRouterUI(profile());
   // Destroying the UI should return the expected error from above to the error
   // callback.
@@ -576,12 +575,12 @@
       content::PresentationErrorType::PRESENTATION_ERROR_NO_AVAILABLE_SCREENS,
       "No screens found.");
   PresentationRequestCallbacks request_callbacks(expected_error);
-  create_session_request_.reset(new CreatePresentationConnectionRequest(
+  start_presentation_context_ = base::MakeUnique<StartPresentationContext>(
       presentation_request_,
       base::Bind(&PresentationRequestCallbacks::Success,
                  base::Unretained(&request_callbacks)),
       base::Bind(&PresentationRequestCallbacks::Error,
-                 base::Unretained(&request_callbacks))));
+                 base::Unretained(&request_callbacks)));
   CreateMediaRouterUI(profile());
 
   // Send a sink to the UI that is compatible with sources other than the
@@ -607,12 +606,12 @@
           PRESENTATION_ERROR_PRESENTATION_REQUEST_CANCELLED,
       "Dialog closed.");
   PresentationRequestCallbacks request_callbacks(expected_error);
-  create_session_request_.reset(new CreatePresentationConnectionRequest(
+  start_presentation_context_ = base::MakeUnique<StartPresentationContext>(
       presentation_request_,
       base::Bind(&PresentationRequestCallbacks::Success,
                  base::Unretained(&request_callbacks)),
       base::Bind(&PresentationRequestCallbacks::Error,
-                 base::Unretained(&request_callbacks))));
+                 base::Unretained(&request_callbacks)));
   CreateMediaRouterUI(profile());
 
   // Send a sink to the UI that is compatible with the presentation url to avoid
@@ -754,12 +753,12 @@
       content::PresentationErrorType::PRESENTATION_ERROR_NO_AVAILABLE_SCREENS,
       "No screens found.");
   PresentationRequestCallbacks request_callbacks(expected_error);
-  create_session_request_.reset(new CreatePresentationConnectionRequest(
+  start_presentation_context_ = base::MakeUnique<StartPresentationContext>(
       presentation_request_,
       base::Bind(&PresentationRequestCallbacks::Success,
                  base::Unretained(&request_callbacks)),
       base::Bind(&PresentationRequestCallbacks::Error,
-                 base::Unretained(&request_callbacks))));
+                 base::Unretained(&request_callbacks)));
 
   SessionTabHelper::CreateForWebContents(web_contents());
   web_ui_contents_.reset(
@@ -792,9 +791,9 @@
                   expected_modes, "google.com",
                   base::Optional<MediaCastMode>(MediaCastMode::PRESENTATION)));
   media_router_ui_->UIInitialized();
-  media_router_ui_->InitForTest(mock_router_, web_contents(),
-                                message_handler_.get(),
-                                std::move(create_session_request_), nullptr);
+  media_router_ui_->InitForTest(
+      mock_router_, web_contents(), message_handler_.get(),
+      std::move(start_presentation_context_), nullptr);
   // |media_router_ui_| takes ownership of |request_callbacks|.
   media_router_ui_.reset();
 }
diff --git a/chrome/browser/vr/elements/ui_element.cc b/chrome/browser/vr/elements/ui_element.cc
index c3eddc8..b22fe77 100644
--- a/chrome/browser/vr/elements/ui_element.cc
+++ b/chrome/browser/vr/elements/ui_element.cc
@@ -174,6 +174,7 @@
 }
 
 void UiElement::OnSetMode() {}
+void UiElement::OnUpdatedInheritedProperties() {}
 
 void UiElement::AddChild(std::unique_ptr<UiElement> child) {
   child->parent_ = this;
@@ -295,6 +296,34 @@
 
 void UiElement::AdjustRotationForHeadPose(const gfx::Vector3dF& look_at) {}
 
+void UiElement::UpdateInheritedProperties() {
+  gfx::Transform transform;
+  transform.Scale(size_.width(), size_.height());
+  set_computed_opacity(opacity_);
+  set_computed_viewport_aware(viewport_aware_);
+
+  // Compute an inheritable transformation that can be applied to this element,
+  // and it's children, if applicable.
+  gfx::Transform inheritable = LocalTransform();
+
+  if (parent_) {
+    inheritable.ConcatTransform(parent_->inheritable_transform());
+    set_computed_opacity(computed_opacity() * parent_->opacity());
+    if (parent_->viewport_aware())
+      set_computed_viewport_aware(true);
+  }
+
+  transform.ConcatTransform(inheritable);
+  set_world_space_transform(transform);
+  set_inheritable_transform(inheritable);
+
+  for (auto& child : children_) {
+    child->UpdateInheritedProperties();
+  }
+
+  OnUpdatedInheritedProperties();
+}
+
 gfx::Transform UiElement::LocalTransform() const {
   return layout_offset_.Apply() * transform_operations_.Apply();
 }
diff --git a/chrome/browser/vr/elements/ui_element.h b/chrome/browser/vr/elements/ui_element.h
index 1cecdef..25cbf606 100644
--- a/chrome/browser/vr/elements/ui_element.h
+++ b/chrome/browser/vr/elements/ui_element.h
@@ -182,11 +182,7 @@
     inheritable_transform_ = transform;
   }
 
-  // A flag usable during transformation calculates to avoid duplicate work.
-  bool dirty() const { return dirty_; }
-  void set_dirty(bool dirty) { dirty_ = dirty; }
-
-  // A flag usable during transformation calculates to avoid duplicate work.
+  // An optional, but stable and semantic identifier for an element.
   UiElementName name() const { return name_; }
   void set_name(UiElementName name) { name_ = name; }
 
@@ -257,6 +253,8 @@
   // or right where the head is pointing.
   virtual void AdjustRotationForHeadPose(const gfx::Vector3dF& look_at);
 
+  void UpdateInheritedProperties();
+
   std::vector<std::unique_ptr<UiElement>>& children() { return children_; }
   const std::vector<std::unique_ptr<UiElement>>& children() const {
     return children_;
@@ -264,6 +262,7 @@
 
  protected:
   virtual void OnSetMode();
+  virtual void OnUpdatedInheritedProperties();
 
   base::TimeTicks last_frame_time() const { return last_frame_time_; }
 
@@ -317,9 +316,6 @@
   // This transform can be used by children to derive position of its parent.
   gfx::Transform inheritable_transform_;
 
-  // A flag usable during transformation calculates to avoid duplicate work.
-  bool dirty_ = false;
-
   // An identifier used for testing and debugging, in lieu of a string.
   UiElementName name_ = UiElementName::kNone;
 
diff --git a/chrome/browser/vr/elements/viewport_aware_root.cc b/chrome/browser/vr/elements/viewport_aware_root.cc
index c6b5f1c..7a1139d 100644
--- a/chrome/browser/vr/elements/viewport_aware_root.cc
+++ b/chrome/browser/vr/elements/viewport_aware_root.cc
@@ -19,16 +19,6 @@
 
 void ViewportAwareRoot::AdjustRotationForHeadPose(
     const gfx::Vector3dF& look_at) {
-  // We must not inherit a transform.
-  //
-  // TODO(vollick): ensure that this check happens at the right time in the
-  // frame lifecycle. More precisely, once we've made ApplyRecursiveTransforms a
-  // recursive function on the UiElement tree, we can do this check there.
-  // Presently, we're checking our parent's transform from last frame. The
-  // transform from last frame should also be the identity, of course, so the
-  // check is valid, but we'd prefer to check the transform for the current
-  // frame.
-  DCHECK(parent()->world_space_transform().IsIdentity());
   DCHECK(viewport_aware());
 
   gfx::Vector3dF rotated_center_vector{0.f, 0.f, -1.0f};
@@ -47,4 +37,9 @@
   }
 }
 
+void ViewportAwareRoot::OnUpdatedInheritedProperties() {
+  // We must not inherit a transform.
+  DCHECK(parent()->world_space_transform().IsIdentity());
+}
+
 }  // namespace vr
diff --git a/chrome/browser/vr/elements/viewport_aware_root.h b/chrome/browser/vr/elements/viewport_aware_root.h
index 2179a27..87c16af 100644
--- a/chrome/browser/vr/elements/viewport_aware_root.h
+++ b/chrome/browser/vr/elements/viewport_aware_root.h
@@ -24,6 +24,7 @@
   void AdjustRotationForHeadPose(const gfx::Vector3dF& look_at) override;
 
  private:
+  void OnUpdatedInheritedProperties() override;
   float viewport_aware_total_rotation_ = 0;
 
   DISALLOW_COPY_AND_ASSIGN(ViewportAwareRoot);
diff --git a/chrome/browser/vr/ui_scene.cc b/chrome/browser/vr/ui_scene.cc
index a6af243..b63b1eb 100644
--- a/chrome/browser/vr/ui_scene.cc
+++ b/chrome/browser/vr/ui_scene.cc
@@ -70,7 +70,6 @@
   ForAllElements(root_element_.get(), [current_time](UiElement* element) {
     // Process all animations before calculating object transforms.
     element->Animate(current_time);
-    element->set_dirty(true);
   });
 
   ForAllElements(root_element_.get(), [look_at](UiElement* element) {
@@ -78,9 +77,7 @@
     element->AdjustRotationForHeadPose(look_at);
   });
 
-  ForAllElements(root_element_.get(), [this](UiElement* element) {
-    this->ApplyRecursiveTransforms(element);
-  });
+  root_element_->UpdateInheritedProperties();
 }
 
 void UiScene::PrepareToDraw() {
@@ -147,36 +144,6 @@
 
 UiScene::~UiScene() = default;
 
-void UiScene::ApplyRecursiveTransforms(UiElement* element) {
-  if (!element->dirty())
-    return;
-
-  UiElement* parent = element->parent();
-
-  gfx::Transform transform;
-  transform.Scale(element->size().width(), element->size().height());
-  element->set_computed_opacity(element->opacity());
-  element->set_computed_viewport_aware(element->viewport_aware());
-
-  // Compute an inheritable transformation that can be applied to this element,
-  // and it's children, if applicable.
-  gfx::Transform inheritable = element->LocalTransform();
-
-  if (parent) {
-    ApplyRecursiveTransforms(parent);
-    inheritable.ConcatTransform(parent->inheritable_transform());
-
-    element->set_computed_opacity(element->computed_opacity() *
-                                  parent->opacity());
-    element->set_computed_viewport_aware(parent->viewport_aware());
-  }
-
-  transform.ConcatTransform(inheritable);
-  element->set_world_space_transform(transform);
-  element->set_inheritable_transform(inheritable);
-  element->set_dirty(false);
-}
-
 // TODO(vollick): we should bind to gl-initialized state. Elements will
 // initialize when the binding fires, automatically.
 void UiScene::OnGlInitialized() {
diff --git a/chrome/browser/vr/ui_scene.h b/chrome/browser/vr/ui_scene.h
index 70967f4b..98cb145e 100644
--- a/chrome/browser/vr/ui_scene.h
+++ b/chrome/browser/vr/ui_scene.h
@@ -97,7 +97,6 @@
 
  private:
   void Animate(const base::TimeTicks& current_time);
-  void ApplyRecursiveTransforms(UiElement* element);
 
   std::unique_ptr<UiElement> root_element_;
   ColorScheme::Mode mode_ = ColorScheme::kModeNormal;
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index fe3f212a..e59baff9 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -3173,7 +3173,6 @@
     "../browser/media/midi_permission_context_unittest.cc",
     "../browser/media/midi_sysex_permission_context_unittest.cc",
     "../browser/media/router/browser_presentation_connection_proxy_unittest.cc",
-    "../browser/media/router/create_presentation_connection_request_unittest.cc",
     "../browser/media/router/issue_manager_unittest.cc",
     "../browser/media/router/media_router_base_unittest.cc",
     "../browser/media/router/media_router_dialog_controller_unittest.cc",
@@ -3459,7 +3458,9 @@
 
   configs += [ "//build/config:precompiled_headers" ]
 
-  data_deps = []
+  data_deps = [
+    "//testing/buildbot/filters:unit_tests_filters",
+  ]
 
   data = [
     "data/",
diff --git a/chrome/test/base/chrome_test_suite.cc b/chrome/test/base/chrome_test_suite.cc
index d0edd56c..2a2eaf5a 100644
--- a/chrome/test/base/chrome_test_suite.cc
+++ b/chrome/test/base/chrome_test_suite.cc
@@ -14,6 +14,7 @@
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
+#include "chrome/app/chrome_main_delegate.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/common/chrome_constants.h"
 #include "chrome/common/chrome_paths.h"
@@ -81,8 +82,9 @@
   // values for DIR_EXE and DIR_MODULE.
   content::ContentTestSuiteBase::Initialize();
 
-  ContentSettingsPattern::SetNonWildcardDomainNonPortScheme(
-      extensions::kExtensionScheme);
+  ContentSettingsPattern::SetNonWildcardDomainNonPortSchemes(
+      ChromeMainDelegate::kNonWildcardDomainNonPortSchemes,
+      ChromeMainDelegate::kNonWildcardDomainNonPortSchemesSize);
 
 #if defined(OS_MACOSX)
   // Look in the framework bundle for resources.
diff --git a/chrome/test/chromedriver/test/test_expectations b/chrome/test/chromedriver/test/test_expectations
index 023d7f10b..743873b 100644
--- a/chrome/test/chromedriver/test/test_expectations
+++ b/chrome/test/chromedriver/test/test_expectations
@@ -235,6 +235,21 @@
     'BasicMouseInterfaceTest.testDoubleClick',
     'BasicMouseInterfaceTest.testContextClick',
     'CorrectEventFiringTest.testShouldFireMouseUpEventWhenClicking',
+
+    # https://bugs.chromium.org/p/chromedriver/issues/detail?id=1960
+    'CorrectEventFiringTest.testShouldNotThrowIfEventHandlerThrows',
+    'CorrectEventFiringTest.testShouldFireMouseOverEventWhenClicking',
+    'CorrectEventFiringTest.testShouldFireTwoClickEventsWhenClickingOnALabel',
+    'CorrectEventFiringTest.testShouldIssueClickEvents',
+    'CorrectEventFiringTest.testShouldFireMouseMoveEventWhenClicking',
+    'CombinedInputActionsTest.testChordControlCutAndPaste',
+    'BasicKeyboardInterfaceTest.testSendingKeysWithShiftPressed',
+    'BasicKeyboardInterfaceTest.testBasicKeyboardInputOnActiveElement',
+    'BasicKeyboardInterfaceTest.testSendingKeyUp',
+    'BasicKeyboardInterfaceTest.testSendingKeyDownOnly',
+    'BasicMouseInterfaceTest.testMoveAndClick',
+    'BasicMouseInterfaceTest.testShouldClickElementInIFrame',
+    'CombinedInputActionsTest.testCanClickOnLinks',
 ]
 _OS_NEGATIVE_FILTER['android:chrome_stable'] = (
     _OS_NEGATIVE_FILTER['android:chrome'] + [
diff --git a/chrome/test/data/extensions/api_test/lazy_events/chrome_updates/listener/background.js b/chrome/test/data/extensions/api_test/lazy_events/chrome_updates/listener/background.js
index dbed65f..7b58c07b 100644
--- a/chrome/test/data/extensions/api_test/lazy_events/chrome_updates/listener/background.js
+++ b/chrome/test/data/extensions/api_test/lazy_events/chrome_updates/listener/background.js
@@ -2,8 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-chrome.runtime.onInstalled.addListener(function(info) {
-  if (info.reason == 'chrome_update')
-    chrome.test.sendMessage('update event');
-});
+chrome.runtime.onInstalled.addListener(function(info) {});
+
 chrome.test.notifyPass();
diff --git a/chrome/test/data/extensions/api_test/lazy_events/chrome_updates/non_listener/background.js b/chrome/test/data/extensions/api_test/lazy_events/chrome_updates/non_listener/background.js
index 7be7f34..70c9056c 100644
--- a/chrome/test/data/extensions/api_test/lazy_events/chrome_updates/non_listener/background.js
+++ b/chrome/test/data/extensions/api_test/lazy_events/chrome_updates/non_listener/background.js
@@ -2,5 +2,4 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-chrome.test.sendMessage('not listening');
 chrome.test.notifyPass();
diff --git a/chromecast/android/BUILD.gn b/chromecast/android/BUILD.gn
index 8ced54c7..1ce5e34e 100644
--- a/chromecast/android/BUILD.gn
+++ b/chromecast/android/BUILD.gn
@@ -8,22 +8,12 @@
 # These targets shall only be referenced on Android builds.
 assert(is_android)
 
-# This source_set should only contain headers for internal code. These must be
-# built separately from public stub implementations of this code to keep the
-# dependency tree clean.
-source_set("platform_jni_loader") {
-  sources = [
-    "platform_jni_loader.h",
-  ]
-}
-
 cast_shared_library("libcast_shell_android") {
   sources = [
     "//chromecast/app/android/cast_jni_loader.cc",
   ]
 
   deps = [
-    ":platform_jni_loader",
     "//base",
     "//chromecast:cast_shell_jni_registration",
     "//chromecast:cast_shell_lib",
@@ -54,10 +44,6 @@
     ]
   }
 
-  if (chromecast_branding == "public") {
-    sources += [ "platform_jni_loader_stub.cc" ]
-  }
-
   if (is_cast_using_cma_backend) {
     deps += [ "//chromecast/media/cma/backend/android:cast_media_android" ]
   }
diff --git a/chromecast/android/platform_jni_loader.h b/chromecast/android/platform_jni_loader.h
deleted file mode 100644
index 76307461..0000000
--- a/chromecast/android/platform_jni_loader.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2014 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 CHROMECAST_ANDROID_PLATFORM_JNI_LOADER_H_
-#define CHROMECAST_ANDROID_PLATFORM_JNI_LOADER_H_
-
-#include <jni.h>
-
-namespace chromecast {
-namespace android {
-
-bool PlatformRegisterJni(JNIEnv* env);
-
-}  // namespace android
-}  // namespace chromecast
-
-#endif  // CHROMECAST_ANDROID_PLATFORM_JNI_LOADER_H_
diff --git a/chromecast/android/platform_jni_loader_stub.cc b/chromecast/android/platform_jni_loader_stub.cc
deleted file mode 100644
index 0f8d814..0000000
--- a/chromecast/android/platform_jni_loader_stub.cc
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2014 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 "chromecast/android/platform_jni_loader.h"
-
-namespace chromecast {
-namespace android {
-
-bool PlatformRegisterJni(JNIEnv* env) {
-  // Intentional no-op for public build.
-  return true;
-}
-
-}  // namespace android
-}  // namespace chromecast
diff --git a/chromecast/app/android/cast_jni_loader.cc b/chromecast/app/android/cast_jni_loader.cc
index 9c75510b..705d49b 100644
--- a/chromecast/app/android/cast_jni_loader.cc
+++ b/chromecast/app/android/cast_jni_loader.cc
@@ -6,7 +6,6 @@
 #include "base/android/library_loader/library_loader_hooks.h"
 #include "base/bind.h"
 #include "chromecast/android/cast_shell_jni_registration.h"
-#include "chromecast/android/platform_jni_loader.h"
 #include "chromecast/app/cast_main_delegate.h"
 #include "content/public/app/content_jni_onload.h"
 #include "content/public/app/content_main.h"
diff --git a/chromecast/browser/android/cast_content_window_android.cc b/chromecast/browser/android/cast_content_window_android.cc
index f642c606..2afccc426 100644
--- a/chromecast/browser/android/cast_content_window_android.cc
+++ b/chromecast/browser/android/cast_content_window_android.cc
@@ -26,11 +26,6 @@
 }  // namespace
 
 // static
-bool CastContentWindowAndroid::RegisterJni(JNIEnv* env) {
-  return RegisterNativesImpl(env);
-}
-
-// static
 std::unique_ptr<CastContentWindow> CastContentWindow::Create(
     CastContentWindow::Delegate* delegate) {
   return base::WrapUnique(new CastContentWindowAndroid(delegate));
diff --git a/chromecast/browser/android/cast_content_window_android.h b/chromecast/browser/android/cast_content_window_android.h
index 68f2a84..1226766 100644
--- a/chromecast/browser/android/cast_content_window_android.h
+++ b/chromecast/browser/android/cast_content_window_android.h
@@ -24,8 +24,6 @@
 // CastWebContentsActivity.
 class CastContentWindowAndroid : public CastContentWindow {
  public:
-  static bool RegisterJni(JNIEnv* env);
-
   ~CastContentWindowAndroid() override;
 
   // CastContentWindow implementation:
diff --git a/components/content_settings/core/browser/BUILD.gn b/components/content_settings/core/browser/BUILD.gn
index f9aeabc..97df967f 100644
--- a/components/content_settings/core/browser/BUILD.gn
+++ b/components/content_settings/core/browser/BUILD.gn
@@ -59,10 +59,6 @@
     "//url",
   ]
 
-  if (!is_ios) {
-    deps += [ "//media" ]
-  }
-
   configs += [
     "//build/config/compiler:no_size_t_to_int_warning",
     "//build/config/compiler:wexit_time_destructors",
diff --git a/components/content_settings/core/browser/DEPS b/components/content_settings/core/browser/DEPS
index aea66d2..01dbe2a 100644
--- a/components/content_settings/core/browser/DEPS
+++ b/components/content_settings/core/browser/DEPS
@@ -6,7 +6,6 @@
   "+components/sync_preferences",
   "+components/url_formatter",
   "+extensions/features",
-  "+media/base/media_switches.h",
   "+net/base",
   "+net/cookies",
   "+services/preferences/public",
diff --git a/components/content_settings/core/browser/website_settings_registry.cc b/components/content_settings/core/browser/website_settings_registry.cc
index 0c898d9..6dc97a4 100644
--- a/components/content_settings/core/browser/website_settings_registry.cc
+++ b/components/content_settings/core/browser/website_settings_registry.cc
@@ -8,13 +8,8 @@
 
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
-#include "build/build_config.h"
 #include "components/content_settings/core/common/content_settings.h"
 
-#if !defined(OS_IOS)
-#include "media/base/media_switches.h"
-#endif  // !defined(OS_IOS)
-
 namespace {
 
 base::LazyInstance<content_settings::WebsiteSettingsRegistry>::DestructorAtExit
@@ -178,15 +173,11 @@
            WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE,
            DESKTOP | PLATFORM_ANDROID,
            WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);
-#if !defined(OS_IOS)
-  if (base::FeatureList::IsEnabled(media::kRecordMediaEngagementScores)) {
-    Register(CONTENT_SETTINGS_TYPE_MEDIA_ENGAGEMENT, "media-engagement",
-             nullptr, WebsiteSettingsInfo::SYNCABLE, WebsiteSettingsInfo::LOSSY,
-             WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE,
-             DESKTOP | PLATFORM_ANDROID,
-             WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);
-  }
-#endif  //! defined(OS_IOS)
+  Register(CONTENT_SETTINGS_TYPE_MEDIA_ENGAGEMENT, "media-engagement", nullptr,
+           WebsiteSettingsInfo::SYNCABLE, WebsiteSettingsInfo::LOSSY,
+           WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE,
+           DESKTOP | PLATFORM_ANDROID,
+           WebsiteSettingsInfo::INHERIT_IN_INCOGNITO);
   Register(CONTENT_SETTINGS_TYPE_CLIENT_HINTS, "client-hints", nullptr,
            WebsiteSettingsInfo::UNSYNCABLE, WebsiteSettingsInfo::LOSSY,
            WebsiteSettingsInfo::REQUESTING_ORIGIN_ONLY_SCOPE,
diff --git a/components/content_settings/core/common/content_settings_pattern.cc b/components/content_settings/core/common/content_settings_pattern.cc
index e88351a5..fed851c 100644
--- a/components/content_settings/core/common/content_settings_pattern.cc
+++ b/components/content_settings/core/common/content_settings_pattern.cc
@@ -19,18 +19,17 @@
 
 namespace {
 
-// The component supports only one scheme for simplicity.
-const char* non_port_non_domain_wildcard_scheme = NULL;
+// Array of non domain wildcard and non-port scheme names, and their count.
+const char* const* g_non_domain_wildcard_non_port_schemes = nullptr;
+size_t g_non_domain_wildcard_non_port_schemes_count = 0;
 
 // Keep it consistent with enum SchemeType in content_settings_pattern.h.
-const char* const kSchemeNames[] = {
-  "wildcard",
-  "other",
-  url::kHttpScheme,
-  url::kHttpsScheme,
-  url::kFileScheme,
-  "chrome-extension",
-};
+// TODO(msramek): Layering violation: assemble this array from hardcoded
+// schemes and those injected via |SetNonWildcardDomainNonPortSchemes()|.
+const char* const kSchemeNames[] = {"wildcard",       "other",
+                                    url::kHttpScheme, url::kHttpsScheme,
+                                    url::kFileScheme, "chrome-extension",
+                                    "chrome-search"};
 
 static_assert(arraysize(kSchemeNames) == ContentSettingsPattern::SCHEME_MAX,
               "kSchemeNames should have SCHEME_MAX elements");
@@ -264,7 +263,8 @@
             parts.path.find("*") == std::string::npos);
   }
 
-  // If the pattern is for an extension URL test if it is valid.
+  // If the pattern is for a URL with a non-wildcard domain without a port,
+  // test if it is valid.
   if (IsNonWildcardDomainNonPortScheme(parts.scheme) &&
       parts.port.empty() &&
       !parts.is_port_wildcard) {
@@ -454,19 +454,32 @@
 }
 
 // static
-void ContentSettingsPattern::SetNonWildcardDomainNonPortScheme(
-    const char* scheme) {
-  DCHECK(scheme);
-  DCHECK(!non_port_non_domain_wildcard_scheme ||
-         non_port_non_domain_wildcard_scheme == scheme);
-  non_port_non_domain_wildcard_scheme = scheme;
+void ContentSettingsPattern::SetNonWildcardDomainNonPortSchemes(
+    const char* const* schemes,
+    size_t count) {
+  DCHECK(schemes || count == 0);
+  if (g_non_domain_wildcard_non_port_schemes) {
+    DCHECK_EQ(g_non_domain_wildcard_non_port_schemes_count, count);
+    for (size_t i = 0; i < count; ++i) {
+      DCHECK_EQ(g_non_domain_wildcard_non_port_schemes[i], schemes[i]);
+    }
+  }
+
+  g_non_domain_wildcard_non_port_schemes = schemes;
+  g_non_domain_wildcard_non_port_schemes_count = count;
 }
 
 // static
 bool ContentSettingsPattern::IsNonWildcardDomainNonPortScheme(
     const std::string& scheme) {
-  DCHECK(non_port_non_domain_wildcard_scheme);
-  return scheme == non_port_non_domain_wildcard_scheme;
+  DCHECK(g_non_domain_wildcard_non_port_schemes ||
+         g_non_domain_wildcard_non_port_schemes_count == 0);
+  for (size_t i = 0; i < g_non_domain_wildcard_non_port_schemes_count; ++i) {
+    if (g_non_domain_wildcard_non_port_schemes[i] == scheme) {
+      return true;
+    }
+  }
+  return false;
 }
 
 ContentSettingsPattern::ContentSettingsPattern()
diff --git a/components/content_settings/core/common/content_settings_pattern.h b/components/content_settings/core/common/content_settings_pattern.h
index fe292d53..6a55d3b 100644
--- a/components/content_settings/core/common/content_settings_pattern.h
+++ b/components/content_settings/core/common/content_settings_pattern.h
@@ -60,8 +60,10 @@
   };
 
   // This enum is used to back an UMA histogram, the order of existing values
-  // should not be changed. New values should only append before SCHEME_MAX.
-  // Also keep it consistent with kSchemeNames in content_settings_pattern.cc.
+  // should not be changed.
+  // New values should only be appended before SCHEME_MAX.
+  // Also keep it consistent with kSchemeNames in content_settings_pattern.cc,
+  // and the ContentSettingScheme enum in histograms/enums.xml.
   enum SchemeType {
     SCHEME_WILDCARD,
     SCHEME_OTHER,
@@ -69,6 +71,7 @@
     SCHEME_HTTPS,
     SCHEME_FILE,
     SCHEME_CHROMEEXTENSION,
+    SCHEME_CHROMESEARCH,
     SCHEME_MAX,
   };
 
@@ -88,7 +91,7 @@
     // - IPv4 or IPv6
     // - hostname
     // - domain
-    // - empty string if the |is_host_wildcard flag is set.
+    // - empty string if the |is_host_wildcard| flag is set.
     std::string host;
 
     // True if the domain wildcard is set.
@@ -172,13 +175,18 @@
       const ContentSettingsPattern& domain_pattern,
       ContentSettingsPattern* origin_pattern);
 
-  // Sets the scheme that doesn't support domain wildcard and port.
+  // Sets schemes that do not support domain wildcards and ports.
   // Needs to be called by the embedder before using ContentSettingsPattern.
-  // |scheme| can't be NULL, and the pointed string must remain alive until the
-  // app terminates.
-  static void SetNonWildcardDomainNonPortScheme(const char* scheme);
+  // |schemes| can't be NULL, and the pointed to strings must remain alive
+  // until the app terminates.
+  // The method should only be called once. If called again, the parameters
+  // must have values equal to the parameter values of the first call.
+  // The |count| parameter represents the number of strings that
+  // |schemes| points to.
+  static void SetNonWildcardDomainNonPortSchemes(const char* const* schemes,
+                                                 size_t count);
 
-  // Compares |scheme| against the scheme set by the embedder.
+  // Compares |scheme| against the schemes set by the embedder.
   static bool IsNonWildcardDomainNonPortScheme(const std::string& scheme);
 
   // Constructs an empty pattern. Empty patterns are invalid patterns. Invalid
diff --git a/components/content_settings/core/common/content_settings_pattern_parser.cc b/components/content_settings/core/common/content_settings_pattern_parser.cc
index 723c9eb..0e0f2c5 100644
--- a/components/content_settings/core/common/content_settings_pattern_parser.cc
+++ b/components/content_settings/core/common/content_settings_pattern_parser.cc
@@ -131,9 +131,19 @@
     std::string host = pattern_spec.substr(host_component.start,
                                            host_component.len);
     if (host == kHostWildcard) {
+      if (ContentSettingsPattern::IsNonWildcardDomainNonPortScheme(scheme)) {
+        builder->Invalid();
+        return;
+      }
+
       builder->WithDomainWildcard();
     } else if (base::StartsWith(host, kDomainWildcard,
                                 base::CompareCase::SENSITIVE)) {
+      if (ContentSettingsPattern::IsNonWildcardDomainNonPortScheme(scheme)) {
+        builder->Invalid();
+        return;
+      }
+
       host = host.substr(kDomainWildcardLength);
       builder->WithDomainWildcard();
       builder->WithHost(host);
@@ -148,6 +158,11 @@
   }
 
   if (port_component.IsNonEmpty()) {
+    if (ContentSettingsPattern::IsNonWildcardDomainNonPortScheme(scheme)) {
+      builder->Invalid();
+      return;
+    }
+
     const std::string port = pattern_spec.substr(port_component.start,
                                                  port_component.len);
     if (port == kPortWildcard) {
diff --git a/components/content_settings/core/common/content_settings_pattern_parser_unittest.cc b/components/content_settings/core/common/content_settings_pattern_parser_unittest.cc
index b35b700..4587a06 100644
--- a/components/content_settings/core/common/content_settings_pattern_parser_unittest.cc
+++ b/components/content_settings/core/common/content_settings_pattern_parser_unittest.cc
@@ -208,6 +208,114 @@
   ::testing::Mock::VerifyAndClear(&builder);
 }
 
+TEST(ContentSettingsPatternParserTest, ParseChromePatterns) {
+  // The schemes chrome-extension:// and chrome-search:// are valid,
+  // and chrome-not-search:// is not, because the former two are registered
+  // as non-domain wildcard non-port schemes in components_test_suite.cc,
+  // and the last one isn't.
+  ::testing::StrictMock<MockBuilder> builder;
+
+  // Valid chrome-extension:// URL.
+  EXPECT_CALL(builder, WithScheme("chrome-extension"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, WithHost("peoadpeiejnhkmpaakpnompolbglelel"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, WithPath("/"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  content_settings::PatternParser::Parse(
+      "chrome-extension://peoadpeiejnhkmpaakpnompolbglelel/", &builder);
+  ::testing::Mock::VerifyAndClear(&builder);
+
+  // Valid chrome-search:// URL.
+  EXPECT_CALL(builder, WithScheme("chrome-search"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, WithHost("local-ntp"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, WithPath("/local-ntp.html"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  content_settings::PatternParser::Parse(
+      "chrome-search://local-ntp/local-ntp.html", &builder);
+  ::testing::Mock::VerifyAndClear(&builder);
+
+  // Not a non-domain wildcard non-port scheme implies a port is parsed.
+  EXPECT_CALL(builder, WithScheme("chrome-not-search"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, WithHost("local-ntp"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, WithPath("/local-ntp.html"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, WithPortWildcard())
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  content_settings::PatternParser::Parse(
+      "chrome-not-search://local-ntp/local-ntp.html", &builder);
+  ::testing::Mock::VerifyAndClear(&builder);
+}
+
+TEST(ContentSettingsPatternParserTest,
+     ParseInvalidNonDomainWildcardNonPortPatterns) {
+  ::testing::StrictMock<MockBuilder> builder;
+
+  // Domain wildcard for scheme without domain wildcards.
+  EXPECT_CALL(builder, WithScheme("chrome-search"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, Invalid())
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  content_settings::PatternParser::Parse("chrome-search://*/local-ntp.html",
+                                         &builder);
+  ::testing::Mock::VerifyAndClear(&builder);
+
+  // Domain wildcard for scheme without domain wildcards.
+  EXPECT_CALL(builder, WithScheme("chrome-search"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, Invalid())
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  content_settings::PatternParser::Parse(
+      "chrome-search://*local-ntp/local-ntp.html", &builder);
+  ::testing::Mock::VerifyAndClear(&builder);
+
+  // Port for scheme without ports.
+  EXPECT_CALL(builder, WithScheme("chrome-search"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, WithHost("local-ntp"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, Invalid())
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  content_settings::PatternParser::Parse(
+      "chrome-search://local-ntp:65535/local-ntp.html", &builder);
+  ::testing::Mock::VerifyAndClear(&builder);
+
+  // Port wildcard for scheme without ports.
+  EXPECT_CALL(builder, WithScheme("chrome-search"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, WithHost("local-ntp"))
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  EXPECT_CALL(builder, Invalid())
+      .Times(1)
+      .WillOnce(::testing::Return(&builder));
+  content_settings::PatternParser::Parse(
+      "chrome-search://local-ntp:*/local-ntp.html", &builder);
+  ::testing::Mock::VerifyAndClear(&builder);
+}
+
 TEST(ContentSettingsPatternParserTest, SerializePatterns) {
   ContentSettingsPattern::PatternParts parts;
   parts.scheme = "http";
@@ -227,4 +335,16 @@
   parts.path = "";
   parts.is_path_wildcard = true;
   EXPECT_EQ("file:///*", content_settings::PatternParser::ToString(parts));
+
+  parts = ContentSettingsPattern::PatternParts();
+  parts.scheme = "chrome-search";
+  parts.host = "local-ntp";
+  EXPECT_EQ("chrome-search://local-ntp/",
+            content_settings::PatternParser::ToString(parts));
+
+  parts = ContentSettingsPattern::PatternParts();
+  parts.scheme = "chrome-extension";
+  parts.host = "peoadpeiejnhkmpaakpnompolbglelel";
+  EXPECT_EQ("chrome-extension://peoadpeiejnhkmpaakpnompolbglelel/",
+            content_settings::PatternParser::ToString(parts));
 }
diff --git a/components/content_settings/core/common/content_settings_pattern_unittest.cc b/components/content_settings/core/common/content_settings_pattern_unittest.cc
index 0a39384..90fe597 100644
--- a/components/content_settings/core/common/content_settings_pattern_unittest.cc
+++ b/components/content_settings/core/common/content_settings_pattern_unittest.cc
@@ -327,6 +327,14 @@
       .Matches(GURL("chrome-extension://peoadpeiejnhkmpaakpnompolbglelel/")));
 }
 
+TEST(ContentSettingsPatternTest, FromString_SearchPatterns) {
+  EXPECT_TRUE(Pattern("chrome-search://local-ntp/").IsValid());
+  EXPECT_EQ("chrome-search://local-ntp/",
+            Pattern("chrome-search://local-ntp/").ToString());
+  EXPECT_TRUE(Pattern("chrome-search://local-ntp/")
+                  .Matches(GURL("chrome-search://local-ntp/")));
+}
+
 TEST(ContentSettingsPatternTest, FromString_WithIPAdresses) {
   // IPv4
   EXPECT_TRUE(Pattern("192.168.0.1").IsValid());
@@ -799,6 +807,9 @@
       ContentSettingsPattern::FromString(
           "chrome-extension://peoadpeiejnhkmpaakpnompolbglelel/"),
       &origin_pattern));
+  EXPECT_FALSE(ContentSettingsPattern::MigrateFromDomainToOrigin(
+      ContentSettingsPattern::FromString("chrome-search://local-ntp/"),
+      &origin_pattern));
 
   // These are pattern styles which might be generated using FromURL().
   EXPECT_TRUE(ContentSettingsPattern::MigrateFromDomainToOrigin(
@@ -831,6 +842,8 @@
   EXPECT_EQ(ContentSettingsPattern::SCHEME_CHROMEEXTENSION,
             Pattern("chrome-extension://peoadpeiejnhkmpaakpnompolbglelel/")
                 .GetScheme());
+  EXPECT_EQ(ContentSettingsPattern::SCHEME_CHROMESEARCH,
+            Pattern("chrome-search://local-ntp/").GetScheme());
   EXPECT_EQ(ContentSettingsPattern::SCHEME_WILDCARD,
             Pattern("192.168.0.1").GetScheme());
   EXPECT_EQ(ContentSettingsPattern::SCHEME_WILDCARD,
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/CronetTestRule.java b/components/cronet/android/test/javatests/src/org/chromium/net/CronetTestRule.java
index 87f51f48..8d06ceef 100644
--- a/components/cronet/android/test/javatests/src/org/chromium/net/CronetTestRule.java
+++ b/components/cronet/android/test/javatests/src/org/chromium/net/CronetTestRule.java
@@ -104,7 +104,7 @@
 
         // Find the API version required by the test.
         int requiredApiVersion = mTestCommon.getMaximumAvailableApiLevel();
-        for (Annotation a : desc.getAnnotations()) {
+        for (Annotation a : desc.getTestClass().getAnnotations()) {
             if (a instanceof RequiresMinApi) {
                 requiredApiVersion = ((RequiresMinApi) a).value();
             }
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json
index d77d8fb1..87e5f963 100644
--- a/components/policy/resources/policy_templates.json
+++ b/components/policy/resources/policy_templates.json
@@ -9726,16 +9726,19 @@
           'caption': '''Allow data migration''',
         },
       ],
-      'supported_on': ['chrome_os:60-'],
+      'supported_on': ['chrome_os:60-60'],
       'device_only': True,
       'features': {
         'dynamic_refresh': True,
       },
+      'deprecated': True,
       'example_value': 1,
       'id': 374,
       'caption': '''Migration strategy for ecryptfs''',
       'tags': [],
-      'desc': '''Specifies how a device should behave that shipped with ecryptfs and needs to transition to ext4 encryption.
+      'desc': '''This policy is deprecated in M61, please use EcryptfsMigrationStrategy instead.
+
+      Specifies how a device should behave that shipped with ecryptfs and needs to transition to ext4 encryption.
 
       If you set this policy to 'DisallowArc', Android apps will be disabled for all users on the device (including those that have ext4 encryption already) and no migration from ecryptfs to ext4 encryption will be offered to any users.
 
diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc
index 9433205..e64736a 100644
--- a/components/search_engines/template_url_service.cc
+++ b/components/search_engines/template_url_service.cc
@@ -1335,19 +1335,6 @@
   // Revert these fields to the built-in values.
   UpdateTemplateURLIfPrepopulated(turl.get(), prefs);
 
-  // We used to sync keywords associated with omnibox extensions, but no longer
-  // want to.  Delete them from the server.
-  // TODO(vasilii): After a few Chrome versions, delete this code together with
-  // IsOmniboxExtensionURL().
-  DCHECK(client);
-  if (client->IsOmniboxExtensionURL(turl->url())) {
-    change_list->push_back(
-        syncer::SyncChange(FROM_HERE,
-                           syncer::SyncChange::ACTION_DELETE,
-                           sync_data));
-    return nullptr;
-  }
-
   DCHECK_EQ(TemplateURL::NORMAL, turl->type());
   if (reset_keyword || deduped) {
     if (reset_keyword)
diff --git a/components/search_engines/template_url_service_client.h b/components/search_engines/template_url_service_client.h
index 77a22d2..21a1f240 100644
--- a/components/search_engines/template_url_service_client.h
+++ b/components/search_engines/template_url_service_client.h
@@ -9,7 +9,6 @@
 #include "components/search_engines/template_url_id.h"
 
 class GURL;
-class TemplateURL;
 class TemplateURLService;
 
 // This interface provides history related functionality required by
@@ -36,10 +35,6 @@
 
   // Adds the given URL to history as a keyword generated visit.
   virtual void AddKeywordGeneratedVisit(const GURL& url) = 0;
-
-  // Given the main search |url| for a TemplateURL, returns whether the
-  // TemplateURL is from an omnibox extension.
-  virtual bool IsOmniboxExtensionURL(const std::string& url) = 0;
 };
 
 #endif  // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_CLIENT_H_
diff --git a/components/signin/core/browser/android/BUILD.gn b/components/signin/core/browser/android/BUILD.gn
index 10e1f773..57e1962 100644
--- a/components/signin/core/browser/android/BUILD.gn
+++ b/components/signin/core/browser/android/BUILD.gn
@@ -32,6 +32,7 @@
     "java/src/org/chromium/components/signin/ChromeSigninController.java",
     "java/src/org/chromium/components/signin/GmsAvailabilityException.java",
     "java/src/org/chromium/components/signin/GmsJustUpdatedException.java",
+    "java/src/org/chromium/components/signin/ProfileDataSource.java",
     "java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java",
   ]
 }
diff --git a/components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountManagerDelegate.java b/components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountManagerDelegate.java
index ccff6ac..285859c2 100644
--- a/components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountManagerDelegate.java
+++ b/components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountManagerDelegate.java
@@ -90,4 +90,14 @@
     @AnyThread
     void updateCredentials(
             Account account, Activity activity, @Nullable Callback<Boolean> callback);
+
+    /**
+     * Gets profile data source.
+     * @return {@link ProfileDataSource} if this delegate provides it, null otherwise.
+     */
+    @MainThread
+    @Nullable
+    default ProfileDataSource getProfileDataSource() {
+        return null;
+    }
 }
diff --git a/components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountManagerFacade.java b/components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountManagerFacade.java
index d2dcbb8..9099a12 100644
--- a/components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountManagerFacade.java
+++ b/components/signin/core/browser/android/java/src/org/chromium/components/signin/AccountManagerFacade.java
@@ -499,6 +499,16 @@
         mDelegate.updateCredentials(account, activity, callback);
     }
 
+    /**
+     * Gets profile data source.
+     * @return {@link ProfileDataSource} if it is supported by implementation, null otherwise.
+     */
+    @MainThread
+    @Nullable
+    public ProfileDataSource getProfileDataSource() {
+        return mDelegate.getProfileDataSource();
+    }
+
     private interface AuthTask<T> {
         T run() throws AuthException;
         void onSuccess(T result);
diff --git a/components/signin/core/browser/android/java/src/org/chromium/components/signin/ProfileDataSource.java b/components/signin/core/browser/android/java/src/org/chromium/components/signin/ProfileDataSource.java
new file mode 100644
index 0000000..4e5146e
--- /dev/null
+++ b/components/signin/core/browser/android/java/src/org/chromium/components/signin/ProfileDataSource.java
@@ -0,0 +1,94 @@
+// 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.
+
+package org.chromium.components.signin;
+
+import android.graphics.Bitmap;
+import android.support.annotation.Nullable;
+
+import java.util.Map;
+
+/**
+ * Observable source of profile data for accounts on device. Must be used from UI thread only.
+ */
+public interface ProfileDataSource {
+    /**
+     * Immutable holder for profile data.
+     */
+    class ProfileData {
+        private final @Nullable Bitmap mAvatar;
+        private final @Nullable String mFullName;
+        private final @Nullable String mGivenName;
+
+        public ProfileData(
+                @Nullable Bitmap avatar, @Nullable String fullName, @Nullable String givenName) {
+            this.mAvatar = avatar;
+            this.mFullName = fullName;
+            this.mGivenName = givenName;
+        }
+
+        /**
+         * Gets the avatar.
+         * @return the avatar if it is known, otherwise returns null.
+         */
+        public @Nullable Bitmap getAvatar() {
+            return mAvatar;
+        }
+
+        /**
+         * Gets the full name (e.g., John Doe).
+         * @return the full name if it is known, otherwise returns null.
+         */
+        public @Nullable String getFullName() {
+            return mFullName;
+        }
+
+        /**
+         * Gets the given name (e.g., John).
+         * @return the given name if it is known, otherwise returns null.
+         */
+        public @Nullable String getGivenName() {
+            return mGivenName;
+        }
+    }
+
+    /**
+     * Observer to get notifications about changes in profile data.
+     */
+    interface Observer {
+        /**
+         * Notifies that an account's profile data has been updated.
+         * @param accountId An account ID.
+         */
+        void onProfileDataUpdated(String accountId);
+    }
+
+    /**
+     * Gets ProfileData for all accounts. There must be at least one active observer when this
+     * method is invoked (see {@link #addObserver}).
+     * @return unmodifiable map of ProfileData for all accounts (keyed by account name).
+     */
+    Map<String, ProfileData> getProfileDataMap();
+
+    /**
+     * Gets ProfileData for single account. There must be at least one active observer when this
+     * method is invoked (see {@link #addObserver}).
+     * @param accountId account name to get ProfileData for.
+     * @return ProfileData if there's any profile data for this account name, null otherwise.
+     */
+    @Nullable
+    ProfileData getProfileDataForAccount(String accountId);
+
+    /**
+     * Adds an observer to get notified about changes to profile data.
+     * @param observer observer that should be notified when new profile data is available.
+     */
+    void addObserver(Observer observer);
+
+    /**
+     * Removes an observer previously added by {@link #addObserver}.
+     * @param observer observer to remove.
+     */
+    void removeObserver(Observer observer);
+}
diff --git a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
index f4e443f8..b852d957 100644
--- a/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
+++ b/components/subresource_filter/content/browser/content_subresource_filter_driver_factory.cc
@@ -133,11 +133,11 @@
     return;
   // This shouldn't happen normally, but in the rare case that an IPC from a
   // previous page arrives late we should guard against it.
-  if (activation_options().should_disable_ruleset_rules)
+  if (activation_options().should_disable_ruleset_rules ||
+      activation_options().activation_level != ActivationLevel::ENABLED) {
     return;
-  DCHECK_EQ(activation_options().activation_level, ActivationLevel::ENABLED);
-  client_->ToggleNotificationVisibility(activation_options().activation_level ==
-                                        ActivationLevel::ENABLED);
+  }
+  client_->ShowNotification();
 }
 
 bool ContentSubresourceFilterDriverFactory::AllowRulesetRules() {
@@ -149,7 +149,7 @@
   if (navigation_handle->IsInMainFrame() &&
       !navigation_handle->IsSameDocument()) {
     activation_decision_ = ActivationDecision::UNKNOWN;
-    client_->ToggleNotificationVisibility(false);
+    client_->OnNewNavigationStarted();
   }
 }
 
diff --git a/components/subresource_filter/content/browser/subresource_filter_client.h b/components/subresource_filter/content/browser/subresource_filter_client.h
index 3633fa0..75763d90 100644
--- a/components/subresource_filter/content/browser/subresource_filter_client.h
+++ b/components/subresource_filter/content/browser/subresource_filter_client.h
@@ -20,13 +20,12 @@
  public:
   virtual ~SubresourceFilterClient() = default;
 
-  // Changes the visibility of the prompt that informs the user that potentially
-  // deceptive content has been blocked on the page according to the passed
-  // |visibility| parameter. When |visibility| is set to true, an icon on the
-  // right side of the omnibox is displayed. If the user clicks on the icon then
-  // a bubble is shown that explains the feature and alalows the user to turn it
-  // off.
-  virtual void ToggleNotificationVisibility(bool visibility) = 0;
+  // Informs the embedder to show some UI indicating that resources are being
+  // blocked.
+  virtual void ShowNotification() = 0;
+
+  // Called when the component is starting to observe a new navigation.
+  virtual void OnNewNavigationStarted() = 0;
 
   // Called when the activation decision is otherwise completely computed by the
   // subresource filter. At this point, the embedder still has a chance to
diff --git a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc
index f7ed063b..a67823f 100644
--- a/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc
+++ b/components/subresource_filter/content/browser/subresource_filter_safe_browsing_activation_throttle_unittest.cc
@@ -100,7 +100,8 @@
     return ruleset_dealer_.get();
   }
 
-  MOCK_METHOD1(ToggleNotificationVisibility, void(bool));
+  MOCK_METHOD0(ShowNotification, void());
+  MOCK_METHOD0(OnNewNavigationStarted, void());
   MOCK_METHOD0(ForceActivationInCurrentWebContents, bool());
 
   void ClearWhitelist() { whitelisted_hosts_.clear(); }
@@ -598,10 +599,10 @@
        NotificationVisibility) {
   GURL url(kURL);
   ConfigureForMatch(url);
-  EXPECT_CALL(*client(), ToggleNotificationVisibility(false)).Times(1);
+  EXPECT_CALL(*client(), OnNewNavigationStarted()).Times(1);
   content::RenderFrameHost* rfh = SimulateNavigateAndCommit({url}, main_rfh());
 
-  EXPECT_CALL(*client(), ToggleNotificationVisibility(true)).Times(1);
+  EXPECT_CALL(*client(), ShowNotification()).Times(1);
   EXPECT_FALSE(CreateAndNavigateDisallowedSubframe(rfh));
 }
 
@@ -613,7 +614,8 @@
 
   GURL url(kURL);
   content::RenderFrameHost* rfh = SimulateNavigateAndCommit({url}, main_rfh());
-  EXPECT_CALL(*client(), ToggleNotificationVisibility(::testing::_)).Times(0);
+  EXPECT_CALL(*client(), ShowNotification()).Times(0);
+  EXPECT_CALL(*client(), OnNewNavigationStarted()).Times(0);
   EXPECT_FALSE(CreateAndNavigateDisallowedSubframe(rfh));
 }
 
diff --git a/components/test/components_test_suite.cc b/components/test/components_test_suite.cc
index 74377cc..e76118ee 100644
--- a/components/test/components_test_suite.cc
+++ b/components/test/components_test_suite.cc
@@ -33,6 +33,11 @@
 
 namespace {
 
+// Not using kExtensionScheme and kChromeSearchScheme to avoid the dependency
+// to extensions and chrome/common.
+const char* const kNonWildcardDomainNonPortSchemes[] = {"chrome-extension",
+                                                        "chrome-search"};
+
 class ComponentsTestSuite : public base::TestSuite {
  public:
   ComponentsTestSuite(int argc, char** argv) : base::TestSuite(argc, argv) {}
@@ -82,9 +87,9 @@
     url::AddStandardScheme("chrome-devtools", url::SCHEME_WITHOUT_PORT);
     url::AddStandardScheme("chrome-search", url::SCHEME_WITHOUT_PORT);
 
-    // Not using kExtensionScheme to avoid the dependency to extensions.
-    ContentSettingsPattern::SetNonWildcardDomainNonPortScheme(
-        "chrome-extension");
+    ContentSettingsPattern::SetNonWildcardDomainNonPortSchemes(
+        kNonWildcardDomainNonPortSchemes,
+        arraysize(kNonWildcardDomainNonPortSchemes));
   }
 
   void Shutdown() override {
diff --git a/components/webcrypto/BUILD.gn b/components/webcrypto/BUILD.gn
index 576247d..fdb059b 100644
--- a/components/webcrypto/BUILD.gn
+++ b/components/webcrypto/BUILD.gn
@@ -109,6 +109,7 @@
     "//base",
     "//crypto",
     "//crypto:platform",
+    "//mojo/edk/system",
     "//third_party/WebKit/public:blink",
   ]
 }
diff --git a/components/webcrypto/DEPS b/components/webcrypto/DEPS
index 5d9852bf..8c722f91 100644
--- a/components/webcrypto/DEPS
+++ b/components/webcrypto/DEPS
@@ -1,5 +1,6 @@
 include_rules = [
   "+crypto",
+  "+mojo/edk/embedder",
   "+third_party/boringssl/src/include",
   "+third_party/re2",
   "+third_party/WebKit/public/platform",
diff --git a/components/webcrypto/fuzzer_support.cc b/components/webcrypto/fuzzer_support.cc
index f670933..f0d1191 100644
--- a/components/webcrypto/fuzzer_support.cc
+++ b/components/webcrypto/fuzzer_support.cc
@@ -10,6 +10,7 @@
 #include "components/webcrypto/algorithm_dispatch.h"
 #include "components/webcrypto/crypto_data.h"
 #include "components/webcrypto/status.h"
+#include "mojo/edk/embedder/embedder.h"
 #include "third_party/WebKit/public/platform/Platform.h"
 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
 #include "third_party/WebKit/public/web/WebKit.h"
@@ -23,6 +24,7 @@
  public:
   InitOnce() {
     base::CommandLine::Init(0, nullptr);
+    mojo::edk::Init();
     blink::Platform::Initialize(this);
   }
   ~InitOnce() override {}
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index b5a2806c..d9c97df 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -1321,6 +1321,8 @@
     "renderer_host/media/video_capture_controller.h",
     "renderer_host/media/video_capture_controller_event_handler.h",
     "renderer_host/media/video_capture_device_launch_observer.h",
+    "renderer_host/media/video_capture_factory_delegate.cc",
+    "renderer_host/media/video_capture_factory_delegate.h",
     "renderer_host/media/video_capture_gpu_jpeg_decoder.cc",
     "renderer_host/media/video_capture_gpu_jpeg_decoder.h",
     "renderer_host/media/video_capture_host.cc",
diff --git a/content/browser/android/dialog_overlay_impl.cc b/content/browser/android/dialog_overlay_impl.cc
index 72712df4..85f23b1 100644
--- a/content/browser/android/dialog_overlay_impl.cc
+++ b/content/browser/android/dialog_overlay_impl.cc
@@ -4,6 +4,8 @@
 
 #include "content/browser/android/dialog_overlay_impl.h"
 
+#include "content/browser/frame_host/render_frame_host_impl.h"
+#include "content/browser/renderer_host/render_widget_host_view_base.h"
 #include "content/browser/web_contents/web_contents_impl.h"
 #include "content/public/browser/web_contents_delegate.h"
 #include "gpu/ipc/common/gpu_surface_tracker.h"
@@ -30,6 +32,13 @@
   if (!rfhi)
     return 0;
 
+  // TODO(http://crbug.com/673886): Support overlay surfaces in VR using GVR
+  // reprojection video surface.
+  RenderWidgetHostViewBase* rwhvb =
+      static_cast<RenderWidgetHostViewBase*>(rfhi->GetView());
+  if (rwhvb->IsInVR())
+    return 0;
+
   WebContentsImpl* web_contents_impl = static_cast<WebContentsImpl*>(
       content::WebContents::FromRenderFrameHost(rfhi));
 
diff --git a/content/browser/appcache/appcache_request_handler_unittest.cc b/content/browser/appcache/appcache_request_handler_unittest.cc
index 407b501..dc81c0b1 100644
--- a/content/browser/appcache/appcache_request_handler_unittest.cc
+++ b/content/browser/appcache/appcache_request_handler_unittest.cc
@@ -283,8 +283,8 @@
     test_finished_event_->Signal();
   }
 
-  void PushNextTask(const base::Closure& task) {
-    task_stack_.push(task);
+  void PushNextTask(base::OnceClosure task) {
+    task_stack_.push(std::move(task));
   }
 
   void ScheduleNextTask() {
@@ -293,7 +293,8 @@
       TestFinished();
       return;
     }
-    base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, task_stack_.top());
+    base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+                                                  std::move(task_stack_.top()));
     task_stack_.pop();
   }
 
@@ -1035,7 +1036,7 @@
   // Data members --------------------------------------------------
 
   std::unique_ptr<base::WaitableEvent> test_finished_event_;
-  std::stack<base::Closure> task_stack_;
+  std::stack<base::OnceClosure> task_stack_;
   std::unique_ptr<MockAppCacheService> mock_service_;
   std::unique_ptr<AppCacheBackendImpl> backend_impl_;
   std::unique_ptr<MockFrontend> mock_frontend_;
diff --git a/content/browser/appcache/appcache_response_unittest.cc b/content/browser/appcache/appcache_response_unittest.cc
index d72e2be..c8cdaa0 100644
--- a/content/browser/appcache/appcache_response_unittest.cc
+++ b/content/browser/appcache/appcache_response_unittest.cc
@@ -139,12 +139,13 @@
     test_finished_event_->Signal();
   }
 
-  void PushNextTask(const base::Closure& task) {
-    task_stack_.push(std::pair<base::Closure, bool>(task, false));
+  void PushNextTask(base::Closure task) {
+    task_stack_.push(
+        std::pair<base::OnceClosure, bool>(std::move(task), false));
   }
 
   void PushNextTaskAsImmediate(const base::Closure& task) {
-    task_stack_.push(std::pair<base::Closure, bool>(task, true));
+    task_stack_.push(std::pair<base::OnceClosure, bool>(std::move(task), true));
   }
 
   void ScheduleNextTask() {
@@ -153,13 +154,13 @@
       TestFinished();
       return;
     }
-    base::Closure task = task_stack_.top().first;
+    base::OnceClosure task = std::move(task_stack_.top().first);
     bool immediate = task_stack_.top().second;
     task_stack_.pop();
     if (immediate)
-      task.Run();
+      std::move(task).Run();
     else
-      base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, task);
+      base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(task));
   }
 
   // Wrappers to call AppCacheResponseReader/Writer Read and Write methods
@@ -767,7 +768,7 @@
   std::unique_ptr<base::WaitableEvent> test_finished_event_;
   std::unique_ptr<MockStorageDelegate> storage_delegate_;
   std::unique_ptr<MockAppCacheService> service_;
-  std::stack<std::pair<base::Closure, bool> > task_stack_;
+  std::stack<std::pair<base::OnceClosure, bool>> task_stack_;
 
   std::unique_ptr<AppCacheResponseReader> reader_;
   scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_;
diff --git a/content/browser/appcache/appcache_storage_impl_unittest.cc b/content/browser/appcache/appcache_storage_impl_unittest.cc
index b2bdb09..e9bc382 100644
--- a/content/browser/appcache/appcache_storage_impl_unittest.cc
+++ b/content/browser/appcache/appcache_storage_impl_unittest.cc
@@ -456,17 +456,15 @@
     test_finished_event_->Signal();
   }
 
-  void PushNextTask(const base::Closure& task) {
-    task_stack_.push(task);
-  }
+  void PushNextTask(base::Closure task) { task_stack_.push(std::move(task)); }
 
   void ScheduleNextTask() {
     DCHECK(io_thread->task_runner()->BelongsToCurrentThread());
     if (task_stack_.empty()) {
       return;
     }
-    base::SequencedTaskRunnerHandle::Get()->PostTask(FROM_HERE,
-                                                     task_stack_.top());
+    base::SequencedTaskRunnerHandle::Get()->PostTask(
+        FROM_HERE, std::move(task_stack_.top()));
     task_stack_.pop();
   }
 
@@ -1901,7 +1899,7 @@
   // Data members --------------------------------------------------
 
   std::unique_ptr<base::WaitableEvent> test_finished_event_;
-  std::stack<base::Closure> task_stack_;
+  std::stack<base::OnceClosure> task_stack_;
   std::unique_ptr<AppCacheServiceImpl> service_;
   std::unique_ptr<MockStorageDelegate> delegate_;
   scoped_refptr<MockQuotaManagerProxy> mock_quota_manager_proxy_;
diff --git a/content/browser/appcache/appcache_url_request_job_unittest.cc b/content/browser/appcache/appcache_url_request_job_unittest.cc
index eb9eea6..80cf2f15 100644
--- a/content/browser/appcache/appcache_url_request_job_unittest.cc
+++ b/content/browser/appcache/appcache_url_request_job_unittest.cc
@@ -313,12 +313,13 @@
     test_finished_event_->Signal();
   }
 
-  void PushNextTask(const base::Closure& task) {
-    task_stack_.push(std::pair<base::Closure, bool>(task, false));
+  void PushNextTask(base::OnceClosure task) {
+    task_stack_.push(
+        std::pair<base::OnceClosure, bool>(std::move(task), false));
   }
 
-  void PushNextTaskAsImmediate(const base::Closure& task) {
-    task_stack_.push(std::pair<base::Closure, bool>(task, true));
+  void PushNextTaskAsImmediate(base::Closure task) {
+    task_stack_.push(std::pair<base::OnceClosure, bool>(std::move(task), true));
   }
 
   void ScheduleNextTask() {
@@ -327,13 +328,13 @@
       TestFinished();
       return;
     }
-    base::Closure task =task_stack_.top().first;
+    base::OnceClosure task = std::move(task_stack_.top().first);
     bool immediate = task_stack_.top().second;
     task_stack_.pop();
     if (immediate)
-      task.Run();
+      std::move(task).Run();
     else
-      base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, task);
+      base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(task));
   }
 
   // Wrappers to call AppCacheResponseReader/Writer Read and Write methods
@@ -846,7 +847,7 @@
   std::unique_ptr<base::WaitableEvent> test_finished_event_;
   std::unique_ptr<MockStorageDelegate> storage_delegate_;
   std::unique_ptr<MockAppCacheService> service_;
-  std::stack<std::pair<base::Closure, bool> > task_stack_;
+  std::stack<std::pair<base::OnceClosure, bool>> task_stack_;
 
   std::unique_ptr<AppCacheResponseReader> reader_;
   scoped_refptr<HttpResponseInfoIOBuffer> read_info_buffer_;
diff --git a/content/browser/child_process_launcher_helper.h b/content/browser/child_process_launcher_helper.h
index 8d669ea4..4a68402 100644
--- a/content/browser/child_process_launcher_helper.h
+++ b/content/browser/child_process_launcher_helper.h
@@ -12,7 +12,6 @@
 #include "base/process/kill.h"
 #include "base/process/process.h"
 #include "build/build_config.h"
-#include "content/public/browser/android/child_process_importance.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/common/result_codes.h"
 #include "mojo/edk/embedder/embedder.h"
diff --git a/content/browser/frame_host/cross_process_frame_connector.cc b/content/browser/frame_host/cross_process_frame_connector.cc
index 7576665..173f337 100644
--- a/content/browser/frame_host/cross_process_frame_connector.cc
+++ b/content/browser/frame_host/cross_process_frame_connector.cc
@@ -90,7 +90,8 @@
     if (is_hidden_)
       OnVisibilityChanged(false);
     frame_proxy_in_parent_renderer_->Send(new FrameMsg_ViewChanged(
-        frame_proxy_in_parent_renderer_->GetRoutingID()));
+        frame_proxy_in_parent_renderer_->GetRoutingID(),
+        view_->GetFrameSinkId()));
   }
 }
 
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 8f001487..2e4d0d9 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -370,8 +370,7 @@
 
 void NavigationHandleImpl::Resume(NavigationThrottle* resuming_throttle) {
   DCHECK(resuming_throttle);
-  // TODO(csharrison): Convert to DCHECK when crbug.com/736249 is resolved.
-  CHECK_EQ(resuming_throttle, GetDeferringThrottle());
+  DCHECK_EQ(resuming_throttle, GetDeferringThrottle());
   ResumeInternal();
 }
 
@@ -379,8 +378,7 @@
     NavigationThrottle* cancelling_throttle,
     NavigationThrottle::ThrottleCheckResult result) {
   DCHECK(cancelling_throttle);
-  // TODO(csharrison): Convert to DCHECK when crbug.com/736249 is resolved.
-  CHECK_EQ(cancelling_throttle, GetDeferringThrottle());
+  DCHECK_EQ(cancelling_throttle, GetDeferringThrottle());
   CancelDeferredNavigationInternal(result);
 }
 
diff --git a/content/browser/permissions/permission_service_context.cc b/content/browser/permissions/permission_service_context.cc
index ed873fa..311e0c6 100644
--- a/content/browser/permissions/permission_service_context.cc
+++ b/content/browser/permissions/permission_service_context.cc
@@ -30,8 +30,7 @@
   ~PermissionSubscription() {
     DCHECK_NE(id_, 0);
     BrowserContext* browser_context = context_->GetBrowserContext();
-    DCHECK(browser_context);
-    if (browser_context->GetPermissionManager()) {
+    if (browser_context && browser_context->GetPermissionManager()) {
       browser_context->GetPermissionManager()
           ->UnsubscribePermissionStatusChange(id_);
     }
@@ -82,8 +81,7 @@
     const url::Origin& origin,
     PermissionObserverPtr observer) {
   BrowserContext* browser_context = GetBrowserContext();
-  DCHECK(browser_context);
-  if (!browser_context->GetPermissionManager())
+  if (!browser_context || !browser_context->GetPermissionManager())
     return;
 
   auto subscription =
@@ -137,11 +135,15 @@
 }
 
 BrowserContext* PermissionServiceContext::GetBrowserContext() const {
-  if (!web_contents()) {
-    DCHECK(render_process_host_);
+  // web_contents() may return nullptr during teardown, or when showing
+  // an interstitial.
+  if (web_contents())
+    return web_contents()->GetBrowserContext();
+
+  if (render_process_host_)
     return render_process_host_->GetBrowserContext();
-  }
-  return web_contents()->GetBrowserContext();
+
+  return nullptr;
 }
 
 GURL PermissionServiceContext::GetEmbeddingOrigin() const {
diff --git a/content/browser/permissions/permission_service_context.h b/content/browser/permissions/permission_service_context.h
index 9ed0fee..0fa8254 100644
--- a/content/browser/permissions/permission_service_context.h
+++ b/content/browser/permissions/permission_service_context.h
@@ -41,7 +41,9 @@
   // Called when the connection to a PermissionObserver has an error.
   void ObserverHadConnectionError(int subscription_id);
 
+  // May return nullptr during teardown, or when showing an interstitial.
   BrowserContext* GetBrowserContext() const;
+
   GURL GetEmbeddingOrigin() const;
 
   RenderFrameHost* render_frame_host() const;
diff --git a/content/browser/permissions/permission_service_impl.cc b/content/browser/permissions/permission_service_impl.cc
index 196d2eb..8028cf6 100644
--- a/content/browser/permissions/permission_service_impl.cc
+++ b/content/browser/permissions/permission_service_impl.cc
@@ -176,10 +176,12 @@
     : context_(context), weak_factory_(this) {}
 
 PermissionServiceImpl::~PermissionServiceImpl() {
-  DCHECK(context_->GetBrowserContext());
+  BrowserContext* browser_context = context_->GetBrowserContext();
+  if (!browser_context)
+    return;
 
   PermissionManager* permission_manager =
-      context_->GetBrowserContext()->GetPermissionManager();
+      browser_context->GetPermissionManager();
   if (!permission_manager)
     return;
 
@@ -216,7 +218,9 @@
   // any UI, we want to still return something relevant so the current
   // permission status is returned for each permission.
   BrowserContext* browser_context = context_->GetBrowserContext();
-  DCHECK(browser_context);
+  if (!browser_context)
+    return;
+
   if (!context_->render_frame_host() ||
       !browser_context->GetPermissionManager()) {
     std::vector<PermissionStatus> result(permissions.size());
@@ -332,7 +336,9 @@
     PermissionType type,
     const url::Origin& origin) {
   BrowserContext* browser_context = context_->GetBrowserContext();
-  DCHECK(browser_context);
+  if (!browser_context)
+    return PermissionStatus::DENIED;
+
   if (!browser_context->GetPermissionManager() ||
       !AllowedByFeaturePolicy(context_->render_frame_host(), type)) {
     return PermissionStatus::DENIED;
@@ -349,7 +355,9 @@
 void PermissionServiceImpl::ResetPermissionStatus(PermissionType type,
                                                   const url::Origin& origin) {
   BrowserContext* browser_context = context_->GetBrowserContext();
-  DCHECK(browser_context);
+  if (!browser_context)
+    return;
+
   if (!browser_context->GetPermissionManager())
     return;
 
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc
index 74624ca..95ba400ec 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -450,10 +450,6 @@
                                        skipped_latency_info_list_.end());
     skipped_latency_info_list_.clear();
 
-    bool result =
-        support_->SubmitCompositorFrame(local_surface_id, std::move(frame));
-    DCHECK(result);
-
     if (local_surface_id != local_surface_id_ || !has_frame_) {
       // manager must outlive compositors using it.
       viz::SurfaceId surface_id(frame_sink_id_, local_surface_id);
@@ -461,12 +457,19 @@
                                     frame_size);
       client_->DelegatedFrameHostGetLayer()->SetShowPrimarySurface(
           surface_info, manager->surface_manager()->reference_factory());
-      client_->DelegatedFrameHostGetLayer()->SetFallbackSurface(surface_info);
       current_surface_size_ = frame_size;
       current_scale_factor_ = frame_device_scale_factor;
     }
 
     has_frame_ = true;
+
+    // If surface synchronization is off, then OnFirstSurfaceActivation will be
+    // called in the same call stack and so to ensure that the fallback surface
+    // is set, then primary surface must be set prior to calling
+    // CompositorFrameSinkSupport::SubmitCompositorFrame.
+    bool result =
+        support_->SubmitCompositorFrame(local_surface_id, std::move(frame));
+    DCHECK(result);
   }
   local_surface_id_ = local_surface_id;
 
@@ -520,8 +523,8 @@
 
 void DelegatedFrameHost::OnFirstSurfaceActivation(
     const viz::SurfaceInfo& surface_info) {
-  // TODO(fsamuel): Once surface synchronization is turned on, the fallback
-  // surface should be set here.
+  if (has_frame_)
+    client_->DelegatedFrameHostGetLayer()->SetFallbackSurface(surface_info);
 }
 
 void DelegatedFrameHost::OnBeginFrame(const viz::BeginFrameArgs& args) {
diff --git a/content/browser/renderer_host/media/service_video_capture_device_launcher.cc b/content/browser/renderer_host/media/service_video_capture_device_launcher.cc
index 9999a278..1f6dce22 100644
--- a/content/browser/renderer_host/media/service_video_capture_device_launcher.cc
+++ b/content/browser/renderer_host/media/service_video_capture_device_launcher.cc
@@ -15,20 +15,12 @@
 namespace {
 
 void ConcludeLaunchDeviceWithSuccess(
-    bool abort_requested,
     const media::VideoCaptureParams& params,
     video_capture::mojom::DevicePtr device,
     base::WeakPtr<media::VideoFrameReceiver> receiver,
     base::OnceClosure connection_lost_cb,
     VideoCaptureDeviceLauncher::Callbacks* callbacks,
     base::OnceClosure done_cb) {
-  if (abort_requested) {
-    device.reset();
-    callbacks->OnDeviceLaunchAborted();
-    base::ResetAndReturn(&done_cb).Run();
-    return;
-  }
-
   auto receiver_adapter =
       base::MakeUnique<video_capture::ReceiverMediaToMojoAdapter>(
           base::MakeUnique<media::VideoFrameReceiverOnTaskRunner>(
@@ -46,8 +38,10 @@
 
 void ConcludeLaunchDeviceWithFailure(
     bool abort_requested,
+    std::unique_ptr<VideoCaptureFactoryDelegate> device_factory,
     VideoCaptureDeviceLauncher::Callbacks* callbacks,
     base::OnceClosure done_cb) {
+  device_factory.reset();
   if (abort_requested)
     callbacks->OnDeviceLaunchAborted();
   else
@@ -58,17 +52,14 @@
 }  // anonymous namespace
 
 ServiceVideoCaptureDeviceLauncher::ServiceVideoCaptureDeviceLauncher(
-    video_capture::mojom::DeviceFactoryPtr* device_factory,
-    base::OnceClosure destruction_cb)
-    : device_factory_(device_factory),
-      destruction_cb_(std::move(destruction_cb)),
+    ConnectToDeviceFactoryCB connect_to_device_factory_cb)
+    : connect_to_device_factory_cb_(std::move(connect_to_device_factory_cb)),
       state_(State::READY_TO_LAUNCH),
       callbacks_(nullptr) {}
 
 ServiceVideoCaptureDeviceLauncher::~ServiceVideoCaptureDeviceLauncher() {
   DCHECK(sequence_checker_.CalledOnValidSequence());
   DCHECK(state_ == State::READY_TO_LAUNCH);
-  base::ResetAndReturn(&destruction_cb_).Run();
 }
 
 void ServiceVideoCaptureDeviceLauncher::LaunchDeviceAsync(
@@ -88,17 +79,19 @@
     return;
   }
 
+  connect_to_device_factory_cb_.Run(&device_factory_);
   if (!device_factory_->is_bound()) {
     // This can happen when the ServiceVideoCaptureProvider owning
     // |device_factory_| loses connection to the service process and resets
     // |device_factory_|.
-    ConcludeLaunchDeviceWithFailure(false, callbacks, std::move(done_cb));
+    ConcludeLaunchDeviceWithFailure(false, std::move(device_factory_),
+                                    callbacks, std::move(done_cb));
     return;
   }
   video_capture::mojom::DevicePtr device;
   auto device_request = mojo::MakeRequest(&device);
   // Ownership of |done_cb| is moved to |this|. It is not sufficient to attach
-  // it to the callback passed to |(*device_factory_)->CreateDevice()|, because
+  // it to the callback passed to |device_factory_->CreateDevice()|, because
   // |device_factory_| may get torn down before the callback is invoked.
   done_cb_ = std::move(done_cb);
   callbacks_ = callbacks;
@@ -108,15 +101,14 @@
       base::BindOnce(&ServiceVideoCaptureDeviceLauncher::
                          OnConnectionLostWhileWaitingForCallback,
                      base::Unretained(this)));
-  (*device_factory_)
-      ->CreateDevice(
-          device_id, std::move(device_request),
-          base::BindOnce(
-              // Use of Unretained |this| is safe, because |done_cb_| guarantees
-              // that |this| stays alive.
-              &ServiceVideoCaptureDeviceLauncher::OnCreateDeviceCallback,
-              base::Unretained(this), params, base::Passed(&device),
-              std::move(receiver), base::Passed(&connection_lost_cb)));
+  device_factory_->CreateDevice(
+      device_id, std::move(device_request),
+      base::BindOnce(
+          // Use of Unretained |this| is safe, because |done_cb_| guarantees
+          // that |this| stays alive.
+          &ServiceVideoCaptureDeviceLauncher::OnCreateDeviceCallback,
+          base::Unretained(this), params, base::Passed(&device),
+          std::move(receiver), base::Passed(&connection_lost_cb)));
   state_ = State::DEVICE_START_IN_PROGRESS;
 }
 
@@ -142,13 +134,21 @@
   callbacks_ = nullptr;
   switch (result_code) {
     case video_capture::mojom::DeviceAccessResultCode::SUCCESS:
+      if (abort_requested) {
+        device.reset();
+        device_factory_.reset();
+        callbacks->OnDeviceLaunchAborted();
+        base::ResetAndReturn(&done_cb_).Run();
+        return;
+      }
       ConcludeLaunchDeviceWithSuccess(
-          abort_requested, params, std::move(device), std::move(receiver),
+          params, std::move(device), std::move(receiver),
           std::move(connection_lost_cb), callbacks, std::move(done_cb_));
       return;
     case video_capture::mojom::DeviceAccessResultCode::ERROR_DEVICE_NOT_FOUND:
     case video_capture::mojom::DeviceAccessResultCode::NOT_INITIALIZED:
-      ConcludeLaunchDeviceWithFailure(abort_requested, callbacks,
+      ConcludeLaunchDeviceWithFailure(abort_requested,
+                                      std::move(device_factory_), callbacks,
                                       std::move(done_cb_));
       return;
   }
@@ -162,8 +162,8 @@
   state_ = State::READY_TO_LAUNCH;
   Callbacks* callbacks = callbacks_;
   callbacks_ = nullptr;
-  ConcludeLaunchDeviceWithFailure(abort_requested, callbacks,
-                                  std::move(done_cb_));
+  ConcludeLaunchDeviceWithFailure(abort_requested, std::move(device_factory_),
+                                  callbacks, std::move(done_cb_));
 }
 
 }  // namespace content
diff --git a/content/browser/renderer_host/media/service_video_capture_device_launcher.h b/content/browser/renderer_host/media/service_video_capture_device_launcher.h
index 4159b8f8..94b4f1cf 100644
--- a/content/browser/renderer_host/media/service_video_capture_device_launcher.h
+++ b/content/browser/renderer_host/media/service_video_capture_device_launcher.h
@@ -5,6 +5,7 @@
 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_VIDEO_CAPTURE_DEVICE_LAUNCHER_H_
 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_SERVICE_VIDEO_CAPTURE_DEVICE_LAUNCHER_H_
 
+#include "content/browser/renderer_host/media/video_capture_factory_delegate.h"
 #include "content/browser/renderer_host/media/video_capture_provider.h"
 #include "content/public/common/media_stream_request.h"
 #include "services/video_capture/public/interfaces/device_factory.mojom.h"
@@ -16,9 +17,12 @@
 class CONTENT_EXPORT ServiceVideoCaptureDeviceLauncher
     : public VideoCaptureDeviceLauncher {
  public:
+  // Receives an instance via output parameter |factory|.
+  using ConnectToDeviceFactoryCB = base::RepeatingCallback<void(
+      std::unique_ptr<VideoCaptureFactoryDelegate>* factory)>;
+
   explicit ServiceVideoCaptureDeviceLauncher(
-      video_capture::mojom::DeviceFactoryPtr* device_factory,
-      base::OnceClosure destruction_cb);
+      ConnectToDeviceFactoryCB connect_to_device_factory_cb);
   ~ServiceVideoCaptureDeviceLauncher() override;
 
   // VideoCaptureDeviceLauncher implementation.
@@ -49,8 +53,8 @@
 
   void OnConnectionLostWhileWaitingForCallback();
 
-  video_capture::mojom::DeviceFactoryPtr* const device_factory_;
-  base::OnceClosure destruction_cb_;
+  ConnectToDeviceFactoryCB connect_to_device_factory_cb_;
+  std::unique_ptr<VideoCaptureFactoryDelegate> device_factory_;
   State state_;
   base::SequenceChecker sequence_checker_;
   base::OnceClosure done_cb_;
diff --git a/content/browser/renderer_host/media/service_video_capture_device_launcher_unittest.cc b/content/browser/renderer_host/media/service_video_capture_device_launcher_unittest.cc
index 40cfde8..0a6bae1d3 100644
--- a/content/browser/renderer_host/media/service_video_capture_device_launcher_unittest.cc
+++ b/content/browser/renderer_host/media/service_video_capture_device_launcher_unittest.cc
@@ -9,6 +9,7 @@
 #include "base/test/scoped_task_environment.h"
 #include "base/threading/thread.h"
 #include "content/browser/renderer_host/media/service_launched_video_capture_device.h"
+#include "content/browser/renderer_host/media/video_capture_factory_delegate.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "services/video_capture/public/interfaces/device_factory.mojom.h"
 #include "testing/gmock/include/gmock/gmock.h"
@@ -68,7 +69,23 @@
         base::MakeUnique<mojo::Binding<video_capture::mojom::DeviceFactory>>(
             &mock_device_factory_, mojo::MakeRequest(&device_factory_));
     launcher_ = base::MakeUnique<ServiceVideoCaptureDeviceLauncher>(
-        &device_factory_, base::BindOnce(&base::DoNothing));
+        connect_to_device_factory_cb_.Get());
+    launcher_has_connected_to_device_factory_ = false;
+    launcher_has_released_device_factory_ = false;
+
+    ON_CALL(connect_to_device_factory_cb_, Run(_))
+        .WillByDefault(Invoke(
+            [this](std::unique_ptr<VideoCaptureFactoryDelegate>* out_factory) {
+              launcher_has_connected_to_device_factory_ = true;
+              *out_factory = base::MakeUnique<VideoCaptureFactoryDelegate>(
+                  &device_factory_, release_connection_cb_.Get());
+            }));
+
+    ON_CALL(release_connection_cb_, Run())
+        .WillByDefault(InvokeWithoutArgs([this]() {
+          launcher_has_released_device_factory_ = true;
+          wait_for_release_connection_cb_.Quit();
+        }));
   }
 
   void TearDown() override {}
@@ -85,14 +102,19 @@
   std::unique_ptr<ServiceVideoCaptureDeviceLauncher> launcher_;
   base::MockCallback<base::OnceClosure> connection_lost_cb_;
   base::MockCallback<base::OnceClosure> done_cb_;
+  base::MockCallback<
+      ServiceVideoCaptureDeviceLauncher::ConnectToDeviceFactoryCB>
+      connect_to_device_factory_cb_;
+  base::MockCallback<base::OnceClosure> release_connection_cb_;
+  bool launcher_has_connected_to_device_factory_;
+  bool launcher_has_released_device_factory_;
+  base::RunLoop wait_for_release_connection_cb_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(ServiceVideoCaptureDeviceLauncherTest);
 };
 
 TEST_F(ServiceVideoCaptureDeviceLauncherTest, LaunchingDeviceSucceeds) {
-  base::RunLoop run_loop;
-
   EXPECT_CALL(mock_device_factory_, DoCreateDevice(kStubDeviceId, _, _))
       .WillOnce(Invoke([](const std::string& device_id,
                           video_capture::mojom::DeviceRequest* device_request,
@@ -112,21 +134,27 @@
                 },
                 std::move(*device_request), std::move(callback)));
       }));
+
   EXPECT_CALL(mock_callbacks_, DoOnDeviceLaunched(_)).Times(1);
   EXPECT_CALL(mock_callbacks_, OnDeviceLaunchAborted()).Times(0);
   EXPECT_CALL(mock_callbacks_, OnDeviceLaunchFailed()).Times(0);
   EXPECT_CALL(connection_lost_cb_, Run()).Times(0);
-  EXPECT_CALL(done_cb_, Run()).WillOnce(InvokeWithoutArgs([&run_loop]() {
-    run_loop.Quit();
-  }));
+  base::RunLoop wait_for_done_cb;
+  EXPECT_CALL(done_cb_, Run())
+      .WillOnce(InvokeWithoutArgs(
+          [&wait_for_done_cb]() { wait_for_done_cb.Quit(); }));
 
   // Exercise
   launcher_->LaunchDeviceAsync(
       kStubDeviceId, content::MEDIA_DEVICE_VIDEO_CAPTURE, kArbitraryParams,
       kNullReceiver, connection_lost_cb_.Get(), &mock_callbacks_,
       done_cb_.Get());
+  wait_for_done_cb.Run();
 
-  run_loop.Run();
+  launcher_.reset();
+  wait_for_release_connection_cb_.Run();
+  EXPECT_TRUE(launcher_has_connected_to_device_factory_);
+  EXPECT_TRUE(launcher_has_released_device_factory_);
 }
 
 TEST_F(ServiceVideoCaptureDeviceLauncherTest,
@@ -192,6 +220,9 @@
 
   std::move(create_device_success_answer_cb).Run();
   step_2_run_loop.Run();
+
+  EXPECT_TRUE(launcher_has_connected_to_device_factory_);
+  EXPECT_TRUE(launcher_has_released_device_factory_);
 }
 
 TEST_F(ServiceVideoCaptureDeviceLauncherTest,
@@ -232,7 +263,6 @@
       kStubDeviceId, content::MEDIA_DEVICE_VIDEO_CAPTURE, kArbitraryParams,
       kNullReceiver, connection_lost_cb_.Get(), &mock_callbacks_,
       done_cb_.Get());
-
   run_loop.Run();
 }
 
@@ -350,6 +380,11 @@
   // Exercise step 2: The service cuts/loses the connection
   device_request_owned_by_service = nullptr;
   step_2_run_loop.Run();
+
+  launcher_.reset();
+  wait_for_release_connection_cb_.Run();
+  EXPECT_TRUE(launcher_has_connected_to_device_factory_);
+  EXPECT_TRUE(launcher_has_released_device_factory_);
 }
 
 }  // namespace content
diff --git a/content/browser/renderer_host/media/service_video_capture_provider.cc b/content/browser/renderer_host/media/service_video_capture_provider.cc
index 109a4c8..44155f1 100644
--- a/content/browser/renderer_host/media/service_video_capture_provider.cc
+++ b/content/browser/renderer_host/media/service_video_capture_provider.cc
@@ -5,6 +5,7 @@
 #include "content/browser/renderer_host/media/service_video_capture_provider.h"
 
 #include "content/browser/renderer_host/media/service_video_capture_device_launcher.h"
+#include "content/browser/renderer_host/media/video_capture_factory_delegate.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/common/service_manager_connection.h"
 #include "media/base/scoped_callback_runner.h"
@@ -46,7 +47,7 @@
     std::unique_ptr<ServiceConnector> service_connector)
     : service_connector_(std::move(service_connector)),
       usage_count_(0),
-      has_created_device_launcher_(false),
+      launcher_has_connected_to_device_factory_(false),
       weak_ptr_factory_(this) {
   DETACH_FROM_SEQUENCE(sequence_checker_);
 }
@@ -73,10 +74,18 @@
 std::unique_ptr<VideoCaptureDeviceLauncher>
 ServiceVideoCaptureProvider::CreateDeviceLauncher() {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+  return base::MakeUnique<ServiceVideoCaptureDeviceLauncher>(
+      base::BindRepeating(&ServiceVideoCaptureProvider::ConnectToDeviceFactory,
+                          weak_ptr_factory_.GetWeakPtr()));
+}
+
+void ServiceVideoCaptureProvider::ConnectToDeviceFactory(
+    std::unique_ptr<VideoCaptureFactoryDelegate>* out_factory) {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   IncreaseUsageCount();
   LazyConnectToService();
-  has_created_device_launcher_ = true;
-  return base::MakeUnique<ServiceVideoCaptureDeviceLauncher>(
+  launcher_has_connected_to_device_factory_ = true;
+  *out_factory = base::MakeUnique<VideoCaptureFactoryDelegate>(
       &device_factory_,
       base::BindOnce(&ServiceVideoCaptureProvider::DecreaseUsageCount,
                      weak_ptr_factory_.GetWeakPtr()));
@@ -89,7 +98,7 @@
   video_capture::uma::LogVideoCaptureServiceEvent(
       video_capture::uma::BROWSER_CONNECTING_TO_SERVICE);
   if (time_of_last_uninitialize_ != base::TimeTicks()) {
-    if (has_created_device_launcher_) {
+    if (launcher_has_connected_to_device_factory_) {
       video_capture::uma::LogDurationUntilReconnectAfterCapture(
           base::TimeTicks::Now() - time_of_last_uninitialize_);
     } else {
@@ -98,7 +107,7 @@
     }
   }
 
-  has_created_device_launcher_ = false;
+  launcher_has_connected_to_device_factory_ = false;
   time_of_last_connect_ = base::TimeTicks::Now();
 
   service_connector_->BindFactoryProvider(&device_factory_provider_);
@@ -150,7 +159,7 @@
   switch (reason) {
     case ReasonForUninitialize::kShutdown:
     case ReasonForUninitialize::kUnused:
-      if (has_created_device_launcher_) {
+      if (launcher_has_connected_to_device_factory_) {
         video_capture::uma::LogVideoCaptureServiceEvent(
             video_capture::uma::
                 BROWSER_CLOSING_CONNECTION_TO_SERVICE_AFTER_CAPTURE);
diff --git a/content/browser/renderer_host/media/service_video_capture_provider.h b/content/browser/renderer_host/media/service_video_capture_provider.h
index 5b2231e..85cd966 100644
--- a/content/browser/renderer_host/media/service_video_capture_provider.h
+++ b/content/browser/renderer_host/media/service_video_capture_provider.h
@@ -12,6 +12,8 @@
 
 namespace content {
 
+class VideoCaptureFactoryDelegate;
+
 // Implementation of VideoCaptureProvider that uses the "video_capture" service.
 // Connects to the service lazily on demand and disconnects from the service as
 // soon as all previously handed out VideoCaptureDeviceLauncher instances have
@@ -41,6 +43,8 @@
  private:
   enum class ReasonForUninitialize { kShutdown, kUnused, kConnectionLost };
 
+  void ConnectToDeviceFactory(
+      std::unique_ptr<VideoCaptureFactoryDelegate>* out_factory);
   void LazyConnectToService();
   void OnDeviceInfosReceived(GetDeviceInfosCallback result_callback,
                              const std::vector<media::VideoCaptureDeviceInfo>&);
@@ -58,7 +62,7 @@
   int usage_count_;
   SEQUENCE_CHECKER(sequence_checker_);
 
-  bool has_created_device_launcher_;
+  bool launcher_has_connected_to_device_factory_;
   base::TimeTicks time_of_last_connect_;
   base::TimeTicks time_of_last_uninitialize_;
 
diff --git a/content/browser/renderer_host/media/service_video_capture_provider_unittest.cc b/content/browser/renderer_host/media/service_video_capture_provider_unittest.cc
index 18c274a7..4564428 100644
--- a/content/browser/renderer_host/media/service_video_capture_provider_unittest.cc
+++ b/content/browser/renderer_host/media/service_video_capture_provider_unittest.cc
@@ -20,6 +20,10 @@
 
 namespace content {
 
+static const std::string kStubDeviceId = "StubDevice";
+static const media::VideoCaptureParams kArbitraryParams;
+static const base::WeakPtr<media::VideoFrameReceiver> kNullReceiver;
+
 class MockServiceConnector
     : public ServiceVideoCaptureProvider::ServiceConnector {
  public:
@@ -60,6 +64,20 @@
                     CreateDeviceCallback& callback));
 };
 
+class MockVideoCaptureDeviceLauncherCallbacks
+    : public VideoCaptureDeviceLauncher::Callbacks {
+ public:
+  void OnDeviceLaunched(
+      std::unique_ptr<LaunchedVideoCaptureDevice> device) override {
+    DoOnDeviceLaunched(&device);
+  }
+
+  MOCK_METHOD1(DoOnDeviceLaunched,
+               void(std::unique_ptr<LaunchedVideoCaptureDevice>* device));
+  MOCK_METHOD0(OnDeviceLaunchFailed, void());
+  MOCK_METHOD0(OnDeviceLaunchAborted, void());
+};
+
 class ServiceVideoCaptureProviderTest : public testing::Test {
  public:
   ServiceVideoCaptureProviderTest()
@@ -199,8 +217,8 @@
 
 // Tests that |ServiceVideoCaptureProvider| does not close the connection to the
 // service while at least one previously handed out VideoCaptureDeviceLauncher
-// instance is still alive. Then confirms that it closes the connection as soon
-// as the last VideoCaptureDeviceLauncher instance is released.
+// instance is still using it. Then confirms that it closes the connection as
+// soon as the last VideoCaptureDeviceLauncher instance is released.
 TEST_F(ServiceVideoCaptureProviderTest,
        KeepsServiceConnectionWhileDeviceLauncherAlive) {
   ON_CALL(mock_device_factory_, DoGetDeviceInfos(_))
@@ -209,10 +227,26 @@
         std::vector<media::VideoCaptureDeviceInfo> arbitrarily_empty_results;
         base::ResetAndReturn(&callback).Run(arbitrarily_empty_results);
       }));
+  ON_CALL(mock_device_factory_, DoCreateDevice(_, _, _))
+      .WillByDefault(
+          Invoke([](const std::string& device_id,
+                    video_capture::mojom::DeviceRequest* device_request,
+                    video_capture::mojom::DeviceFactory::CreateDeviceCallback&
+                        callback) {
+            base::ResetAndReturn(&callback).Run(
+                video_capture::mojom::DeviceAccessResultCode::SUCCESS);
+          }));
+  MockVideoCaptureDeviceLauncherCallbacks mock_callbacks;
 
   // Exercise part 1: Create a device launcher and hold on to it.
   auto device_launcher_1 = provider_->CreateDeviceLauncher();
+  base::RunLoop wait_for_launch_1;
+  device_launcher_1->LaunchDeviceAsync(
+      kStubDeviceId, content::MEDIA_DEVICE_VIDEO_CAPTURE, kArbitraryParams,
+      kNullReceiver, base::BindOnce(&base::DoNothing), &mock_callbacks,
+      wait_for_launch_1.QuitClosure());
   wait_for_connection_to_service_.Run();
+  wait_for_launch_1.Run();
 
   // Monitor if connection gets closed
   bool connection_has_been_closed = false;
@@ -257,6 +291,12 @@
 
   // Exercise part 3: Create and release another device launcher
   auto device_launcher_2 = provider_->CreateDeviceLauncher();
+  base::RunLoop wait_for_launch_2;
+  device_launcher_2->LaunchDeviceAsync(
+      kStubDeviceId, content::MEDIA_DEVICE_VIDEO_CAPTURE, kArbitraryParams,
+      kNullReceiver, base::BindOnce(&base::DoNothing), &mock_callbacks,
+      wait_for_launch_2.QuitClosure());
+  wait_for_launch_2.Run();
   device_launcher_2.reset();
   {
     base::RunLoop give_provider_chance_to_disconnect;
diff --git a/content/browser/renderer_host/media/video_capture_factory_delegate.cc b/content/browser/renderer_host/media/video_capture_factory_delegate.cc
new file mode 100644
index 0000000..4b3c0b0d
--- /dev/null
+++ b/content/browser/renderer_host/media/video_capture_factory_delegate.cc
@@ -0,0 +1,28 @@
+// 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 "content/browser/renderer_host/media/video_capture_factory_delegate.h"
+
+namespace content {
+
+VideoCaptureFactoryDelegate::VideoCaptureFactoryDelegate(
+    video_capture::mojom::DeviceFactoryPtr* device_factory,
+    base::OnceClosure destruction_cb)
+    : device_factory_(device_factory),
+      destruction_cb_(std::move(destruction_cb)) {}
+
+VideoCaptureFactoryDelegate::~VideoCaptureFactoryDelegate() {
+  base::ResetAndReturn(&destruction_cb_).Run();
+}
+
+void VideoCaptureFactoryDelegate::CreateDevice(
+    const std::string& device_id,
+    ::video_capture::mojom::DeviceRequest device_request,
+    video_capture::mojom::DeviceFactory::CreateDeviceCallback callback) {
+  DCHECK(device_factory_->is_bound());
+  (*device_factory_)
+      ->CreateDevice(device_id, std::move(device_request), std::move(callback));
+}
+
+}  // namespace content
diff --git a/content/browser/renderer_host/media/video_capture_factory_delegate.h b/content/browser/renderer_host/media/video_capture_factory_delegate.h
new file mode 100644
index 0000000..dc27e29
--- /dev/null
+++ b/content/browser/renderer_host/media/video_capture_factory_delegate.h
@@ -0,0 +1,42 @@
+// 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_FACTORY_DELEGATE_H_
+#define CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_FACTORY_DELEGATE_H_
+
+#include "content/common/content_export.h"
+#include "services/video_capture/public/interfaces/device_factory.mojom.h"
+
+namespace content {
+
+// Forwards calls to a given video_capture::mojom::DeviceFactoryPtr and invokes
+// a given OnceClosure on destruction.
+// Before calling CreatDevice(), clients must verify that is_bound() returns
+// true. When is_bound() returns false, calling CreateDevice() is illegal.
+// Note: This can happen when the ServiceVideoCaptureProvider owning
+// |device_factory_| loses connection to the service process and resets
+// |device_factory_|.
+class CONTENT_EXPORT VideoCaptureFactoryDelegate {
+ public:
+  VideoCaptureFactoryDelegate(
+      video_capture::mojom::DeviceFactoryPtr* device_factory,
+      base::OnceClosure destruction_cb);
+
+  ~VideoCaptureFactoryDelegate();
+
+  bool is_bound() { return device_factory_->is_bound(); }
+
+  void CreateDevice(
+      const std::string& device_id,
+      ::video_capture::mojom::DeviceRequest device_request,
+      video_capture::mojom::DeviceFactory::CreateDeviceCallback callback);
+
+ private:
+  video_capture::mojom::DeviceFactoryPtr* const device_factory_;
+  base::OnceClosure destruction_cb_;
+};
+
+}  // namespace content
+
+#endif  // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_FACTORY_DELEGATE_H_
diff --git a/content/browser/renderer_host/overscroll_controller.cc b/content/browser/renderer_host/overscroll_controller.cc
index cbc844f6..a949111 100644
--- a/content/browser/renderer_host/overscroll_controller.cc
+++ b/content/browser/renderer_host/overscroll_controller.cc
@@ -11,7 +11,6 @@
 #include "content/browser/renderer_host/overscroll_controller_delegate.h"
 #include "content/public/browser/overscroll_configuration.h"
 #include "content/public/common/content_switches.h"
-#include "third_party/WebKit/public/platform/WebMouseWheelEvent.h"
 
 using blink::WebInputEvent;
 
@@ -90,31 +89,22 @@
   if (!ShouldProcessEvent(event))
     return false;
 
+  if (event.GetType() == blink::WebInputEvent::kGestureScrollBegin ||
+      event.GetType() == blink::WebInputEvent::kGestureScrollEnd ||
+      (event.GetType() == blink::WebInputEvent::kGestureScrollUpdate &&
+       overscroll_mode_ == OVERSCROLL_NONE)) {
+    // Will handle events when processing ACKs to ensure the correct order.
+    return false;
+  }
+
   bool reset_scroll_state = false;
   if (scroll_state_ != STATE_UNKNOWN ||
       overscroll_delta_x_ || overscroll_delta_y_) {
     switch (event.GetType()) {
-      case blink::WebInputEvent::kGestureScrollEnd:
-        // Avoid resetting the state on GestureScrollEnd generated
-        // from the touchpad since it is sent based on a timeout.
-        reset_scroll_state = !IsGestureEventFromTouchpad(event);
-        break;
-
       case blink::WebInputEvent::kGestureFlingStart:
         reset_scroll_state = true;
         break;
 
-      case blink::WebInputEvent::kMouseWheel: {
-        const blink::WebMouseWheelEvent& wheel =
-            static_cast<const blink::WebMouseWheelEvent&>(event);
-        if (!wheel.has_precise_scrolling_deltas ||
-            wheel.phase == blink::WebMouseWheelEvent::kPhaseEnded ||
-            wheel.phase == blink::WebMouseWheelEvent::kPhaseCancelled) {
-          reset_scroll_state = true;
-        }
-        break;
-      }
-
       default:
         if (blink::WebInputEvent::IsMouseEventType(event.GetType()) ||
             blink::WebInputEvent::IsKeyboardEventType(event.GetType())) {
@@ -164,8 +154,7 @@
     // has been scrolled, then there is not going to be an overscroll gesture,
     // until the current scroll ends, and a new scroll gesture starts.
     if (scroll_state_ == STATE_UNKNOWN &&
-        (event.GetType() == blink::WebInputEvent::kMouseWheel ||
-         event.GetType() == blink::WebInputEvent::kGestureScrollUpdate)) {
+        event.GetType() == blink::WebInputEvent::kGestureScrollUpdate) {
       scroll_state_ = STATE_CONTENT_SCROLLING;
     }
     return;
@@ -266,20 +255,9 @@
 bool OverscrollController::DispatchEventResetsState(
     const blink::WebInputEvent& event) const {
   switch (event.GetType()) {
-    case blink::WebInputEvent::kMouseWheel: {
-      // Only wheel events with precise deltas (i.e. from trackpad) contribute
-      // to the overscroll gesture.
-      const blink::WebMouseWheelEvent& wheel =
-          static_cast<const blink::WebMouseWheelEvent&>(event);
-      return !wheel.has_precise_scrolling_deltas;
-    }
-
-    // Avoid resetting overscroll on GestureScrollBegin/End generated
-    // from the touchpad since it is sent based on a timeout.
+    // GestureScrollBegin/End ACK will reset overscroll state when necessary.
     case blink::WebInputEvent::kGestureScrollBegin:
     case blink::WebInputEvent::kGestureScrollEnd:
-      return !IsGestureEventFromTouchpad(event);
-
     case blink::WebInputEvent::kGestureScrollUpdate:
     case blink::WebInputEvent::kGestureFlingCancel:
       return false;
@@ -295,14 +273,36 @@
     const blink::WebInputEvent& event) {
   bool event_processed = false;
   switch (event.GetType()) {
-    case blink::WebInputEvent::kMouseWheel: {
-      const blink::WebMouseWheelEvent& wheel =
-          static_cast<const blink::WebMouseWheelEvent&>(event);
-      if (!wheel.has_precise_scrolling_deltas)
+    case blink::WebInputEvent::kGestureScrollBegin: {
+      // Avoid resetting the state on GestureScrollBegin generated
+      // from the touchpad since it is sent based on a timeout.
+      if (overscroll_mode_ != OVERSCROLL_NONE &&
+          !IsGestureEventFromTouchpad(event)) {
+        SetOverscrollMode(OVERSCROLL_NONE, OverscrollSource::NONE);
+      }
+      break;
+    }
+    case blink::WebInputEvent::kGestureScrollEnd: {
+      // Avoid resetting the state on GestureScrollEnd generated
+      // from the touchpad since it is sent based on a timeout.
+      bool reset_scroll_state = !IsGestureEventFromTouchpad(event);
+
+      if (reset_scroll_state)
+        scroll_state_ = STATE_UNKNOWN;
+
+      if (DispatchEventCompletesAction(event)) {
+        CompleteAction();
         break;
-      event_processed =
-          ProcessOverscroll(wheel.delta_x * wheel.acceleration_ratio_x,
-                            wheel.delta_y * wheel.acceleration_ratio_y, true);
+      }
+
+      if (!reset_scroll_state)
+        break;
+
+      if (overscroll_mode_ != OVERSCROLL_NONE) {
+        SetOverscrollMode(OVERSCROLL_NONE, OverscrollSource::NONE);
+      } else {
+        overscroll_delta_x_ = overscroll_delta_y_ = 0.f;
+      }
       break;
     }
     case blink::WebInputEvent::kGestureScrollUpdate: {
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 616a031a..f9bcaf8 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2233,10 +2233,6 @@
   UpdateProcessPriority();
 }
 
-ChildProcessImportance RenderProcessHostImpl::GetWidgetImportanceForTesting() {
-  return ComputeEffectiveImportance();
-}
-
 ChildProcessImportance RenderProcessHostImpl::ComputeEffectiveImportance() {
   ChildProcessImportance importance = ChildProcessImportance::NORMAL;
   for (size_t i = 0u; i < arraysize(widget_importance_counts_); ++i) {
@@ -3758,11 +3754,6 @@
     return;
   }
 
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
-          switches::kDisableRendererPriorityManagement)) {
-    return;
-  }
-
   const ChildProcessLauncherPriority priority = {
     // We background a process as soon as it hosts no active audio/video streams
     // and no visible widgets -- the callers must call this function whenever we
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index d39a919b..dd7df59c 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -177,6 +177,7 @@
 #if defined(OS_ANDROID)
   void UpdateWidgetImportance(ChildProcessImportance old_value,
                               ChildProcessImportance new_value) override;
+  ChildProcessImportance ComputeEffectiveImportance() override;
 #endif
   void SetSuddenTerminationAllowed(bool enabled) override;
   bool SuddenTerminationAllowed() const override;
@@ -386,11 +387,6 @@
   // globally-used spare RenderProcessHost at any time.
   static RenderProcessHost* GetSpareRenderProcessHostForTesting();
 
-#if defined(OS_ANDROID)
-  // Test-only method to get the importance of this process.
-  ChildProcessImportance GetWidgetImportanceForTesting();
-#endif
-
  protected:
   // A proxy for our IPC::Channel that lives on the IO thread.
   std::unique_ptr<IPC::ChannelProxy> channel_;
@@ -486,11 +482,6 @@
   // change.
   void UpdateProcessPriority();
 
-#if defined(OS_ANDROID)
-  // Helper method to compute importance from |widget_importance_counts_|.
-  ChildProcessImportance ComputeEffectiveImportance();
-#endif
-
   // Creates a PersistentMemoryAllocator and shares it with the renderer
   // process for it to store histograms from that process. The allocator is
   // available for extraction by a SubprocesMetricsProvider in order to
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index 5c574c7..2675ab47 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -151,12 +151,16 @@
 
   OverscrollMode current_mode() const { return current_mode_; }
   OverscrollMode completed_mode() const { return completed_mode_; }
+  const std::vector<OverscrollMode>& historical_modes() const {
+    return historical_modes_;
+  }
   float delta_x() const { return delta_x_; }
   float delta_y() const { return delta_y_; }
 
   void Reset() {
     current_mode_ = OVERSCROLL_NONE;
     completed_mode_ = OVERSCROLL_NONE;
+    historical_modes_.clear();
     delta_x_ = delta_y_ = 0.f;
   }
 
@@ -185,6 +189,7 @@
                               OverscrollSource source) override {
     EXPECT_EQ(current_mode_, old_mode);
     current_mode_ = new_mode;
+    historical_modes_.push_back(new_mode);
     delta_x_ = delta_y_ = 0.f;
   }
 
@@ -196,6 +201,8 @@
   base::Optional<float> delta_cap_;
   OverscrollMode current_mode_;
   OverscrollMode completed_mode_;
+  std::vector<OverscrollMode> historical_modes_;
+
   float delta_x_;
   float delta_y_;
 
@@ -4904,6 +4911,65 @@
   EXPECT_EQ(OverscrollSource::NONE, overscroll_source());
 }
 
+TEST_F(RenderWidgetHostViewAuraOverscrollTest,
+       CompleteOverscrollOnGestureScrollEndAck) {
+  SetUpOverscrollEnvironment();
+
+  SimulateGestureEvent(WebInputEvent::kGestureScrollBegin,
+                       blink::kWebGestureDeviceTouchscreen);
+  SendScrollBeginAckIfNeeded(INPUT_EVENT_ACK_STATE_CONSUMED);
+  EXPECT_EQ(OVERSCROLL_NONE, overscroll_mode());
+  EXPECT_EQ(OverscrollSource::NONE, overscroll_source());
+  EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode());
+  EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->completed_mode());
+  EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
+
+  // Send GSU to trigger overscroll.
+  SimulateGestureScrollUpdateEvent(300, -5, 0);
+  // Send GSE immediately before ACKing GSU.
+  SimulateGestureEvent(WebInputEvent::kGestureScrollEnd,
+                       blink::kWebGestureDeviceTouchscreen);
+
+  // Now ACK the GSU. Should see a completed overscroll.
+  SendInputEventACK(WebInputEvent::kGestureScrollUpdate,
+                    INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
+  EXPECT_EQ(OVERSCROLL_NONE, overscroll_mode());
+  EXPECT_EQ(OverscrollSource::NONE, overscroll_source());
+  EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode());
+  EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode());
+}
+
+TEST_F(RenderWidgetHostViewAuraOverscrollTest,
+       InterleavedScrollUpdateAckAndScrollEnd) {
+  SetUpOverscrollEnvironment();
+
+  SimulateGestureEvent(WebInputEvent::kGestureScrollBegin,
+                       blink::kWebGestureDeviceTouchscreen);
+  SendScrollBeginAckIfNeeded(INPUT_EVENT_ACK_STATE_CONSUMED);
+
+  // Send the first GSU which shouldn't trigger overscroll.
+  SimulateGestureScrollUpdateEvent(30, -5, 0);
+  SendInputEventACK(WebInputEvent::kGestureScrollUpdate,
+                    INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
+
+  EXPECT_EQ(0U, overscroll_delegate()->historical_modes().size());
+
+  // Send the second GSU which should be able to trigger overscroll if combined.
+  SimulateGestureScrollUpdateEvent(30, -5, 0);
+
+  // Send GSE immediately before ACKing GSU.
+  SimulateGestureEvent(WebInputEvent::kGestureScrollEnd,
+                       blink::kWebGestureDeviceTouchscreen);
+
+  // Now ACK the second GSU, should see overscroll being triggered and cleared.
+  SendInputEventACK(WebInputEvent::kGestureScrollUpdate,
+                    INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
+
+  EXPECT_EQ(2U, overscroll_delegate()->historical_modes().size());
+  EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->historical_modes().at(0));
+  EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->historical_modes().at(1));
+}
+
 void RenderWidgetHostViewAuraOverscrollTest::
     OverscrollDirectionChangeMouseWheel() {
   SetUpOverscrollEnvironment();
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
index 48fd5c32..1c5fec5 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
@@ -155,9 +155,8 @@
 
       auto* manager = root_view->GetTouchSelectionControllerClientManager();
       if (manager) {
-        // We will only have a manager on Aura (and eventually Android).
-        // TODO(wjmaclean): update this comment when TSE OOPIF support becomes
-        // available on Android.
+        // We have managers in Aura and Android, as well as outside of content/.
+        // There is no manager for Mac OS.
         selection_controller_client_ =
             base::MakeUnique<TouchSelectionControllerClientChildFrame>(this,
                                                                        manager);
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 9891f00..1f2ed7b 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -11120,34 +11120,28 @@
   FrameTreeNode* child = root->child_at(0);
 
   // Importance should survive initial navigation.
-  EXPECT_EQ(ChildProcessImportance::MODERATE,
-            static_cast<RenderProcessHostImpl*>(
-                root->current_frame_host()->GetProcess())
-                ->GetWidgetImportanceForTesting());
-  EXPECT_EQ(ChildProcessImportance::MODERATE,
-            static_cast<RenderProcessHostImpl*>(
-                child->current_frame_host()->GetProcess())
-                ->GetWidgetImportanceForTesting());
+  EXPECT_EQ(
+      ChildProcessImportance::MODERATE,
+      root->current_frame_host()->GetProcess()->ComputeEffectiveImportance());
+  EXPECT_EQ(
+      ChildProcessImportance::MODERATE,
+      child->current_frame_host()->GetProcess()->ComputeEffectiveImportance());
 
   // Check setting importance.
   web_contents()->SetImportance(ChildProcessImportance::NORMAL);
-  EXPECT_EQ(ChildProcessImportance::NORMAL,
-            static_cast<RenderProcessHostImpl*>(
-                root->current_frame_host()->GetProcess())
-                ->GetWidgetImportanceForTesting());
-  EXPECT_EQ(ChildProcessImportance::NORMAL,
-            static_cast<RenderProcessHostImpl*>(
-                child->current_frame_host()->GetProcess())
-                ->GetWidgetImportanceForTesting());
+  EXPECT_EQ(
+      ChildProcessImportance::NORMAL,
+      root->current_frame_host()->GetProcess()->ComputeEffectiveImportance());
+  EXPECT_EQ(
+      ChildProcessImportance::NORMAL,
+      child->current_frame_host()->GetProcess()->ComputeEffectiveImportance());
   web_contents()->SetImportance(ChildProcessImportance::IMPORTANT);
-  EXPECT_EQ(ChildProcessImportance::IMPORTANT,
-            static_cast<RenderProcessHostImpl*>(
-                root->current_frame_host()->GetProcess())
-                ->GetWidgetImportanceForTesting());
-  EXPECT_EQ(ChildProcessImportance::IMPORTANT,
-            static_cast<RenderProcessHostImpl*>(
-                child->current_frame_host()->GetProcess())
-                ->GetWidgetImportanceForTesting());
+  EXPECT_EQ(
+      ChildProcessImportance::IMPORTANT,
+      root->current_frame_host()->GetProcess()->ComputeEffectiveImportance());
+  EXPECT_EQ(
+      ChildProcessImportance::IMPORTANT,
+      child->current_frame_host()->GetProcess()->ComputeEffectiveImportance());
 
   // Check importance is maintained if child navigates to new domain.
   int old_child_process_id = child->current_frame_host()->GetProcess()->GetID();
@@ -11159,10 +11153,9 @@
   }
   int new_child_process_id = child->current_frame_host()->GetProcess()->GetID();
   EXPECT_NE(old_child_process_id, new_child_process_id);
-  EXPECT_EQ(ChildProcessImportance::IMPORTANT,
-            static_cast<RenderProcessHostImpl*>(
-                child->current_frame_host()->GetProcess())
-                ->GetWidgetImportanceForTesting());
+  EXPECT_EQ(
+      ChildProcessImportance::IMPORTANT,
+      child->current_frame_host()->GetProcess()->ComputeEffectiveImportance());
 
   // Check importance is maintained if root navigates to new domain.
   int old_root_process_id = root->current_frame_host()->GetProcess()->GetID();
@@ -11175,10 +11168,9 @@
   EXPECT_EQ(0u, root->child_count());
   int new_root_process_id = root->current_frame_host()->GetProcess()->GetID();
   EXPECT_NE(old_root_process_id, new_root_process_id);
-  EXPECT_EQ(ChildProcessImportance::IMPORTANT,
-            static_cast<RenderProcessHostImpl*>(
-                root->current_frame_host()->GetProcess())
-                ->GetWidgetImportanceForTesting());
+  EXPECT_EQ(
+      ChildProcessImportance::IMPORTANT,
+      root->current_frame_host()->GetProcess()->ComputeEffectiveImportance());
 
   // Check interstitial maintains importance.
   TestInterstitialDelegate* delegate = new TestInterstitialDelegate;
@@ -11189,15 +11181,14 @@
       contents_impl, contents_impl, true, interstitial_url, delegate);
   interstitial->Show();
   WaitForInterstitialAttach(contents_impl);
-  RenderProcessHostImpl* interstitial_process =
-      static_cast<RenderProcessHostImpl*>(
-          interstitial->GetMainFrame()->GetProcess());
+  RenderProcessHost* interstitial_process =
+      interstitial->GetMainFrame()->GetProcess();
   EXPECT_EQ(ChildProcessImportance::IMPORTANT,
-            interstitial_process->GetWidgetImportanceForTesting());
+            interstitial_process->ComputeEffectiveImportance());
 
   web_contents()->SetImportance(ChildProcessImportance::MODERATE);
   EXPECT_EQ(ChildProcessImportance::MODERATE,
-            interstitial_process->GetWidgetImportanceForTesting());
+            interstitial_process->ComputeEffectiveImportance());
 }
 
 // Tests for Android TouchSelectionEditing.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index da23214..959ff29a 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2396,6 +2396,11 @@
     }
   }
 
+  // Any new WebContents opened while this WebContents is in fullscreen can be
+  // used to confuse the user, so drop fullscreen.
+  if (IsFullscreenForCurrentTab())
+    ExitFullscreen(true);
+
   if (params.opener_suppressed) {
     // When the opener is suppressed, the original renderer cannot access the
     // new window.  As a result, we need to show and navigate the window here.
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index ebe6f7e..c9b0aa4 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -937,6 +937,8 @@
                            JavaScriptDialogsInMainAndSubframes);
   FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest,
                            DialogsFromJavaScriptEndFullscreen);
+  FRIEND_TEST_ALL_PREFIXES(WebContentsImplBrowserTest,
+                           PopupsFromJavaScriptEndFullscreen);
   FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest,
                            IframeBeforeUnloadParentHang);
   FRIEND_TEST_ALL_PREFIXES(RenderFrameHostImplBrowserTest,
diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
index ef51c44..74ba8a5 100644
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -1042,12 +1042,12 @@
 
 namespace {
 
-class TestJavaScriptDialogManager : public JavaScriptDialogManager,
-                                    public WebContentsDelegate {
+class TestWCDelegateForDialogsAndFullscreen : public JavaScriptDialogManager,
+                                              public WebContentsDelegate {
  public:
-  TestJavaScriptDialogManager()
+  TestWCDelegateForDialogsAndFullscreen()
       : is_fullscreen_(false), message_loop_runner_(new MessageLoopRunner) {}
-  ~TestJavaScriptDialogManager() override {}
+  ~TestWCDelegateForDialogsAndFullscreen() override {}
 
   void Wait() {
     message_loop_runner_->Run();
@@ -1077,6 +1077,16 @@
     return is_fullscreen_;
   }
 
+  void AddNewContents(WebContents* source,
+                      WebContents* new_contents,
+                      WindowOpenDisposition disposition,
+                      const gfx::Rect& initial_rect,
+                      bool user_gesture,
+                      bool* was_blocked) override {
+    delete new_contents;
+    message_loop_runner_->Quit();
+  }
+
   // JavaScriptDialogManager
 
   void RunJavaScriptDialog(WebContents* web_contents,
@@ -1116,7 +1126,7 @@
   // The MessageLoopRunner used to spin the message loop.
   scoped_refptr<MessageLoopRunner> message_loop_runner_;
 
-  DISALLOW_COPY_AND_ASSIGN(TestJavaScriptDialogManager);
+  DISALLOW_COPY_AND_ASSIGN(TestWCDelegateForDialogsAndFullscreen);
 };
 
 }  // namespace
@@ -1124,8 +1134,8 @@
 IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
                        JavaScriptDialogsInMainAndSubframes) {
   WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents());
-  TestJavaScriptDialogManager dialog_manager;
-  wc->SetDelegate(&dialog_manager);
+  TestWCDelegateForDialogsAndFullscreen test_delegate;
+  wc->SetDelegate(&test_delegate);
 
   ASSERT_TRUE(embedded_test_server()->Start());
 
@@ -1153,15 +1163,15 @@
   std::string alert_location = "alert(document.location)";
   EXPECT_TRUE(
       content::ExecuteScript(root->current_frame_host(), alert_location));
-  dialog_manager.Wait();
+  test_delegate.Wait();
   EXPECT_EQ(GURL("http://a.com/title1.html"),
-            GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
+            GURL(test_delegate.last_message()).ReplaceComponents(clear_port));
 
   // A dialog from the subframe.
   EXPECT_TRUE(
       content::ExecuteScript(frame->current_frame_host(), alert_location));
-  dialog_manager.Wait();
-  EXPECT_EQ("about:blank", dialog_manager.last_message());
+  test_delegate.Wait();
+  EXPECT_EQ("about:blank", test_delegate.last_message());
 
   // Navigate the subframe cross-site.
   NavigateFrameToURL(frame,
@@ -1171,16 +1181,16 @@
   // A dialog from the subframe.
   EXPECT_TRUE(
       content::ExecuteScript(frame->current_frame_host(), alert_location));
-  dialog_manager.Wait();
+  test_delegate.Wait();
   EXPECT_EQ(GURL("http://b.com/title2.html"),
-            GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
+            GURL(test_delegate.last_message()).ReplaceComponents(clear_port));
 
   // A dialog from the main frame.
   EXPECT_TRUE(
       content::ExecuteScript(root->current_frame_host(), alert_location));
-  dialog_manager.Wait();
+  test_delegate.Wait();
   EXPECT_EQ(GURL("http://a.com/title1.html"),
-            GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
+            GURL(test_delegate.last_message()).ReplaceComponents(clear_port));
 
   // Navigate the top frame cross-site; ensure that dialogs work.
   NavigateToURL(shell(),
@@ -1188,18 +1198,18 @@
   EXPECT_TRUE(WaitForLoadStop(wc));
   EXPECT_TRUE(
       content::ExecuteScript(root->current_frame_host(), alert_location));
-  dialog_manager.Wait();
+  test_delegate.Wait();
   EXPECT_EQ(GURL("http://c.com/title3.html"),
-            GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
+            GURL(test_delegate.last_message()).ReplaceComponents(clear_port));
 
   // Navigate back; ensure that dialogs work.
   wc->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(wc));
   EXPECT_TRUE(
       content::ExecuteScript(root->current_frame_host(), alert_location));
-  dialog_manager.Wait();
+  test_delegate.Wait();
   EXPECT_EQ(GURL("http://a.com/title1.html"),
-            GURL(dialog_manager.last_message()).ReplaceComponents(clear_port));
+            GURL(test_delegate.last_message()).ReplaceComponents(clear_port));
 
   wc->SetDelegate(nullptr);
   wc->SetJavaScriptDialogManagerForTesting(nullptr);
@@ -1521,8 +1531,8 @@
 IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
                        DialogsFromJavaScriptEndFullscreen) {
   WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents());
-  TestJavaScriptDialogManager dialog_manager;
-  wc->SetDelegate(&dialog_manager);
+  TestWCDelegateForDialogsAndFullscreen test_delegate;
+  wc->SetDelegate(&test_delegate);
 
   GURL url("about:blank");
   EXPECT_TRUE(NavigateToURL(shell(), url));
@@ -1532,7 +1542,7 @@
   EXPECT_TRUE(wc->IsFullscreenForCurrentTab());
   std::string script = "alert('hi')";
   EXPECT_TRUE(content::ExecuteScript(wc, script));
-  dialog_manager.Wait();
+  test_delegate.Wait();
   EXPECT_FALSE(wc->IsFullscreenForCurrentTab());
 
   // confirm
@@ -1540,7 +1550,7 @@
   EXPECT_TRUE(wc->IsFullscreenForCurrentTab());
   script = "confirm('hi')";
   EXPECT_TRUE(content::ExecuteScript(wc, script));
-  dialog_manager.Wait();
+  test_delegate.Wait();
   EXPECT_FALSE(wc->IsFullscreenForCurrentTab());
 
   // prompt
@@ -1548,7 +1558,7 @@
   EXPECT_TRUE(wc->IsFullscreenForCurrentTab());
   script = "prompt('hi')";
   EXPECT_TRUE(content::ExecuteScript(wc, script));
-  dialog_manager.Wait();
+  test_delegate.Wait();
   EXPECT_FALSE(wc->IsFullscreenForCurrentTab());
 
   // beforeunload
@@ -1563,7 +1573,28 @@
   script = "window.onbeforeunload=function(e){ return 'x' };";
   EXPECT_TRUE(content::ExecuteScript(wc, script));
   EXPECT_TRUE(NavigateToURL(shell(), url));
-  dialog_manager.Wait();
+  test_delegate.Wait();
+  EXPECT_FALSE(wc->IsFullscreenForCurrentTab());
+
+  wc->SetDelegate(nullptr);
+  wc->SetJavaScriptDialogManagerForTesting(nullptr);
+}
+
+IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
+                       PopupsFromJavaScriptEndFullscreen) {
+  WebContentsImpl* wc = static_cast<WebContentsImpl*>(shell()->web_contents());
+  TestWCDelegateForDialogsAndFullscreen test_delegate;
+  wc->SetDelegate(&test_delegate);
+
+  GURL url("about:blank");
+  EXPECT_TRUE(NavigateToURL(shell(), url));
+
+  // popup
+  wc->EnterFullscreenMode(url);
+  EXPECT_TRUE(wc->IsFullscreenForCurrentTab());
+  std::string script = "window.open('', '', 'width=200,height=100')";
+  EXPECT_TRUE(content::ExecuteScript(wc, script));
+  test_delegate.Wait();
   EXPECT_FALSE(wc->IsFullscreenForCurrentTab());
 
   wc->SetDelegate(nullptr);
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h
index b54c9d2..7fcc512 100644
--- a/content/common/frame_messages.h
+++ b/content/common/frame_messages.h
@@ -872,7 +872,7 @@
 
 // Notifies RenderFrameProxy that its associated RenderWidgetHostView has
 // changed.
-IPC_MESSAGE_ROUTED0(FrameMsg_ViewChanged)
+IPC_MESSAGE_ROUTED1(FrameMsg_ViewChanged, viz::FrameSinkId /* frame_sink_id */)
 
 // Notifies this frame or proxy that it is now focused.  This is used to
 // support cross-process focused frame changes.
diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessCreationParams.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessCreationParams.java
index 49eb76f4..5c65ddd 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessCreationParams.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessCreationParams.java
@@ -74,13 +74,18 @@
     private final boolean mIsSandboxedServiceExternal;
     private final int mLibraryProcessType;
     private final boolean mBindToCallerCheck;
+    // Use only the explicit WebContents.setImportance signal, and ignore other implicit
+    // signals in content.
+    private final boolean mIgnoreVisibilityForImportance;
 
     public ChildProcessCreationParams(String packageNameForSandboxedService,
-            boolean isExternalSandboxedService, int libraryProcessType, boolean bindToCallerCheck) {
+            boolean isExternalSandboxedService, int libraryProcessType, boolean bindToCallerCheck,
+            boolean ignoreVisibilityForImportance) {
         mPackageNameForSandboxedService = packageNameForSandboxedService;
         mIsSandboxedServiceExternal = isExternalSandboxedService;
         mLibraryProcessType = libraryProcessType;
         mBindToCallerCheck = bindToCallerCheck;
+        mIgnoreVisibilityForImportance = ignoreVisibilityForImportance;
     }
 
     public String getPackageNameForSandboxedService() {
@@ -95,6 +100,10 @@
         return mBindToCallerCheck;
     }
 
+    public boolean getIgnoreVisibilityForImportance() {
+        return mIgnoreVisibilityForImportance;
+    }
+
     public void addIntentExtras(Bundle extras) {
         extras.putInt(EXTRA_LIBRARY_PROCESS_TYPE, mLibraryProcessType);
     }
diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java
index 6fcb5de..235487f 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java
@@ -467,42 +467,51 @@
             @ChildProcessImportance int importance) {
         assert LauncherThread.runningOnLauncherThread();
         assert mLauncher.getPid() == pid;
+
+        // Add first and remove second.
+        ChildProcessConnection connection = mLauncher.getConnection();
+        if (mImportance != importance) {
+            switch (importance) {
+                case ChildProcessImportance.NORMAL:
+                    // Nothing to add.
+                    break;
+                case ChildProcessImportance.MODERATE:
+                    connection.addModerateBinding();
+                    break;
+                case ChildProcessImportance.IMPORTANT:
+                    connection.addStrongBinding();
+                    break;
+                case ChildProcessImportance.COUNT:
+                    assert false;
+                    break;
+                default:
+                    assert false;
+            }
+        }
+
+        if (mCreationParams != null && mCreationParams.getIgnoreVisibilityForImportance()) {
+            foreground = false;
+            boostForPendingViews = false;
+        }
         getBindingManager().setPriority(pid, foreground, boostForPendingViews);
 
-        if (mImportance == importance) return;
-        ChildProcessConnection connection = mLauncher.getConnection();
-        // Add first and remove second.
-        switch (importance) {
-            case ChildProcessImportance.NORMAL:
-                // Nothing to add.
-                break;
-            case ChildProcessImportance.MODERATE:
-                connection.addModerateBinding();
-                break;
-            case ChildProcessImportance.IMPORTANT:
-                connection.addStrongBinding();
-                break;
-            case ChildProcessImportance.COUNT:
-                assert false;
-                break;
-            default:
-                assert false;
-        }
-        switch (mImportance) {
-            case ChildProcessImportance.NORMAL:
-                // Nothing to remove.
-                break;
-            case ChildProcessImportance.MODERATE:
-                connection.removeModerateBinding();
-                break;
-            case ChildProcessImportance.IMPORTANT:
-                connection.removeStrongBinding();
-                break;
-            case ChildProcessImportance.COUNT:
-                assert false;
-                break;
-            default:
-                assert false;
+        if (mImportance != importance) {
+            switch (mImportance) {
+                case ChildProcessImportance.NORMAL:
+                    // Nothing to remove.
+                    break;
+                case ChildProcessImportance.MODERATE:
+                    connection.removeModerateBinding();
+                    break;
+                case ChildProcessImportance.IMPORTANT:
+                    connection.removeStrongBinding();
+                    break;
+                case ChildProcessImportance.COUNT:
+                    assert false;
+                    break;
+                default:
+                    assert false;
+            }
         }
         mImportance = importance;
     }
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherHelperTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherHelperTest.java
index 4a93ebf..2101f63 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherHelperTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherHelperTest.java
@@ -167,9 +167,10 @@
 
         // Launch a service from this process. Since slot 0 is already bound by the Helper, it
         // will fail to start and the ChildProcessLauncher will retry and use the slot 1.
-        ChildProcessCreationParams creationParams = new ChildProcessCreationParams(
-                context.getPackageName(), false /* isExternalService */,
-                LibraryProcessType.PROCESS_CHILD, true /* bindToCallerCheck */);
+        ChildProcessCreationParams creationParams =
+                new ChildProcessCreationParams(context.getPackageName(),
+                        false /* isExternalService */, LibraryProcessType.PROCESS_CHILD,
+                        true /* bindToCallerCheck */, false /* ignoreVisibilityForImportance */);
         ChildProcessLauncherHelper launcher = startSandboxedChildProcessWithCreationParams(
                 creationParams, BLOCK_UNTIL_SETUP, true /* doSetupConnection */);
 
@@ -281,9 +282,10 @@
     @Feature({"ProcessManagement"})
     public void testWarmUpWithBindToCaller() {
         Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
-        ChildProcessCreationParams creationParams = new ChildProcessCreationParams(
-                context.getPackageName(), false /* isExternalService */,
-                LibraryProcessType.PROCESS_CHILD, true /* bindToCallerCheck */);
+        ChildProcessCreationParams creationParams =
+                new ChildProcessCreationParams(context.getPackageName(),
+                        false /* isExternalService */, LibraryProcessType.PROCESS_CHILD,
+                        true /* bindToCallerCheck */, false /* ignoreVisibilityForImportance */);
         testWarmUpWithCreationParams(creationParams);
     }
 
@@ -555,7 +557,8 @@
         return packageName == null
                 ? null
                 : new ChildProcessCreationParams(packageName, false /* isExternalService */,
-                          LibraryProcessType.PROCESS_CHILD, false /* bindToCallerCheck */);
+                          LibraryProcessType.PROCESS_CHILD, false /* bindToCallerCheck */,
+                          false /* ignoreVisibilityForImportance */);
     }
 
     private static boolean hasSandboxedConnectionAllocatorForPackage(final String packageName) {
diff --git a/content/public/android/junit/src/org/chromium/content/browser/BindingManagerImplTest.java b/content/public/android/junit/src/org/chromium/content/browser/BindingManagerImplTest.java
index 843c293..cb7393c 100644
--- a/content/public/android/junit/src/org/chromium/content/browser/BindingManagerImplTest.java
+++ b/content/public/android/junit/src/org/chromium/content/browser/BindingManagerImplTest.java
@@ -47,8 +47,7 @@
                 false /* bindToCallerCheck */, false /* bindAsExternalService */,
                 null /* serviceBundle */);
         connection.setPid(pid);
-        connection.start(false /* useStrongBinding */, null /* serviceCallback */,
-                false /* retryOnTimeout */);
+        connection.start(false /* useStrongBinding */, null /* serviceCallback */);
         if (manager != null) {
             manager.addNewConnection(pid, connection);
         }
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h
index e98785ff..dc9c9a3aa 100644
--- a/content/public/browser/render_process_host.h
+++ b/content/public/browser/render_process_host.h
@@ -237,6 +237,9 @@
   // Called by an already added widget when its importance changes.
   virtual void UpdateWidgetImportance(ChildProcessImportance old_value,
                                       ChildProcessImportance new_value) = 0;
+
+  // Return the highest importance of all widgets in this process.
+  virtual ChildProcessImportance ComputeEffectiveImportance() = 0;
 #endif
 
   // Sets a flag indicating that the process can be abnormally terminated.
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 480a90fc..78041e2 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -257,10 +257,6 @@
 // Prevent renderer process backgrounding when set.
 const char kDisableRendererBackgrounding[]  = "disable-renderer-backgrounding";
 
-// No not manage renderer process priority at all when set.
-const char kDisableRendererPriorityManagement[] =
-    "disable-renderer-priority-management";
-
 // Whether the resize lock is disabled. Default is false. This is generally only
 // useful for tests that want to force disabling.
 const char kDisableResizeLock[] = "disable-resize-lock";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index cf17a89..9451a76 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -86,7 +86,6 @@
 extern const char kDisableRemoteFonts[];
 CONTENT_EXPORT extern const char kDisableRemotePlaybackAPI[];
 extern const char kDisableRendererAccessibility[];
-CONTENT_EXPORT extern const char kDisableRendererPriorityManagement[];
 CONTENT_EXPORT extern const char kDisableRendererBackgrounding[];
 CONTENT_EXPORT extern const char kDisableResizeLock[];
 CONTENT_EXPORT extern const char kDisableSeccompFilterSandbox[];
diff --git a/content/public/test/fake_download_item.cc b/content/public/test/fake_download_item.cc
index 3ce5ff0..cd08368 100644
--- a/content/public/test/fake_download_item.cc
+++ b/content/public/test/fake_download_item.cc
@@ -173,6 +173,14 @@
   return last_access_time_;
 }
 
+void FakeDownloadItem::SetIsTransient(bool is_transient) {
+  is_transient_ = is_transient;
+}
+
+bool FakeDownloadItem::IsTransient() const {
+  return is_transient_;
+}
+
 // The methods below are not supported and are not expected to be called.
 void FakeDownloadItem::ValidateDangerousDownload() {
   NOTREACHED();
@@ -393,11 +401,6 @@
   return false;
 }
 
-bool FakeDownloadItem::IsTransient() const {
-  NOTREACHED();
-  return false;
-}
-
 BrowserContext* FakeDownloadItem::GetBrowserContext() const {
   NOTREACHED();
   return nullptr;
diff --git a/content/public/test/fake_download_item.h b/content/public/test/fake_download_item.h
index b0b44f9..2d124a1 100644
--- a/content/public/test/fake_download_item.h
+++ b/content/public/test/fake_download_item.h
@@ -86,6 +86,9 @@
   void SetLastAccessTime(base::Time time) override;
   base::Time GetLastAccessTime() const override;
 
+  void SetIsTransient(bool is_transient);
+  bool IsTransient() const override;
+
   // The methods below are not supported and are not expected to be called.
   void ValidateDangerousDownload() override;
   void StealDangerousDownload(bool delete_file_afterward,
@@ -133,7 +136,6 @@
   bool GetOpenWhenComplete() const override;
   bool GetAutoOpened() override;
   bool GetOpened() const override;
-  bool IsTransient() const override;
   BrowserContext* GetBrowserContext() const override;
   WebContents* GetWebContents() const override;
   void OnContentCheckCompleted(DownloadDangerType danger_type,
@@ -164,6 +166,7 @@
       DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_NONE;
   int64_t received_bytes_ = 0;
   int64_t total_bytes_ = 0;
+  bool is_transient_ = false;
 
   // The members below are to be returned by methods, which return by reference.
   std::string dummy_string;
diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc
index 56a8870..0a15edc 100644
--- a/content/public/test/mock_render_process_host.cc
+++ b/content/public/test/mock_render_process_host.cc
@@ -257,6 +257,11 @@
 void MockRenderProcessHost::UpdateWidgetImportance(
     ChildProcessImportance old_value,
     ChildProcessImportance new_value) {}
+
+ChildProcessImportance MockRenderProcessHost::ComputeEffectiveImportance() {
+  NOTIMPLEMENTED();
+  return ChildProcessImportance::NORMAL;
+}
 #endif
 
 void MockRenderProcessHost::SetSuddenTerminationAllowed(bool allowed) {
diff --git a/content/public/test/mock_render_process_host.h b/content/public/test/mock_render_process_host.h
index f2e6f9b..643b389 100644
--- a/content/public/test/mock_render_process_host.h
+++ b/content/public/test/mock_render_process_host.h
@@ -89,6 +89,7 @@
 #if defined(OS_ANDROID)
   void UpdateWidgetImportance(ChildProcessImportance old_value,
                               ChildProcessImportance new_value) override;
+  ChildProcessImportance ComputeEffectiveImportance() override;
 #endif
   void SetSuddenTerminationAllowed(bool allowed) override;
   bool SuddenTerminationAllowed() const override;
diff --git a/content/renderer/child_frame_compositing_helper.cc b/content/renderer/child_frame_compositing_helper.cc
index 8fad0fb1..b8440c9 100644
--- a/content/renderer/child_frame_compositing_helper.cc
+++ b/content/renderer/child_frame_compositing_helper.cc
@@ -275,6 +275,7 @@
   viz::SurfaceInfo modified_surface_info(surface_info.id(), scale_factor,
                                          surface_info.size_in_pixels());
   surface_layer_->SetPrimarySurfaceInfo(modified_surface_info);
+  surface_layer_->SetFallbackSurfaceInfo(fallback_surface_info_);
 
   std::unique_ptr<cc_blink::WebLayerImpl> layer(
       new cc_blink::WebLayerImpl(surface_layer_));
@@ -294,6 +295,7 @@
 void ChildFrameCompositingHelper::SetFallbackSurfaceInfo(
     const viz::SurfaceInfo& surface_info,
     const viz::SurfaceSequence& sequence) {
+  fallback_surface_info_ = surface_info;
   float scale_factor = surface_info.device_scale_factor();
   // TODO(oshima): This is a stopgap fix so that the compositor does not
   // scaledown the content when 2x frame data is added to 1x parent frame data.
diff --git a/content/renderer/child_frame_compositing_helper.h b/content/renderer/child_frame_compositing_helper.h
index 4346ec9..31c9d3d6 100644
--- a/content/renderer/child_frame_compositing_helper.h
+++ b/content/renderer/child_frame_compositing_helper.h
@@ -87,6 +87,8 @@
   viz::SurfaceId last_primary_surface_id_;
   gfx::Size last_surface_size_in_pixels_;
 
+  viz::SurfaceInfo fallback_surface_info_;
+
   // The lifetime of this weak pointer should be greater than the lifetime of
   // other member objects, as they may access this pointer during their
   // destruction.
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc
index 35707b7..c754839 100644
--- a/content/renderer/render_frame_proxy.cc
+++ b/content/renderer/render_frame_proxy.cc
@@ -10,6 +10,7 @@
 
 #include "base/command_line.h"
 #include "base/lazy_instance.h"
+#include "components/viz/common/switches.h"
 #include "content/child/feature_policy/feature_policy_platform.h"
 #include "content/child/web_url_request_util.h"
 #include "content/child/webmessageportchannel_impl.h"
@@ -22,6 +23,7 @@
 #include "content/common/site_isolation_policy.h"
 #include "content/common/swapped_out_messages.h"
 #include "content/common/view_messages.h"
+#include "content/public/common/content_switches.h"
 #include "content/renderer/child_frame_compositing_helper.h"
 #include "content/renderer/frame_owner_properties.h"
 #include "content/renderer/render_frame_impl.h"
@@ -52,6 +54,11 @@
 base::LazyInstance<FrameMap>::DestructorAtExit g_frame_map =
     LAZY_INSTANCE_INITIALIZER;
 
+bool IsRunningInMash() {
+  const base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess();
+  return cmdline->HasSwitch(switches::kIsRunningInMash);
+}
+
 }  // namespace
 
 // static
@@ -211,6 +218,12 @@
   std::pair<FrameMap::iterator, bool> result =
       g_frame_map.Get().insert(std::make_pair(web_frame_, this));
   CHECK(result.second) << "Inserted a duplicate item.";
+
+  const base::CommandLine& command_line =
+      *base::CommandLine::ForCurrentProcess();
+  enable_surface_synchronization_ =
+      IsRunningInMash() ||
+      command_line.HasSwitch(switches::kEnableSurfaceSynchronization);
 }
 
 void RenderFrameProxy::ResendFrameRects() {
@@ -221,7 +234,7 @@
 }
 
 void RenderFrameProxy::WillBeginCompositorFrame() {
-  if (compositing_helper_) {
+  if (compositing_helper_ && compositing_helper_->surface_id().is_valid()) {
     FrameHostMsg_HittestData_Params params;
     params.surface_id = compositing_helper_->surface_id();
     params.ignored_for_hittest = web_frame_->IsIgnoredForHitTest();
@@ -328,7 +341,7 @@
 }
 
 void RenderFrameProxy::OnChildFrameProcessGone() {
-  if (compositing_helper_.get())
+  if (compositing_helper_)
     compositing_helper_->ChildFrameGone();
 }
 
@@ -342,14 +355,27 @@
   if (!web_frame()->Parent())
     return;
 
-  if (!compositing_helper_.get()) {
+  if (!compositing_helper_) {
     compositing_helper_ =
         ChildFrameCompositingHelper::CreateForRenderFrameProxy(this);
+    if (enable_surface_synchronization_) {
+      // We wait until there is a single CompositorFrame guaranteed to be
+      // available and ready for display in the display compositor before using
+      // surface synchronization. This guarantees that we will have something to
+      // display when the compositor goes to produce a display frame.
+      //
+      // Once there's an available fallback surface that can be employed, then
+      // the primary surface is updated as soon as the frame rect changes.
+      //
+      // The compositor will attempt to composite the primary surface within a
+      // give deadline (4 frames is the default). If the primary surface isn't
+      // available for four frames, then the fallback surface will be used.
+      compositing_helper_->SetPrimarySurfaceInfo(surface_info);
+    }
   }
-  // TODO(fsamuel): When surface synchronization is enabled, only set the
-  // fallback here. The primary should be updated on resize/device scale factor
-  // change.
-  compositing_helper_->SetPrimarySurfaceInfo(surface_info);
+
+  if (!enable_surface_synchronization_)
+    compositing_helper_->SetPrimarySurfaceInfo(surface_info);
   compositing_helper_->SetFallbackSurfaceInfo(surface_info, sequence);
 }
 
@@ -362,7 +388,8 @@
   web_frame_->DidStartLoading();
 }
 
-void RenderFrameProxy::OnViewChanged() {
+void RenderFrameProxy::OnViewChanged(const viz::FrameSinkId& frame_sink_id) {
+  frame_sink_id_ = frame_sink_id;
   // Resend the FrameRects and allocate a new viz::LocalSurfaceId when the view
   // changes.
   ResendFrameRects();
@@ -521,8 +548,19 @@
 
 void RenderFrameProxy::FrameRectsChanged(const blink::WebRect& frame_rect) {
   gfx::Rect rect = frame_rect;
-  if (frame_rect_.size() != rect.size() || !local_surface_id_.is_valid())
+  if (frame_rect_.size() != rect.size() || !local_surface_id_.is_valid()) {
     local_surface_id_ = local_surface_id_allocator_.GenerateId();
+    if (compositing_helper_ && enable_surface_synchronization_ &&
+        frame_sink_id_.is_valid()) {
+      float device_scale_factor =
+          render_widget()->GetOriginalDeviceScaleFactor();
+      viz::SurfaceInfo surface_info(
+          viz::SurfaceId(frame_sink_id_, local_surface_id_),
+          device_scale_factor,
+          gfx::ScaleToCeiledSize(frame_rect_.size(), device_scale_factor));
+      compositing_helper_->SetPrimarySurfaceInfo(surface_info);
+    }
+  }
 
   frame_rect_ = rect;
 
diff --git a/content/renderer/render_frame_proxy.h b/content/renderer/render_frame_proxy.h
index a471d36c..3c203de6 100644
--- a/content/renderer/render_frame_proxy.h
+++ b/content/renderer/render_frame_proxy.h
@@ -169,7 +169,7 @@
   void OnSetChildFrameSurface(const viz::SurfaceInfo& surface_info,
                               const viz::SurfaceSequence& sequence);
   void OnUpdateOpener(int opener_routing_id);
-  void OnViewChanged();
+  void OnViewChanged(const viz::FrameSinkId& frame_sink_id);
   void OnDidStopLoading();
   void OnDidUpdateFramePolicy(
       blink::WebSandboxFlags flags,
@@ -205,9 +205,12 @@
   RenderWidget* render_widget_;
 
   gfx::Rect frame_rect_;
+  viz::FrameSinkId frame_sink_id_;
   viz::LocalSurfaceId local_surface_id_;
   viz::LocalSurfaceIdAllocator local_surface_id_allocator_;
 
+  bool enable_surface_synchronization_ = false;
+
   DISALLOW_COPY_AND_ASSIGN(RenderFrameProxy);
 };
 
diff --git a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestHelperService.java b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestHelperService.java
index 50a26bc4..b760123 100644
--- a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestHelperService.java
+++ b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestHelperService.java
@@ -79,8 +79,9 @@
     private void doBindService(final Message msg) {
         String[] commandLine = { "_", "--" + BaseSwitches.RENDERER_WAIT_FOR_JAVA_DEBUGGER };
         final boolean bindToCaller = true;
-        ChildProcessCreationParams params = new ChildProcessCreationParams(
-                getPackageName(), false, LibraryProcessType.PROCESS_CHILD, bindToCaller);
+        ChildProcessCreationParams params = new ChildProcessCreationParams(getPackageName(), false,
+                LibraryProcessType.PROCESS_CHILD, bindToCaller,
+                false /* ignoreVisibilityForImportance */);
         mProcessLauncher = ChildProcessLauncherTestUtils.startForTesting(true /* sandboxed */,
                 commandLine, new FileDescriptorInfo[0], params, true /* doSetupConnection */);
 
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index b97139e3..c114162 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -2817,6 +2817,7 @@
   'DisableVertexAttribArray': {
     'decoder_func': 'DoDisableVertexAttribArray',
     'impl_func': False,
+    'unit_test': False,
   },
   'DrawArrays': {
     'type': 'Custom',
@@ -2846,6 +2847,7 @@
   'EnableVertexAttribArray': {
     'decoder_func': 'DoEnableVertexAttribArray',
     'impl_func': False,
+    'unit_test': False,
   },
   'FenceSync': {
     'type': 'Create',
diff --git a/gpu/command_buffer/service/context_state.cc b/gpu/command_buffer/service/context_state.cc
index 3c71d38..78a77fc 100644
--- a/gpu/command_buffer/service/context_state.cc
+++ b/gpu/command_buffer/service/context_state.cc
@@ -467,16 +467,10 @@
     if (feature_info_->feature_flags().angle_instanced_arrays)
       glVertexAttribDivisorANGLE(attrib_index, attrib->divisor());
 
-    // Never touch vertex attribute 0's state (in particular, never
-    // disable it) when running on desktop GL with compatibility profile
-    // because it will never be re-enabled.
-    if (attrib_index != 0 ||
-        feature_info_->gl_version_info().BehavesLikeGLES()) {
-      if (attrib->enabled()) {
-        glEnableVertexAttribArray(attrib_index);
-      } else {
-        glDisableVertexAttribArray(attrib_index);
-      }
+    if (attrib->enabled_in_driver()) {
+      glEnableVertexAttribArray(attrib_index);
+    } else {
+      glDisableVertexAttribArray(attrib_index);
     }
   }
 }
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 49eef3a..c2ab579 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -3339,7 +3339,7 @@
     // We have to enable vertex array 0 on GL with compatibility profile or it
     // won't render. Note that ES or GL with core profile does not have this
     // issue.
-    glEnableVertexAttribArray(0);
+    state_.vertex_attrib_manager->SetDriverVertexAttribEnabled(0, true);
   }
   glGenBuffersARB(1, &attrib_0_buffer_id_);
   glBindBuffer(GL_ARRAY_BUFFER, attrib_0_buffer_id_);
@@ -5760,7 +5760,7 @@
 
   for (uint32_t i = 0; i < group_->max_vertex_attribs(); ++i) {
     if (i != 0)  // Never disable attribute 0
-      glDisableVertexAttribArray(i);
+      state_.vertex_attrib_manager->SetDriverVertexAttribEnabled(i, false);
     if (features().angle_instanced_arrays)
       glVertexAttribDivisorANGLE(i, 0);
   }
@@ -6111,7 +6111,7 @@
 void GLES2DecoderImpl::DoDisableVertexAttribArray(GLuint index) {
   if (state_.vertex_attrib_manager->Enable(index, false)) {
     if (index != 0 || gl_version_info().BehavesLikeGLES()) {
-      glDisableVertexAttribArray(index);
+      state_.vertex_attrib_manager->SetDriverVertexAttribEnabled(index, false);
     }
   } else {
     LOCAL_SET_GL_ERROR(
@@ -6320,7 +6320,7 @@
 
 void GLES2DecoderImpl::DoEnableVertexAttribArray(GLuint index) {
   if (state_.vertex_attrib_manager->Enable(index, true)) {
-    glEnableVertexAttribArray(index);
+    state_.vertex_attrib_manager->SetDriverVertexAttribEnabled(index, true);
   } else {
     LOCAL_SET_GL_ERROR(
         GL_INVALID_VALUE, "glEnableVertexAttribArray", "index out of range");
@@ -10118,11 +10118,8 @@
   // when running on desktop GL with compatibility profile because it will
   // never be re-enabled.
   if (attrib_index != 0 || gl_version_info().BehavesLikeGLES()) {
-    if (attrib->enabled()) {
-      glEnableVertexAttribArray(attrib_index);
-    } else {
-      glDisableVertexAttribArray(attrib_index);
-    }
+    state_.vertex_attrib_manager->SetDriverVertexAttribEnabled(
+        attrib_index, attrib->enabled());
   }
 }
 
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
index 23e41af..dd9df69 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h
@@ -536,15 +536,6 @@
   EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
 }
 
-TEST_P(GLES2DecoderTest1, DisableVertexAttribArrayValidArgs) {
-  EXPECT_CALL(*gl_, DisableVertexAttribArray(1));
-  SpecializedSetup<cmds::DisableVertexAttribArray, 0>(true);
-  cmds::DisableVertexAttribArray cmd;
-  cmd.Init(1);
-  EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
-  EXPECT_EQ(GL_NO_ERROR, GetGLError());
-}
-
 TEST_P(GLES2DecoderTest1, EnableValidArgs) {
   SetupExpectationsForEnableDisable(GL_BLEND, true);
   SpecializedSetup<cmds::Enable, 0>(true);
@@ -572,15 +563,6 @@
   EXPECT_EQ(GL_INVALID_ENUM, GetGLError());
 }
 
-TEST_P(GLES2DecoderTest1, EnableVertexAttribArrayValidArgs) {
-  EXPECT_CALL(*gl_, EnableVertexAttribArray(1));
-  SpecializedSetup<cmds::EnableVertexAttribArray, 0>(true);
-  cmds::EnableVertexAttribArray cmd;
-  cmd.Init(1);
-  EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
-  EXPECT_EQ(GL_NO_ERROR, GetGLError());
-}
-
 TEST_P(GLES3DecoderTest1, FenceSyncValidArgs) {
   const GLsync kNewServiceIdGLuint = reinterpret_cast<GLsync>(kNewServiceId);
   EXPECT_CALL(*gl_, FenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0))
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
index 9094ab0..8cfa0a4 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
@@ -51,6 +51,54 @@
 
 using namespace cmds;
 
+TEST_P(GLES2DecoderTest, DisableVertexAttribArrayValidArgs) {
+  SetDriverVertexAttribEnabled(1, false);
+  SpecializedSetup<cmds::DisableVertexAttribArray, 0>(true);
+  cmds::DisableVertexAttribArray cmd;
+  cmd.Init(1);
+  EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+  EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
+
+TEST_P(GLES2DecoderTest, EnableVertexAttribArrayValidArgs) {
+  SetDriverVertexAttribEnabled(1, true);
+  SpecializedSetup<cmds::EnableVertexAttribArray, 0>(true);
+  cmds::EnableVertexAttribArray cmd;
+  cmd.Init(1);
+  EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+  EXPECT_EQ(GL_NO_ERROR, GetGLError());
+}
+
+TEST_P(GLES2DecoderWithShaderTest, EnabledVertexAttribArrayIsDisabledIfUnused) {
+  SetupExpectationsForApplyingDefaultDirtyState();
+
+  // Set up and enable attribs 0, 1, 2
+  SetupAllNeededVertexBuffers();
+  // Enable attrib 3, and verify it's called in the driver
+  {
+    EXPECT_CALL(*gl_, EnableVertexAttribArray(3))
+        .Times(1)
+        .RetiresOnSaturation();
+    cmds::EnableVertexAttribArray cmd;
+    cmd.Init(3);
+    EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+  }
+  DoVertexAttribPointer(3, 2, GL_FLOAT, 0, 0);
+
+  // Expect the draw call below causes attrib 3 to be disabled in the driver
+  EXPECT_CALL(*gl_, DisableVertexAttribArray(3)).Times(1).RetiresOnSaturation();
+  // Perform a draw which uses only attributes 0, 1, 2 - not attrib 3
+  {
+    EXPECT_CALL(*gl_, DrawArrays(GL_TRIANGLES, 0, kNumVertices))
+        .Times(1)
+        .RetiresOnSaturation();
+    DrawArrays cmd;
+    cmd.Init(GL_TRIANGLES, 0, kNumVertices);
+    EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
+    EXPECT_EQ(GL_NO_ERROR, GetGLError());
+  }
+}
+
 TEST_P(GLES2DecoderWithShaderTest, GetVertexAttribPointervSucceeds) {
   const GLuint kOffsetToTestFor = sizeof(float) * 4;
   const GLuint kIndexToTest = 1;
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
index 3d8d53dc..4d3b826 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -278,9 +278,7 @@
   AddExpectationsForBindVertexArrayOES();
 
   if (!group_->feature_info()->gl_version_info().BehavesLikeGLES()) {
-    EXPECT_CALL(*gl_, EnableVertexAttribArray(0))
-        .Times(1)
-        .RetiresOnSaturation();
+    SetDriverVertexAttribEnabled(0, true);
   }
   static GLuint attrib_0_id[] = {
     kServiceAttrib0BufferId,
@@ -1974,10 +1972,26 @@
   }
 }
 
+void GLES2DecoderTestBase::SetDriverVertexAttribEnabled(GLint index,
+                                                        bool enable) {
+  DCHECK(index < static_cast<GLint>(attribs_enabled_.size()));
+  bool already_enabled = attribs_enabled_[index];
+  if (already_enabled != enable) {
+    attribs_enabled_[index] = enable;
+    if (enable) {
+      EXPECT_CALL(*gl_, EnableVertexAttribArray(index))
+          .Times(1)
+          .RetiresOnSaturation();
+    } else {
+      EXPECT_CALL(*gl_, DisableVertexAttribArray(index))
+          .Times(1)
+          .RetiresOnSaturation();
+    }
+  }
+}
+
 void GLES2DecoderTestBase::DoEnableVertexAttribArray(GLint index) {
-  EXPECT_CALL(*gl_, EnableVertexAttribArray(index))
-      .Times(1)
-      .RetiresOnSaturation();
+  SetDriverVertexAttribEnabled(index, true);
   cmds::EnableVertexAttribArray cmd;
   cmd.Init(index);
   EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
index f73234d..adcef852 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h
@@ -8,6 +8,7 @@
 #include <stddef.h>
 #include <stdint.h>
 
+#include <array>
 #include <memory>
 
 #include "base/message_loop/message_loop.h"
@@ -383,6 +384,7 @@
 
   void DoEnableDisable(GLenum cap, bool enable);
 
+  void SetDriverVertexAttribEnabled(GLint index, bool enable);
   void DoEnableVertexAttribArray(GLint index);
 
   void DoBufferData(GLenum target, GLsizei size);
@@ -723,6 +725,8 @@
 
   int shader_language_version_;
 
+  std::array<bool, kNumVertexAttribs> attribs_enabled_ = {};
+
  private:
   // MockGLStates is used to track GL states and emulate driver
   // behaviors on top of MockGLInterface.
diff --git a/gpu/command_buffer/service/vertex_attrib_manager.cc b/gpu/command_buffer/service/vertex_attrib_manager.cc
index 30d3fa1..5d395ba 100644
--- a/gpu/command_buffer/service/vertex_attrib_manager.cc
+++ b/gpu/command_buffer/service/vertex_attrib_manager.cc
@@ -29,6 +29,7 @@
 VertexAttrib::VertexAttrib()
     : index_(0),
       enabled_(false),
+      enabled_in_driver_(false),
       size_(4),
       type_(GL_FLOAT),
       offset_(0),
@@ -38,8 +39,7 @@
       divisor_(0),
       integer_(GL_FALSE),
       is_client_side_array_(false),
-      list_(NULL) {
-}
+      list_(NULL) {}
 
 VertexAttrib::VertexAttrib(const VertexAttrib& other) = default;
 
@@ -210,6 +210,16 @@
     }
     const Program::VertexAttrib* attrib_info =
         current_program->GetAttribInfoByLocation(attrib->index());
+
+    // Make sure that every attrib in enabled_vertex_attribs_ is really enabled
+    // in the driver, if AND ONLY IF it is consumed by the current shader
+    // program. (Note that since the containing loop is over
+    // enable_vertex_attribs_, not all vertex attribs, it doesn't erroneously
+    // enable any attribs that should be disabled.)
+    // This is for http://crbug.com/756293 but also subsumes some workaround
+    // code for use_client_side_arrays_for_stream_buffers.
+    SetDriverVertexAttribEnabled(attrib->index(), attrib_info != nullptr);
+
     if (attrib_info) {
       divisor0 |= (attrib->divisor() == 0);
       have_enabled_active_attribs = true;
@@ -224,7 +234,6 @@
         return false;
       }
       if (use_client_side_arrays_for_stream_buffers) {
-        glEnableVertexAttribArray(attrib->index());
         if (buffer->IsClientSideArray()) {
           if (current_buffer_id != 0) {
             current_buffer_id = 0;
@@ -257,18 +266,6 @@
               ptr);
         }
       }
-    } else {
-      // This attrib is not used in the current program.
-      if (use_client_side_arrays_for_stream_buffers) {
-        // Disable client side arrays for unused attributes else we'll
-        // read bad memory
-        if (buffer->IsClientSideArray()) {
-          // Don't disable attrib 0 since it's special.
-          if (attrib->index() > 0) {
-            glDisableVertexAttribArray(attrib->index());
-          }
-        }
-      }
     }
   }
 
diff --git a/gpu/command_buffer/service/vertex_attrib_manager.h b/gpu/command_buffer/service/vertex_attrib_manager.h
index 4a2796b..832896f 100644
--- a/gpu/command_buffer/service/vertex_attrib_manager.h
+++ b/gpu/command_buffer/service/vertex_attrib_manager.h
@@ -78,6 +78,8 @@
     return enabled_;
   }
 
+  bool enabled_in_driver() const { return enabled_in_driver_; }
+
   // Find the maximum vertex accessed, accounting for instancing.
   GLuint MaxVertexAccessed(GLsizei primcount,
                            GLuint max_vertex_accessed) const {
@@ -136,6 +138,9 @@
   // Whether or not this attribute is enabled.
   bool enabled_;
 
+  // Whether or not this attribute is actually enabled in the driver.
+  bool enabled_in_driver_;
+
   // number of components (1, 2, 3, 4)
   GLint size_;
 
@@ -209,6 +214,20 @@
     attrib_base_type_mask_[loc / 16] |= base_type << shift_bits;
   }
 
+  void SetDriverVertexAttribEnabled(GLuint index, bool enable) {
+    DCHECK_LT(index, vertex_attribs_.size());
+    VertexAttrib& attrib = vertex_attribs_[index];
+
+    if (enable != attrib.enabled_in_driver_) {
+      attrib.enabled_in_driver_ = enable;
+      if (enable) {
+        glEnableVertexAttribArray(index);
+      } else {
+        glDisableVertexAttribArray(index);
+      }
+    }
+  }
+
   const std::vector<uint32_t>& attrib_base_type_mask() const {
     return attrib_base_type_mask_;
   }
diff --git a/gpu/ipc/service/direct_composition_child_surface_win.cc b/gpu/ipc/service/direct_composition_child_surface_win.cc
index bc02f90c..1a7a6a3 100644
--- a/gpu/ipc/service/direct_composition_child_surface_win.cc
+++ b/gpu/ipc/service/direct_composition_child_surface_win.cc
@@ -113,7 +113,8 @@
     desc.Stereo = FALSE;
     desc.SampleDesc.Count = 1;
     desc.BufferCount = 2;
-    desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+    desc.BufferUsage =
+        DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT;
     desc.Scaling = DXGI_SCALING_STRETCH;
     desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
     desc.AlphaMode = alpha_mode;
diff --git a/gpu/ipc/service/direct_composition_surface_win_unittest.cc b/gpu/ipc/service/direct_composition_surface_win_unittest.cc
index dc7199e..1327690 100644
--- a/gpu/ipc/service/direct_composition_surface_win_unittest.cc
+++ b/gpu/ipc/service/direct_composition_surface_win_unittest.cc
@@ -472,6 +472,32 @@
     DestroySurface(std::move(surface_));
   }
 
+  void PixelTestCopyTexture(bool layers_enabled) {
+    if (!CheckIfDCSupported())
+      return;
+    InitializeSurface();
+    surface_->SetEnableDCLayers(layers_enabled);
+    gfx::Size window_size(100, 100);
+
+    scoped_refptr<gl::GLContext> context = gl::init::CreateGLContext(
+        nullptr, surface_.get(), gl::GLContextAttribs());
+    EXPECT_TRUE(surface_->Resize(window_size, 1.0,
+                                 gl::GLSurface::ColorSpace::UNSPECIFIED, true));
+
+    EXPECT_TRUE(surface_->SetDrawRectangle(gfx::Rect(0, 0, 100, 100)));
+    EXPECT_TRUE(context->MakeCurrent(surface_.get()));
+
+    Sleep(1000);
+
+    GLuint texture = 0;
+    glGenTextures(1, &texture);
+    glBindTexture(GL_TEXTURE_2D, texture);
+    glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0, 0, 100, 100, 0);
+
+    context = nullptr;
+    DestroySurface(std::move(surface_));
+  }
+
   TestPlatformDelegate platform_delegate_;
   TestImageTransportSurfaceDelegate delegate_;
   ui::WinWindow window_;
@@ -486,6 +512,14 @@
   PixelTestSwapChain(false);
 }
 
+TEST_F(DirectCompositionPixelTest, CopyTextureFromSurfaceWithLayersEnabled) {
+  PixelTestCopyTexture(true);
+}
+
+TEST_F(DirectCompositionPixelTest, CopyTextureFromSurfaceWithLayersDisabled) {
+  PixelTestCopyTexture(false);
+}
+
 bool AreColorsSimilar(int a, int b) {
   // The precise colors may differ depending on the video processor, so allow
   // a margin for error.
diff --git a/ios/chrome/app/application_delegate/url_opener_unittest.mm b/ios/chrome/app/application_delegate/url_opener_unittest.mm
index 13c8b09f..1bb857f 100644
--- a/ios/chrome/app/application_delegate/url_opener_unittest.mm
+++ b/ios/chrome/app/application_delegate/url_opener_unittest.mm
@@ -20,6 +20,7 @@
 #import "ios/chrome/test/base/scoped_block_swizzler.h"
 #import "ios/testing/ocmock_complex_type_helper.h"
 #import "net/base/mac/url_conversions.h"
+#include "testing/gtest_mac.h"
 #include "testing/platform_test.h"
 #import "third_party/ocmock/OCMock/OCMock.h"
 #include "third_party/ocmock/gtest_support.h"
@@ -369,8 +370,8 @@
       id<TabOpening> tabOpener, id<StartupInformation> startupInformation) {
     hasBeenCalled = YES;
     EXPECT_EQ([url absoluteString], [urlArg absoluteString]);
-    EXPECT_EQ(@"com.apple.mobilesafari",
-              options[UIApplicationOpenURLOptionsSourceApplicationKey]);
+    EXPECT_NSEQ(@"com.apple.mobilesafari",
+                options[UIApplicationOpenURLOptionsSourceApplicationKey]);
     EXPECT_EQ(startupInformationMock, startupInformation);
     EXPECT_EQ(tabOpenerMock, tabOpener);
     return YES;
@@ -481,8 +482,8 @@
       id<TabOpening> tabOpener, id<StartupInformation> startupInformation) {
     hasBeenCalled = YES;
     EXPECT_EQ([url absoluteString], [urlArg absoluteString]);
-    EXPECT_EQ(@"com.apple.mobilesafari",
-              options[UIApplicationOpenURLOptionsSourceApplicationKey]);
+    EXPECT_NSEQ(@"com.apple.mobilesafari",
+                options[UIApplicationOpenURLOptionsSourceApplicationKey]);
     EXPECT_EQ(startupInformationMock, startupInformation);
     EXPECT_EQ(tabOpenerMock, tabOpener);
     return YES;
diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm
index c4afca3..61a7157 100644
--- a/ios/chrome/app/main_controller.mm
+++ b/ios/chrome/app/main_controller.mm
@@ -1446,6 +1446,19 @@
                  completion:nil];
 }
 
+- (void)showReportAnIssue {
+  if (_settingsNavigationController)
+    return;
+  _settingsNavigationController =
+      [SettingsNavigationController newUserFeedbackController:_mainBrowserState
+                                                     delegate:self
+                                           feedbackDataSource:self];
+  [[self topPresentedViewController]
+      presentViewController:_settingsNavigationController
+                   animated:YES
+                 completion:nil];
+}
+
 #pragma mark - chromeExecuteCommand
 
 - (IBAction)chromeExecuteCommand:(id)sender {
@@ -1455,11 +1468,6 @@
     case IDC_OPEN_URL:
       [self openUrl:base::mac::ObjCCast<OpenUrlCommand>(sender)];
       break;
-    case IDC_REPORT_AN_ISSUE: {
-      dispatch_async(dispatch_get_main_queue(), ^{
-        [self showReportAnIssue];
-      });
-    } break;
     case IDC_SHOW_SIGNIN_IOS: {
       ShowSigninCommand* command =
           base::mac::ObjCCastStrict<ShowSigninCommand>(sender);
@@ -1980,19 +1988,6 @@
                  completion:nil];
 }
 
-- (void)showReportAnIssue {
-  if (_settingsNavigationController)
-    return;
-  _settingsNavigationController =
-      [SettingsNavigationController newUserFeedbackController:_mainBrowserState
-                                                     delegate:self
-                                           feedbackDataSource:self];
-  [[self topPresentedViewController]
-      presentViewController:_settingsNavigationController
-                   animated:YES
-                 completion:nil];
-}
-
 - (void)showSyncEncryptionPassphrase {
   if (_settingsNavigationController)
     return;
diff --git a/ios/chrome/browser/chrome_url_constants.cc b/ios/chrome/browser/chrome_url_constants.cc
index 3c9c345..a17ad67 100644
--- a/ios/chrome/browser/chrome_url_constants.cc
+++ b/ios/chrome/browser/chrome_url_constants.cc
@@ -9,7 +9,6 @@
 #include "base/macros.h"
 
 const char kChromeUIScheme[] = "chrome";
-const char kDummyExtensionScheme[] = ":no-extension-scheme:";
 
 const char kChromeUIBookmarksURL[] = "chrome://bookmarks/";
 const char kChromeUIChromeURLsURL[] = "chrome://chrome-urls/";
diff --git a/ios/chrome/browser/chrome_url_constants.h b/ios/chrome/browser/chrome_url_constants.h
index dfe96394..47d7ad5 100644
--- a/ios/chrome/browser/chrome_url_constants.h
+++ b/ios/chrome/browser/chrome_url_constants.h
@@ -17,7 +17,6 @@
 // kChromeUIScheme defined in content/public/common/url_constants.h until Chrome
 // on iOS stops depending on //content downstream.
 extern const char kChromeUIScheme[];
-extern const char kDummyExtensionScheme[];
 
 // chrome: URLs (including schemes). Should be kept in sync with the
 // URL components below.
diff --git a/ios/chrome/browser/content_settings/cookie_settings_factory.cc b/ios/chrome/browser/content_settings/cookie_settings_factory.cc
index 346c3e6..421f50f 100644
--- a/ios/chrome/browser/content_settings/cookie_settings_factory.cc
+++ b/ios/chrome/browser/content_settings/cookie_settings_factory.cc
@@ -9,11 +9,12 @@
 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h"
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
-#include "ios/chrome/browser/chrome_url_constants.h"
 #include "ios/chrome/browser/content_settings/host_content_settings_map_factory.h"
 
 namespace ios {
 
+const char kDummyExtensionScheme[] = ":no-extension-scheme:";
+
 // static
 scoped_refptr<content_settings::CookieSettings>
 CookieSettingsFactory::GetForBrowserState(
diff --git a/ios/chrome/browser/experimental_flags.mm b/ios/chrome/browser/experimental_flags.mm
index 2a0e737b..4ddf9d2 100644
--- a/ios/chrome/browser/experimental_flags.mm
+++ b/ios/chrome/browser/experimental_flags.mm
@@ -31,7 +31,6 @@
 
 namespace {
 
-NSString* const kEnableNewClearBrowsingDataUI = @"EnableNewClearBrowsingDataUI";
 NSString* const kEnableStartupCrash = @"EnableStartupCrash";
 NSString* const kEnableViewCopyPasswords = @"EnableViewCopyPasswords";
 NSString* const kFirstRunForceEnabled = @"FirstRunForceEnabled";
@@ -106,11 +105,9 @@
 #endif  // CHROMIUM_BUILD
 }
 
+// TODO(crbug.com/760084): Remove this method and replace with base::Feature or
+// remove it all.
 bool IsNewClearBrowsingDataUIEnabled() {
-  NSString* countersFlag = [[NSUserDefaults standardUserDefaults]
-      objectForKey:kEnableNewClearBrowsingDataUI];
-  if ([countersFlag isEqualToString:@"Enabled"])
-    return true;
   return false;
 }
 
diff --git a/ios/chrome/browser/ios_chrome_main_parts.mm b/ios/chrome/browser/ios_chrome_main_parts.mm
index 4b5d75f8..f04eb86 100644
--- a/ios/chrome/browser/ios_chrome_main_parts.mm
+++ b/ios/chrome/browser/ios_chrome_main_parts.mm
@@ -38,7 +38,6 @@
 #include "ios/chrome/browser/browser_state/chrome_browser_state_manager.h"
 #include "ios/chrome/browser/chrome_paths.h"
 #include "ios/chrome/browser/chrome_switches.h"
-#include "ios/chrome/browser/chrome_url_constants.h"
 #import "ios/chrome/browser/first_run/first_run.h"
 #include "ios/chrome/browser/install_time_util.h"
 #include "ios/chrome/browser/ios_chrome_field_trials.h"
@@ -155,8 +154,7 @@
 
   // ContentSettingsPattern need to be initialized before creating the
   // ChromeBrowserState.
-  ContentSettingsPattern::SetNonWildcardDomainNonPortScheme(
-      kDummyExtensionScheme);
+  ContentSettingsPattern::SetNonWildcardDomainNonPortSchemes(nullptr, 0);
 
   // Ensure ClipboadRecentContentIOS is created.
   ClipboardRecentContent::SetInstance(CreateClipboardRecentContentIOS());
diff --git a/ios/chrome/browser/passwords/BUILD.gn b/ios/chrome/browser/passwords/BUILD.gn
index 2cc0846..2f174bb 100644
--- a/ios/chrome/browser/passwords/BUILD.gn
+++ b/ios/chrome/browser/passwords/BUILD.gn
@@ -7,8 +7,12 @@
 source_set("passwords") {
   configs += [ "//build/config/compiler:enable_arc" ]
   sources = [
+    "credential_manager.h",
+    "credential_manager.mm",
     "credential_manager_features.cc",
     "credential_manager_features.h",
+    "credential_manager_util.h",
+    "credential_manager_util.mm",
     "ios_chrome_password_manager_client.h",
     "ios_chrome_password_manager_client.mm",
     "ios_chrome_password_manager_driver.h",
@@ -98,6 +102,7 @@
   configs += [ "//build/config/compiler:enable_arc" ]
   testonly = true
   sources = [
+    "credential_manager_util_unittest.cc",
     "password_controller_js_unittest.mm",
     "password_controller_off_the_record_unittest.mm",
     "password_controller_unittest.mm",
diff --git a/ios/chrome/browser/passwords/credential_manager.h b/ios/chrome/browser/passwords/credential_manager.h
new file mode 100644
index 0000000..ea64084
--- /dev/null
+++ b/ios/chrome/browser/passwords/credential_manager.h
@@ -0,0 +1,55 @@
+// 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 IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_H_
+#define IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_H_
+
+#include "components/password_manager/core/browser/credential_manager_impl.h"
+
+namespace credential_manager {
+
+// Owned by PasswordController. It is responsible for registering and handling
+// callbacks for JS methods |navigator.credentials.*|.
+// TODO(crbug.com/435047): Implement JSCredentialManager responsible for
+// sending results back to website. Expected flow of CredentialManager class:
+// 0. Add script command callbacks, initialize JSCredentialManager
+// 1. A command is sent from JavaScript to the browser.
+// 2. HandleScriptCommand is called, it parses the message and constructs a
+//     OnceCallback to be passed as parameter to proper CredentialManagerImpl
+//     method. |requestId| field from received JS message is bound to
+//     constructed OnceCallback.
+// 3. CredentialManagerImpl method is invoked, performs some logic with
+//     PasswordStore, calls passed OnceCallback with result.
+// 4. The OnceCallback uses JSCredentialManager to send result back to the
+//     website.
+class CredentialManager {
+ public:
+  explicit CredentialManager(password_manager::PasswordManagerClient* client);
+  ~CredentialManager();
+
+ private:
+  // HandleScriptCommand parses JSON message and invokes Get, Store or
+  // PreventSilentAccess on CredentialManagerImpl.
+  bool HandleScriptCommand(const base::DictionaryValue& json,
+                           const GURL& origin_url,
+                           bool user_is_interacting);
+
+  // Passed as callback to CredentialManagerImpl::Get.
+  void SendGetResponse(
+      int request_id,
+      password_manager::CredentialManagerError error,
+      const base::Optional<password_manager::CredentialInfo>& info);
+  // Passed as callback to CredentialManagerImpl::PreventSilentAccess.
+  void SendPreventSilentAccessResponse(int request_id);
+  // Passed as callback to CredentialManagerImpl::Store.
+  void SendStoreResponse(int request_id);
+
+  password_manager::CredentialManagerImpl impl_;
+
+  DISALLOW_COPY_AND_ASSIGN(CredentialManager);
+};
+
+}  // namespace credential_manager
+
+#endif  // IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_H_
diff --git a/ios/chrome/browser/passwords/credential_manager.mm b/ios/chrome/browser/passwords/credential_manager.mm
new file mode 100644
index 0000000..a5244d942
--- /dev/null
+++ b/ios/chrome/browser/passwords/credential_manager.mm
@@ -0,0 +1,92 @@
+// 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.
+
+#import "ios/chrome/browser/passwords/credential_manager.h"
+
+#import "base/mac/bind_objc_block.h"
+#include "ios/chrome/browser/passwords/credential_manager_util.h"
+
+using password_manager::CredentialManagerError;
+using password_manager::CredentialInfo;
+using password_manager::CredentialType;
+using password_manager::CredentialMediationRequirement;
+
+namespace credential_manager {
+
+CredentialManager::CredentialManager(
+    password_manager::PasswordManagerClient* client)
+    : impl_(client) {
+  // TODO(crbug.com/435047): Register a script command callback for prefix
+  // "credentials" and HandleScriptCommand method.
+}
+
+CredentialManager::~CredentialManager() {}
+
+bool CredentialManager::HandleScriptCommand(const base::DictionaryValue& json,
+                                            const GURL& origin_url,
+                                            bool user_is_interacting) {
+  // TODO(crbug.com/435047): Check if context is secure.
+  std::string command;
+  if (!json.GetString("command", &command)) {
+    DLOG(ERROR) << "RECEIVED BAD json - NO VALID 'command' FIELD";
+    return false;
+  }
+
+  int request_id;
+  if (!json.GetInteger("requestId", &request_id)) {
+    DLOG(ERROR) << "RECEIVED BAD json - NO VALID 'requestId' FIELD";
+    return false;
+  }
+
+  if (command == "credentials.get") {
+    CredentialMediationRequirement mediation;
+    if (!ParseMediationRequirement(json, &mediation)) {
+      // TODO(crbug.com/435047): Reject promise with a TypeError.
+      return false;
+    }
+    bool include_passwords;
+    if (!ParseIncludePasswords(json, &include_passwords)) {
+      // TODO(crbug.com/435047): Reject promise with a TypeError.
+      return false;
+    }
+    std::vector<GURL> federations;
+    if (!ParseFederations(json, &federations)) {
+      // TODO(crbug.com/435047): Reject promise with a TypeError.
+      return false;
+    }
+    impl_.Get(mediation, include_passwords, federations,
+              base::BindOnce(&CredentialManager::SendGetResponse,
+                             base::Unretained(this), request_id));
+    return true;
+  }
+  if (command == "credentials.store") {
+    CredentialInfo credential;
+    if (!ParseCredentialDictionary(json, &credential)) {
+      // TODO(crbug.com/435047): Reject promise with a TypeError.
+      return false;
+    }
+    impl_.Store(credential,
+                base::BindOnce(&CredentialManager::SendStoreResponse,
+                               base::Unretained(this), request_id));
+    return true;
+  }
+  if (command == "credentials.preventSilentAccess") {
+    impl_.PreventSilentAccess(
+        base::BindOnce(&CredentialManager::SendPreventSilentAccessResponse,
+                       base::Unretained(this), request_id));
+    return true;
+  }
+  return false;
+}
+
+void CredentialManager::SendGetResponse(
+    int request_id,
+    CredentialManagerError error,
+    const base::Optional<CredentialInfo>& info) {}
+
+void CredentialManager::SendPreventSilentAccessResponse(int request_id) {}
+
+void CredentialManager::SendStoreResponse(int request_id) {}
+
+}  // namespace credential_manager
diff --git a/ios/chrome/browser/passwords/credential_manager_util.h b/ios/chrome/browser/passwords/credential_manager_util.h
new file mode 100644
index 0000000..b01d156
--- /dev/null
+++ b/ios/chrome/browser/passwords/credential_manager_util.h
@@ -0,0 +1,87 @@
+// 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 IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_UTIL_H_
+#define IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_UTIL_H_
+
+#include "base/values.h"
+#include "components/password_manager/core/common/credential_manager_types.h"
+
+namespace credential_manager {
+
+// Keys for obtaining common Credential's fields from DictionaryValue
+// representing the Credential. Keys below correspond to JavaScript
+// Credential object fields as follows:
+// kCredentialIdKey   : |id|
+// kCredentialTypeKey : |type|
+// kCredentialNameKey : |name|
+// kCredentialIconKey : |iconURL|
+// Values under those keys are all strings.
+extern const char kCredentialIdKey[];
+extern const char kCredentialTypeKey[];
+extern const char kCredentialNameKey[];
+extern const char kCredentialIconKey[];
+
+// Key for obtaining PasswordCredential's own property |password| from
+// DictionaryValue representing the JavaScript object. Value under this key
+// is a string.
+extern const char kPasswordCredentialPasswordKey[];
+
+// Key for obtaining FederatedCredential's own property |provider| from
+// DictionaryValue representing the JavaScript object. Value under this key
+// is a string.
+extern const char kFederatedCredentialProviderKey[];
+
+// Keys below correspond to JavaScript CredentialRequestOptions object fields
+// as follows:
+// kCredentialRequestMediationKey : |mediation|
+// kCredentialRequestPasswordKey  : |password|
+// kCredentialRequestProvidersKey : |providers|
+// |mediation| value is a string, |password| value is a boolean and |providers|
+// value should is a list of strings.
+extern const char kCredentialRequestMediationKey[];
+extern const char kCredentialRequestPasswordKey[];
+extern const char kCredentialRequestProvidersKey[];
+
+// Strings denoting acceptable CredentialRequestOptions.mediation values,
+// respectively "silent", "required", "optional". Use them by comparing to
+// obtained |mediation| value.
+extern const char kMediationRequirementSilent[];
+extern const char kMediationRequirementRequired[];
+extern const char kMediationRequirementOptional[];
+
+// Strings denoting acceptable Credential.type values, respectively
+// "PasswordCredential", "FederatedCredential". Use them by comparing to
+// obtained |type| value.
+extern const char kCredentialTypePassword[];
+extern const char kCredentialTypeFederated[];
+
+// TODO(crbug.com/435048): For ParseCredentialDictionary method, add ability to
+// pass an error message back to the caller.
+
+// Returns value of Parse* methods below is false if |json| is invalid, which
+// means it is missing required fields, contains fields of wrong type or
+// unexpected values. Otherwise return value is true.
+// Parses |mediation| field of JavaScript object CredentialRequestOptions.
+bool ParseMediationRequirement(
+    const base::DictionaryValue& json,
+    password_manager::CredentialMediationRequirement* mediation);
+// Parses |password| field of JavaScript object CredentialRequestOptions.
+bool ParseIncludePasswords(const base::DictionaryValue& json,
+                           bool* include_passwords);
+// Parses |providers| field of JavaScript object
+// FederatedCredentialRequestOptions into list of GURLs.
+bool ParseFederations(const base::DictionaryValue& json,
+                      std::vector<GURL>* federations);
+// Parses |type| field from JavaScript Credential object into CredentialType.
+bool ParseCredentialType(const base::DictionaryValue& json,
+                         password_manager::CredentialType* credential_type);
+// Parses dictionary representing JavaScript Credential object into
+// CredentialInfo.
+bool ParseCredentialDictionary(const base::DictionaryValue& json,
+                               password_manager::CredentialInfo* credential);
+
+}  // namespace credential_manager
+
+#endif  // IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_UTIL_H_
diff --git a/ios/chrome/browser/passwords/credential_manager_util.mm b/ios/chrome/browser/passwords/credential_manager_util.mm
new file mode 100644
index 0000000..f3d13464
--- /dev/null
+++ b/ios/chrome/browser/passwords/credential_manager_util.mm
@@ -0,0 +1,157 @@
+// 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 "ios/chrome/browser/passwords/credential_manager_util.h"
+
+#import "ios/web/public/origin_util.h"
+#include "url/origin.h"
+
+using password_manager::CredentialManagerError;
+using password_manager::CredentialInfo;
+using password_manager::CredentialType;
+using password_manager::CredentialMediationRequirement;
+
+namespace credential_manager {
+
+const char kCredentialIdKey[] = "id";
+const char kCredentialTypeKey[] = "type";
+const char kCredentialNameKey[] = "name";
+const char kCredentialIconKey[] = "iconURL";
+const char kPasswordCredentialPasswordKey[] = "password";
+const char kFederatedCredentialProviderKey[] = "provider";
+const char kCredentialRequestMediationKey[] = "mediation";
+const char kCredentialRequestPasswordKey[] = "password";
+const char kCredentialRequestProvidersKey[] = "providers";
+const char kMediationRequirementSilent[] = "silent";
+const char kMediationRequirementRequired[] = "required";
+const char kMediationRequirementOptional[] = "optional";
+const char kCredentialTypePassword[] = "PasswordCredential";
+const char kCredentialTypeFederated[] = "FederatedCredential";
+
+bool ParseMediationRequirement(const base::DictionaryValue& json,
+                               CredentialMediationRequirement* mediation) {
+  if (!json.HasKey(kCredentialRequestMediationKey)) {
+    *mediation = CredentialMediationRequirement::kOptional;
+    return true;
+  }
+  std::string mediation_str;
+  if (!json.GetString(kCredentialRequestMediationKey, &mediation_str)) {
+    // Dictionary contains |mediation| field but it is not a valid string.
+    return false;
+  }
+  if (mediation_str == kMediationRequirementSilent) {
+    *mediation = CredentialMediationRequirement::kSilent;
+    return true;
+  }
+  if (mediation_str == kMediationRequirementRequired) {
+    *mediation = CredentialMediationRequirement::kRequired;
+    return true;
+  }
+  if (mediation_str == kMediationRequirementOptional) {
+    *mediation = CredentialMediationRequirement::kOptional;
+    return true;
+  }
+  // |mediation| value is not in {"silent", "required", "optional"}.
+  // Dictionary is invalid then.
+  return false;
+}
+
+bool ParseIncludePasswords(const base::DictionaryValue& json,
+                           bool* include_passwords) {
+  if (!json.HasKey(kCredentialRequestPasswordKey)) {
+    *include_passwords = false;
+    return true;
+  }
+  return json.GetBoolean(kCredentialRequestPasswordKey, include_passwords);
+}
+
+bool ParseFederations(const base::DictionaryValue& json,
+                      std::vector<GURL>* federations) {
+  federations->clear();
+  if (!json.HasKey(kCredentialRequestProvidersKey)) {
+    // No |providers| list.
+    return true;
+  }
+  const base::ListValue* lst = nullptr;
+  if (!json.GetList(kCredentialRequestProvidersKey, &lst)) {
+    // Dictionary has |providers| field but it is not a list. That means
+    // dictionary is invalid.
+    return false;
+  }
+  for (size_t i = 0; i < lst->GetSize(); i++) {
+    std::string s;
+    if (!lst->GetString(i, &s)) {
+      // Element of |providers| is invalid string.
+      return false;
+    }
+    GURL gurl(s);
+    if (gurl.is_valid()) {
+      // Skip the invalid URLs. See
+      // https://w3c.github.io/webappsec-credential-management/#provider-identification
+      federations->push_back(std::move(gurl));
+    }
+  }
+  return true;
+}
+
+bool ParseCredentialType(const base::DictionaryValue& json,
+                         CredentialType* credential_type) {
+  std::string str;
+  if (!json.GetString(kCredentialTypeKey, &str)) {
+    // Credential must contain |type|
+    return false;
+  }
+  if (str == kCredentialTypePassword) {
+    *credential_type = CredentialType::CREDENTIAL_TYPE_PASSWORD;
+    return true;
+  }
+  if (str == kCredentialTypeFederated) {
+    *credential_type = CredentialType::CREDENTIAL_TYPE_FEDERATED;
+    return true;
+  }
+  return false;
+}
+
+bool ParseCredentialDictionary(const base::DictionaryValue& json,
+                               CredentialInfo* credential) {
+  if (!json.GetString(kCredentialIdKey, &credential->id)) {
+    // |id| is required.
+    return false;
+  }
+  json.GetString(kCredentialNameKey, &credential->name);
+  std::string iconUrl;
+  if (json.GetString(kCredentialIconKey, &iconUrl) && !iconUrl.empty()) {
+    credential->icon = GURL(iconUrl);
+    if (!credential->icon.is_valid() ||
+        !web::IsOriginSecure(credential->icon)) {
+      // |iconUrl| is either not a valid URL or not a secure URL.
+      return false;
+    }
+  }
+  if (!ParseCredentialType(json, &credential->type)) {
+    // Credential has invalid |type|
+    return false;
+  }
+  if (credential->type == CredentialType::CREDENTIAL_TYPE_PASSWORD) {
+    if (!json.GetString(kPasswordCredentialPasswordKey,
+                        &credential->password) ||
+        credential->password.empty()) {
+      // |password| field is required for PasswordCredential.
+      return false;
+    }
+  }
+  if (credential->type == CredentialType::CREDENTIAL_TYPE_FEDERATED) {
+    std::string federation;
+    json.GetString(kFederatedCredentialProviderKey, &federation);
+    if (!GURL(federation).is_valid()) {
+      // |provider| field must be a valid URL. See
+      // https://w3c.github.io/webappsec-credential-management/#provider-identification
+      return false;
+    }
+    credential->federation = url::Origin(GURL(federation));
+  }
+  return true;
+}
+
+}  // namespace credential_manager
diff --git a/ios/chrome/browser/passwords/credential_manager_util_unittest.cc b/ios/chrome/browser/passwords/credential_manager_util_unittest.cc
new file mode 100644
index 0000000..8d9b899
--- /dev/null
+++ b/ios/chrome/browser/passwords/credential_manager_util_unittest.cc
@@ -0,0 +1,245 @@
+// 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 "ios/chrome/browser/passwords/credential_manager_util.h"
+
+#include "base/memory/ptr_util.h"
+#include "base/strings/string16.h"
+#include "base/strings/utf_string_conversions.h"
+#include "base/values.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/platform_test.h"
+
+using password_manager::CredentialInfo;
+using password_manager::CredentialMediationRequirement;
+using password_manager::CredentialType;
+
+namespace credential_manager {
+
+namespace {
+
+constexpr char kTestWebOrigin[] = "https://example.com/";
+constexpr char kTestIconUrl[] = "https://www.google.com/favicon.ico";
+
+base::DictionaryValue BuildExampleCredential() {
+  base::DictionaryValue json;
+  json.SetString(kCredentialIdKey, "john@doe.com");
+  json.SetString(kCredentialNameKey, "John Doe");
+  json.SetString(kCredentialIconKey, kTestIconUrl);
+  return json;
+}
+
+// Builds a dictionary representing valid PasswordCredential.
+base::DictionaryValue BuildExampleValidPasswordCredential() {
+  base::DictionaryValue json = BuildExampleCredential();
+  json.SetString(kPasswordCredentialPasswordKey, "admin123");
+  json.SetString(kCredentialTypeKey, kCredentialTypePassword);
+  return json;
+}
+
+// Builds a dictionary representing valid FederatedCredential.
+base::DictionaryValue BuildExampleValidFederatedCredential() {
+  base::DictionaryValue json = BuildExampleCredential();
+  json.SetString(kFederatedCredentialProviderKey, kTestWebOrigin);
+  json.SetString(kCredentialTypeKey, kCredentialTypeFederated);
+  return json;
+}
+
+}  // namespace
+
+// Checks that CredentialRequestOptions.password field is parsed
+// correctly.
+TEST(CredentialManagerUtilTest, ParseIncludePasswords) {
+  base::DictionaryValue json;
+  bool include_passwords = true;
+
+  // Default value should be false.
+  EXPECT_TRUE(ParseIncludePasswords(json, &include_passwords));
+  EXPECT_FALSE(include_passwords);
+
+  // true/false values should be parsed correctly.
+  json.SetBoolean(kCredentialRequestPasswordKey, true);
+  EXPECT_TRUE(ParseIncludePasswords(json, &include_passwords));
+  EXPECT_TRUE(include_passwords);
+
+  json.SetBoolean(kCredentialRequestPasswordKey, false);
+  EXPECT_TRUE(ParseIncludePasswords(json, &include_passwords));
+  EXPECT_FALSE(include_passwords);
+
+  // Test against random string.
+  json.SetString(kCredentialRequestPasswordKey, "yes");
+  EXPECT_FALSE(ParseIncludePasswords(json, &include_passwords));
+}
+
+// Checks that CredentialRequestOptions.mediation field is parsed
+// correctly.
+TEST(CredentialManagerUtilTest, ParseMediationRequirement) {
+  base::DictionaryValue json;
+  CredentialMediationRequirement mediation;
+
+  // Default value should be kOptional.
+  EXPECT_TRUE(ParseMediationRequirement(json, &mediation));
+  EXPECT_EQ(CredentialMediationRequirement::kOptional, mediation);
+
+  // "silent"/"optional"/"required" values should be parsed correctly.
+  json.SetString(kCredentialRequestMediationKey, kMediationRequirementSilent);
+  EXPECT_TRUE(ParseMediationRequirement(json, &mediation));
+  EXPECT_EQ(CredentialMediationRequirement::kSilent, mediation);
+
+  json.SetString(kCredentialRequestMediationKey, kMediationRequirementOptional);
+  EXPECT_TRUE(ParseMediationRequirement(json, &mediation));
+  EXPECT_EQ(CredentialMediationRequirement::kOptional, mediation);
+
+  json.SetString(kCredentialRequestMediationKey, kMediationRequirementRequired);
+  EXPECT_TRUE(ParseMediationRequirement(json, &mediation));
+  EXPECT_EQ(CredentialMediationRequirement::kRequired, mediation);
+
+  // Test against random string.
+  json.SetString(kCredentialRequestMediationKey, "dksjl");
+  EXPECT_FALSE(ParseMediationRequirement(json, &mediation));
+}
+
+// Checks that Credential.type field is parsed correctly.
+TEST(CredentialManagerUtilTest, ParseCredentialType) {
+  base::DictionaryValue json;
+  CredentialType type = CredentialType::CREDENTIAL_TYPE_EMPTY;
+
+  // JS object Credential must contain |type| field.
+  EXPECT_FALSE(ParseCredentialType(json, &type));
+
+  // "PasswordCredential"/"FederatedCredential" values should be parsed
+  // correctly.
+  json.SetString(kCredentialTypeKey, kCredentialTypePassword);
+  EXPECT_TRUE(ParseCredentialType(json, &type));
+  EXPECT_EQ(CredentialType::CREDENTIAL_TYPE_PASSWORD, type);
+
+  json.SetString(kCredentialTypeKey, kCredentialTypeFederated);
+  EXPECT_TRUE(ParseCredentialType(json, &type));
+  EXPECT_EQ(CredentialType::CREDENTIAL_TYPE_FEDERATED, type);
+
+  // "Credential" is not a valid type.
+  json.SetString(kCredentialTypeKey, "Credential");
+  EXPECT_FALSE(ParseCredentialType(json, &type));
+
+  // Empty string is also not allowed.
+  json.SetString(kCredentialTypeKey, "");
+  EXPECT_FALSE(ParseCredentialType(json, &type));
+}
+
+// Checks that common fields of PasswordCredential and FederatedCredential are
+// parsed correctly.
+TEST(CredentialManagerUtilTest, ParseCommonCredentialFields) {
+  // Building PasswordCredential because ParseCredentialDictionary for
+  // Credential containing only common fields would return false.
+  base::DictionaryValue json = BuildExampleValidPasswordCredential();
+  CredentialInfo credential;
+
+  // Valid dictionary should be parsed correctly and ParseCredentialDictionary
+  // should return true.
+  EXPECT_TRUE(ParseCredentialDictionary(json, &credential));
+  EXPECT_EQ(base::ASCIIToUTF16("john@doe.com"), credential.id);
+  EXPECT_EQ(base::ASCIIToUTF16("John Doe"), credential.name);
+  EXPECT_EQ(GURL(kTestIconUrl), credential.icon);
+
+  // |id| field is required.
+  json.Remove(kCredentialIdKey, nullptr);
+  EXPECT_FALSE(ParseCredentialDictionary(json, &credential));
+
+  // |iconURL| field is not required.
+  json = BuildExampleValidPasswordCredential();
+  json.Remove(kCredentialIconKey, nullptr);
+  EXPECT_TRUE(ParseCredentialDictionary(json, &credential));
+
+  // If Credential has |iconURL| field, it must be a valid URL.
+  json.SetString(kCredentialIconKey, "not a valid url");
+  EXPECT_FALSE(ParseCredentialDictionary(json, &credential));
+
+  // If Credential has |iconURL| field, it must be a secure URL.
+  json.SetString(kCredentialIconKey, "http://example.com");
+  EXPECT_FALSE(ParseCredentialDictionary(json, &credential));
+
+  // Check that empty |iconURL| field is treated as no |iconURL| field.
+  json.SetString(kCredentialIconKey, "");
+  EXPECT_TRUE(ParseCredentialDictionary(json, &credential));
+}
+
+// Checks that |password| and |type| fields of PasswordCredential are parsed
+// correctly.
+TEST(CredentialManagerUtilTest, ParsePasswordCredential) {
+  base::DictionaryValue json = BuildExampleValidPasswordCredential();
+  CredentialInfo credential;
+
+  // Valid dictionary should be parsed correctly and ParseCredentialDictionary
+  // should return true.
+  EXPECT_TRUE(ParseCredentialDictionary(json, &credential));
+  EXPECT_EQ(CredentialType::CREDENTIAL_TYPE_PASSWORD, credential.type);
+  EXPECT_EQ(base::ASCIIToUTF16("admin123"), credential.password);
+
+  // |password| field is required.
+  json.Remove(kPasswordCredentialPasswordKey, nullptr);
+  EXPECT_FALSE(ParseCredentialDictionary(json, &credential));
+
+  // |password| field is cannot be an empty string.
+  json.SetString(kPasswordCredentialPasswordKey, "");
+  EXPECT_FALSE(ParseCredentialDictionary(json, &credential));
+}
+
+// Checks that |provider| and |type| fields of FederatedCredential are parsed
+// correctly.
+TEST(CredentialManagerUtilTest, ParseFederatedCredential) {
+  base::DictionaryValue json = BuildExampleValidFederatedCredential();
+  CredentialInfo credential;
+
+  // Valid dictionary should be parsed correctly and ParseCredentialDictionary
+  // should return true.
+  EXPECT_TRUE(ParseCredentialDictionary(json, &credential));
+  EXPECT_EQ(CredentialType::CREDENTIAL_TYPE_FEDERATED, credential.type);
+  EXPECT_EQ(GURL(kTestWebOrigin), credential.federation.GetURL());
+
+  // |provider| field is required.
+  json.Remove(kFederatedCredentialProviderKey, nullptr);
+  EXPECT_FALSE(ParseCredentialDictionary(json, &credential));
+
+  // |provider| field cannot be an empty string.
+  json.SetString(kFederatedCredentialProviderKey, "");
+  EXPECT_FALSE(ParseCredentialDictionary(json, &credential));
+
+  // |provider| field must be a valid URL.
+  json.SetString(kFederatedCredentialProviderKey, "not a valid URL");
+  EXPECT_FALSE(ParseCredentialDictionary(json, &credential));
+}
+
+// Checks that |providers| field of FederatedCredentialRequestOptions is
+// parsed correctly.
+TEST(CredentialManagerUtilTest, ParseFederations) {
+  base::DictionaryValue json;
+
+  // Build example valid |providers| list.
+  std::unique_ptr<base::ListValue> list_ptr =
+      base::MakeUnique<base::ListValue>();
+  list_ptr->GetList().emplace_back(kTestWebOrigin);
+  list_ptr->GetList().emplace_back("https://google.com");
+  json.SetList(kCredentialRequestProvidersKey, std::move(list_ptr));
+  std::vector<GURL> federations;
+
+  // Check that parsing valid |providers| results in correct |federations| list.
+  EXPECT_TRUE(ParseFederations(json, &federations));
+  EXPECT_THAT(federations, testing::ElementsAre(GURL(kTestWebOrigin),
+                                                GURL("https://google.com")));
+
+  // ParseFederations should skip invalid URLs.
+  list_ptr = base::MakeUnique<base::ListValue>();
+  list_ptr->GetList().emplace_back(kTestWebOrigin);
+  list_ptr->GetList().emplace_back("not a valid url");
+  json.SetList(kCredentialRequestProvidersKey, std::move(list_ptr));
+  EXPECT_TRUE(ParseFederations(json, &federations));
+  EXPECT_THAT(federations, testing::ElementsAre(GURL(kTestWebOrigin)));
+
+  // If |providers| is not a valid list, ParseFederations should return false.
+  json.SetString(kCredentialRequestProvidersKey, kTestWebOrigin);
+  EXPECT_FALSE(ParseFederations(json, &federations));
+}
+
+}  // namespace credential_manager
diff --git a/ios/chrome/browser/resources/Settings.bundle/Experimental.plist b/ios/chrome/browser/resources/Settings.bundle/Experimental.plist
index 923fe93..a9e89ba 100644
--- a/ios/chrome/browser/resources/Settings.bundle/Experimental.plist
+++ b/ios/chrome/browser/resources/Settings.bundle/Experimental.plist
@@ -172,28 +172,6 @@
 		</dict>
 		<dict>
 			<key>Type</key>
-			<string>PSMultiValueSpecifier</string>
-			<key>Title</key>
-			<string>New Clear Browsing Data UI</string>
-			<key>Key</key>
-			<string>EnableNewClearBrowsingDataUI</string>
-			<key>DefaultValue</key>
-			<string></string>
-			<key>Values</key>
-			<array>
-				<string></string>
-				<string>Disabled</string>
-				<string>Enabled</string>
-			</array>
-			<key>Titles</key>
-			<array>
-				<string>Default</string>
-				<string>Disabled</string>
-				<string>Enabled</string>
-			</array>
-		</dict>
-		<dict>
-			<key>Type</key>
 			<string>PSToggleSwitchSpecifier</string>
 			<key>Title</key>
 			<string>Enable New FeedbackKit</string>
@@ -312,40 +290,6 @@
 			<key>Type</key>
 			<string>PSGroupSpecifier</string>
 			<key>Title</key>
-			<string>Web APIs</string>
-		</dict>
-		<dict>
-			<key>Type</key>
-			<string>PSGroupSpecifier</string>
-			<key>Title</key>
-			<string>CSChromium</string>
-		</dict>
-		<dict>
-			<key>Type</key>
-			<string>PSMultiValueSpecifier</string>
-			<key>Title</key>
-			<string>Enable Bottom Toolbar</string>
-			<key>Key</key>
-			<string>EnableBottomToolbar</string>
-			<key>DefaultValue</key>
-			<string></string>
-			<key>Values</key>
-			<array>
-				<string></string>
-				<string>Enabled</string>
-				<string>Disabled</string>
-			</array>
-			<key>Titles</key>
-			<array>
-				<string>Default</string>
-				<string>Enabled</string>
-				<string>Disabled</string>
-			</array>
-		</dict>
-		<dict>
-			<key>Type</key>
-			<string>PSGroupSpecifier</string>
-			<key>Title</key>
 			<string>Extra Flags (one per line)</string>
 		</dict>
 		<dict>
diff --git a/ios/chrome/browser/search_engines/template_url_service_client_impl.cc b/ios/chrome/browser/search_engines/template_url_service_client_impl.cc
index 5e8f3c2e..76b973f0a 100644
--- a/ios/chrome/browser/search_engines/template_url_service_client_impl.cc
+++ b/ios/chrome/browser/search_engines/template_url_service_client_impl.cc
@@ -68,12 +68,6 @@
   }
 }
 
-bool TemplateURLServiceClientImpl::IsOmniboxExtensionURL(
-    const std::string& url) {
-  // iOS does not support extensions.
-  return false;
-}
-
 void TemplateURLServiceClientImpl::OnURLVisited(
     history::HistoryService* history_service,
     ui::PageTransition transition,
diff --git a/ios/chrome/browser/search_engines/template_url_service_client_impl.h b/ios/chrome/browser/search_engines/template_url_service_client_impl.h
index 59c3fe1..af46d11 100644
--- a/ios/chrome/browser/search_engines/template_url_service_client_impl.h
+++ b/ios/chrome/browser/search_engines/template_url_service_client_impl.h
@@ -35,7 +35,6 @@
                                    TemplateURLID id,
                                    const base::string16& term) override;
   void AddKeywordGeneratedVisit(const GURL& url) override;
-  bool IsOmniboxExtensionURL(const std::string& url) override;
 
   // history::HistoryServiceObserver:
   void OnURLVisited(history::HistoryService* history_service,
diff --git a/ios/chrome/browser/tabs/tab.mm b/ios/chrome/browser/tabs/tab.mm
index 6b7d2cd4..8be272e 100644
--- a/ios/chrome/browser/tabs/tab.mm
+++ b/ios/chrome/browser/tabs/tab.mm
@@ -1729,6 +1729,7 @@
            initWithMode:repeatedFailure ? SadTabViewMode::FEEDBACK
                                         : SadTabViewMode::RELOAD
       navigationManager:tabHelper->web_state()->GetNavigationManager()];
+  sadTabview.dispatcher = self.dispatcher;
   CRWContentView* contentView =
       [[CRWGenericContentView alloc] initWithView:sadTabview];
   tabHelper->web_state()->ShowTransientContentView(contentView);
diff --git a/ios/chrome/browser/ui/authentication/BUILD.gn b/ios/chrome/browser/ui/authentication/BUILD.gn
index ec9bc7d3..37034c1 100644
--- a/ios/chrome/browser/ui/authentication/BUILD.gn
+++ b/ios/chrome/browser/ui/authentication/BUILD.gn
@@ -179,3 +179,17 @@
   ]
   libs = [ "XCTest.framework" ]
 }
+
+source_set("eg_test_support") {
+  configs += [ "//build/config/compiler:enable_arc" ]
+  testonly = true
+  sources = [
+    "signin_promo_view_earlgrey_utils.h",
+    "signin_promo_view_earlgrey_utils.mm",
+  ]
+  deps = [
+    ":authentication_ui",
+    "//ios/chrome/test/earl_grey:test_support",
+    "//ios/third_party/earl_grey",
+  ]
+}
diff --git a/ios/chrome/browser/ui/authentication/signin_promo_item.mm b/ios/chrome/browser/ui/authentication/signin_promo_item.mm
index 6853699..cc574fbe1 100644
--- a/ios/chrome/browser/ui/authentication/signin_promo_item.mm
+++ b/ios/chrome/browser/ui/authentication/signin_promo_item.mm
@@ -21,6 +21,9 @@
 - (instancetype)initWithType:(NSInteger)type {
   self = [super initWithType:type];
   if (self) {
+    // |accessibilityIdentifier| is passed to the cell in -[CollectionViewItem
+    // configureCell:].
+    self.accessibilityIdentifier = @"SigninPromoCell";
     self.cellClass = [SigninPromoCell class];
   }
   return self;
diff --git a/ios/chrome/browser/ui/authentication/signin_promo_view_earlgrey_utils.h b/ios/chrome/browser/ui/authentication/signin_promo_view_earlgrey_utils.h
new file mode 100644
index 0000000..da7f9a7
--- /dev/null
+++ b/ios/chrome/browser/ui/authentication/signin_promo_view_earlgrey_utils.h
@@ -0,0 +1,20 @@
+// 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 IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGN_PROMO_VIEW_EARLGREY_UTILS_H_
+#define IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGN_PROMO_VIEW_EARLGREY_UTILS_H_
+
+#import "ios/chrome/browser/ui/authentication/signin_promo_view.h"
+
+@interface SignPromoViewEarlgreyUtils : NSObject
+
+// Checks that the sign-in promo view is visible using the right mode.
++ (void)checkSigninPromoVisibleWithMode:(SigninPromoViewMode)mode;
+
+// Checks that the sign-in promo view is not visible.
++ (void)checkSigninPromoNotVisible;
+
+@end
+
+#endif  // IOS_CHROME_BROWSER_UI_AUTHENTICATION_SIGN_PROMO_VIEW_EARLGREY_UTILS_H_
diff --git a/ios/chrome/browser/ui/authentication/signin_promo_view_earlgrey_utils.mm b/ios/chrome/browser/ui/authentication/signin_promo_view_earlgrey_utils.mm
new file mode 100644
index 0000000..a19fb1ca
--- /dev/null
+++ b/ios/chrome/browser/ui/authentication/signin_promo_view_earlgrey_utils.mm
@@ -0,0 +1,62 @@
+// 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.
+
+#import "ios/chrome/browser/ui/authentication/signin_promo_view_earlgrey_utils.h"
+
+#import <EarlGrey/EarlGrey.h>
+
+#import "ios/chrome/test/earl_grey/chrome_matchers.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+using chrome_test_util::PrimarySignInButton;
+using chrome_test_util::SecondarySignInButton;
+
+@implementation SignPromoViewEarlgreyUtils
+
++ (void)checkSigninPromoVisibleWithMode:(SigninPromoViewMode)mode {
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(
+                                   grey_accessibilityID(kSigninPromoViewId),
+                                   grey_sufficientlyVisible(), nil)]
+      assertWithMatcher:grey_notNil()];
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(PrimarySignInButton(),
+                                          grey_sufficientlyVisible(), nil)]
+      assertWithMatcher:grey_notNil()];
+  switch (mode) {
+    case SigninPromoViewModeColdState:
+      [[EarlGrey
+          selectElementWithMatcher:grey_allOf(SecondarySignInButton(),
+                                              grey_sufficientlyVisible(), nil)]
+          assertWithMatcher:grey_nil()];
+      break;
+    case SigninPromoViewModeWarmState:
+      [[EarlGrey
+          selectElementWithMatcher:grey_allOf(SecondarySignInButton(),
+                                              grey_sufficientlyVisible(), nil)]
+          assertWithMatcher:grey_notNil()];
+      break;
+  }
+}
+
++ (void)checkSigninPromoNotVisible {
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(
+                                   grey_accessibilityID(kSigninPromoViewId),
+                                   grey_sufficientlyVisible(), nil)]
+      assertWithMatcher:grey_nil()];
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(PrimarySignInButton(),
+                                          grey_sufficientlyVisible(), nil)]
+      assertWithMatcher:grey_nil()];
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(SecondarySignInButton(),
+                                          grey_sufficientlyVisible(), nil)]
+      assertWithMatcher:grey_nil()];
+}
+
+@end
diff --git a/ios/chrome/browser/ui/bookmarks/BUILD.gn b/ios/chrome/browser/ui/bookmarks/BUILD.gn
index 861f6c8..45d3f4cb 100644
--- a/ios/chrome/browser/ui/bookmarks/BUILD.gn
+++ b/ios/chrome/browser/ui/bookmarks/BUILD.gn
@@ -195,6 +195,7 @@
     "//ios/chrome/browser/browser_state",
     "//ios/chrome/browser/ui",
     "//ios/chrome/browser/ui/authentication:authentication_ui",
+    "//ios/chrome/browser/ui/authentication:eg_test_support",
     "//ios/chrome/browser/ui/commands",
     "//ios/chrome/browser/ui/toolbar",
     "//ios/chrome/browser/ui/tools_menu",
diff --git a/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm b/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm
index 6c56fd0..be0bbfb 100644
--- a/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm
+++ b/ios/chrome/browser/ui/bookmarks/bookmark_home_view_controller.mm
@@ -193,6 +193,7 @@
                                          style:UIBarButtonItemStyleDone
                                         target:self
                                         action:@selector(navigationBarCancel:)];
+    doneButton.accessibilityIdentifier = @"DONE";
     self.navigationItem.rightBarButtonItem = doneButton;
     self.navigationItem.backBarButtonItem =
         [[UIBarButtonItem alloc] initWithTitle:@""
diff --git a/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm b/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm
index bea273e..0922794d 100644
--- a/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm
+++ b/ios/chrome/browser/ui/bookmarks/bookmarks_egtest.mm
@@ -20,6 +20,7 @@
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
 #include "ios/chrome/browser/pref_names.h"
 #import "ios/chrome/browser/ui/authentication/signin_promo_view.h"
+#import "ios/chrome/browser/ui/authentication/signin_promo_view_earlgrey_utils.h"
 #import "ios/chrome/browser/ui/commands/generic_chrome_command.h"
 #include "ios/chrome/browser/ui/commands/ios_command_ids.h"
 #import "ios/chrome/browser/ui/toolbar/toolbar_controller.h"
@@ -1051,10 +1052,10 @@
   [self setTearDownHandler:^{
     [BookmarksTestCase setPromoAlreadySeen:NO];
   }];
-  // Check that promo is visible.
+  // Check that sign-in promo view is visible.
   [BookmarksTestCase verifyPromoAlreadySeen:NO];
-  [[EarlGrey selectElementWithMatcher:PrimarySignInButton()]
-      assertWithMatcher:grey_sufficientlyVisible()];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeColdState];
 
   // Tap the dismiss button.
   [[EarlGrey
@@ -1062,39 +1063,96 @@
       performAction:grey_tap()];
 
   // Wait until promo is gone.
-  [[EarlGrey selectElementWithMatcher:SecondarySignInButton()]
-      assertWithMatcher:grey_notVisible()];
+  [SignPromoViewEarlgreyUtils checkSigninPromoNotVisible];
 
   // Check that the promo already seen state is updated.
   [BookmarksTestCase verifyPromoAlreadySeen:YES];
 }
 
-// Tests that tapping Sign in on the promo make the Sign in sheet appear and
-// the promo still appears after dismissing the Sign in sheet.
-- (void)testUIPromoSignIn {
+// Tests the tapping on the primary button of sign-in promo view in a cold
+// state makes the sign-in sheet appear, and the promo still appears after
+// dismissing the sheet.
+- (void)testSignInPromoWithColdStateUsingPrimaryButton {
+  [BookmarksTestCase openBookmarks];
+
+  // Check that sign-in promo view are visible.
+  [BookmarksTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeColdState];
+
+  // Tap the primary button.
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(PrimarySignInButton(),
+                                          grey_sufficientlyVisible(), nil)]
+      performAction:grey_tap()];
+  [[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Cancel")]
+      performAction:grey_tap()];
+
+  // Check that the bookmarks UI reappeared and the cell is still here.
+  [BookmarksTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeColdState];
+}
+
+// Tests the tapping on the primary button of sign-in promo view in a warm
+// state makes the confirmaiton sheet appear, and the promo still appears after
+// dismissing the sheet.
+- (void)testSignInPromoWithWarmStateUsingPrimaryButton {
   [BookmarksTestCase setupStandardBookmarks];
   [BookmarksTestCase openTopLevelBookmarksFolder];
 
   // Set up a fake identity.
   ChromeIdentity* identity =
+      [FakeChromeIdentity identityWithEmail:@"fakefoo@gmail.com"
+                                     gaiaID:@"fakefoopassword"
+                                       name:@"Fake Foo"];
+  ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
+      identity);
+
+  // Check that sign-in promo view are visible.
+  [BookmarksTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState];
+
+  // Tap the secondary button.
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(PrimarySignInButton(),
+                                          grey_sufficientlyVisible(), nil)]
+      performAction:grey_tap()];
+
+  // Tap the UNDO button.
+  [[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"UNDO")]
+      performAction:grey_tap()];
+
+  // Check that the bookmarks UI reappeared and the cell is still here.
+  [BookmarksTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState];
+}
+
+// Tests the tapping on the secondary button of sign-in promo view in a warm
+// state makes the sign-in sheet appear, and the promo still appears after
+// dismissing the sheet.
+- (void)testSignInPromoWithWarmStateUsingSecondaryButton {
+  [BookmarksTestCase setupStandardBookmarks];
+  [BookmarksTestCase openTopLevelBookmarksFolder];
+  // Set up a fake identity.
+  ChromeIdentity* identity =
       [FakeChromeIdentity identityWithEmail:@"fakefoo@egmail.com"
                                      gaiaID:@"fakefoopassword"
                                        name:@"Fake Foo"];
   ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
       identity);
 
-  // Check that promo is visible.
+  // Check that sign-in promo view are visible.
   [BookmarksTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState];
+
+  // Tap the secondary button.
   [[EarlGrey
       selectElementWithMatcher:grey_allOf(SecondarySignInButton(),
                                           grey_sufficientlyVisible(), nil)]
-      assertWithMatcher:grey_notNil()];
-
-  // Tap the Sign in button.
-  [[EarlGrey
-      selectElementWithMatcher:grey_allOf(grey_accessibilityID(
-                                              kSigninPromoSecondaryButtonId),
-                                          grey_sufficientlyVisible(), nil)]
       performAction:grey_tap()];
 
   // Tap the CANCEL button.
@@ -1104,12 +1162,38 @@
                      uppercaseString])] performAction:grey_tap()];
 
   // Check that the bookmarks UI reappeared and the cell is still here.
-  [[EarlGrey
-      selectElementWithMatcher:grey_allOf(SecondarySignInButton(),
-                                          grey_sufficientlyVisible(), nil)]
-      assertWithMatcher:grey_notNil()];
-
   [BookmarksTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState];
+}
+
+// Tests that the sign-in promo should not be shown after been shown 19 times.
+- (void)testAutomaticSigninPromoDismiss {
+  ios::ChromeBrowserState* browser_state =
+      chrome_test_util::GetOriginalBrowserState();
+  PrefService* prefs = browser_state->GetPrefs();
+  prefs->SetInteger(prefs::kIosBookmarkSigninPromoDisplayedCount, 19);
+  [BookmarksTestCase openBookmarks];
+  // Check the sign-in promo view is visible.
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeColdState];
+  // Check the sign-in promo will not be shown anymore.
+  [BookmarksTestCase verifyPromoAlreadySeen:YES];
+  GREYAssertEqual(
+      20, prefs->GetInteger(prefs::kIosBookmarkSigninPromoDisplayedCount),
+      @"Should have incremented the display count");
+  // Close the bookmark view and open it again.
+  if (IsCompact()) {
+    [[EarlGrey selectElementWithMatcher:BookmarksDoneButton()]
+        performAction:grey_tap()];
+    [BookmarksTestCase openBookmarks];
+  } else {
+    [BookmarksTestCase closeAllTabs];
+    chrome_test_util::OpenNewTab();
+  }
+  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
+  // Check that the sign-in promo is not visible anymore.
+  [SignPromoViewEarlgreyUtils checkSigninPromoNotVisible];
 }
 
 // Tests that all elements on the bookmarks landing page are accessible.
diff --git a/ios/chrome/browser/ui/bookmarks/bookmarks_new_generation_egtest.mm b/ios/chrome/browser/ui/bookmarks/bookmarks_new_generation_egtest.mm
index 0c00147..910da23 100644
--- a/ios/chrome/browser/ui/bookmarks/bookmarks_new_generation_egtest.mm
+++ b/ios/chrome/browser/ui/bookmarks/bookmarks_new_generation_egtest.mm
@@ -17,6 +17,7 @@
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
 #include "ios/chrome/browser/pref_names.h"
 #import "ios/chrome/browser/ui/authentication/signin_promo_view.h"
+#import "ios/chrome/browser/ui/authentication/signin_promo_view_earlgrey_utils.h"
 #include "ios/chrome/browser/ui/tools_menu/tools_menu_constants.h"
 #import "ios/chrome/browser/ui/uikit_ui_util.h"
 #include "ios/chrome/grit/ios_strings.h"
@@ -53,6 +54,12 @@
   return ButtonWithAccessibilityLabel(@"Back");
 }
 
+// Matcher for the Back button on the bookmarks UI.
+id<GREYMatcher> BookmarksDoneButton() {
+  return grey_allOf(grey_accessibilityID(@"DONE"), grey_sufficientlyVisible(),
+                    nil);
+}
+
 // Bookmark integration tests for Chrome.
 @interface BookmarksNewGenTestCase : ChromeTestCase
 @end
@@ -160,17 +167,16 @@
   [self setTearDownHandler:^{
     [BookmarksNewGenTestCase setPromoAlreadySeen:NO];
   }];
-  // Check that promo is visible.
+  // Check that sign-in promo view is visible.
   [BookmarksNewGenTestCase verifyPromoAlreadySeen:NO];
-  [[EarlGrey selectElementWithMatcher:PrimarySignInButton()]
-      assertWithMatcher:grey_sufficientlyVisible()];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeColdState];
 
   // Go to child node.
   [BookmarksNewGenTestCase openMobileBookmarks];
 
   // Wait until promo is gone.
-  [[EarlGrey selectElementWithMatcher:SecondarySignInButton()]
-      assertWithMatcher:grey_notVisible()];
+  [SignPromoViewEarlgreyUtils checkSigninPromoNotVisible];
 
   // Check that the promo already seen state is not updated.
   [BookmarksNewGenTestCase verifyPromoAlreadySeen:NO];
@@ -201,10 +207,10 @@
   [self setTearDownHandler:^{
     [BookmarksNewGenTestCase setPromoAlreadySeen:NO];
   }];
-  // Check that promo is visible.
+  // Check that sign-in promo view is visible.
   [BookmarksNewGenTestCase verifyPromoAlreadySeen:NO];
-  [[EarlGrey selectElementWithMatcher:PrimarySignInButton()]
-      assertWithMatcher:grey_sufficientlyVisible()];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeColdState];
 
   // Tap the dismiss button.
   [[EarlGrey
@@ -212,16 +218,48 @@
       performAction:grey_tap()];
 
   // Wait until promo is gone.
-  [[EarlGrey selectElementWithMatcher:SecondarySignInButton()]
-      assertWithMatcher:grey_notVisible()];
+  [SignPromoViewEarlgreyUtils checkSigninPromoNotVisible];
 
   // Check that the promo already seen state is updated.
   [BookmarksNewGenTestCase verifyPromoAlreadySeen:YES];
 }
 
-// Tests that tapping Sign in on the promo make the Sign in sheet appear and
-// the promo still appears after dismissing the Sign in sheet.
-- (void)testUIPromoSignIn {
+// Tests the tapping on the primary button of sign-in promo view in a cold
+// state makes the sign-in sheet appear, and the promo still appears after
+// dismissing the sheet.
+- (void)testSignInPromoWithColdStateUsingPrimaryButton {
+  if (IsIPadIdiom()) {
+    EARL_GREY_TEST_DISABLED(@"Test disabled on iPad.");
+  }
+  base::test::ScopedFeatureList scoped_feature_list;
+  scoped_feature_list.InitAndEnableFeature(
+      bookmark_new_generation::features::kBookmarkNewGeneration);
+
+  [BookmarksNewGenTestCase openBookmarks];
+
+  // Check that sign-in promo view are visible.
+  [BookmarksNewGenTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeColdState];
+
+  // Tap the primary button.
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(PrimarySignInButton(),
+                                          grey_sufficientlyVisible(), nil)]
+      performAction:grey_tap()];
+  [[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Cancel")]
+      performAction:grey_tap()];
+
+  // Check that the bookmarks UI reappeared and the cell is still here.
+  [BookmarksNewGenTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeColdState];
+}
+
+// Tests the tapping on the primary button of sign-in promo view in a warm
+// state makes the confirmaiton sheet appear, and the promo still appears after
+// dismissing the sheet.
+- (void)testSignInPromoWithWarmStateUsingPrimaryButton {
   if (IsIPadIdiom()) {
     EARL_GREY_TEST_DISABLED(@"Test disabled on iPad.");
   }
@@ -234,7 +272,7 @@
 
   // Set up a fake identity.
   ChromeIdentity* identity =
-      [FakeChromeIdentity identityWithEmail:@"fakefoo@egmail.com"
+      [FakeChromeIdentity identityWithEmail:@"fakefoo@gmail.com"
                                      gaiaID:@"fakefoopassword"
                                        name:@"Fake Foo"];
   ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
@@ -269,6 +307,81 @@
   [BookmarksNewGenTestCase verifyPromoAlreadySeen:NO];
 }
 
+// Tests the tapping on the secondary button of sign-in promo view in a warm
+// state makes the sign-in sheet appear, and the promo still appears after
+// dismissing the sheet.
+- (void)testSignInPromoWithWarmStateUsingSecondaryButton {
+  if (IsIPadIdiom()) {
+    EARL_GREY_TEST_DISABLED(@"Test disabled on iPad.");
+  }
+  base::test::ScopedFeatureList scoped_feature_list;
+  scoped_feature_list.InitAndEnableFeature(
+      bookmark_new_generation::features::kBookmarkNewGeneration);
+
+  [BookmarksNewGenTestCase setupStandardBookmarks];
+  [BookmarksNewGenTestCase openBookmarks];
+  // Set up a fake identity.
+  ChromeIdentity* identity =
+      [FakeChromeIdentity identityWithEmail:@"fakefoo@egmail.com"
+                                     gaiaID:@"fakefoopassword"
+                                       name:@"Fake Foo"];
+  ios::FakeChromeIdentityService::GetInstanceFromChromeProvider()->AddIdentity(
+      identity);
+
+  // Check that sign-in promo view are visible.
+  [BookmarksNewGenTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState];
+
+  // Tap the secondary button.
+  [[EarlGrey
+      selectElementWithMatcher:grey_allOf(SecondarySignInButton(),
+                                          grey_sufficientlyVisible(), nil)]
+      performAction:grey_tap()];
+
+  // Tap the CANCEL button.
+  [[EarlGrey selectElementWithMatcher:
+                 grey_buttonTitle([l10n_util::GetNSString(
+                     IDS_IOS_ACCOUNT_CONSISTENCY_SETUP_SKIP_BUTTON)
+                     uppercaseString])] performAction:grey_tap()];
+
+  // Check that the bookmarks UI reappeared and the cell is still here.
+  [BookmarksNewGenTestCase verifyPromoAlreadySeen:NO];
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeWarmState];
+}
+
+// Tests that the sign-in promo should not be shown after been shown 19 times.
+- (void)testAutomaticSigninPromoDismiss {
+  if (IsIPadIdiom()) {
+    EARL_GREY_TEST_DISABLED(@"Test disabled on iPad.");
+  }
+  base::test::ScopedFeatureList scoped_feature_list;
+  scoped_feature_list.InitAndEnableFeature(
+      bookmark_new_generation::features::kBookmarkNewGeneration);
+
+  ios::ChromeBrowserState* browser_state =
+      chrome_test_util::GetOriginalBrowserState();
+  PrefService* prefs = browser_state->GetPrefs();
+  prefs->SetInteger(prefs::kIosBookmarkSigninPromoDisplayedCount, 19);
+  [BookmarksNewGenTestCase openBookmarks];
+  // Check the sign-in promo view is visible.
+  [SignPromoViewEarlgreyUtils
+      checkSigninPromoVisibleWithMode:SigninPromoViewModeColdState];
+  // Check the sign-in promo will not be shown anymore.
+  [BookmarksNewGenTestCase verifyPromoAlreadySeen:YES];
+  GREYAssertEqual(
+      20, prefs->GetInteger(prefs::kIosBookmarkSigninPromoDisplayedCount),
+      @"Should have incremented the display count");
+  // Close the bookmark view and open it again.
+  [[EarlGrey selectElementWithMatcher:BookmarksDoneButton()]
+      performAction:grey_tap()];
+  [BookmarksNewGenTestCase openBookmarks];
+  [[GREYUIThreadExecutor sharedInstance] drainUntilIdle];
+  // Check that the sign-in promo is not visible anymore.
+  [SignPromoViewEarlgreyUtils checkSigninPromoNotVisible];
+}
+
 #pragma mark - Helpers
 
 // Navigates to the bookmark manager UI.
diff --git a/ios/chrome/browser/ui/bookmarks/cells/bookmark_parent_folder_item_unittest.mm b/ios/chrome/browser/ui/bookmarks/cells/bookmark_parent_folder_item_unittest.mm
index ffbf1bdc..db831fb 100644
--- a/ios/chrome/browser/ui/bookmarks/cells/bookmark_parent_folder_item_unittest.mm
+++ b/ios/chrome/browser/ui/bookmarks/cells/bookmark_parent_folder_item_unittest.mm
@@ -6,6 +6,7 @@
 
 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "testing/gtest_mac.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
@@ -21,7 +22,7 @@
 
   item.title = @"Foo";
   [item configureCell:cell];
-  EXPECT_EQ(@"Foo", cell.parentFolderNameLabel.text);
+  EXPECT_NSEQ(@"Foo", cell.parentFolderNameLabel.text);
 }
 
 }  // namespace
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 4bcc4ba..77b713c9 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -5099,9 +5099,7 @@
 - (void)userTappedSendFeedback:(UIView*)view {
   base::RecordAction(base::UserMetricsAction("IOSRateThisAppFeedbackChosen"));
   _rateThisAppDialog = nil;
-  GenericChromeCommand* command =
-      [[GenericChromeCommand alloc] initWithTag:IDC_REPORT_AN_ISSUE];
-  [self chromeExecuteCommand:command];
+  [self.dispatcher showReportAnIssue];
 }
 
 - (void)userTappedDismiss:(UIView*)view {
diff --git a/ios/chrome/browser/ui/collection_view/cells/collection_view_item_unittest.mm b/ios/chrome/browser/ui/collection_view/cells/collection_view_item_unittest.mm
index 5642c3b4..2a9534f 100644
--- a/ios/chrome/browser/ui/collection_view/cells/collection_view_item_unittest.mm
+++ b/ios/chrome/browser/ui/collection_view/cells/collection_view_item_unittest.mm
@@ -7,6 +7,7 @@
 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item+collection_view_controller.h"
 #import "ios/third_party/material_components_ios/src/components/CollectionCells/src/MaterialCollectionCells.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "testing/gtest_mac.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
 #error "This file requires ARC support."
@@ -39,7 +40,7 @@
   EXPECT_FALSE([cell accessibilityIdentifier]);
   [item configureCell:cell];
   EXPECT_EQ(UIAccessibilityTraitButton, [cell accessibilityTraits]);
-  EXPECT_EQ(@"test_identifier", [cell accessibilityIdentifier]);
+  EXPECT_NSEQ(@"test_identifier", [cell accessibilityIdentifier]);
 }
 
 }  // namespace
diff --git a/ios/chrome/browser/ui/commands/application_commands.h b/ios/chrome/browser/ui/commands/application_commands.h
index 7094127..b8de1db 100644
--- a/ios/chrome/browser/ui/commands/application_commands.h
+++ b/ios/chrome/browser/ui/commands/application_commands.h
@@ -67,6 +67,9 @@
 // Shows the Save Passwords settings UI.
 - (void)showSavePasswordsSettings;
 
+// Shows the Report an Issue UI.
+- (void)showReportAnIssue;
+
 @end
 
 #endif  // IOS_CHROME_BROWSER_UI_COMMANDS_APPLICATION_COMMANDS_H_
diff --git a/ios/chrome/browser/ui/commands/ios_command_ids.h b/ios/chrome/browser/ui/commands/ios_command_ids.h
index 688735e..eb196f8 100644
--- a/ios/chrome/browser/ui/commands/ios_command_ids.h
+++ b/ios/chrome/browser/ui/commands/ios_command_ids.h
@@ -32,7 +32,6 @@
 #define IDC_REQUEST_MOBILE_SITE                        40922
 #define IDC_CLEAR_BROWSING_DATA_IOS                    40924
 #define IDC_SHOW_MAIL_COMPOSER                         40926
-#define IDC_REPORT_AN_ISSUE                            40936
 #define IDC_RATE_THIS_APP                              40948
 #define IDC_SHOW_SYNC_PASSPHRASE_SETTINGS              40952
 // clang-format on
diff --git a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_header_item.mm b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_header_item.mm
index ae0fac9..9edfecb 100644
--- a/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_header_item.mm
+++ b/ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_header_item.mm
@@ -25,6 +25,7 @@
 - (void)configureCell:(ContentSuggestionsHeaderCell*)cell {
   [super configureCell:cell];
   [cell setHeaderView:self.view];
+  cell.accessibilityIdentifier = @"CSHeaderIdentifier";
 }
 
 @end
diff --git a/ios/chrome/browser/ui/icons/chrome_icon_unittest.mm b/ios/chrome/browser/ui/icons/chrome_icon_unittest.mm
index 1de818d..8ea5bc9 100644
--- a/ios/chrome/browser/ui/icons/chrome_icon_unittest.mm
+++ b/ios/chrome/browser/ui/icons/chrome_icon_unittest.mm
@@ -5,6 +5,7 @@
 #import "ios/chrome/browser/ui/icons/chrome_icon.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "testing/gtest_mac.h"
 #import "third_party/ocmock/OCMock/OCMock.h"
 #import "third_party/ocmock/ocmock_extensions.h"
 #include "ui/base/l10n/l10n_util_mac.h"
@@ -57,8 +58,8 @@
                                           target:mockTarget
                                           action:@selector(doSomething)];
 
-  EXPECT_EQ(@"identifier", barButtonItem.accessibilityIdentifier);
-  EXPECT_EQ(@"label", barButtonItem.accessibilityLabel);
+  EXPECT_NSEQ(@"identifier", barButtonItem.accessibilityIdentifier);
+  EXPECT_NSEQ(@"label", barButtonItem.accessibilityLabel);
   EXPECT_EQ(image.size.width, barButtonItem.image.size.width);
   EXPECT_EQ(image.size.height, barButtonItem.image.size.height);
   EXPECT_EQ(image.scale, barButtonItem.image.scale);
diff --git a/ios/chrome/browser/ui/ntp/most_visited_cell_unittest.mm b/ios/chrome/browser/ui/ntp/most_visited_cell_unittest.mm
index 3c494ef..e47470a 100644
--- a/ios/chrome/browser/ui/ntp/most_visited_cell_unittest.mm
+++ b/ios/chrome/browser/ui/ntp/most_visited_cell_unittest.mm
@@ -3,6 +3,7 @@
 // found in the LICENSE file.
 
 #import "ios/chrome/browser/ui/ntp/most_visited_cell.h"
+#include "testing/gtest_mac.h"
 #include "testing/platform_test.h"
 
 #if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -33,5 +34,5 @@
   CGRect rect = CGRectMake(0, 0, 100, 100);
   cell_ = [[MostVisitedCell alloc] initWithFrame:rect];
   [cell_ setText:title];
-  EXPECT_EQ(title, [cell_ accessibilityLabel]);
+  EXPECT_NSEQ(title, [cell_ accessibilityLabel]);
 }
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_header_view.h b/ios/chrome/browser/ui/ntp/new_tab_page_header_view.h
index 9c3db90a..8289063 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_header_view.h
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_header_view.h
@@ -14,7 +14,7 @@
 // Header view for the Material Design NTP. The header view contains all views
 // that are displayed above the list of most visited sites, which includes the
 // toolbar buttons, Google doodle, and fake omnibox.
-@interface NewTabPageHeaderView : UICollectionReusableView<ToolbarOwner>
+@interface NewTabPageHeaderView : UIView<ToolbarOwner>
 
 // Return the toolbar view;
 @property(nonatomic, readonly) UIView* toolBarView;
diff --git a/ios/chrome/browser/ui/payments/payment_request_coordinator.mm b/ios/chrome/browser/ui/payments/payment_request_coordinator.mm
index d241472..ae3f2dce 100644
--- a/ios/chrome/browser/ui/payments/payment_request_coordinator.mm
+++ b/ios/chrome/browser/ui/payments/payment_request_coordinator.mm
@@ -174,9 +174,12 @@
                                repeats:NO];
   }
 
-  // If a shipping address has been selected and there are available shipping
-  // options, set it as the selected shipping address.
-  if (_pendingShippingAddress && !_paymentRequest->shipping_options().empty()) {
+  // If there are no available shipping options, reset the previously selected
+  // shipping address. Otherwise, if a shipping address had been selected, set
+  // it as the selected shipping address.
+  if (_paymentRequest->shipping_options().empty())
+    _paymentRequest->set_selected_shipping_profile(nullptr);
+  else if (_pendingShippingAddress) {
     _paymentRequest->set_selected_shipping_profile(_pendingShippingAddress);
   }
   _pendingShippingAddress = nil;
diff --git a/ios/chrome/browser/ui/payments/payment_request_manager.mm b/ios/chrome/browser/ui/payments/payment_request_manager.mm
index 1741b82..85578df 100644
--- a/ios/chrome/browser/ui/payments/payment_request_manager.mm
+++ b/ios/chrome/browser/ui/payments/payment_request_manager.mm
@@ -275,6 +275,7 @@
   _paymentRequestJsManager = nil;
   _activeWebStateObserver.reset();
   _activeWebState = webState;
+  [self enableActiveWebState];
 
   if (_activeWebState) {
     _paymentRequestJsManager =
@@ -301,7 +302,7 @@
   if (!enabled) {
     [self cancelRequest];
     [self disableActiveWebState];
-  } else {
+  } else if (!_activeWebStateEnabled) {
     [self enableActiveWebState];
   }
 }
@@ -347,24 +348,28 @@
 }
 
 - (void)enableActiveWebState {
-  if (_activeWebState && !_activeWebStateEnabled) {
-    __weak PaymentRequestManager* weakSelf = self;
-    auto callback = base::BindBlockArc(^bool(const base::DictionaryValue& JSON,
-                                             const GURL& originURL,
-                                             bool userIsInteracting) {
-      // |originURL| and |userIsInteracting| aren't used.
-      return [weakSelf handleScriptCommand:JSON];
-    });
-    _activeWebState->AddScriptCommandCallback(callback, kCommandPrefix);
-    _activeWebStateEnabled = YES;
-  }
+  if (!_activeWebState)
+    return;
+
+  DCHECK(!_activeWebStateEnabled);
+  __weak PaymentRequestManager* weakSelf = self;
+  auto callback =
+      base::BindBlockArc(^bool(const base::DictionaryValue& JSON,
+                               const GURL& originURL, bool userIsInteracting) {
+        // |originURL| and |userIsInteracting| aren't used.
+        return [weakSelf handleScriptCommand:JSON];
+      });
+  _activeWebState->AddScriptCommandCallback(callback, kCommandPrefix);
+  _activeWebStateEnabled = YES;
 }
 
 - (void)disableActiveWebState {
-  if (_activeWebState && _activeWebStateEnabled) {
-    _activeWebState->RemoveScriptCommandCallback(kCommandPrefix);
-    _activeWebStateEnabled = NO;
-  }
+  if (!_activeWebState)
+    return;
+
+  DCHECK(_activeWebStateEnabled);
+  _activeWebState->RemoveScriptCommandCallback(kCommandPrefix);
+  _activeWebStateEnabled = NO;
 }
 
 - (BOOL)handleScriptCommand:(const base::DictionaryValue&)JSONCommand {
@@ -1002,7 +1007,6 @@
   }
 
   [self dismissUIWithCallback:nil];
-  [self enableActiveWebState];
 
   // The lifetime of a PaymentRequest is tied to the WebState it is associated
   // with and the current URL. Therefore, PaymentRequest instances should get
diff --git a/ios/chrome/browser/ui/sad_tab/sad_tab_view.h b/ios/chrome/browser/ui/sad_tab/sad_tab_view.h
index d75ea80..9f9cd15a 100644
--- a/ios/chrome/browser/ui/sad_tab/sad_tab_view.h
+++ b/ios/chrome/browser/ui/sad_tab/sad_tab_view.h
@@ -10,6 +10,8 @@
 #include "base/ios/block_types.h"
 #include "ios/web/public/navigation_manager.h"
 
+@protocol ApplicationCommands;
+
 // Describes the mode of the Sad Tab, whether it should offer an attempt to
 // reload content, or whether it should offer a way to provide feedback.
 enum class SadTabViewMode {
@@ -34,6 +36,9 @@
 // Determines the type of Sad Tab information that will be displayed.
 @property(nonatomic, readonly) SadTabViewMode mode;
 
+// The dispatcher for this view.
+@property(nonatomic, weak) id<ApplicationCommands> dispatcher;
+
 @end
 
 #endif  // IOS_CHROME_BROWSER_UI_SAD_TAB_SAD_TAB_VIEW_H_
diff --git a/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm b/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm
index 2c3b4d2..f9ba470 100644
--- a/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm
+++ b/ios/chrome/browser/ui/sad_tab/sad_tab_view.mm
@@ -12,7 +12,7 @@
 #include "ios/chrome/browser/chrome_url_constants.h"
 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
 #import "ios/chrome/browser/ui/commands/UIKit+ChromeExecuteCommand.h"
-#import "ios/chrome/browser/ui/commands/ios_command_ids.h"
+#import "ios/chrome/browser/ui/commands/application_commands.h"
 #import "ios/chrome/browser/ui/commands/open_url_command.h"
 #include "ios/chrome/browser/ui/rtl_geometry.h"
 #import "ios/chrome/browser/ui/uikit_ui_util.h"
@@ -136,6 +136,7 @@
 @synthesize actionButton = _actionButton;
 @synthesize mode = _mode;
 @synthesize navigationManager = _navigationManager;
+@synthesize dispatcher = _dispatcher;
 
 - (instancetype)initWithMode:(SadTabViewMode)mode
            navigationManager:(web::NavigationManager*)navigationManager {
@@ -579,12 +580,11 @@
       self.navigationManager->Reload(web::ReloadType::NORMAL, true);
       break;
     case SadTabViewMode::FEEDBACK: {
+      DCHECK(self.dispatcher);
       UMA_HISTOGRAM_ENUMERATION(ui_metrics::kSadTabFeedbackHistogramKey,
                                 ui_metrics::SadTabEvent::BUTTON_CLICKED,
                                 ui_metrics::SadTabEvent::MAX_SAD_TAB_EVENT);
-      GenericChromeCommand* command =
-          [[GenericChromeCommand alloc] initWithTag:IDC_REPORT_AN_ISSUE];
-      [self chromeExecuteCommand:command];
+      [self.dispatcher showReportAnIssue];
       break;
     }
   };
diff --git a/ios/chrome/browser/ui/settings/cells/version_item_unittest.mm b/ios/chrome/browser/ui/settings/cells/version_item_unittest.mm
index 1c3f6a6..d618aff 100644
--- a/ios/chrome/browser/ui/settings/cells/version_item_unittest.mm
+++ b/ios/chrome/browser/ui/settings/cells/version_item_unittest.mm
@@ -6,6 +6,7 @@
 
 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "testing/gtest_mac.h"
 
 namespace {
 
@@ -16,7 +17,7 @@
 
   item.text = @"Foo";
   [item configureCell:cell];
-  EXPECT_EQ(@"Foo", cell.textLabel.text);
+  EXPECT_NSEQ(@"Foo", cell.textLabel.text);
 }
 
 }  // namespace
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data_egtest.mm b/ios/chrome/browser/ui/settings/clear_browsing_data_egtest.mm
index eb88566..f4a51640 100644
--- a/ios/chrome/browser/ui/settings/clear_browsing_data_egtest.mm
+++ b/ios/chrome/browser/ui/settings/clear_browsing_data_egtest.mm
@@ -39,7 +39,8 @@
 }
 
 // Test that opening the clear browsing data dialog does not cause a crash.
-- (void)testOpeningClearBrowsingData {
+// TODO(crbug.com/760084): Disabled as the user default do not longer exists
+- (void)DISABLED_testOpeningClearBrowsingData {
   NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
   NSString* oldSetting =
       [defaults stringForKey:@"EnableNewClearBrowsingDataUI"];
diff --git a/ios/chrome/browser/ui/tools_menu/tools_menu_constants.h b/ios/chrome/browser/ui/tools_menu/tools_menu_constants.h
index 0ac2566..1c5fd70 100644
--- a/ios/chrome/browser/ui/tools_menu/tools_menu_constants.h
+++ b/ios/chrome/browser/ui/tools_menu/tools_menu_constants.h
@@ -54,6 +54,7 @@
   TOOLS_CLOSE_ALL_TABS = -13,
   TOOLS_CLOSE_ALL_INCOGNITO_TABS = -14,
   TOOLS_VIEW_SOURCE = -15,
+  TOOLS_REPORT_AN_ISSUE = -16,
 };
 
 #endif  // IOS_CHROME_BROWSER_UI_TOOLS_MENU_TOOLS_MENU_CONSTANTS_H_
diff --git a/ios/chrome/browser/ui/tools_menu/tools_menu_model.mm b/ios/chrome/browser/ui/tools_menu/tools_menu_model.mm
index 018e732..072eeb0 100644
--- a/ios/chrome/browser/ui/tools_menu/tools_menu_model.mm
+++ b/ios/chrome/browser/ui/tools_menu/tools_menu_model.mm
@@ -67,7 +67,8 @@
     @selector(showHistory),               ToolbarTypeWebAll,
     0,                                    nil },
   { IDS_IOS_OPTIONS_REPORT_AN_ISSUE,      kToolsMenuReportAnIssueId,
-    IDC_REPORT_AN_ISSUE, nullptr,         ToolbarTypeAll,
+    TOOLS_REPORT_AN_ISSUE,
+    @selector(showReportAnIssue),       ToolbarTypeAll,
     0,                                    nil },
   { IDS_IOS_TOOLS_MENU_FIND_IN_PAGE,      kToolsMenuFindInPageId,
     IDC_FIND, nullptr,                    ToolbarTypeWebAll,
diff --git a/ios/chrome/browser/ui/tools_menu/tools_popup_controller.mm b/ios/chrome/browser/ui/tools_menu/tools_popup_controller.mm
index e304449f..20789b1 100644
--- a/ios/chrome/browser/ui/tools_menu/tools_popup_controller.mm
+++ b/ios/chrome/browser/ui/tools_menu/tools_popup_controller.mm
@@ -211,7 +211,7 @@
     case TOOLS_STOP_ITEM:
       base::RecordAction(UserMetricsAction("MobileMenuStop"));
       break;
-    case IDC_REPORT_AN_ISSUE:
+    case TOOLS_REPORT_AN_ISSUE:
       self.containerView.hidden = YES;
       base::RecordAction(UserMetricsAction("MobileMenuReportAnIssue"));
       break;
diff --git a/ios/chrome/browser/web/resources/credential_manager.js b/ios/chrome/browser/web/resources/credential_manager.js
index c052609..72857b0 100644
--- a/ios/chrome/browser/web/resources/credential_manager.js
+++ b/ios/chrome/browser/web/resources/credential_manager.js
@@ -14,10 +14,6 @@
 // Implement the JavaScript API and types according to the spec:
 // https://w3c.github.io/webappsec-credential-management
 
-// TODO(crbug.com/435046) After the constructors have been implemented,
-// make sure tests at https://w3c-test.org/credential-management/idl.https.html
-// are passing (except the ones which invoke exposed methods)
-
 // TODO(crbug.com/435046) After get, store, preventSilentAccess are
 // implemented app-side, make sure that all tests at
 // https://w3c-test.org/credential-management/idl.https.html
@@ -116,21 +112,96 @@
  * PasswordCredential interace, for more information see
  * https://w3c.github.io/webappsec-credential-management/#passwordcredential-interface
  * @extends {Credential}
+ * @param {PasswordCredentialInit} init Either a PasswordCredentialData or
+ *     HTMLFormElement to create PasswordCredential from.
  * @constructor
  */
-// TODO(crbug.com/435046) Implement two constructors: from
-// HTMLFormElement and from PasswordCredentialData
-function PasswordCredential() {
+function PasswordCredential(init) {
+  // TODO(crbug.com/435046): When iOS9 is no longer supported, change vars to
+  // |let| and |const| and declare at assignment.
+  /** @type {!PasswordCredentialData} */
+  var data;
+  var elements;
+  var elementIndex;
+  var newPasswordObserved;
+  var field;
+  var name;
+  var autocompleteTokens;
+  var token;
+  var tokenIndex;
+
+  if (init instanceof HTMLFormElement) {
+    // Performs following steps:
+    // https://www.w3.org/TR/credential-management-1/#abstract-opdef-create-a-passwordcredential-from-an-htmlformelement
+    data = /** @type {!PasswordCredentialData} */ ({});
+    elements = init.querySelectorAll( // all submittable elements
+        'button, input, object, select, textarea');
+    newPasswordObserved = false;
+    for (elementIndex = 0; elementIndex < elements.length;
+        elementIndex++) {
+      field = elements.item(elementIndex);
+      if (!field.hasAttribute('autocomplete')) {
+        continue;
+      }
+      name = field.name;
+      if (!init[name]) {
+        continue;
+      }
+      autocompleteTokens = field.getAttribute('autocomplete').split(' ');
+      for (tokenIndex = 0; tokenIndex < autocompleteTokens.length;
+          tokenIndex++) {
+        token = autocompleteTokens[tokenIndex];
+        if (token.toLowerCase() === 'new-password') {
+          data.password = init[name].value;
+          newPasswordObserved = true;
+        }
+        if (token.toLowerCase() === 'current-password') {
+          if (!newPasswordObserved) {
+            data.password = init[name].value;
+          }
+        }
+        if (token.toLowerCase() === 'photo') {
+          data.iconURL = init[name].value;
+        }
+        if (token.toLowerCase() === 'name') {
+          data.name = init[name].value;
+        }
+        if (token.toLowerCase() === 'nickname') {
+          data.name = init[name].value;
+        }
+        if (token.toLowerCase() === 'username') {
+          data.id = init[name].value;
+        }
+      }
+    }
+  } else {
+    // |init| was not HTMLFormElement so assuming it is PasswordCredentialData.
+    // Not checking with instanceof because any dictionary with required fields
+    // should be accepted.
+    data = /** @type {!PasswordCredentialData} */ (init);
+  }
+
+  // Perform following steps:
+  // https://w3c.github.io/webappsec-credential-management/#abstract-opdef-create-a-passwordcredential-from-passwordcredentialdata
+  if (!data.id) {
+    throw new TypeError('id must be a non-empty string');
+  }
+  if (!data.password) {
+    throw new TypeError('password must be a non-empty string');
+  }
+  if (data.iconURL && !data.iconURL.startsWith('https://')) {
+    throw new SyntaxError('invalid iconURL');
+  }
   /** @type {string} */
-  this.id;
+  this._id = data.id;
   /** @type {string} */
-  this.type;
+  this._type = 'password';
   /** @type {string} */
-  this.name;
+  this._password = data.password;
   /** @type {string} */
-  this.iconURL;
+  this._iconURL = (data.iconURL ? data.iconURL : '');
   /** @type {string} */
-  this.password;
+  this._name = (data.name ? data.name : '');
 }
 
 PasswordCredential.prototype = {
@@ -139,8 +210,44 @@
 Object.defineProperty(PasswordCredential, 'prototype', { writable: false });
 
 PasswordCredential.prototype.constructor = PasswordCredential;
-Object.defineProperty(
-    PasswordCredential.prototype, 'constructor', { enumerable: false });
+Object.defineProperties(
+  PasswordCredential.prototype,
+  {
+    'constructor': {
+      enumerable: false
+    },
+    'id' : {
+      get: /** @this {PasswordCredential} */ function() {
+        return this._id;
+      }
+    },
+    'type' : {
+      get: /** @this {PasswordCredential} */ function() {
+        return this._type;
+      }
+    },
+    'password': {
+      get: /** @this {PasswordCredential} */ function() {
+        if (!(this instanceof PasswordCredential)) {
+          throw new TypeError('attempting to get a property on prototype');
+        }
+        return this._password;
+      },
+      configurable: true,
+      enumerable: true
+    },
+    'iconURL' : {
+      get: /** @this {PasswordCredential} */ function() {
+        return this._iconURL;
+      }
+    },
+    'name' : {
+      get: /** @this {PasswordCredential} */ function() {
+        return this._name;
+      }
+    }
+  }
+);
 Object.defineProperty(PasswordCredential.prototype, Symbol.toStringTag,
     { value: 'PasswordCredential' });
 
@@ -204,19 +311,23 @@
     },
     'provider': {
       get: /** @this {FederatedCredential} */ function() {
+        if (!(this instanceof FederatedCredential)) {
+          throw new TypeError('attempting to get a property on prototype');
+        }
         return this._provider;
-      }
-      // TODO(crbug.com/435046): IDL tests require that getting property
-      // |provider| on PasswordCredential.prototype throws TypeError. Implement
-      // getter conforming to those tests.
+      },
+      configurable: true,
+      enumerable: true
     },
     'protocol': {
       get: /** @this {FederatedCredential} */ function() {
+        if (!(this instanceof FederatedCredential)) {
+          throw new TypeError('attempting to get a property on prototype');
+        }
         return this._protocol;
-      }
-      // TODO(crbug.com/435046): IDL tests require that getting property
-      // |provider| on PasswordCredential.prototype throws TypeError. Implement
-      // getter conforming to those tests.
+      },
+      configurable: true,
+      enumerable: true
     },
     'iconURL' : {
       get: /** @this {FederatedCredential} */ function() {
@@ -255,6 +366,14 @@
 var PasswordCredentialData;
 
 /**
+ * Either PasswordCredentialData or HTMLFormElement used for constructing
+ * a new PasswordCredential
+ * https://www.w3.org/TR/credential-management-1/#typedefdef-passwordcredentialinit
+ * @typedef {!PasswordCredentialData|HTMLFormElement}
+ */
+var PasswordCredentialInit;
+
+/**
  * FederatedCredentialInit used for constructing FederatedCredential objects
  * https://w3c.github.io/webappsec-credential-management/#dictdef-federatedcredentialinit
  * @dict
diff --git a/ios/chrome/test/ios_chrome_unit_test_suite.mm b/ios/chrome/test/ios_chrome_unit_test_suite.mm
index 2c064c9..1de1ae8 100644
--- a/ios/chrome/test/ios_chrome_unit_test_suite.mm
+++ b/ios/chrome/test/ios_chrome_unit_test_suite.mm
@@ -88,6 +88,5 @@
   ios::RegisterPathProvider();
   ui::RegisterPathProvider();
   url::AddStandardScheme(kChromeUIScheme, url::SCHEME_WITHOUT_PORT);
-  ContentSettingsPattern::SetNonWildcardDomainNonPortScheme(
-      kDummyExtensionScheme);
+  ContentSettingsPattern::SetNonWildcardDomainNonPortSchemes(nullptr, 0);
 }
diff --git a/ios/clean/chrome/browser/ui/tab/tab_coordinator_unittest.mm b/ios/clean/chrome/browser/ui/tab/tab_coordinator_unittest.mm
index bde5be7..73274a1 100644
--- a/ios/clean/chrome/browser/ui/tab/tab_coordinator_unittest.mm
+++ b/ios/clean/chrome/browser/ui/tab/tab_coordinator_unittest.mm
@@ -68,7 +68,9 @@
 
 }  // namespace
 
-TEST_F(TabCoordinatorTest, DefaultToolbar) {
+// TODO(crbug.com/759761): Reenable this test when threading issues are fixed
+// for this test fixture.
+TEST_F(TabCoordinatorTest, DISABLED_DefaultToolbar) {
   [[NSUserDefaults standardUserDefaults] setObject:@""
                                             forKey:@"EnableBottomToolbar"];
   [coordinator_ start];
@@ -76,7 +78,9 @@
             [coordinator_.viewController class]);
 }
 
-TEST_F(TabCoordinatorTest, TopToolbar) {
+// TODO(crbug.com/759761): Reenable this test when threading issues are fixed
+// for this test fixture.
+TEST_F(TabCoordinatorTest, DISABLED_TopToolbar) {
   [[NSUserDefaults standardUserDefaults] setObject:@"Disabled"
                                             forKey:@"EnableBottomToolbar"];
   [coordinator_ start];
@@ -84,7 +88,9 @@
             [coordinator_.viewController class]);
 }
 
-TEST_F(TabCoordinatorTest, BottomToolbar) {
+// TODO(crbug.com/759761): Reenable this test when threading issues are fixed
+// for this test fixture.
+TEST_F(TabCoordinatorTest, DISABLED_BottomToolbar) {
   [[NSUserDefaults standardUserDefaults] setObject:@"Enabled"
                                             forKey:@"EnableBottomToolbar"];
   [coordinator_ start];
diff --git a/ios/showcase/test/showcase_eg_utils.mm b/ios/showcase/test/showcase_eg_utils.mm
index e686b85..d86ec76 100644
--- a/ios/showcase/test/showcase_eg_utils.mm
+++ b/ios/showcase/test/showcase_eg_utils.mm
@@ -22,7 +22,7 @@
   if (base::ios::IsRunningOnIOS11OrLater()) {
     return grey_allOf(grey_accessibilityLabel(@"SC"),
                       grey_accessibilityTrait(UIAccessibilityTraitButton),
-                      grey_interactable(), nil);
+                      grey_userInteractionEnabled(), nil);
   }
 
   return grey_kindOfClass(
diff --git a/ipc/README.md b/ipc/README.md
index be5624d..250a159 100644
--- a/ipc/README.md
+++ b/ipc/README.md
@@ -303,7 +303,7 @@
 
 ``` cpp
 void BindFrobinator(mojom::FrobinatorRequest request) {
-  mojo::MakeStrongBinding(base::MakeUnique<FrobinatorImpl>, std::move(request));
+  mojo::MakeStrongBinding(std::make_unique<FrobinatorImpl>, std::move(request));
 }
 
 // |registry| will hereby handle all incoming requests for "mojom::Frobinator"
diff --git a/ipc/ipc_channel_factory.cc b/ipc/ipc_channel_factory.cc
index 775ac33..08a5272 100644
--- a/ipc/ipc_channel_factory.cc
+++ b/ipc/ipc_channel_factory.cc
@@ -49,7 +49,7 @@
     const ChannelHandle& handle,
     Channel::Mode mode,
     const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) {
-  return base::MakeUnique<PlatformChannelFactory>(handle, mode,
+  return std::make_unique<PlatformChannelFactory>(handle, mode,
                                                   ipc_task_runner);
 }
 
diff --git a/ipc/ipc_channel_mojo.cc b/ipc/ipc_channel_mojo.cc
index af5b86b..38d07cc 100644
--- a/ipc/ipc_channel_mojo.cc
+++ b/ipc/ipc_channel_mojo.cc
@@ -286,7 +286,7 @@
 std::unique_ptr<ChannelFactory> ChannelMojo::CreateServerFactory(
     mojo::ScopedMessagePipeHandle handle,
     const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) {
-  return base::MakeUnique<MojoChannelFactory>(
+  return std::make_unique<MojoChannelFactory>(
       std::move(handle), Channel::MODE_SERVER, ipc_task_runner);
 }
 
@@ -294,7 +294,7 @@
 std::unique_ptr<ChannelFactory> ChannelMojo::CreateClientFactory(
     mojo::ScopedMessagePipeHandle handle,
     const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) {
-  return base::MakeUnique<MojoChannelFactory>(
+  return std::make_unique<MojoChannelFactory>(
       std::move(handle), Channel::MODE_CLIENT, ipc_task_runner);
 }
 
@@ -424,9 +424,10 @@
 
 std::unique_ptr<mojo::ThreadSafeForwarder<mojom::Channel>>
 ChannelMojo::CreateThreadSafeChannel() {
-  return base::MakeUnique<mojo::ThreadSafeForwarder<mojom::Channel>>(
-      task_runner_, base::Bind(&ChannelMojo::ForwardMessageFromThreadSafePtr,
-                               weak_factory_.GetWeakPtr()),
+  return std::make_unique<mojo::ThreadSafeForwarder<mojom::Channel>>(
+      task_runner_,
+      base::Bind(&ChannelMojo::ForwardMessageFromThreadSafePtr,
+                 weak_factory_.GetWeakPtr()),
       base::Bind(&ChannelMojo::ForwardMessageWithResponderFromThreadSafePtr,
                  weak_factory_.GetWeakPtr()),
       *bootstrap_->GetAssociatedGroup());
diff --git a/ipc/ipc_channel_nacl.cc b/ipc/ipc_channel_nacl.cc
index b95f8cb..638e01e 100644
--- a/ipc/ipc_channel_nacl.cc
+++ b/ipc/ipc_channel_nacl.cc
@@ -220,7 +220,7 @@
   if (pipe_ == -1)
     return;
 
-  auto data = base::MakeUnique<std::vector<char>>();
+  auto data = std::make_unique<std::vector<char>>();
   data->swap(contents->data);
   read_queue_.push_back(std::move(data));
 
@@ -386,7 +386,7 @@
     const IPC::ChannelHandle& channel_handle,
     Mode mode,
     Listener* listener) {
-  return base::MakeUnique<ChannelNacl>(channel_handle, mode, listener);
+  return std::make_unique<ChannelNacl>(channel_handle, mode, listener);
 }
 
 }  // namespace IPC
diff --git a/ipc/ipc_message_unittest.cc b/ipc/ipc_message_unittest.cc
index a0f27cc..36b5d28 100644
--- a/ipc/ipc_message_unittest.cc
+++ b/ipc/ipc_message_unittest.cc
@@ -69,7 +69,7 @@
   base::ListValue input;
   input.AppendDouble(42.42);
   input.AppendString("forty");
-  input.Append(base::MakeUnique<base::Value>());
+  input.Append(std::make_unique<base::Value>());
 
   IPC::Message msg(1, 2, IPC::Message::PRIORITY_NORMAL);
   IPC::WriteParam(&msg, input);
@@ -89,16 +89,16 @@
 
 TEST(IPCMessageTest, DictionaryValue) {
   base::DictionaryValue input;
-  input.Set("null", base::MakeUnique<base::Value>());
+  input.Set("null", std::make_unique<base::Value>());
   input.SetBoolean("bool", true);
   input.SetInteger("int", 42);
   input.SetKey("int.with.dot", base::Value(43));
 
-  auto subdict = base::MakeUnique<base::DictionaryValue>();
+  auto subdict = std::make_unique<base::DictionaryValue>();
   subdict->SetString("str", "forty two");
   subdict->SetBoolean("bool", false);
 
-  auto sublist = base::MakeUnique<base::ListValue>();
+  auto sublist = std::make_unique<base::ListValue>();
   sublist->AppendDouble(42.42);
   sublist->AppendString("forty");
   sublist->AppendString("two");
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index bfab681..dd065fd 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -266,34 +266,34 @@
 
   switch (static_cast<base::Value::Type>(type)) {
     case base::Value::Type::NONE:
-      *value = base::MakeUnique<base::Value>();
+      *value = std::make_unique<base::Value>();
       break;
     case base::Value::Type::BOOLEAN: {
       bool val;
       if (!ReadParam(m, iter, &val))
         return false;
-      *value = base::MakeUnique<base::Value>(val);
+      *value = std::make_unique<base::Value>(val);
       break;
     }
     case base::Value::Type::INTEGER: {
       int val;
       if (!ReadParam(m, iter, &val))
         return false;
-      *value = base::MakeUnique<base::Value>(val);
+      *value = std::make_unique<base::Value>(val);
       break;
     }
     case base::Value::Type::DOUBLE: {
       double val;
       if (!ReadParam(m, iter, &val))
         return false;
-      *value = base::MakeUnique<base::Value>(val);
+      *value = std::make_unique<base::Value>(val);
       break;
     }
     case base::Value::Type::STRING: {
       std::string val;
       if (!ReadParam(m, iter, &val))
         return false;
-      *value = base::MakeUnique<base::Value>(std::move(val));
+      *value = std::make_unique<base::Value>(std::move(val));
       break;
     }
     case base::Value::Type::BINARY: {
@@ -308,14 +308,14 @@
       base::DictionaryValue val;
       if (!ReadDictionaryValue(m, iter, &val, recursion))
         return false;
-      *value = base::MakeUnique<base::Value>(std::move(val));
+      *value = std::make_unique<base::Value>(std::move(val));
       break;
     }
     case base::Value::Type::LIST: {
       base::ListValue val;
       if (!ReadListValue(m, iter, &val, recursion))
         return false;
-      *value = base::MakeUnique<base::Value>(std::move(val));
+      *value = std::make_unique<base::Value>(std::move(val));
       break;
     }
     default:
diff --git a/ipc/ipc_message_utils_unittest.cc b/ipc/ipc_message_utils_unittest.cc
index ddbe112..f4ca6ba 100644
--- a/ipc/ipc_message_utils_unittest.cc
+++ b/ipc/ipc_message_utils_unittest.cc
@@ -102,7 +102,7 @@
   value->SetKey("foo", base::Value(42));
   value->SetKey("bar", base::Value(3.14));
   value->SetKey("baz", base::Value("hello"));
-  value->SetWithoutPathExpansion("qux", base::MakeUnique<base::Value>());
+  value->SetWithoutPathExpansion("qux", std::make_unique<base::Value>());
 
   std::unique_ptr<base::DictionaryValue> nested_dict(new base::DictionaryValue);
   nested_dict->SetKey("foobar", base::Value(5));
diff --git a/ipc/ipc_mojo_bootstrap.cc b/ipc/ipc_mojo_bootstrap.cc
index 1307b9c..506c9f8 100644
--- a/ipc/ipc_mojo_bootstrap.cc
+++ b/ipc/ipc_mojo_bootstrap.cc
@@ -502,7 +502,7 @@
       {
         base::AutoLock locker(controller_->lock_);
         if (!sync_message_event_) {
-          sync_message_event_ = base::MakeUnique<base::WaitableEvent>(
+          sync_message_event_ = std::make_unique<base::WaitableEvent>(
               base::WaitableEvent::ResetPolicy::MANUAL,
               base::WaitableEvent::InitialState::NOT_SIGNALED);
           if (peer_closed_ || !sync_messages_.empty())
@@ -510,7 +510,7 @@
         }
       }
 
-      sync_watcher_ = base::MakeUnique<mojo::SyncEventWatcher>(
+      sync_watcher_ = std::make_unique<mojo::SyncEventWatcher>(
           sync_message_event_.get(),
           base::Bind(&Endpoint::OnSyncMessageEventReady,
                      base::Unretained(this)));
@@ -928,7 +928,7 @@
     mojo::ScopedMessagePipeHandle handle,
     Channel::Mode mode,
     const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner) {
-  return base::MakeUnique<MojoBootstrapImpl>(
+  return std::make_unique<MojoBootstrapImpl>(
       std::move(handle), new ChannelAssociatedGroupController(
                              mode == Channel::MODE_SERVER, ipc_task_runner));
 }
diff --git a/ipc/ipc_sync_channel.cc b/ipc/ipc_sync_channel.cc
index 7c1c44d8..16a6878 100644
--- a/ipc/ipc_sync_channel.cc
+++ b/ipc/ipc_sync_channel.cc
@@ -280,7 +280,7 @@
         dispatch_event_(base::WaitableEvent::ResetPolicy::MANUAL,
                         base::WaitableEvent::InitialState::NOT_SIGNALED),
         listener_task_runner_(base::ThreadTaskRunnerHandle::Get()),
-        sync_dispatch_watcher_(base::MakeUnique<mojo::SyncEventWatcher>(
+        sync_dispatch_watcher_(std::make_unique<mojo::SyncEventWatcher>(
             &dispatch_event_,
             base::Bind(&ReceivedSyncMsgQueue::OnDispatchEventReady,
                        base::Unretained(this)))) {
@@ -635,7 +635,7 @@
   base::WaitableEvent* pump_messages_event = nullptr;
   if (pump_messages) {
     if (!g_pump_messages_event.Get()) {
-      g_pump_messages_event.Get() = base::MakeUnique<base::WaitableEvent>(
+      g_pump_messages_event.Get() = std::make_unique<base::WaitableEvent>(
           base::WaitableEvent::ResetPolicy::MANUAL,
           base::WaitableEvent::InitialState::SIGNALED);
     }
diff --git a/ipc/ipc_test_base.cc b/ipc/ipc_test_base.cc
index d09b3b69..49cb116 100644
--- a/ipc/ipc_test_base.cc
+++ b/ipc/ipc_test_base.cc
@@ -18,7 +18,7 @@
 
 void IPCChannelMojoTestBase::Init(const std::string& test_client_name) {
   InitWithCustomMessageLoop(test_client_name,
-                            base::MakeUnique<base::MessageLoop>());
+                            std::make_unique<base::MessageLoop>());
 }
 
 void IPCChannelMojoTestBase::InitWithCustomMessageLoop(
diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc
index deda35a..decaf34 100644
--- a/media/base/media_switches.cc
+++ b/media/base/media_switches.cc
@@ -275,7 +275,7 @@
 // Enables Media Engagement Index recording. The data from which will
 // be used to bypass autoplay policies.
 const base::Feature kRecordMediaEngagementScores{
-    "RecordMediaEngagementScores", base::FEATURE_DISABLED_BY_DEFAULT};
+    "RecordMediaEngagementScores", base::FEATURE_ENABLED_BY_DEFAULT};
 
 // Enables the Media Engagement Index to override autoplay policies if an
 // origins engagement score is high enough.
diff --git a/media/midi/task_service.cc b/media/midi/task_service.cc
index fc1cfb7f..664f309 100644
--- a/media/midi/task_service.cc
+++ b/media/midi/task_service.cc
@@ -19,7 +19,9 @@
     : no_tasks_in_flight_cv_(&tasks_in_flight_lock_),
       tasks_in_flight_(0),
       next_instance_id_(0),
-      bound_instance_id_(kInvalidInstanceId) {}
+      bound_instance_id_(kInvalidInstanceId) {
+  DETACH_FROM_SEQUENCE(instance_binding_sequence_checker_);
+}
 
 TaskService::~TaskService() {
   std::vector<std::unique_ptr<base::Thread>> threads;
@@ -34,6 +36,7 @@
 }
 
 bool TaskService::BindInstance() {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(instance_binding_sequence_checker_);
   base::AutoLock lock(lock_);
   if (bound_instance_id_ != kInvalidInstanceId)
     return false;
@@ -45,6 +48,7 @@
 }
 
 bool TaskService::UnbindInstance() {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(instance_binding_sequence_checker_);
   {
     base::AutoLock lock(lock_);
     if (bound_instance_id_ == kInvalidInstanceId)
diff --git a/media/midi/task_service.h b/media/midi/task_service.h
index 04240467..4134df59 100644
--- a/media/midi/task_service.h
+++ b/media/midi/task_service.h
@@ -8,6 +8,7 @@
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "base/sequence_checker.h"
 #include "base/single_thread_task_runner.h"
 #include "base/synchronization/condition_variable.h"
 #include "base/synchronization/lock.h"
@@ -95,6 +96,10 @@
   // Protects all members other than |tasks_in_flight_|.
   base::Lock lock_;
 
+  // Verifies all UnbindInstance() calls occur on the same sequence as
+  // BindSequence().
+  SEQUENCE_CHECKER(instance_binding_sequence_checker_);
+
   DISALLOW_COPY_AND_ASSIGN(TaskService);
 };
 
diff --git a/net/base/chunked_upload_data_stream.cc b/net/base/chunked_upload_data_stream.cc
index 4670a0c..494e495 100644
--- a/net/base/chunked_upload_data_stream.cc
+++ b/net/base/chunked_upload_data_stream.cc
@@ -49,7 +49,7 @@
   if (data_len > 0) {
     DCHECK(data);
     upload_data_.push_back(
-        base::MakeUnique<std::vector<char>>(data, data + data_len));
+        std::make_unique<std::vector<char>>(data, data + data_len));
   }
   all_data_appended_ = is_done;
 
diff --git a/net/base/elements_upload_data_stream_unittest.cc b/net/base/elements_upload_data_stream_unittest.cc
index 98240de..2833b8af 100644
--- a/net/base/elements_upload_data_stream_unittest.cc
+++ b/net/base/elements_upload_data_stream_unittest.cc
@@ -164,7 +164,7 @@
 
 TEST_F(ElementsUploadDataStreamTest, ConsumeAllBytes) {
   element_readers_.push_back(
-      base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
+      std::make_unique<UploadBytesElementReader>(kTestData, kTestDataSize));
   std::unique_ptr<UploadDataStream> stream(
       new ElementsUploadDataStream(std::move(element_readers_), 0));
   ASSERT_THAT(stream->Init(CompletionCallback(), NetLogWithSource()), IsOk());
@@ -189,7 +189,7 @@
   ASSERT_EQ(static_cast<int>(kTestDataSize),
             base::WriteFile(temp_file_path, kTestData, kTestDataSize));
 
-  element_readers_.push_back(base::MakeUnique<UploadFileElementReader>(
+  element_readers_.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
       std::numeric_limits<uint64_t>::max(), base::Time()));
 
@@ -226,7 +226,7 @@
   UploadFileElementReader::ScopedOverridingContentLengthForTests
       overriding_content_length(kFakeSize);
 
-  element_readers_.push_back(base::MakeUnique<UploadFileElementReader>(
+  element_readers_.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
       std::numeric_limits<uint64_t>::max(), base::Time()));
 
@@ -269,7 +269,7 @@
 
   // This element is ignored because of the error from the previous reader.
   element_readers_.push_back(
-      base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
+      std::make_unique<UploadBytesElementReader>(kTestData, kTestDataSize));
 
   std::unique_ptr<UploadDataStream> stream(
       new ElementsUploadDataStream(std::move(element_readers_), 0));
@@ -304,7 +304,7 @@
 
   // This element is ignored because of the error from the previous reader.
   element_readers_.push_back(
-      base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
+      std::make_unique<UploadBytesElementReader>(kTestData, kTestDataSize));
 
   std::unique_ptr<UploadDataStream> stream(
       new ElementsUploadDataStream(std::move(element_readers_), 0));
@@ -343,12 +343,12 @@
 
   const uint64_t kFileRangeOffset = 1;
   const uint64_t kFileRangeLength = 4;
-  element_readers_.push_back(base::MakeUnique<UploadFileElementReader>(
+  element_readers_.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path,
       kFileRangeOffset, kFileRangeLength, base::Time()));
 
   element_readers_.push_back(
-      base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
+      std::make_unique<UploadBytesElementReader>(kTestData, kTestDataSize));
 
   const uint64_t kStreamSize = kTestDataSize + kFileRangeLength;
   TestCompletionCallback init_callback;
@@ -539,7 +539,7 @@
   // Don't use element_readers_ here, as this function is called twice, and
   // reusing element_readers_ is wrong.
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-  element_readers.push_back(base::MakeUnique<UploadFileElementReader>(
+  element_readers.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), file_path, 1, 2, time));
 
   TestCompletionCallback init_callback;
@@ -582,8 +582,8 @@
 
   // Prepare data.
   element_readers_.push_back(
-      base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
-  element_readers_.push_back(base::MakeUnique<UploadFileElementReader>(
+      std::make_unique<UploadBytesElementReader>(kTestData, kTestDataSize));
+  element_readers_.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
       std::numeric_limits<uint64_t>::max(), base::Time()));
   std::unique_ptr<UploadDataStream> stream(
@@ -627,8 +627,8 @@
 
   // Prepare data.
   element_readers_.push_back(
-      base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
-  element_readers_.push_back(base::MakeUnique<UploadFileElementReader>(
+      std::make_unique<UploadBytesElementReader>(kTestData, kTestDataSize));
+  element_readers_.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
       std::numeric_limits<uint64_t>::max(), base::Time()));
   std::unique_ptr<UploadDataStream> stream(
@@ -669,8 +669,8 @@
 
   // Prepare data.
   element_readers_.push_back(
-      base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
-  element_readers_.push_back(base::MakeUnique<UploadFileElementReader>(
+      std::make_unique<UploadBytesElementReader>(kTestData, kTestDataSize));
+  element_readers_.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
       std::numeric_limits<uint64_t>::max(), base::Time()));
   std::unique_ptr<UploadDataStream> stream(
@@ -727,8 +727,8 @@
 
   // Prepare data.
   element_readers_.push_back(
-      base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
-  element_readers_.push_back(base::MakeUnique<UploadFileElementReader>(
+      std::make_unique<UploadBytesElementReader>(kTestData, kTestDataSize));
+  element_readers_.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
       std::numeric_limits<uint64_t>::max(), base::Time()));
   std::unique_ptr<UploadDataStream> stream(
@@ -775,8 +775,8 @@
 
   // Prepare data.
   element_readers_.push_back(
-      base::MakeUnique<UploadBytesElementReader>(kTestData, kTestDataSize));
-  element_readers_.push_back(base::MakeUnique<UploadFileElementReader>(
+      std::make_unique<UploadBytesElementReader>(kTestData, kTestDataSize));
+  element_readers_.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
       std::numeric_limits<uint64_t>::max(), base::Time()));
   std::unique_ptr<UploadDataStream> stream(
diff --git a/net/base/file_stream.cc b/net/base/file_stream.cc
index 5bd4d14..67ca183 100644
--- a/net/base/file_stream.cc
+++ b/net/base/file_stream.cc
@@ -13,11 +13,11 @@
 namespace net {
 
 FileStream::FileStream(const scoped_refptr<base::TaskRunner>& task_runner)
-    : context_(base::MakeUnique<Context>(task_runner)) {}
+    : context_(std::make_unique<Context>(task_runner)) {}
 
 FileStream::FileStream(base::File file,
                        const scoped_refptr<base::TaskRunner>& task_runner)
-    : context_(base::MakeUnique<Context>(std::move(file), task_runner)) {}
+    : context_(std::make_unique<Context>(std::move(file), task_runner)) {}
 
 FileStream::~FileStream() {
   context_.release()->Orphan();
diff --git a/net/base/network_activity_monitor_unittest.cc b/net/base/network_activity_monitor_unittest.cc
index cb82274..e97b0414 100644
--- a/net/base/network_activity_monitor_unittest.cc
+++ b/net/base/network_activity_monitor_unittest.cc
@@ -96,7 +96,7 @@
 TEST_F(NetworkActivityMontiorTest, Threading) {
   std::vector<std::unique_ptr<base::Thread>> threads;
   for (size_t i = 0; i < 3; ++i) {
-    threads.push_back(base::MakeUnique<base::Thread>(base::SizeTToString(i)));
+    threads.push_back(std::make_unique<base::Thread>(base::SizeTToString(i)));
     ASSERT_TRUE(threads.back()->Start());
   }
 
diff --git a/net/base/network_change_notifier_mac.cc b/net/base/network_change_notifier_mac.cc
index e66d87a..76c3e96 100644
--- a/net/base/network_change_notifier_mac.cc
+++ b/net/base/network_change_notifier_mac.cc
@@ -49,10 +49,10 @@
       connection_type_initialized_(false),
       initial_connection_type_cv_(&connection_type_lock_),
       forwarder_(this),
-      dns_config_service_thread_(base::MakeUnique<DnsConfigServiceThread>()) {
+      dns_config_service_thread_(std::make_unique<DnsConfigServiceThread>()) {
   // Must be initialized after the rest of this object, as it may call back into
   // SetInitialConnectionType().
-  config_watcher_ = base::MakeUnique<NetworkConfigWatcherMac>(&forwarder_);
+  config_watcher_ = std::make_unique<NetworkConfigWatcherMac>(&forwarder_);
   dns_config_service_thread_->StartWithOptions(
       base::Thread::Options(base::MessageLoop::TYPE_IO, 0));
 }
diff --git a/net/base/network_interfaces_getifaddrs.cc b/net/base/network_interfaces_getifaddrs.cc
index 9e86239..02e925d3 100644
--- a/net/base/network_interfaces_getifaddrs.cc
+++ b/net/base/network_interfaces_getifaddrs.cc
@@ -225,7 +225,7 @@
   std::unique_ptr<internal::IPAttributesGetter> ip_attributes_getter;
 
 #if defined(OS_MACOSX) && !defined(OS_IOS)
-  ip_attributes_getter = base::MakeUnique<internal::IPAttributesGetterMac>();
+  ip_attributes_getter = std::make_unique<internal::IPAttributesGetterMac>();
 #endif
 
   bool result = internal::IfaddrsToNetworkInterfaceList(
diff --git a/net/base/network_throttle_manager_impl.cc b/net/base/network_throttle_manager_impl.cc
index 3448fcd..7eb7257d 100644
--- a/net/base/network_throttle_manager_impl.cc
+++ b/net/base/network_throttle_manager_impl.cc
@@ -154,7 +154,7 @@
     : lifetime_median_estimate_(PercentileEstimator::kMedianPercentile,
                                 kInitialMedianInMs),
       outstanding_recomputation_timer_(
-          base::MakeUnique<base::Timer>(false /* retain_user_task */,
+          std::make_unique<base::Timer>(false /* retain_user_task */,
                                         false /* is_repeating */)),
       tick_clock_(new base::DefaultTickClock()),
       weak_ptr_factory_(this) {}
@@ -191,7 +191,7 @@
     std::unique_ptr<base::TickClock> tick_clock) {
   tick_clock_ = std::move(tick_clock);
   DCHECK(!outstanding_recomputation_timer_->IsRunning());
-  outstanding_recomputation_timer_ = base::MakeUnique<base::Timer>(
+  outstanding_recomputation_timer_ = std::make_unique<base::Timer>(
       false /* retain_user_task */, false /* is_repeating */,
       tick_clock_.get());
 }
diff --git a/net/cert/caching_cert_verifier_unittest.cc b/net/cert/caching_cert_verifier_unittest.cc
index f67781c0..90889b7 100644
--- a/net/cert/caching_cert_verifier_unittest.cc
+++ b/net/cert/caching_cert_verifier_unittest.cc
@@ -51,7 +51,7 @@
 
 class CachingCertVerifierTest : public ::testing::Test {
  public:
-  CachingCertVerifierTest() : verifier_(base::MakeUnique<MockCertVerifier>()) {}
+  CachingCertVerifierTest() : verifier_(std::make_unique<MockCertVerifier>()) {}
   ~CachingCertVerifierTest() override {}
 
  protected:
diff --git a/net/cert/cert_verifier.cc b/net/cert/cert_verifier.cc
index c471fa9..eeebdba 100644
--- a/net/cert/cert_verifier.cc
+++ b/net/cert/cert_verifier.cc
@@ -81,8 +81,8 @@
   NOTIMPLEMENTED();
   return std::unique_ptr<CertVerifier>();
 #else
-  return base::MakeUnique<CachingCertVerifier>(
-      base::MakeUnique<MultiThreadedCertVerifier>(
+  return std::make_unique<CachingCertVerifier>(
+      std::make_unique<MultiThreadedCertVerifier>(
           CertVerifyProc::CreateDefault()));
 #endif
 }
diff --git a/net/cert/cert_verify_proc_android_unittest.cc b/net/cert/cert_verify_proc_android_unittest.cc
index 554f8f1d..d2f90bc 100644
--- a/net/cert/cert_verify_proc_android_unittest.cc
+++ b/net/cert/cert_verify_proc_android_unittest.cc
@@ -66,19 +66,19 @@
     const scoped_refptr<X509Certificate>& cert) {
   std::string der;
   EXPECT_TRUE(X509Certificate::GetDEREncoded(cert->os_cert_handle(), &der));
-  return base::MakeUnique<TestCertNetFetcherRequest>(
+  return std::make_unique<TestCertNetFetcherRequest>(
       error, std::vector<uint8_t>(der.data(), der.data() + der.length()));
 }
 
 std::unique_ptr<CertNetFetcher::Request> CreateMockRequestWithError(
     Error error) {
-  return base::MakeUnique<TestCertNetFetcherRequest>(error,
+  return std::make_unique<TestCertNetFetcherRequest>(error,
                                                      std::vector<uint8_t>({}));
 }
 
 std::unique_ptr<CertNetFetcher::Request>
 CreateMockRequestWithInvalidCertificate() {
-  return base::MakeUnique<TestCertNetFetcherRequest>(
+  return std::make_unique<TestCertNetFetcherRequest>(
       OK, std::vector<uint8_t>({1, 2, 3}));
 }
 
diff --git a/net/cert/internal/cert_error_params.cc b/net/cert/internal/cert_error_params.cc
index d9fae76..487c5942 100644
--- a/net/cert/internal/cert_error_params.cc
+++ b/net/cert/internal/cert_error_params.cc
@@ -103,7 +103,7 @@
     const char* name,
     const der::Input& der) {
   DCHECK(name);
-  return base::MakeUnique<CertErrorParams2Der>(name, der, nullptr,
+  return std::make_unique<CertErrorParams2Der>(name, der, nullptr,
                                                der::Input());
 }
 
@@ -114,13 +114,13 @@
     const der::Input& der2) {
   DCHECK(name1);
   DCHECK(name2);
-  return base::MakeUnique<CertErrorParams2Der>(name1, der1, name2, der2);
+  return std::make_unique<CertErrorParams2Der>(name1, der1, name2, der2);
 }
 
 std::unique_ptr<CertErrorParams> CreateCertErrorParams1SizeT(const char* name,
                                                              size_t value) {
   DCHECK(name);
-  return base::MakeUnique<CertErrorParams1SizeT>(name, value);
+  return std::make_unique<CertErrorParams1SizeT>(name, value);
 }
 
 NET_EXPORT std::unique_ptr<CertErrorParams> CreateCertErrorParams2SizeT(
@@ -130,7 +130,7 @@
     size_t value2) {
   DCHECK(name1);
   DCHECK(name2);
-  return base::MakeUnique<CertErrorParams2SizeT>(name1, value1, name2, value2);
+  return std::make_unique<CertErrorParams2SizeT>(name1, value1, name2, value2);
 }
 
 }  // namespace net
diff --git a/net/cert/internal/cert_issuer_source_aia_unittest.cc b/net/cert/internal/cert_issuer_source_aia_unittest.cc
index 0561372..505d586 100644
--- a/net/cert/internal/cert_issuer_source_aia_unittest.cc
+++ b/net/cert/internal/cert_issuer_source_aia_unittest.cc
@@ -105,7 +105,7 @@
 
 // Creates a CertNetFetcher::Request that completes with an error.
 std::unique_ptr<CertNetFetcher::Request> CreateMockRequest(Error error) {
-  return base::MakeUnique<MockCertNetFetcherRequest>(error,
+  return std::make_unique<MockCertNetFetcherRequest>(error,
                                                      std::vector<uint8_t>());
 }
 
@@ -113,7 +113,7 @@
 // code and bytes.
 std::unique_ptr<CertNetFetcher::Request> CreateMockRequest(
     const std::vector<uint8_t>& bytes) {
-  return base::MakeUnique<MockCertNetFetcherRequest>(OK, bytes);
+  return std::make_unique<MockCertNetFetcherRequest>(OK, bytes);
 }
 
 // CertIssuerSourceAia does not return results for SyncGetIssuersOf.
diff --git a/net/cert/internal/path_builder.cc b/net/cert/internal/path_builder.cc
index 144654d3..e6bde35b 100644
--- a/net/cert/internal/path_builder.cc
+++ b/net/cert/internal/path_builder.cc
@@ -487,7 +487,7 @@
         break;
       }
 
-      cur_path_.Append(base::MakeUnique<CertIssuersIter>(
+      cur_path_.Append(std::make_unique<CertIssuersIter>(
           std::move(next_issuer_.cert), &cert_issuer_sources_, trust_store_));
       next_issuer_ = IssuerEntry();
       DVLOG(1) << "CertPathIter cur_path_ = " << cur_path_.PathDebugString();
@@ -613,7 +613,7 @@
   }
 
   // Verify the entire certificate chain.
-  auto result_path = base::MakeUnique<ResultPath>();
+  auto result_path = std::make_unique<ResultPath>();
   result_path->path = next_path_;
   VerifyCertificateChain(
       result_path->path.certs, result_path->path.last_cert_trust, delegate_,
diff --git a/net/cert/internal/signature_algorithm.cc b/net/cert/internal/signature_algorithm.cc
index a284975..17c5783 100644
--- a/net/cert/internal/signature_algorithm.cc
+++ b/net/cert/internal/signature_algorithm.cc
@@ -682,7 +682,7 @@
     uint32_t salt_length) {
   return base::WrapUnique(new SignatureAlgorithm(
       SignatureAlgorithmId::RsaPss, digest,
-      base::MakeUnique<RsaPssParameters>(mgf1_hash, salt_length)));
+      std::make_unique<RsaPssParameters>(mgf1_hash, salt_length)));
 }
 
 const RsaPssParameters* SignatureAlgorithm::ParamsForRsaPss() const {
diff --git a/net/cert/internal/system_trust_store.cc b/net/cert/internal/system_trust_store.cc
index 199ca6e..3e7c285 100644
--- a/net/cert/internal/system_trust_store.cc
+++ b/net/cert/internal/system_trust_store.cc
@@ -97,7 +97,7 @@
 }  // namespace
 
 std::unique_ptr<SystemTrustStore> CreateSslSystemTrustStore() {
-  return base::MakeUnique<SystemTrustStoreNSS>();
+  return std::make_unique<SystemTrustStoreNSS>();
 }
 
 #elif defined(OS_MACOSX) && !defined(OS_IOS)
@@ -130,7 +130,7 @@
 };
 
 std::unique_ptr<SystemTrustStore> CreateSslSystemTrustStore() {
-  return base::MakeUnique<SystemTrustStoreMac>();
+  return std::make_unique<SystemTrustStoreMac>();
 }
 #else
 
@@ -144,7 +144,7 @@
 };
 
 std::unique_ptr<SystemTrustStore> CreateSslSystemTrustStore() {
-  return base::MakeUnique<DummySystemTrustStore>();
+  return std::make_unique<DummySystemTrustStore>();
 }
 #endif
 
diff --git a/net/cert/multi_threaded_cert_verifier.cc b/net/cert/multi_threaded_cert_verifier.cc
index ec9037b..c59e292 100644
--- a/net/cert/multi_threaded_cert_verifier.cc
+++ b/net/cert/multi_threaded_cert_verifier.cc
@@ -357,7 +357,7 @@
   } else {
     // Need to make a new job.
     std::unique_ptr<CertVerifierJob> new_job =
-        base::MakeUnique<CertVerifierJob>(params, net_log.net_log(), this);
+        std::make_unique<CertVerifierJob>(params, net_log.net_log(), this);
 
     if (!new_job->Start(verify_proc_, crl_set)) {
       // TODO(wtc): log to the NetLog.
diff --git a/net/cert/test_root_certs_nss.cc b/net/cert/test_root_certs_nss.cc
index 8df9a31..896e34c 100644
--- a/net/cert/test_root_certs_nss.cc
+++ b/net/cert/test_root_certs_nss.cc
@@ -56,7 +56,7 @@
   }
 
   trust_cache_.push_back(
-      base::MakeUnique<TrustEntry>(std::move(cert_handle), original_trust));
+      std::make_unique<TrustEntry>(std::move(cert_handle), original_trust));
   return true;
 }
 
diff --git a/net/cert_net/cert_net_fetcher_impl.cc b/net/cert_net/cert_net_fetcher_impl.cc
index 6f7fe38..727a124 100644
--- a/net/cert_net/cert_net_fetcher_impl.cc
+++ b/net/cert_net/cert_net_fetcher_impl.cc
@@ -803,7 +803,7 @@
       request_core->SignalImmediateError();
     }
 
-    return base::MakeUnique<CertNetFetcherRequestImpl>(std::move(request_core));
+    return std::make_unique<CertNetFetcherRequestImpl>(std::move(request_core));
   }
 
  private:
diff --git a/net/cert_net/cert_net_fetcher_impl_unittest.cc b/net/cert_net/cert_net_fetcher_impl_unittest.cc
index 12e468e..f51e310 100644
--- a/net/cert_net/cert_net_fetcher_impl_unittest.cc
+++ b/net/cert_net/cert_net_fetcher_impl_unittest.cc
@@ -66,12 +66,12 @@
     session_context.proxy_service = proxy_service();
     session_context.ssl_config_service = ssl_config_service();
     session_context.http_server_properties = http_server_properties();
-    storage_.set_http_network_session(base::MakeUnique<HttpNetworkSession>(
+    storage_.set_http_network_session(std::make_unique<HttpNetworkSession>(
         HttpNetworkSession::Params(), session_context));
-    storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>(
+    storage_.set_http_transaction_factory(std::make_unique<HttpCache>(
         storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0),
         false /* is_main_cache */));
-    storage_.set_job_factory(base::MakeUnique<URLRequestJobFactoryImpl>());
+    storage_.set_job_factory(std::make_unique<URLRequestJobFactoryImpl>());
   }
 
   ~RequestContext() override { AssertNoURLRequests(); }
diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc
index 75be113..ce5bf291 100644
--- a/net/cookies/canonical_cookie.cc
+++ b/net/cookies/canonical_cookie.cc
@@ -242,7 +242,7 @@
     return nullptr;
   }
 
-  std::unique_ptr<CanonicalCookie> cc(base::MakeUnique<CanonicalCookie>(
+  std::unique_ptr<CanonicalCookie> cc(std::make_unique<CanonicalCookie>(
       parsed_cookie.Name(), parsed_cookie.Value(), cookie_domain, cookie_path,
       creation_time, cookie_expires, creation_time, parsed_cookie.IsSecure(),
       parsed_cookie.IsHttpOnly(), parsed_cookie.SameSite(),
diff --git a/net/cookies/canonical_cookie_unittest.cc b/net/cookies/canonical_cookie_unittest.cc
index ecbe8a90..9f1017b 100644
--- a/net/cookies/canonical_cookie_unittest.cc
+++ b/net/cookies/canonical_cookie_unittest.cc
@@ -19,7 +19,7 @@
   GURL url("http://www.example.com/test");
   base::Time current_time = base::Time::Now();
 
-  std::unique_ptr<CanonicalCookie> cookie(base::MakeUnique<CanonicalCookie>(
+  std::unique_ptr<CanonicalCookie> cookie(std::make_unique<CanonicalCookie>(
       "A", "2", "www.example.com", "/test", current_time, base::Time(),
       base::Time(), false, false, CookieSameSite::DEFAULT_MODE,
       COOKIE_PRIORITY_DEFAULT));
@@ -31,7 +31,7 @@
   EXPECT_FALSE(cookie->IsHttpOnly());
   EXPECT_EQ(CookieSameSite::NO_RESTRICTION, cookie->SameSite());
 
-  std::unique_ptr<CanonicalCookie> cookie2(base::MakeUnique<CanonicalCookie>(
+  std::unique_ptr<CanonicalCookie> cookie2(std::make_unique<CanonicalCookie>(
       "A", "2", ".www.example.com", "/", current_time, base::Time(),
       base::Time(), false, false, CookieSameSite::DEFAULT_MODE,
       COOKIE_PRIORITY_DEFAULT));
@@ -112,7 +112,7 @@
 
   // Test the creating cookies using specific parameter instead of a cookie
   // string.
-  cookie = base::MakeUnique<CanonicalCookie>(
+  cookie = std::make_unique<CanonicalCookie>(
       "A", "2", ".www.example.com", "/test", creation_time, base::Time(),
       base::Time(), false, false, CookieSameSite::DEFAULT_MODE,
       COOKIE_PRIORITY_DEFAULT);
@@ -124,7 +124,7 @@
   EXPECT_FALSE(cookie->IsHttpOnly());
   EXPECT_EQ(CookieSameSite::NO_RESTRICTION, cookie->SameSite());
 
-  cookie = base::MakeUnique<CanonicalCookie>(
+  cookie = std::make_unique<CanonicalCookie>(
       "A", "2", ".www.example.com", "/test", creation_time, base::Time(),
       base::Time(), false, false, CookieSameSite::DEFAULT_MODE,
       COOKIE_PRIORITY_DEFAULT);
@@ -198,7 +198,7 @@
   CookieSameSite same_site(CookieSameSite::NO_RESTRICTION);
 
   // Test that a cookie is equivalent to itself.
-  std::unique_ptr<CanonicalCookie> cookie(base::MakeUnique<CanonicalCookie>(
+  std::unique_ptr<CanonicalCookie> cookie(std::make_unique<CanonicalCookie>(
       cookie_name, cookie_value, cookie_domain, cookie_path, creation_time,
       expiration_time, base::Time(), secure, httponly, same_site,
       COOKIE_PRIORITY_MEDIUM));
@@ -207,7 +207,7 @@
 
   // Test that two identical cookies are equivalent.
   std::unique_ptr<CanonicalCookie> other_cookie(
-      base::MakeUnique<CanonicalCookie>(
+      std::make_unique<CanonicalCookie>(
           cookie_name, cookie_value, cookie_domain, cookie_path, creation_time,
           expiration_time, base::Time(), secure, httponly, same_site,
           COOKIE_PRIORITY_MEDIUM));
@@ -216,7 +216,7 @@
 
   // Tests that use different variations of attribute values that
   // DON'T affect cookie equivalence.
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, "2", cookie_domain, cookie_path, creation_time,
       expiration_time, base::Time(), secure, httponly, same_site,
       COOKIE_PRIORITY_HIGH);
@@ -226,7 +226,7 @@
 
   base::Time other_creation_time =
       creation_time + base::TimeDelta::FromMinutes(2);
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, "2", cookie_domain, cookie_path, other_creation_time,
       expiration_time, base::Time(), secure, httponly, same_site,
       COOKIE_PRIORITY_MEDIUM);
@@ -234,7 +234,7 @@
   EXPECT_TRUE(cookie->IsEquivalentForSecureCookieMatching(*other_cookie));
   EXPECT_TRUE(other_cookie->IsEquivalentForSecureCookieMatching(*cookie));
 
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, cookie_name, cookie_domain, cookie_path, creation_time,
       expiration_time, base::Time(), true, httponly, same_site,
       COOKIE_PRIORITY_LOW);
@@ -242,7 +242,7 @@
   EXPECT_TRUE(cookie->IsEquivalentForSecureCookieMatching(*other_cookie));
   EXPECT_TRUE(other_cookie->IsEquivalentForSecureCookieMatching(*cookie));
 
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, cookie_name, cookie_domain, cookie_path, creation_time,
       expiration_time, base::Time(), secure, true, same_site,
       COOKIE_PRIORITY_LOW);
@@ -250,7 +250,7 @@
   EXPECT_TRUE(cookie->IsEquivalentForSecureCookieMatching(*other_cookie));
   EXPECT_TRUE(other_cookie->IsEquivalentForSecureCookieMatching(*cookie));
 
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, cookie_name, cookie_domain, cookie_path, creation_time,
       expiration_time, base::Time(), secure, httponly,
       CookieSameSite::STRICT_MODE, COOKIE_PRIORITY_LOW);
@@ -259,7 +259,7 @@
   EXPECT_TRUE(other_cookie->IsEquivalentForSecureCookieMatching(*cookie));
 
   // Cookies whose names mismatch are not equivalent.
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       "B", cookie_value, cookie_domain, cookie_path, creation_time,
       expiration_time, base::Time(), secure, httponly, same_site,
       COOKIE_PRIORITY_MEDIUM);
@@ -270,7 +270,7 @@
   // A domain cookie at 'www.example.com' is not equivalent to a host cookie
   // at the same domain. These are, however, equivalent according to the laxer
   // rules of 'IsEquivalentForSecureCookieMatching'.
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, cookie_value, "www.example.com", cookie_path, creation_time,
       expiration_time, base::Time(), secure, httponly, same_site,
       COOKIE_PRIORITY_MEDIUM);
@@ -282,7 +282,7 @@
 
   // Likewise, a cookie on 'example.com' is not equivalent to a cookie on
   // 'www.example.com', but they are equivalent for secure cookie matching.
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, cookie_value, ".example.com", cookie_path, creation_time,
       expiration_time, base::Time(), secure, httponly, same_site,
       COOKIE_PRIORITY_MEDIUM);
@@ -295,7 +295,7 @@
   // That is, |cookie| set on '/path' is not equivalent in either way to
   // |other_cookie| set on '/test' or '/path/subpath'. It is, however,
   // equivalent for secure cookie matching to |other_cookie| set on '/'.
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, cookie_value, cookie_domain, "/test", creation_time,
       expiration_time, base::Time(), secure, httponly, same_site,
       COOKIE_PRIORITY_MEDIUM);
@@ -303,7 +303,7 @@
   EXPECT_FALSE(cookie->IsEquivalentForSecureCookieMatching(*other_cookie));
   EXPECT_FALSE(other_cookie->IsEquivalentForSecureCookieMatching(*cookie));
 
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, cookie_value, cookie_domain, cookie_path + "/subpath",
       creation_time, expiration_time, base::Time(), secure, httponly, same_site,
       COOKIE_PRIORITY_MEDIUM);
@@ -311,7 +311,7 @@
   EXPECT_FALSE(cookie->IsEquivalentForSecureCookieMatching(*other_cookie));
   EXPECT_TRUE(other_cookie->IsEquivalentForSecureCookieMatching(*cookie));
 
-  other_cookie = base::MakeUnique<CanonicalCookie>(
+  other_cookie = std::make_unique<CanonicalCookie>(
       cookie_name, cookie_value, cookie_domain, "/", creation_time,
       expiration_time, base::Time(), secure, httponly, same_site,
       COOKIE_PRIORITY_MEDIUM);
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index 974bd420..5ecfe3b1 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -634,7 +634,7 @@
 
   std::pair<GURL, std::string> key(gurl, name);
   if (hook_map_.count(key) == 0)
-    hook_map_[key] = base::MakeUnique<CookieChangedCallbackList>();
+    hook_map_[key] = std::make_unique<CookieChangedCallbackList>();
   return hook_map_[key]->Add(
       base::Bind(&RunAsync, base::ThreadTaskRunnerHandle::Get(), callback));
 }
@@ -711,7 +711,7 @@
   cookie_path = std::string(canon_path.data() + canon_path_component.begin,
                             canon_path_component.len);
 
-  std::unique_ptr<CanonicalCookie> cc(base::MakeUnique<CanonicalCookie>(
+  std::unique_ptr<CanonicalCookie> cc(std::make_unique<CanonicalCookie>(
       name, value, cookie_domain, cookie_path, creation_time, expiration_time,
       last_access_time, secure, http_only, same_site, priority));
 
@@ -1505,7 +1505,7 @@
           (cookie.ExpiryDate() - creation_time).InMinutes());
     }
 
-    InternalInsertCookie(key, base::MakeUnique<CanonicalCookie>(cookie), true);
+    InternalInsertCookie(key, std::make_unique<CanonicalCookie>(cookie), true);
     GarbageCollect(creation_time, key);
   }
 
diff --git a/net/cookies/cookie_monster_store_test.cc b/net/cookies/cookie_monster_store_test.cc
index 9596012f..17c1882 100644
--- a/net/cookies/cookie_monster_store_test.cc
+++ b/net/cookies/cookie_monster_store_test.cc
@@ -134,7 +134,7 @@
                       : base::Time();
   std::string cookie_path = pc.Path();
 
-  return base::MakeUnique<CanonicalCookie>(
+  return std::make_unique<CanonicalCookie>(
       pc.Name(), pc.Value(), "." + url.host(), cookie_path, creation_time,
       cookie_expires, base::Time(), pc.IsSecure(), pc.IsHttpOnly(),
       pc.SameSite(), pc.Priority());
@@ -159,7 +159,7 @@
   std::vector<std::unique_ptr<CanonicalCookie>> out_cookies;
 
   for (auto it = cookies_.begin(); it != cookies_.end(); it++)
-    out_cookies.push_back(base::MakeUnique<CanonicalCookie>(it->second));
+    out_cookies.push_back(std::make_unique<CanonicalCookie>(it->second));
 
   base::ThreadTaskRunnerHandle::Get()->PostTask(
       FROM_HERE, base::Bind(loaded_callback, base::Passed(&out_cookies)));
@@ -246,7 +246,7 @@
     // The URL must be HTTPS since |secure| can be true or false, and because
     // strict secure cookies are enforced, the cookie will fail to be created if
     // |secure| is true but the URL is an insecure scheme.
-    std::unique_ptr<CanonicalCookie> cc(base::MakeUnique<CanonicalCookie>(
+    std::unique_ptr<CanonicalCookie> cc(std::make_unique<CanonicalCookie>(
         "a", "1", base::StringPrintf("h%05d.izzle", i), "/path", creation_time,
         expiration_time, base::Time(), secure, false,
         CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT));
@@ -254,7 +254,7 @@
     store->AddCookie(*cc);
   }
 
-  return base::MakeUnique<CookieMonster>(store.get(), nullptr);
+  return std::make_unique<CookieMonster>(store.get(), nullptr);
 }
 
 MockSimplePersistentCookieStore::~MockSimplePersistentCookieStore() {
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index af2252e..927725f804 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -105,7 +105,7 @@
 
 struct CookieMonsterTestTraits {
   static std::unique_ptr<CookieStore> Create() {
-    return base::MakeUnique<CookieMonster>(nullptr, nullptr);
+    return std::make_unique<CookieMonster>(nullptr, nullptr);
   }
 
   static const bool supports_http_only = true;
@@ -2774,7 +2774,7 @@
 
   // We have to manually build this cookie because it contains a control
   // character, and our cookie line parser rejects control characters.
-  std::unique_ptr<CanonicalCookie> cc = base::MakeUnique<CanonicalCookie>(
+  std::unique_ptr<CanonicalCookie> cc = std::make_unique<CanonicalCookie>(
       "baz",
       "\x05"
       "boo",
diff --git a/net/cookies/cookie_store_unittest.h b/net/cookies/cookie_store_unittest.h
index 5e561d7..415e37e7 100644
--- a/net/cookies/cookie_store_unittest.h
+++ b/net/cookies/cookie_store_unittest.h
@@ -495,7 +495,7 @@
 
   EXPECT_TRUE(this->SetCanonicalCookie(
       cs,
-      base::MakeUnique<CanonicalCookie>(
+      std::make_unique<CanonicalCookie>(
           "A", "B", foo_foo_host, "/foo", one_hour_ago, one_hour_from_now,
           base::Time(), false /* secure */, false /* httponly */,
           CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT),
@@ -504,7 +504,7 @@
   // it must be different from the one set by the line above.
   EXPECT_TRUE(this->SetCanonicalCookie(
       cs,
-      base::MakeUnique<CanonicalCookie>(
+      std::make_unique<CanonicalCookie>(
           "C", "D", "." + foo_bar_domain, "/bar", two_hours_ago, base::Time(),
           one_hour_ago, false, true, CookieSameSite::DEFAULT_MODE,
           COOKIE_PRIORITY_DEFAULT),
@@ -513,7 +513,7 @@
   // A secure source is required for creating secure cookies.
   EXPECT_FALSE(this->SetCanonicalCookie(
       cs,
-      base::MakeUnique<CanonicalCookie>(
+      std::make_unique<CanonicalCookie>(
           "E", "F", http_foo_host, "/", base::Time(), base::Time(),
           base::Time(), true, false, CookieSameSite::DEFAULT_MODE,
           COOKIE_PRIORITY_DEFAULT),
@@ -523,7 +523,7 @@
   // a secure cookie then overwriting it from a non-secure source should fail.
   EXPECT_TRUE(this->SetCanonicalCookie(
       cs,
-      base::MakeUnique<CanonicalCookie>(
+      std::make_unique<CanonicalCookie>(
           "E", "F", http_foo_host, "/", base::Time(), base::Time(),
           base::Time(), true /* secure */, false /* httponly */,
           CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT),
@@ -531,7 +531,7 @@
 
   EXPECT_FALSE(this->SetCanonicalCookie(
       cs,
-      base::MakeUnique<CanonicalCookie>(
+      std::make_unique<CanonicalCookie>(
           "E", "F", http_foo_host, "/", base::Time(), base::Time(),
           base::Time(), true /* secure */, false /* httponly */,
           CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT),
@@ -542,7 +542,7 @@
     // httponly cookie.
     EXPECT_FALSE(this->SetCanonicalCookie(
         cs,
-        base::MakeUnique<CanonicalCookie>(
+        std::make_unique<CanonicalCookie>(
             "G", "H", http_foo_host, "/unique", base::Time(), base::Time(),
             base::Time(), false /* secure */, true /* httponly */,
             CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT),
@@ -552,7 +552,7 @@
     // an httponly cookie.
     EXPECT_TRUE(this->SetCanonicalCookie(
         cs,
-        base::MakeUnique<CanonicalCookie>(
+        std::make_unique<CanonicalCookie>(
             "G", "H", http_foo_host, "/unique", base::Time(), base::Time(),
             base::Time(), false /* secure */, true /* httponly */,
             CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT),
@@ -560,7 +560,7 @@
 
     EXPECT_FALSE(this->SetCanonicalCookie(
         cs,
-        base::MakeUnique<CanonicalCookie>(
+        std::make_unique<CanonicalCookie>(
             "G", "H", http_foo_host, "/unique", base::Time(), base::Time(),
             base::Time(), false /* secure */, true /* httponly */,
             CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT),
@@ -569,7 +569,7 @@
     // Leave store in same state as if the above tests had been run.
     EXPECT_TRUE(this->SetCanonicalCookie(
         cs,
-        base::MakeUnique<CanonicalCookie>(
+        std::make_unique<CanonicalCookie>(
             "G", "H", http_foo_host, "/unique", base::Time(), base::Time(),
             base::Time(), false /* secure */, true /* httponly */,
             CookieSameSite::DEFAULT_MODE, COOKIE_PRIORITY_DEFAULT),
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index 8beb1d7..5caa8c75 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -67,7 +67,7 @@
   net::TestCompletionCallback cb;
 
   std::unique_ptr<disk_cache::BackendImpl> cache(
-      base::MakeUnique<disk_cache::BackendImpl>(cache_path,
+      std::make_unique<disk_cache::BackendImpl>(cache_path,
                                                 /* cleanup_tracker = */ nullptr,
                                                 /* cache_thread = */ nullptr,
                                                 /* net_log = */ nullptr));
@@ -654,7 +654,7 @@
 
   bool prev = base::ThreadRestrictions::SetIOAllowed(false);
   std::unique_ptr<disk_cache::BackendImpl> cache(
-      base::MakeUnique<disk_cache::BackendImpl>(cache_path_, nullptr, nullptr,
+      std::make_unique<disk_cache::BackendImpl>(cache_path_, nullptr, nullptr,
                                                 nullptr));
   int rv = cache->Init(cb.callback());
   EXPECT_THAT(cb.GetResult(rv), IsError(net::ERR_FAILED));
@@ -2299,7 +2299,7 @@
   net::TestCompletionCallback cb;
 
   std::unique_ptr<disk_cache::BackendImpl> cache(
-      base::MakeUnique<disk_cache::BackendImpl>(cache_path_, nullptr, nullptr,
+      std::make_unique<disk_cache::BackendImpl>(cache_path_, nullptr, nullptr,
                                                 nullptr));
   int rv = cache->Init(cb.callback());
   ASSERT_THAT(cb.GetResult(rv), IsError(net::ERR_FAILED));
@@ -2319,7 +2319,7 @@
   // Instantiate the SimpleCacheTrial, forcing this run into the
   // ExperimentControl group.
   base::FieldTrialList field_trial_list(
-      base::MakeUnique<base::MockEntropyProvider>());
+      std::make_unique<base::MockEntropyProvider>());
   base::FieldTrialList::CreateFieldTrial("SimpleCacheTrial",
                                          "ExperimentControl");
   net::TestCompletionCallback cb;
@@ -2343,7 +2343,7 @@
   // Instantiate the SimpleCacheTrial, forcing this run into the
   // ExperimentControl group.
   base::FieldTrialList field_trial_list(
-      base::MakeUnique<base::MockEntropyProvider>());
+      std::make_unique<base::MockEntropyProvider>());
   base::FieldTrialList::CreateFieldTrial("SimpleCacheTrial",
                                          "ExperimentControl");
 
@@ -2376,7 +2376,7 @@
     // Instantiate the SimpleCacheTrial, forcing this run into the
     // ExperimentControl group.
     base::FieldTrialList field_trial_list(
-        base::MakeUnique<base::MockEntropyProvider>());
+        std::make_unique<base::MockEntropyProvider>());
     base::FieldTrialList::CreateFieldTrial("SimpleCacheTrial",
                                            "ExperimentControl");
 
@@ -2388,14 +2388,14 @@
   // Instantiate the SimpleCacheTrial, forcing this run into the
   // ExperimentNo group.
   base::FieldTrialList field_trial_list(
-      base::MakeUnique<base::MockEntropyProvider>());
+      std::make_unique<base::MockEntropyProvider>());
   base::FieldTrialList::CreateFieldTrial("SimpleCacheTrial", "ExperimentNo");
   net::TestCompletionCallback cb;
 
   const int kRestartCount = 5;
   for (int i = 0; i < kRestartCount; ++i) {
     std::unique_ptr<disk_cache::BackendImpl> cache(
-        base::MakeUnique<disk_cache::BackendImpl>(cache_path_, nullptr, nullptr,
+        std::make_unique<disk_cache::BackendImpl>(cache_path_, nullptr, nullptr,
                                                   nullptr));
     int rv = cache->Init(cb.callback());
     ASSERT_THAT(cb.GetResult(rv), IsOk());
@@ -3349,7 +3349,7 @@
   ASSERT_TRUE(CleanupCacheDir());
   // Want to use our thread since we call SyncInit ourselves.
   std::unique_ptr<disk_cache::BackendImpl> cache(
-      base::MakeUnique<disk_cache::BackendImpl>(
+      std::make_unique<disk_cache::BackendImpl>(
           cache_path_, nullptr, base::ThreadTaskRunnerHandle::Get(), nullptr));
   ASSERT_TRUE(NULL != cache.get());
   cache->SetUnitTestMode();
@@ -3365,7 +3365,7 @@
 
   // Want to use our thread since we call SyncInit ourselves.
   std::unique_ptr<disk_cache::BackendImpl> cache(
-      base::MakeUnique<disk_cache::BackendImpl>(
+      std::make_unique<disk_cache::BackendImpl>(
           cache_path_, nullptr, base::ThreadTaskRunnerHandle::Get(), nullptr));
   ASSERT_TRUE(NULL != cache.get());
   cache->SetUnitTestMode();
diff --git a/net/disk_cache/memory/mem_backend_impl.cc b/net/disk_cache/memory/mem_backend_impl.cc
index 5d1d2c4..0da8e02 100644
--- a/net/disk_cache/memory/mem_backend_impl.cc
+++ b/net/disk_cache/memory/mem_backend_impl.cc
@@ -62,7 +62,7 @@
     int max_bytes,
     net::NetLog* net_log) {
   std::unique_ptr<MemBackendImpl> cache(
-      base::MakeUnique<MemBackendImpl>(net_log));
+      std::make_unique<MemBackendImpl>(net_log));
   cache->SetMaxSize(max_bytes);
   if (cache->Init())
     return cache;
@@ -255,7 +255,7 @@
       return net::ERR_FAILED;
 
     if (!backend_keys_) {
-      backend_keys_ = base::MakeUnique<Strings>(backend_->entries_.size());
+      backend_keys_ = std::make_unique<Strings>(backend_->entries_.size());
       for (const auto& iter : backend_->entries_)
         backend_keys_->push_back(iter.first);
       current_ = backend_keys_->begin();
diff --git a/net/disk_cache/simple/simple_backend_impl.cc b/net/disk_cache/simple/simple_backend_impl.cc
index f06b01d..cb90412 100644
--- a/net/disk_cache/simple/simple_backend_impl.cc
+++ b/net/disk_cache/simple/simple_backend_impl.cc
@@ -280,10 +280,10 @@
 int SimpleBackendImpl::Init(const CompletionCallback& completion_callback) {
   worker_pool_ = g_sequenced_worker_pool.Get().GetTaskRunner();
 
-  index_ = base::MakeUnique<SimpleIndex>(
+  index_ = std::make_unique<SimpleIndex>(
       base::ThreadTaskRunnerHandle::Get(), cleanup_tracker_.get(), this,
       cache_type_,
-      base::MakeUnique<SimpleIndexFile>(cache_runner_, worker_pool_.get(),
+      std::make_unique<SimpleIndexFile>(cache_runner_, worker_pool_.get(),
                                         cache_type_, path_));
   index_->ExecuteWhenReady(
       base::Bind(&RecordIndexLoad, cache_type_, base::TimeTicks::Now()));
diff --git a/net/disk_cache/simple/simple_experiment_unittest.cc b/net/disk_cache/simple/simple_experiment_unittest.cc
index 311a5bc..18d7057 100644
--- a/net/disk_cache/simple/simple_experiment_unittest.cc
+++ b/net/disk_cache/simple/simple_experiment_unittest.cc
@@ -25,8 +25,8 @@
 class SimpleExperimentTest : public testing::Test {
  protected:
   void SetUp() override {
-    field_trial_list_ = base::MakeUnique<base::FieldTrialList>(
-        base::MakeUnique<base::MockEntropyProvider>());
+    field_trial_list_ = std::make_unique<base::FieldTrialList>(
+        std::make_unique<base::MockEntropyProvider>());
   }
   void ConfigureSizeFieldTrial(bool enabled, base::Optional<uint32_t> param) {
     const std::string kTrialName = "SimpleSizeTrial";
diff --git a/net/disk_cache/simple/simple_index_file.cc b/net/disk_cache/simple/simple_index_file.cc
index ff26d4c..388888f 100644
--- a/net/disk_cache/simple/simple_index_file.cc
+++ b/net/disk_cache/simple/simple_index_file.cc
@@ -482,7 +482,7 @@
 
   // Make sure to preallocate in one chunk, so we don't induce fragmentation
   // reallocating a growing buffer.
-  auto buffer = base::MakeUnique<char[]>(file_length);
+  auto buffer = std::make_unique<char[]>(file_length);
 
   int read = file.Read(0, buffer.get(), file_length);
   if (read < file_length) {
diff --git a/net/disk_cache/simple/simple_index_unittest.cc b/net/disk_cache/simple/simple_index_unittest.cc
index ca85fdc..0d6460b 100644
--- a/net/disk_cache/simple/simple_index_unittest.cc
+++ b/net/disk_cache/simple/simple_index_unittest.cc
@@ -125,8 +125,8 @@
     const std::string kTrialName = "EvictWithSizeTrial";
     const std::string kGroupName = "GroupFoo";  // Value not used
 
-    field_trial_list_ = base::MakeUnique<base::FieldTrialList>(
-        base::MakeUnique<base::MockEntropyProvider>());
+    field_trial_list_ = std::make_unique<base::FieldTrialList>(
+        std::make_unique<base::MockEntropyProvider>());
 
     scoped_refptr<base::FieldTrial> trial =
         base::FieldTrialList::CreateFieldTrial(kTrialName, kGroupName);
diff --git a/net/dns/dns_config_service.cc b/net/dns/dns_config_service.cc
index 2ecdea9..561c361 100644
--- a/net/dns/dns_config_service.cc
+++ b/net/dns/dns_config_service.cc
@@ -63,14 +63,14 @@
 }
 
 std::unique_ptr<base::Value> DnsConfig::ToValue() const {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
 
-  auto list = base::MakeUnique<base::ListValue>();
+  auto list = std::make_unique<base::ListValue>();
   for (size_t i = 0; i < nameservers.size(); ++i)
     list->AppendString(nameservers[i].ToString());
   dict->Set("nameservers", std::move(list));
 
-  list = base::MakeUnique<base::ListValue>();
+  list = std::make_unique<base::ListValue>();
   for (size_t i = 0; i < search.size(); ++i)
     list->AppendString(search[i]);
   dict->Set("search", std::move(list));
diff --git a/net/dns/dns_config_service_posix_unittest.cc b/net/dns/dns_config_service_posix_unittest.cc
index 35fcbab..2333ab4 100644
--- a/net/dns/dns_config_service_posix_unittest.cc
+++ b/net/dns/dns_config_service_posix_unittest.cc
@@ -270,7 +270,7 @@
 
   void ExpectChange() {
     EXPECT_FALSE(seen_config_);
-    run_loop_ = base::MakeUnique<base::RunLoop>();
+    run_loop_ = std::make_unique<base::RunLoop>();
     run_loop_->Run();
     EXPECT_TRUE(seen_config_);
     seen_config_ = false;
diff --git a/net/dns/dns_session.cc b/net/dns/dns_session.cc
index cbbf3c35..8303b31 100644
--- a/net/dns/dns_session.cc
+++ b/net/dns/dns_session.cc
@@ -136,7 +136,7 @@
 void DnsSession::InitializeServerStats() {
   server_stats_.clear();
   for (size_t i = 0; i < config_.nameservers.size(); ++i) {
-    server_stats_.push_back(base::MakeUnique<ServerStats>(
+    server_stats_.push_back(std::make_unique<ServerStats>(
         initial_timeout_, rtt_buckets_.Pointer()));
   }
 }
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc
index 25fdfb8e..8dce3623 100644
--- a/net/dns/dns_transaction_unittest.cc
+++ b/net/dns/dns_transaction_unittest.cc
@@ -100,7 +100,7 @@
   // Adds pre-built response from |data| buffer.
   void AddResponseData(const uint8_t* data, size_t length, IoMode mode) {
     CHECK(!provider_.get());
-    AddResponse(base::MakeUnique<DnsResponse>(
+    AddResponse(std::make_unique<DnsResponse>(
                     reinterpret_cast<const char*>(data), length, 0),
                 mode);
   }
@@ -911,7 +911,7 @@
   // examine the answer section until asked to parse it, so truncating it in
   // the answer section would result in the DnsTransaction itself succeeding.
   data->AddResponseWithLength(
-      base::MakeUnique<DnsResponse>(
+      std::make_unique<DnsResponse>(
           reinterpret_cast<const char*>(kT0ResponseDatagram),
           arraysize(kT0ResponseDatagram), 0),
       ASYNC, static_cast<uint16_t>(kT0QuerySize - 1));
@@ -926,7 +926,7 @@
   ConfigureFactory();
   AddAsyncQueryAndRcode(kT0HostName, kT0Qtype,
                         dns_protocol::kRcodeNOERROR | dns_protocol::kFlagTC);
-  AddSocketData(base::MakeUnique<DnsSocketData>(1 /* id */, kT0HostName,
+  AddSocketData(std::make_unique<DnsSocketData>(1 /* id */, kT0HostName,
                                                 kT0Qtype, ASYNC, true));
 
   TransactionHelper helper0(kT0HostName, kT0Qtype, ERR_DNS_TIMED_OUT);
@@ -940,7 +940,7 @@
       new DnsSocketData(0 /* id */, kT0HostName, kT0Qtype, ASYNC, true));
   // Return all but the last byte of the response.
   data->AddResponseWithLength(
-      base::MakeUnique<DnsResponse>(
+      std::make_unique<DnsResponse>(
           reinterpret_cast<const char*>(kT0ResponseDatagram),
           arraysize(kT0ResponseDatagram) - 1, 0),
       ASYNC, static_cast<uint16_t>(arraysize(kT0ResponseDatagram)));
@@ -959,7 +959,7 @@
       new DnsSocketData(0 /* id */, kT0HostName, kT0Qtype, ASYNC, true));
   // Return all but the last byte of the response.
   data->AddResponseWithLength(
-      base::MakeUnique<DnsResponse>(
+      std::make_unique<DnsResponse>(
           reinterpret_cast<const char*>(kT0ResponseDatagram),
           arraysize(kT0ResponseDatagram) - 1, 0),
       SYNCHRONOUS, static_cast<uint16_t>(arraysize(kT0ResponseDatagram)));
diff --git a/net/dns/host_cache.cc b/net/dns/host_cache.cc
index 460043f..50759e1 100644
--- a/net/dns/host_cache.cc
+++ b/net/dns/host_cache.cc
@@ -332,7 +332,7 @@
     } else {
       const AddressList& addresses = entry.addresses();
       // Append all of the resolved addresses.
-      auto addresses_value = base::MakeUnique<base::ListValue>();
+      auto addresses_value = std::make_unique<base::ListValue>();
       for (size_t i = 0; i < addresses.size(); ++i)
         addresses_value->AppendString(addresses[i].ToStringWithoutPort());
       entry_dict->SetList(kAddressesKey, std::move(addresses_value));
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index ec790c4b..161f740 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -1986,7 +1986,7 @@
   }
 
   // Can't complete synchronously. Create and attach request.
-  auto req = base::MakeUnique<RequestImpl>(source_net_log, info, priority,
+  auto req = std::make_unique<RequestImpl>(source_net_log, info, priority,
                                            callback, addresses, job);
   job->AddRequest(req.get());
   *out_req = std::move(req);
@@ -2159,7 +2159,7 @@
   // for it.
   const DnsConfig* dns_config = dns_client_->GetConfig();
   if (!dns_config)
-    return base::MakeUnique<base::DictionaryValue>();
+    return std::make_unique<base::DictionaryValue>();
 
   return dns_config->ToValue();
 }
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index c59f2b7..cf62a3d 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -565,7 +565,7 @@
   // not start until released by |proc_->SignalXXX|.
   Request* CreateRequest(const HostResolver::RequestInfo& info,
                          RequestPriority priority) {
-    requests_.push_back(base::MakeUnique<Request>(
+    requests_.push_back(std::make_unique<Request>(
         info, priority, requests_.size(), resolver_.get(), handler_.get()));
     return requests_.back().get();
   }
diff --git a/net/dns/host_resolver_mojo.cc b/net/dns/host_resolver_mojo.cc
index ac4183ad..8edf869 100644
--- a/net/dns/host_resolver_mojo.cc
+++ b/net/dns/host_resolver_mojo.cc
@@ -94,7 +94,7 @@
                                    host_cache_weak_factory_.GetWeakPtr()));
   request->reset(new RequestImpl(std::move(job)));
 
-  impl_->ResolveDns(base::MakeUnique<HostResolver::RequestInfo>(info),
+  impl_->ResolveDns(std::make_unique<HostResolver::RequestInfo>(info),
                     std::move(handle));
   return ERR_IO_PENDING;
 }
diff --git a/net/dns/mdns_client_impl.cc b/net/dns/mdns_client_impl.cc
index 8dbd6d3..a283d09 100644
--- a/net/dns/mdns_client_impl.cc
+++ b/net/dns/mdns_client_impl.cc
@@ -351,7 +351,7 @@
       listeners_[key];
 
   if (!observer_list)
-    observer_list = base::MakeUnique<base::ObserverList<MDnsListenerImpl>>();
+    observer_list = std::make_unique<base::ObserverList<MDnsListenerImpl>>();
 
   observer_list->AddObserver(listener);
 }
diff --git a/net/dns/mojo_host_resolver_impl_unittest.cc b/net/dns/mojo_host_resolver_impl_unittest.cc
index 1b6722e..887b4d20f 100644
--- a/net/dns/mojo_host_resolver_impl_unittest.cc
+++ b/net/dns/mojo_host_resolver_impl_unittest.cc
@@ -142,7 +142,7 @@
   std::unique_ptr<HostResolver::RequestInfo>
   CreateRequest(const std::string& host, uint16_t port, bool is_my_ip_address) {
     std::unique_ptr<HostResolver::RequestInfo> request =
-        base::MakeUnique<HostResolver::RequestInfo>(HostPortPair(host, port));
+        std::make_unique<HostResolver::RequestInfo>(HostPortPair(host, port));
     request->set_is_my_ip_address(is_my_ip_address);
     request->set_address_family(ADDRESS_FAMILY_IPV4);
     return request;
diff --git a/net/dns/mojo_host_struct_traits.cc b/net/dns/mojo_host_struct_traits.cc
index 6ab69dc..44b7efc 100644
--- a/net/dns/mojo_host_struct_traits.cc
+++ b/net/dns/mojo_host_struct_traits.cc
@@ -61,7 +61,7 @@
   if (!data.ReadAddressFamily(&address_family))
     return false;
 
-  *out = base::MakeUnique<net::HostResolver::RequestInfo>(
+  *out = std::make_unique<net::HostResolver::RequestInfo>(
       net::HostPortPair(host.as_string(), data.port()));
   net::HostResolver::RequestInfo& request = **out;
   request.set_address_family(address_family);
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store.cc b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
index e67f650..070b337 100644
--- a/net/extras/sqlite/sqlite_persistent_cookie_store.cc
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store.cc
@@ -823,7 +823,7 @@
     } else {
       value = smt.ColumnString(3);
     }
-    std::unique_ptr<CanonicalCookie> cc(base::MakeUnique<CanonicalCookie>(
+    std::unique_ptr<CanonicalCookie> cc(std::make_unique<CanonicalCookie>(
         smt.ColumnString(2),                           // name
         value,                                         // value
         smt.ColumnString(1),                           // domain
diff --git a/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc b/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
index b8fd6c5..942858b 100644
--- a/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
+++ b/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc
@@ -549,7 +549,7 @@
 
   // Add some cookies in by hand.
   base::FilePath store_name(temp_dir_.GetPath().Append(kCookieFilename));
-  std::unique_ptr<sql::Connection> db(base::MakeUnique<sql::Connection>());
+  std::unique_ptr<sql::Connection> db(std::make_unique<sql::Connection>());
   ASSERT_TRUE(db->Open(store_name));
   sql::Statement stmt(db->GetUniqueStatement(
       "INSERT INTO cookies (creation_utc, host_key, name, value, "
diff --git a/net/ftp/ftp_network_layer.cc b/net/ftp/ftp_network_layer.cc
index 3167803..d2c4a5d 100644
--- a/net/ftp/ftp_network_layer.cc
+++ b/net/ftp/ftp_network_layer.cc
@@ -25,7 +25,7 @@
   if (suspended_)
     return std::unique_ptr<FtpTransaction>();
 
-  return base::MakeUnique<FtpNetworkTransaction>(
+  return std::make_unique<FtpNetworkTransaction>(
       session_->host_resolver(), ClientSocketFactory::GetDefaultFactory());
 }
 
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc
index 542cd2a..74caf028 100644
--- a/net/ftp/ftp_network_transaction.cc
+++ b/net/ftp/ftp_network_transaction.cc
@@ -261,7 +261,7 @@
   net_log_ = net_log;
   request_ = request_info;
 
-  ctrl_response_buffer_ = base::MakeUnique<FtpCtrlResponseBuffer>(net_log_);
+  ctrl_response_buffer_ = std::make_unique<FtpCtrlResponseBuffer>(net_log_);
 
   if (request_->url.has_username()) {
     base::string16 username;
@@ -347,7 +347,7 @@
   user_callback_.Reset();
   response_ = FtpResponseInfo();
   read_ctrl_buf_ = new IOBuffer(kCtrlBufLen);
-  ctrl_response_buffer_ = base::MakeUnique<FtpCtrlResponseBuffer>(net_log_);
+  ctrl_response_buffer_ = std::make_unique<FtpCtrlResponseBuffer>(net_log_);
   read_data_buf_ = nullptr;
   read_data_buf_len_ = 0;
   if (write_buf_.get())
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index 7159c76..3b04c6e4 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -781,8 +781,8 @@
   // the default one. Only needs to be called if a test runs multiple
   // transactions.
   void SetUpTransaction() {
-    mock_socket_factory_ = base::MakeUnique<MockClientSocketFactory>();
-    transaction_ = base::MakeUnique<FtpNetworkTransaction>(
+    mock_socket_factory_ = std::make_unique<MockClientSocketFactory>();
+    transaction_ = std::make_unique<FtpNetworkTransaction>(
         host_resolver_.get(), mock_socket_factory_.get());
   }
 
@@ -816,7 +816,7 @@
     };
 
     std::unique_ptr<StaticSocketDataProvider> data_socket =
-        base::MakeUnique<StaticSocketDataProvider>(
+        std::make_unique<StaticSocketDataProvider>(
             data_reads, arraysize(data_reads), nullptr, 0);
     mock_socket_factory_->AddSocketDataProvider(data_socket.get());
     FtpRequestInfo request_info = GetRequestInfo(request);
diff --git a/net/http/bidirectional_stream.cc b/net/http/bidirectional_stream.cc
index 224976a..cbcbdd6 100644
--- a/net/http/bidirectional_stream.cc
+++ b/net/http/bidirectional_stream.cc
@@ -39,7 +39,7 @@
 std::unique_ptr<base::Value> NetLogHeadersCallback(
     const SpdyHeaderBlock* headers,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->Set("headers", ElideSpdyHeaderBlockForNetLog(*headers, capture_mode));
   return std::move(dict);
 }
@@ -48,7 +48,7 @@
                                             const std::string* method,
                                             const HttpRequestHeaders* headers,
                                             NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("url", url->possibly_invalid_spec());
   dict->SetString("method", *method);
   std::string empty;
@@ -73,7 +73,7 @@
                           session,
                           send_request_headers_automatically,
                           delegate,
-                          base::MakeUnique<base::Timer>(false, false)) {}
+                          std::make_unique<base::Timer>(false, false)) {}
 
 BidirectionalStream::BidirectionalStream(
     std::unique_ptr<BidirectionalStreamRequestInfo> request_info,
diff --git a/net/http/bidirectional_stream_unittest.cc b/net/http/bidirectional_stream_unittest.cc
index 2cc6b3d..b6dd52c 100644
--- a/net/http/bidirectional_stream_unittest.cc
+++ b/net/http/bidirectional_stream_unittest.cc
@@ -88,7 +88,7 @@
   TestDelegateBase(IOBuffer* read_buf, int read_buf_len)
       : TestDelegateBase(read_buf,
                          read_buf_len,
-                         base::MakeUnique<base::Timer>(false, false)) {}
+                         std::make_unique<base::Timer>(false, false)) {}
 
   TestDelegateBase(IOBuffer* read_buf,
                    int read_buf_len,
diff --git a/net/http/broken_alternative_services_unittest.cc b/net/http/broken_alternative_services_unittest.cc
index 28366b64..318c2dc 100644
--- a/net/http/broken_alternative_services_unittest.cc
+++ b/net/http/broken_alternative_services_unittest.cc
@@ -337,12 +337,12 @@
   base::TimeDelta delay1 = base::TimeDelta::FromMinutes(1);
 
   std::unique_ptr<BrokenAlternativeServiceList> broken_list =
-      base::MakeUnique<BrokenAlternativeServiceList>();
+      std::make_unique<BrokenAlternativeServiceList>();
   broken_list->push_back(
       {alternative_service1, broken_services_clock_->NowTicks() + delay1});
 
   std::unique_ptr<RecentlyBrokenAlternativeServices> recently_broken_map =
-      base::MakeUnique<RecentlyBrokenAlternativeServices>(
+      std::make_unique<RecentlyBrokenAlternativeServices>(
           RecentlyBrokenAlternativeServices::NO_AUTO_EVICT);
   recently_broken_map->Put(alternative_service1, 1);
   recently_broken_map->Put(alternative_service2, 2);
@@ -410,7 +410,7 @@
   AlternativeService alternative_service3(kProtoQUIC, "foo3", 443);
 
   std::unique_ptr<BrokenAlternativeServiceList> broken_list =
-      base::MakeUnique<BrokenAlternativeServiceList>();
+      std::make_unique<BrokenAlternativeServiceList>();
   broken_list->push_back(
       {alternative_service1,
        broken_services_clock_->NowTicks() + base::TimeDelta::FromMinutes(3)});
@@ -419,7 +419,7 @@
        broken_services_clock_->NowTicks() + base::TimeDelta::FromMinutes(1)});
 
   std::unique_ptr<RecentlyBrokenAlternativeServices> recently_broken_map =
-      base::MakeUnique<RecentlyBrokenAlternativeServices>(
+      std::make_unique<RecentlyBrokenAlternativeServices>(
           RecentlyBrokenAlternativeServices::NO_AUTO_EVICT);
   recently_broken_map->Put(alternative_service1, 1);
   recently_broken_map->Put(alternative_service3, 1);
@@ -565,13 +565,13 @@
       alternative_service2));
 
   std::unique_ptr<BrokenAlternativeServiceList> broken_list =
-      base::MakeUnique<BrokenAlternativeServiceList>();
+      std::make_unique<BrokenAlternativeServiceList>();
   broken_list->push_back(
       {alternative_service1,
        broken_services_clock_->NowTicks() + base::TimeDelta::FromMinutes(1)});
 
   std::unique_ptr<RecentlyBrokenAlternativeServices> recently_broken_map =
-      base::MakeUnique<RecentlyBrokenAlternativeServices>(
+      std::make_unique<RecentlyBrokenAlternativeServices>(
           RecentlyBrokenAlternativeServices::NO_AUTO_EVICT);
   recently_broken_map->Put(alternative_service2, 2);
 
diff --git a/net/http/http_auth_handler_factory.cc b/net/http/http_auth_handler_factory.cc
index 0dd89c9..cf3c32f3 100644
--- a/net/http/http_auth_handler_factory.cc
+++ b/net/http/http_auth_handler_factory.cc
@@ -86,10 +86,10 @@
     HttpAuthHandlerNegotiate::Factory* negotiate_factory =
         new HttpAuthHandlerNegotiate::Factory();
 #if defined(OS_WIN)
-    negotiate_factory->set_library(base::MakeUnique<SSPILibraryDefault>());
+    negotiate_factory->set_library(std::make_unique<SSPILibraryDefault>());
 #elif defined(OS_POSIX) && !defined(OS_ANDROID)
     negotiate_factory->set_library(
-        base::MakeUnique<GSSAPISharedLibrary>(prefs.GssapiLibraryName()));
+        std::make_unique<GSSAPISharedLibrary>(prefs.GssapiLibraryName()));
 #endif  // defined(OS_POSIX) && !defined(OS_ANDROID)
     negotiate_factory->set_host_resolver(host_resolver);
     registry_factory->RegisterSchemeFactory(kNegotiateAuthScheme,
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc
index 7471ed1..356d9714 100644
--- a/net/http/http_auth_handler_negotiate_unittest.cc
+++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -377,7 +377,7 @@
   negotiate_factory->set_host_resolver(host_resolver);
   negotiate_factory->set_http_auth_preferences(&http_auth_preferences);
   negotiate_factory->set_library(
-      base::MakeUnique<GSSAPISharedLibrary>("/this/library/does/not/exist"));
+      std::make_unique<GSSAPISharedLibrary>("/this/library/does/not/exist"));
 
   GURL gurl("http://www.example.com");
   std::unique_ptr<HttpAuthHandler> generic_handler;
diff --git a/net/http/http_basic_state_unittest.cc b/net/http/http_basic_state_unittest.cc
index 9eac510..c0d337ab 100644
--- a/net/http/http_basic_state_unittest.cc
+++ b/net/http/http_basic_state_unittest.cc
@@ -26,7 +26,7 @@
 }
 
 TEST(HttpBasicStateTest, ConstructsProperlyWithDifferentOptions) {
-  const HttpBasicState state(base::MakeUnique<ClientSocketHandle>(),
+  const HttpBasicState state(std::make_unique<ClientSocketHandle>(),
                              false /* using_proxy */,
                              true /* http_09_on_non_default_ports_enabled */);
   EXPECT_FALSE(state.using_proxy());
@@ -44,7 +44,7 @@
 }
 
 TEST(HttpBasicStateTest, InitializeWorks) {
-  HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), false, false);
+  HttpBasicState state(std::make_unique<ClientSocketHandle>(), false, false);
   const HttpRequestInfo request_info;
   EXPECT_EQ(OK, state.Initialize(&request_info, LOW, NetLogWithSource(),
                                  CompletionCallback()));
@@ -52,7 +52,7 @@
 }
 
 TEST(HttpBasicStateTest, DeleteParser) {
-  HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), false, false);
+  HttpBasicState state(std::make_unique<ClientSocketHandle>(), false, false);
   const HttpRequestInfo request_info;
   state.Initialize(&request_info, LOW, NetLogWithSource(),
                    CompletionCallback());
@@ -63,7 +63,7 @@
 
 TEST(HttpBasicStateTest, GenerateRequestLineNoProxy) {
   const bool use_proxy = false;
-  HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), use_proxy,
+  HttpBasicState state(std::make_unique<ClientSocketHandle>(), use_proxy,
                        false);
   HttpRequestInfo request_info;
   request_info.url = GURL("http://www.example.com/path?foo=bar#hoge");
@@ -75,7 +75,7 @@
 
 TEST(HttpBasicStateTest, GenerateRequestLineWithProxy) {
   const bool use_proxy = true;
-  HttpBasicState state(base::MakeUnique<ClientSocketHandle>(), use_proxy,
+  HttpBasicState state(std::make_unique<ClientSocketHandle>(), use_proxy,
                        false);
   HttpRequestInfo request_info;
   request_info.url = GURL("http://www.example.com/path?foo=bar#hoge");
diff --git a/net/http/http_cache.cc b/net/http/http_cache.cc
index a67131a..9e4ec021 100644
--- a/net/http/http_cache.cc
+++ b/net/http/http_cache.cc
@@ -295,7 +295,7 @@
 HttpCache::HttpCache(HttpNetworkSession* session,
                      std::unique_ptr<BackendFactory> backend_factory,
                      bool is_main_cache)
-    : HttpCache(base::MakeUnique<HttpNetworkLayer>(session),
+    : HttpCache(std::make_unique<HttpNetworkLayer>(session),
                 std::move(backend_factory),
                 is_main_cache) {}
 
@@ -324,7 +324,7 @@
     return;
 
   session->SetServerPushDelegate(
-      base::MakeUnique<HttpCacheLookupManager>(this));
+      std::make_unique<HttpCacheLookupManager>(this));
 }
 
 HttpCache::~HttpCache() {
@@ -513,7 +513,7 @@
   building_backend_ = true;
 
   std::unique_ptr<WorkItem> item =
-      base::MakeUnique<WorkItem>(WI_CREATE_BACKEND, nullptr, callback, backend);
+      std::make_unique<WorkItem>(WI_CREATE_BACKEND, nullptr, callback, backend);
 
   // This is the only operation that we can do that is not related to any given
   // entry, so we use an empty key for it.
@@ -547,7 +547,7 @@
   if (!building_backend_)
     return ERR_FAILED;
 
-  std::unique_ptr<WorkItem> item = base::MakeUnique<WorkItem>(
+  std::unique_ptr<WorkItem> item = std::make_unique<WorkItem>(
       WI_CREATE_BACKEND, trans, CompletionCallback(), nullptr);
   PendingOp* pending_op = GetPendingOp(std::string());
   DCHECK(pending_op->writer);
@@ -613,7 +613,7 @@
 
 int HttpCache::AsyncDoomEntry(const std::string& key, Transaction* trans) {
   std::unique_ptr<WorkItem> item =
-      base::MakeUnique<WorkItem>(WI_DOOM_ENTRY, trans, nullptr);
+      std::make_unique<WorkItem>(WI_DOOM_ENTRY, trans, nullptr);
   PendingOp* pending_op = GetPendingOp(key);
   if (pending_op->writer) {
     pending_op->pending_queue.push_back(std::move(item));
@@ -744,7 +744,7 @@
   }
 
   std::unique_ptr<WorkItem> item =
-      base::MakeUnique<WorkItem>(WI_OPEN_ENTRY, trans, entry);
+      std::make_unique<WorkItem>(WI_OPEN_ENTRY, trans, entry);
   PendingOp* pending_op = GetPendingOp(key);
   if (pending_op->writer) {
     pending_op->pending_queue.push_back(std::move(item));
@@ -774,7 +774,7 @@
   }
 
   std::unique_ptr<WorkItem> item =
-      base::MakeUnique<WorkItem>(WI_CREATE_ENTRY, trans, entry);
+      std::make_unique<WorkItem>(WI_CREATE_ENTRY, trans, entry);
   PendingOp* pending_op = GetPendingOp(key);
   if (pending_op->writer) {
     pending_op->pending_queue.push_back(std::move(item));
diff --git a/net/http/http_cache_lookup_manager.cc b/net/http/http_cache_lookup_manager.cc
index ab80006..e1c43eb57 100644
--- a/net/http/http_cache_lookup_manager.cc
+++ b/net/http/http_cache_lookup_manager.cc
@@ -72,7 +72,7 @@
   if (base::ContainsKey(lookup_transactions_, pushed_url))
     return;
 
-  auto lookup = base::MakeUnique<LookupTransaction>(std::move(push_helper),
+  auto lookup = std::make_unique<LookupTransaction>(std::move(push_helper),
                                                     session_net_log.net_log());
   // TODO(zhongyi): add events in session net log to log the creation of
   // LookupTransaction.
diff --git a/net/http/http_cache_lookup_manager_unittest.cc b/net/http/http_cache_lookup_manager_unittest.cc
index be43e05..81b2bfec 100644
--- a/net/http/http_cache_lookup_manager_unittest.cc
+++ b/net/http/http_cache_lookup_manager_unittest.cc
@@ -41,7 +41,7 @@
       "Last-Modified: Wed, 28 Nov 2007 00:40:09 GMT\n",
       base::Time(), "<html><body>Google Blah Blah</body></html>",
       TEST_MODE_NORMAL, nullptr, nullptr, nullptr, 0, 0, OK};
-  return base::MakeUnique<MockTransaction>(mock_trans);
+  return std::make_unique<MockTransaction>(mock_trans);
 }
 
 void PopulateCacheEntry(HttpCache* cache, const GURL& request_url) {
@@ -88,7 +88,7 @@
   GURL request_url("http://www.example.com/pushed.jpg");
 
   std::unique_ptr<MockServerPushHelper> push_helper =
-      base::MakeUnique<MockServerPushHelper>(request_url);
+      std::make_unique<MockServerPushHelper>(request_url);
   MockServerPushHelper* push_helper_ptr = push_helper.get();
 
   // Receive a server push and should not cancel the push.
@@ -108,7 +108,7 @@
   GURL request_url("http://www.example.com/pushed.jpg");
 
   std::unique_ptr<MockServerPushHelper> push_helper =
-      base::MakeUnique<MockServerPushHelper>(request_url);
+      std::make_unique<MockServerPushHelper>(request_url);
   MockServerPushHelper* push_helper_ptr = push_helper.get();
 
   // Receive a server push and should not cancel the push.
@@ -118,7 +118,7 @@
 
   // Receive another server push for the same url.
   std::unique_ptr<MockServerPushHelper> push_helper2 =
-      base::MakeUnique<MockServerPushHelper>(request_url);
+      std::make_unique<MockServerPushHelper>(request_url);
   MockServerPushHelper* push_helper_ptr2 = push_helper2.get();
   EXPECT_CALL(*push_helper_ptr2, Cancel()).Times(0);
   push_delegate.OnPush(std::move(push_helper2), NetLogWithSource());
@@ -149,7 +149,7 @@
   AddMockTransaction(mock_trans.get());
 
   std::unique_ptr<MockServerPushHelper> push_helper =
-      base::MakeUnique<MockServerPushHelper>(request_url);
+      std::make_unique<MockServerPushHelper>(request_url);
   MockServerPushHelper* push_helper_ptr = push_helper.get();
 
   // Receive a server push and should cancel the push.
@@ -186,7 +186,7 @@
   AddMockTransaction(mock_trans.get());
 
   std::unique_ptr<MockServerPushHelper> push_helper =
-      base::MakeUnique<MockServerPushHelper>(request_url);
+      std::make_unique<MockServerPushHelper>(request_url);
   MockServerPushHelper* push_helper_ptr = push_helper.get();
 
   // Receive a server push and should cancel the push eventually.
@@ -194,7 +194,7 @@
   push_delegate.OnPush(std::move(push_helper), NetLogWithSource());
 
   std::unique_ptr<MockServerPushHelper> push_helper2 =
-      base::MakeUnique<MockServerPushHelper>(request_url);
+      std::make_unique<MockServerPushHelper>(request_url);
   MockServerPushHelper* push_helper_ptr2 = push_helper2.get();
 
   // Receive another server push and should not cancel the push.
@@ -231,7 +231,7 @@
   AddMockTransaction(mock_trans.get());
 
   std::unique_ptr<MockServerPushHelper> push_helper =
-      base::MakeUnique<MockServerPushHelper>(request_url);
+      std::make_unique<MockServerPushHelper>(request_url);
   MockServerPushHelper* push_helper_ptr = push_helper.get();
 
   // Receive a server push and should cancel the push eventually.
@@ -248,7 +248,7 @@
   // Receive the second server push with same url after the first lookup
   // finishes, and should cancel the push.
   std::unique_ptr<MockServerPushHelper> push_helper2 =
-      base::MakeUnique<MockServerPushHelper>(request_url);
+      std::make_unique<MockServerPushHelper>(request_url);
   MockServerPushHelper* push_helper_ptr2 = push_helper2.get();
 
   EXPECT_CALL(*push_helper_ptr2, Cancel()).Times(1);
@@ -266,7 +266,7 @@
   // Receive the third server push with a different url after lookup for a
   // similar server push has been completed, should not cancel the push.
   std::unique_ptr<MockServerPushHelper> push_helper3 =
-      base::MakeUnique<MockServerPushHelper>(request_url2);
+      std::make_unique<MockServerPushHelper>(request_url2);
   MockServerPushHelper* push_helper_ptr3 = push_helper3.get();
 
   EXPECT_CALL(*push_helper_ptr3, Cancel()).Times(0);
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc
index 90c3a8f1..89cfbab 100644
--- a/net/http/http_cache_unittest.cc
+++ b/net/http/http_cache_unittest.cc
@@ -753,7 +753,7 @@
 
 TEST(HttpCache, SimpleGETNoDiskCache2) {
   // This will initialize a cache object with NULL backend.
-  auto factory = base::MakeUnique<MockBlockingBackendFactory>();
+  auto factory = std::make_unique<MockBlockingBackendFactory>();
   factory->set_fail(true);
   factory->FinishCreation();  // We'll complete synchronously.
   MockHttpCache cache(std::move(factory));
@@ -814,7 +814,7 @@
 
   MockHttpRequest request(kSimpleGET_Transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -861,7 +861,7 @@
   MockHttpRequest request(kSimpleGET_Transaction);
 
   // Now fail to read from the cache.
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -1363,7 +1363,7 @@
   const int kNumTransactions = 5;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -1431,7 +1431,7 @@
   const int kNumTransactions = 5;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -1497,7 +1497,7 @@
   scoped_refptr<MockDiskEntry> first_entry;
   scoped_refptr<MockDiskEntry> second_entry;
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -1583,7 +1583,7 @@
 
   scoped_refptr<MockDiskEntry> first_entry;
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -1666,7 +1666,7 @@
   const int kNumTransactions = 2;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
   }
 
   // Let 1st transaction complete headers phase for ranges 40-49.
@@ -1765,7 +1765,7 @@
   const int kNumTransactions = 2;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
   }
 
   // Let 1st transaction complete headers phase for ranges 40-49.
@@ -1850,7 +1850,7 @@
   const int kNumTransactions = 2;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
   }
 
   // Let 1st transaction complete headers phase for ranges 40-49.
@@ -1950,7 +1950,7 @@
   const int kNumTransactions = 2;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
   }
 
   // Let 1st transaction complete headers phase for ranges 40-59.
@@ -2043,7 +2043,7 @@
   std::vector<std::unique_ptr<Context>> context_list;
   const int kNumTransactions = 5;
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
     c->result = cache.CreateTransaction(&c->trans);
     ASSERT_THAT(c->result, IsOk());
@@ -2098,7 +2098,7 @@
   std::vector<std::unique_ptr<Context>> context_list;
   const int kNumTransactions = 5;
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
     c->result = cache.CreateTransaction(&c->trans);
     ASSERT_THAT(c->result, IsOk());
@@ -2166,7 +2166,7 @@
   const int kNumTransactions = 2;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     MockHttpRequest* this_request = &request;
@@ -2227,7 +2227,7 @@
   const int kNumTransactions = 2;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2277,7 +2277,7 @@
   const int kNumTransactions = 2;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     if (i == 1)
@@ -2328,7 +2328,7 @@
   std::vector<std::unique_ptr<Context>> context_list;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2369,7 +2369,7 @@
   kNumTransactions = 6;
 
   for (int i = 4; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2426,7 +2426,7 @@
   std::vector<std::unique_ptr<Context>> context_list;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2499,7 +2499,7 @@
   std::vector<std::unique_ptr<Context>> context_list;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2564,7 +2564,7 @@
   std::vector<std::unique_ptr<Context>> context_list;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2632,7 +2632,7 @@
   std::vector<std::unique_ptr<Context>> context_list;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2682,7 +2682,7 @@
   std::vector<std::unique_ptr<Context>> context_list;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     auto& c = context_list[i];
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2762,7 +2762,7 @@
   const int kNumTransactions = 5;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     Context* c = context_list[i].get();
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2842,7 +2842,7 @@
   const int kNumTransactions = 4;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     Context* c = context_list[i].get();
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2893,7 +2893,7 @@
   const int kNumTransactions = 3;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     Context* c = context_list[i].get();
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2941,7 +2941,7 @@
   const int kNumTransactions = 2;
 
   for (int i = 0; i < kNumTransactions; ++i) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     Context* c = context_list[i].get();
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -2998,7 +2998,7 @@
   const int kNumTransactions = 5;
 
   for (int i = 0; i < kNumTransactions; i++) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     Context* c = context_list[i].get();
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -3044,7 +3044,7 @@
 
   MockHttpRequest request(kSimpleGET_Transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
 
   c->result = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(c->result, IsOk());
@@ -3073,7 +3073,7 @@
   const int kNumTransactions = 5;
 
   for (int i = 0; i < kNumTransactions; i++) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     Context* c = context_list[i].get();
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -3189,8 +3189,8 @@
 // Tests that we can delete the HttpCache and deal with queued transactions
 // ("waiting for the backend" as opposed to Active or Doomed entries).
 TEST(HttpCache, SimpleGET_ManyWriters_DeleteCache) {
-  auto cache = base::MakeUnique<MockHttpCache>(
-      base::MakeUnique<MockBackendNoCbFactory>());
+  auto cache = std::make_unique<MockHttpCache>(
+      std::make_unique<MockBackendNoCbFactory>());
 
   MockHttpRequest request(kSimpleGET_Transaction);
 
@@ -3198,7 +3198,7 @@
   const int kNumTransactions = 5;
 
   for (int i = 0; i < kNumTransactions; i++) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     Context* c = context_list[i].get();
 
     c->result = cache->CreateTransaction(&c->trans);
@@ -3231,7 +3231,7 @@
   const int kNumTransactions = 3;
 
   for (int i = 0; i < kNumTransactions; i++) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     Context* c = context_list[i].get();
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -3277,7 +3277,7 @@
   const int kNumTransactions = 3;
 
   for (int i = 0; i < kNumTransactions; i++) {
-    context_list.push_back(base::MakeUnique<Context>());
+    context_list.push_back(std::make_unique<Context>());
     Context* c = context_list[i].get();
 
     c->result = cache.CreateTransaction(&c->trans);
@@ -3317,11 +3317,11 @@
 // Tests that we can delete the cache while creating the backend.
 TEST(HttpCache, DeleteCacheWaitingForBackend) {
   MockBlockingBackendFactory* factory = new MockBlockingBackendFactory();
-  auto cache = base::MakeUnique<MockHttpCache>(base::WrapUnique(factory));
+  auto cache = std::make_unique<MockHttpCache>(base::WrapUnique(factory));
 
   MockHttpRequest request(kSimpleGET_Transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   c->result = cache->CreateTransaction(&c->trans);
   ASSERT_THAT(c->result, IsOk());
 
@@ -3359,7 +3359,7 @@
   // Now let's queue a regular transaction
   MockHttpRequest request(kSimpleGET_Transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   c->result = cache->CreateTransaction(&c->trans);
   ASSERT_THAT(c->result, IsOk());
 
@@ -4364,7 +4364,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers),
                                               kUploadId);
   MockHttpRequest request(transaction);
@@ -4397,7 +4397,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers),
                                               kUploadId);
 
@@ -4418,7 +4418,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 1);
 
   MockTransaction transaction(kSimplePOST_Transaction);
@@ -4458,7 +4458,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 1);
 
   transaction.method = "POST";
@@ -4498,7 +4498,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "POST";
@@ -4523,14 +4523,14 @@
 // Tests that processing a POST before creating the backend doesn't crash.
 TEST(HttpCache, SimplePOST_NoUploadId_NoBackend) {
   // This will initialize a cache object with NULL backend.
-  auto factory = base::MakeUnique<MockBlockingBackendFactory>();
+  auto factory = std::make_unique<MockBlockingBackendFactory>();
   factory->set_fail(true);
   factory->FinishCreation();
   MockHttpCache cache(std::move(factory));
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   MockTransaction transaction(kSimplePOST_Transaction);
@@ -4560,7 +4560,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 1);
 
   transaction.method = "POST";
@@ -4872,7 +4872,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   MockHttpRequest request(transaction);
@@ -4902,7 +4902,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "PUT";
@@ -4939,7 +4939,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "PUT";
@@ -4978,7 +4978,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "PUT";
@@ -5009,7 +5009,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   MockHttpRequest request(transaction);
@@ -5039,7 +5039,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello", 5));
+      std::make_unique<UploadBytesElementReader>("hello", 5));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   transaction.method = "DELETE";
@@ -6596,7 +6596,7 @@
 
   MockHttpRequest request(kRangeGET_TransactionOK);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -6641,7 +6641,7 @@
   MockHttpRequest request(kRangeGET_TransactionOK);
   request.load_flags |= LOAD_VALIDATE_CACHE;
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -6686,7 +6686,7 @@
   MockHttpRequest request(kRangeGET_TransactionOK);
   request.load_flags |= LOAD_VALIDATE_CACHE;
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -6713,7 +6713,7 @@
   // message loop. This means that a new transaction will just reuse the same
   // active entry (no open or create).
 
-  c = base::MakeUnique<Context>();
+  c = std::make_unique<Context>();
   rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -6867,7 +6867,7 @@
 // Tests that we don't crash with a range request if the disk cache was not
 // initialized properly.
 TEST(HttpCache, RangeGET_NoDiskCache) {
-  auto factory = base::MakeUnique<MockBlockingBackendFactory>();
+  auto factory = std::make_unique<MockBlockingBackendFactory>();
   factory->set_fail(true);
   factory->FinishCreation();  // We'll complete synchronously.
   MockHttpCache cache(std::move(factory));
@@ -7065,7 +7065,7 @@
 
   MockHttpRequest request(kSimpleGET_Transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -7095,7 +7095,7 @@
 
   MockHttpRequest request(kSimpleGET_Transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -7138,7 +7138,7 @@
   AddMockTransaction(&transaction);
   MockHttpRequest request(transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -7180,7 +7180,7 @@
       "Etag: \"foopy\"\n";
   MockHttpRequest request(transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
 
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
@@ -7234,7 +7234,7 @@
   transaction.status = "HTTP/1.1 2";
   MockHttpRequest request(transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
 
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
@@ -7288,7 +7288,7 @@
       "Etag: \"foopy\"\n";
   MockHttpRequest request(transaction);
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -7314,7 +7314,7 @@
   ScopedMockTransaction transaction(kRangeGET_TransactionOK);
   transaction.request_headers = "Range: bytes = 0-19\r\n" EXTRA_HEADER;
 
-  auto request = base::MakeUnique<MockHttpRequest>(transaction);
+  auto request = std::make_unique<MockHttpRequest>(transaction);
   std::unique_ptr<HttpTransaction> trans;
 
   int rv = cache.http_cache()->CreateTransaction(DEFAULT_PRIORITY, &trans);
@@ -7341,7 +7341,7 @@
   ScopedMockTransaction transaction(kRangeGET_TransactionOK);
   transaction.request_headers = "Range: bytes = 30-49\r\n" EXTRA_HEADER;
 
-  auto request = base::MakeUnique<MockHttpRequest>(transaction);
+  auto request = std::make_unique<MockHttpRequest>(transaction);
   std::unique_ptr<HttpTransaction> trans;
 
   int rv = cache.http_cache()->CreateTransaction(DEFAULT_PRIORITY, &trans);
@@ -7463,7 +7463,7 @@
   AddMockTransaction(&transaction);
 
   MockHttpRequest request(transaction);
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
 
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
@@ -7472,7 +7472,7 @@
   // before the first one gets the response from the server and dooms the entry,
   // otherwise it will just create a new entry without being queued to the first
   // request.
-  auto pending = base::MakeUnique<Context>();
+  auto pending = std::make_unique<Context>();
   ASSERT_THAT(cache.CreateTransaction(&pending->trans), IsOk());
 
   rv = c->trans->Start(&request, c->callback.callback(), NetLogWithSource());
@@ -7556,7 +7556,7 @@
   transaction.request_headers = EXTRA_HEADER;
   transaction.data = kFullRangeData;
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -7591,7 +7591,7 @@
   transaction.data = kFullRangeData;
   RangeTransactionServer handler;
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -7642,7 +7642,7 @@
       "Range: bytes = 0-79\r\n"
       "X-Require-Mock-Auth-Alt: dummy\r\n" EXTRA_HEADER;
 
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -7701,7 +7701,7 @@
   transaction.request_headers = EXTRA_HEADER;
 
   MockHttpRequest request(transaction);
-  auto c = base::MakeUnique<Context>();
+  auto c = std::make_unique<Context>();
   int rv = cache.CreateTransaction(&c->trans);
   ASSERT_THAT(rv, IsOk());
 
@@ -8047,7 +8047,7 @@
 
 // Ensure that we don't crash by if left-behind transactions.
 TEST(HttpCache, OutlivedTransactions) {
-  auto cache = base::MakeUnique<MockHttpCache>();
+  auto cache = std::make_unique<MockHttpCache>();
 
   std::unique_ptr<HttpTransaction> trans;
   EXPECT_THAT(cache->CreateTransaction(&trans), IsOk());
@@ -9317,7 +9317,7 @@
   mock_transaction.response_headers = "Cache-Control: no-store\n";
   MockHttpRequest request(mock_transaction);
 
-  auto first = base::MakeUnique<Context>();
+  auto first = std::make_unique<Context>();
   first->result = cache.CreateTransaction(&first->trans);
   ASSERT_THAT(first->result, IsOk());
   EXPECT_EQ(LOAD_STATE_IDLE, first->trans->GetLoadState());
@@ -9333,7 +9333,7 @@
   // Here we have read the response header but not read the response body yet.
 
   // Let us create the second (read) transaction.
-  auto second = base::MakeUnique<Context>();
+  auto second = std::make_unique<Context>();
   second->result = cache.CreateTransaction(&second->trans);
   ASSERT_THAT(second->result, IsOk());
   EXPECT_EQ(LOAD_STATE_IDLE, second->trans->GetLoadState());
@@ -9572,7 +9572,7 @@
 
   base::trace_event::MemoryDumpArgs dump_args = {GetParam()};
   auto process_memory_dump =
-      base::MakeUnique<base::trace_event::ProcessMemoryDump>(nullptr,
+      std::make_unique<base::trace_event::ProcessMemoryDump>(nullptr,
                                                              dump_args);
   base::trace_event::MemoryAllocatorDump* parent_dump =
       process_memory_dump->CreateAllocatorDump(
diff --git a/net/http/http_cache_writers_unittest.cc b/net/http/http_cache_writers_unittest.cc
index 28bb834..8961b65 100644
--- a/net/http/http_cache_writers_unittest.cc
+++ b/net/http/http_cache_writers_unittest.cc
@@ -118,7 +118,7 @@
   void CreateWriters(const std::string& url) {
     cache_.CreateBackendEntry(kSimpleGET_Transaction.url, &disk_entry_,
                               nullptr);
-    writers_ = base::MakeUnique<HttpCache::Writers>(disk_entry_);
+    writers_ = std::make_unique<HttpCache::Writers>(disk_entry_);
   }
 
   std::unique_ptr<HttpTransaction> CreateNetworkTransaction() {
@@ -140,7 +140,7 @@
 
     // Create a mock cache transaction.
     std::unique_ptr<MockHttpCacheTransaction> transaction =
-        base::MakeUnique<MockHttpCacheTransaction>(DEFAULT_PRIORITY,
+        std::make_unique<MockHttpCacheTransaction>(DEFAULT_PRIORITY,
                                                    cache_.http_cache());
 
     CreateWriters(kSimpleGET_Transaction.url);
@@ -163,7 +163,7 @@
 
     // Create a mock cache transaction.
     std::unique_ptr<MockHttpCacheTransaction> transaction =
-        base::MakeUnique<MockHttpCacheTransaction>(DEFAULT_PRIORITY,
+        std::make_unique<MockHttpCacheTransaction>(DEFAULT_PRIORITY,
                                                    cache_.http_cache());
 
     writers_->AddTransaction(transaction.get(), nullptr, false);
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 7cf9329..094e4020 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -311,17 +311,17 @@
   dict->Set("sessions", quic_stream_factory_.QuicStreamFactoryInfoToValue());
   dict->SetBoolean("quic_enabled", IsQuicEnabled());
 
-  auto connection_options(base::MakeUnique<base::ListValue>());
+  auto connection_options(std::make_unique<base::ListValue>());
   for (const auto& option : params_.quic_connection_options)
     connection_options->AppendString(QuicTagToString(option));
   dict->Set("connection_options", std::move(connection_options));
 
-  auto supported_versions(base::MakeUnique<base::ListValue>());
+  auto supported_versions(std::make_unique<base::ListValue>());
   for (const auto& version : params_.quic_supported_versions)
     supported_versions->AppendString(QuicVersionToString(version));
   dict->Set("supported_versions", std::move(supported_versions));
 
-  auto origins_to_force_quic_on(base::MakeUnique<base::ListValue>());
+  auto origins_to_force_quic_on(std::make_unique<base::ListValue>());
   for (const auto& origin : params_.origins_to_force_quic_on)
     origins_to_force_quic_on->AppendString(origin.ToString());
   dict->Set("origins_to_force_quic_on", std::move(origins_to_force_quic_on));
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 80c62f8..3b4534fed 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -129,7 +129,7 @@
                                            RequestPriority priority,
                                            bool ignore_limits) override {
     auto test_throttle =
-        base::MakeUnique<TestThrottle>(throttle_new_requests_, delegate, this);
+        std::make_unique<TestThrottle>(throttle_new_requests_, delegate, this);
     outstanding_throttles_.insert(test_throttle.get());
     return std::move(test_throttle);
   }
@@ -368,7 +368,7 @@
   std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(session_deps));
 
-  auto owned_throttler = base::MakeUnique<TestNetworkStreamThrottler>();
+  auto owned_throttler = std::make_unique<TestNetworkStreamThrottler>();
   *throttler = owned_throttler.get();
 
   HttpNetworkSessionPeer peer(session.get());
@@ -864,7 +864,7 @@
 
   HttpRequestInfo request;
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   request.method = "GET";
   request.url = GURL("http://www.example.com:2000/");
@@ -887,7 +887,7 @@
 
   HttpRequestInfo request;
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   request.method = "GET";
   request.url = GURL("http://www.example.com:2000/");
@@ -1336,7 +1336,7 @@
 TEST_F(HttpNetworkTransactionTest, Ignores100) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -1904,7 +1904,7 @@
 
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   MockRead data_reads[] = {
     MockRead("HTTP/1.0 200 OK\r\n"),
@@ -1944,7 +1944,7 @@
 
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   MockRead data_reads[] = {
     MockRead("HTTP/1.0 200 OK\r\n"),
@@ -2050,7 +2050,7 @@
   for (size_t i = 0; i < kNumUnreadBodies; ++i) {
     TestCompletionCallback callback;
 
-    auto trans = base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
+    auto trans = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
                                                           session.get());
 
     int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -2151,7 +2151,7 @@
   request1.url = GURL("http://www.borked.com/");
 
   auto trans1 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   int rv = trans1->Start(&request1, callback.callback(), NetLogWithSource());
   EXPECT_THAT(callback.GetResult(rv), IsOk());
 
@@ -2173,7 +2173,7 @@
   request2.url = GURL("http://www.borked.com/foo");
 
   auto trans2 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   rv = trans2->Start(&request2, callback.callback(), NetLogWithSource());
   EXPECT_THAT(callback.GetResult(rv), IsOk());
 
@@ -2227,7 +2227,7 @@
   request1.url = GURL("http://www.borked.com/");
 
   auto trans1 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   int rv = trans1->Start(&request1, callback.callback(), NetLogWithSource());
   EXPECT_THAT(callback.GetResult(rv), IsOk());
 
@@ -2249,7 +2249,7 @@
   request2.url = GURL("http://www.borked.com/foo");
 
   auto trans2 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   rv = trans2->Start(&request2, callback.callback(), NetLogWithSource());
   EXPECT_THAT(callback.GetResult(rv), IsOk());
 
@@ -2303,7 +2303,7 @@
   request1.url = GURL("http://www.borked.com/");
 
   auto trans1 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   int rv = trans1->Start(&request1, callback.callback(), NetLogWithSource());
   EXPECT_THAT(callback.GetResult(rv), IsOk());
 
@@ -2325,7 +2325,7 @@
   request2.url = GURL("http://www.borked.com/foo");
 
   auto trans2 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   rv = trans2->Start(&request2, callback.callback(), NetLogWithSource());
   EXPECT_THAT(callback.GetResult(rv), IsOk());
 
@@ -2368,7 +2368,7 @@
   request1.url = GURL("http://www.borked.com/");
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   int rv = trans->Start(&request1, callback.callback(), NetLogWithSource());
   EXPECT_THAT(callback.GetResult(rv), IsOk());
 
@@ -3056,7 +3056,7 @@
   TestCompletionCallback callback1;
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -3180,7 +3180,7 @@
   TestCompletionCallback callback1;
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -3533,7 +3533,7 @@
   TestCompletionCallback callback1;
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
   EXPECT_THAT(callback1.GetResult(rv), IsOk());
@@ -3904,9 +3904,9 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  auto auth_handler_factory = base::MakeUnique<HttpAuthHandlerMock::Factory>();
+  auto auth_handler_factory = std::make_unique<HttpAuthHandlerMock::Factory>();
   auth_handler_factory->set_do_init_from_challenge(true);
-  auto mock_handler = base::MakeUnique<HttpAuthHandlerMock>();
+  auto mock_handler = std::make_unique<HttpAuthHandlerMock>();
   mock_handler->set_allows_default_credentials(true);
   auth_handler_factory->AddMockHandler(mock_handler.release(),
                                        HttpAuth::AUTH_PROXY);
@@ -3967,7 +3967,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -4020,9 +4020,9 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  auto auth_handler_factory = base::MakeUnique<HttpAuthHandlerMock::Factory>();
+  auto auth_handler_factory = std::make_unique<HttpAuthHandlerMock::Factory>();
   auth_handler_factory->set_do_init_from_challenge(true);
-  auto mock_handler = base::MakeUnique<HttpAuthHandlerMock>();
+  auto mock_handler = std::make_unique<HttpAuthHandlerMock>();
   mock_handler->set_allows_default_credentials(true);
   auth_handler_factory->AddMockHandler(mock_handler.release(),
                                        HttpAuth::AUTH_PROXY);
@@ -4086,7 +4086,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -4141,9 +4141,9 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  auto auth_handler_factory = base::MakeUnique<HttpAuthHandlerMock::Factory>();
+  auto auth_handler_factory = std::make_unique<HttpAuthHandlerMock::Factory>();
   auth_handler_factory->set_do_init_from_challenge(true);
-  auto mock_handler = base::MakeUnique<HttpAuthHandlerMock>();
+  auto mock_handler = std::make_unique<HttpAuthHandlerMock>();
   mock_handler->set_allows_default_credentials(true);
   auth_handler_factory->AddMockHandler(mock_handler.release(),
                                        HttpAuth::AUTH_PROXY);
@@ -4200,7 +4200,7 @@
   session_deps_.socket_factory->AddSocketDataProvider(&data2);
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -4238,15 +4238,15 @@
   session_deps_.proxy_service =
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70");
 
-  auto auth_handler_factory = base::MakeUnique<HttpAuthHandlerMock::Factory>();
+  auto auth_handler_factory = std::make_unique<HttpAuthHandlerMock::Factory>();
   auth_handler_factory->set_do_init_from_challenge(true);
-  auto mock_handler = base::MakeUnique<HttpAuthHandlerMock>();
+  auto mock_handler = std::make_unique<HttpAuthHandlerMock>();
   mock_handler->set_allows_default_credentials(true);
   auth_handler_factory->AddMockHandler(mock_handler.release(),
                                        HttpAuth::AUTH_PROXY);
   // Add another handler for the second challenge. It supports default
   // credentials, but they shouldn't be used, since they were already tried.
-  mock_handler = base::MakeUnique<HttpAuthHandlerMock>();
+  mock_handler = std::make_unique<HttpAuthHandlerMock>();
   mock_handler->set_allows_default_credentials(true);
   auth_handler_factory->AddMockHandler(mock_handler.release(),
                                        HttpAuth::AUTH_PROXY);
@@ -4298,7 +4298,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -4338,11 +4338,11 @@
   request.method = "GET";
   request.url = GURL("http://www.example.org/");
 
-  auto auth_handler_factory = base::MakeUnique<HttpAuthHandlerMock::Factory>();
+  auto auth_handler_factory = std::make_unique<HttpAuthHandlerMock::Factory>();
   auth_handler_factory->set_do_init_from_challenge(true);
 
   // First handler. Uses default credentials, but barfs at generate auth token.
-  auto mock_handler = base::MakeUnique<HttpAuthHandlerMock>();
+  auto mock_handler = std::make_unique<HttpAuthHandlerMock>();
   mock_handler->set_allows_default_credentials(true);
   mock_handler->set_allows_explicit_credentials(true);
   mock_handler->set_connection_based(true);
@@ -4352,7 +4352,7 @@
 
   // Add another handler for the second challenge. It supports default
   // credentials, but they shouldn't be used, since they were already tried.
-  mock_handler = base::MakeUnique<HttpAuthHandlerMock>();
+  mock_handler = std::make_unique<HttpAuthHandlerMock>();
   mock_handler->set_allows_default_credentials(true);
   mock_handler->set_allows_explicit_credentials(true);
   mock_handler->set_connection_based(true);
@@ -4417,7 +4417,7 @@
   session_deps_.socket_factory->AddSocketDataProvider(&data3);
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -4512,7 +4512,7 @@
 
   TestCompletionCallback callback1;
   auto trans1 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans1->Start(&request1, callback1.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -4534,7 +4534,7 @@
 
   TestCompletionCallback callback2;
   auto trans2 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   rv = trans2->Start(&request2, callback2.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -4612,7 +4612,7 @@
 
   TestCompletionCallback callback1;
   auto trans1 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans1->Start(&request1, callback1.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -4634,7 +4634,7 @@
 
   TestCompletionCallback callback2;
   auto trans2 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   rv = trans2->Start(&request2, callback2.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -5369,7 +5369,7 @@
   TestCompletionCallback callback;
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   int rv = trans->Start(&request1, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
@@ -5391,7 +5391,7 @@
   trans.reset();
 
   auto trans2 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   rv = trans2->Start(&request2, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
@@ -5469,7 +5469,7 @@
   TestCompletionCallback callback;
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   int rv = trans->Start(&request1, callback.callback(), NetLogWithSource());
   EXPECT_THAT(callback.GetResult(rv), IsOk());
 
@@ -6321,7 +6321,7 @@
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   // Since we have proxy, should try to establish tunnel.
   MockWrite data_writes1[] = {
@@ -6513,7 +6513,7 @@
 
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
 
@@ -6542,7 +6542,7 @@
   // Now start the second transaction, which should reuse the previous socket.
 
   trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   rv = trans->Start(&request, callback.callback(), NetLogWithSource());
 
@@ -6763,7 +6763,7 @@
 TEST_F(HttpNetworkTransactionTest, ResendRequestOnWriteBodyError) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request[2];
@@ -8178,7 +8178,7 @@
   TestCompletionCallback callback1;
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request, callback1.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -8236,7 +8236,7 @@
 // origin that is different from that of its associated resource.
 TEST_F(HttpNetworkTransactionTest, CrossOriginSPDYProxyPush) {
   // Configure the proxy delegate to allow cross-origin SPDY pushes.
-  auto proxy_delegate = base::MakeUnique<TestProxyDelegate>();
+  auto proxy_delegate = std::make_unique<TestProxyDelegate>();
   proxy_delegate->set_trusted_spdy_proxy(net::ProxyServer::FromURI(
       "https://myproxy:443", net::ProxyServer::SCHEME_HTTP));
   HttpRequestInfo request;
@@ -8295,7 +8295,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&proxy);
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -8305,7 +8305,7 @@
   const HttpResponseInfo* response = trans->GetResponseInfo();
 
   auto push_trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   rv = push_trans->Start(&push_request, callback.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
@@ -8353,7 +8353,7 @@
 // Test that an explicitly trusted SPDY proxy cannot push HTTPS content.
 TEST_F(HttpNetworkTransactionTest, CrossOriginProxyPushCorrectness) {
   // Configure the proxy delegate to allow cross-origin SPDY pushes.
-  auto proxy_delegate = base::MakeUnique<TestProxyDelegate>();
+  auto proxy_delegate = std::make_unique<TestProxyDelegate>();
   proxy_delegate->set_trusted_spdy_proxy(net::ProxyServer::FromURI(
       "https://myproxy:443", net::ProxyServer::SCHEME_HTTP));
   HttpRequestInfo request;
@@ -8405,7 +8405,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&proxy);
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -8433,7 +8433,7 @@
 // resources.
 TEST_F(HttpNetworkTransactionTest, SameOriginProxyPushCorrectness) {
   // Configure the proxy delegate to allow cross-origin SPDY pushes.
-  auto proxy_delegate = base::MakeUnique<TestProxyDelegate>();
+  auto proxy_delegate = std::make_unique<TestProxyDelegate>();
   proxy_delegate->set_trusted_spdy_proxy(
       net::ProxyServer::FromURI("myproxy:70", net::ProxyServer::SCHEME_HTTP));
 
@@ -8492,7 +8492,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&proxy);
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), log.bound());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -9392,7 +9392,7 @@
         new CaptureGroupNameTransportSocketPool(nullptr, nullptr);
     CaptureGroupNameSSLSocketPool* ssl_conn_pool =
         new CaptureGroupNameSSLSocketPool(nullptr, nullptr);
-    auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+    auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
     mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
     mock_pool_manager->SetSSLSocketPool(ssl_conn_pool);
     peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
@@ -9453,7 +9453,7 @@
         new CaptureGroupNameHttpProxySocketPool(NULL, NULL);
     CaptureGroupNameSSLSocketPool* ssl_conn_pool =
         new CaptureGroupNameSSLSocketPool(NULL, NULL);
-    auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+    auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
     mock_pool_manager->SetSocketPoolForHTTPProxy(
         proxy_host, base::WrapUnique(http_proxy_pool));
     mock_pool_manager->SetSocketPoolForSSLWithProxy(
@@ -9521,7 +9521,7 @@
         new CaptureGroupNameSOCKSSocketPool(NULL, NULL);
     CaptureGroupNameSSLSocketPool* ssl_conn_pool =
         new CaptureGroupNameSSLSocketPool(NULL, NULL);
-    auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+    auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
     mock_pool_manager->SetSocketPoolForSOCKSProxy(
         proxy_host, base::WrapUnique(socks_conn_pool));
     mock_pool_manager->SetSocketPoolForSSLWithProxy(
@@ -9576,7 +9576,7 @@
   request_info.url = GURL("http://www.example.org/");
 
   // Select a host resolver that does caching.
-  session_deps_.host_resolver = base::MakeUnique<MockCachingHostResolver>();
+  session_deps_.host_resolver = std::make_unique<MockCachingHostResolver>();
 
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
@@ -9860,7 +9860,7 @@
       overriding_content_length(kFakeSize);
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-  element_readers.push_back(base::MakeUnique<UploadFileElementReader>(
+  element_readers.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0,
       std::numeric_limits<uint64_t>::max(), base::Time()));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
@@ -9907,7 +9907,7 @@
   ASSERT_TRUE(base::MakeFileUnreadable(temp_file));
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-  element_readers.push_back(base::MakeUnique<UploadFileElementReader>(
+  element_readers.push_back(std::make_unique<UploadFileElementReader>(
       base::ThreadTaskRunnerHandle::Get().get(), temp_file, 0,
       std::numeric_limits<uint64_t>::max(), base::Time()));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
@@ -9972,7 +9972,7 @@
 
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   StaticSocketDataProvider data;
   session_deps_.socket_factory->AddSocketDataProvider(&data);
@@ -10979,7 +10979,7 @@
 
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -10995,7 +10995,7 @@
   EXPECT_EQ("hello world", response_data);
 
   trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   rv = trans->Start(&request, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -11163,7 +11163,7 @@
 
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -11179,7 +11179,7 @@
   EXPECT_EQ("hello world", response_data);
 
   trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   rv = trans->Start(&request, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -11231,7 +11231,7 @@
       std::unique_ptr<ProxyResolver>* resolver,
       const net::CompletionCallback& callback,
       std::unique_ptr<Request>* request) override {
-    *resolver = base::MakeUnique<ForwardingProxyResolver>(resolver_);
+    *resolver = std::make_unique<ForwardingProxyResolver>(resolver_);
     return OK;
   }
 
@@ -11247,15 +11247,15 @@
   proxy_config.proxy_rules().ParseFromString("myproxy:70");
   proxy_config.proxy_rules().bypass_rules.AddRuleFromString("www.example.org");
   auto proxy_config_service =
-      base::MakeUnique<ProxyConfigServiceFixed>(proxy_config);
+      std::make_unique<ProxyConfigServiceFixed>(proxy_config);
 
   CapturingProxyResolver capturing_proxy_resolver;
-  auto proxy_resolver_factory = base::MakeUnique<CapturingProxyResolverFactory>(
+  auto proxy_resolver_factory = std::make_unique<CapturingProxyResolverFactory>(
       &capturing_proxy_resolver);
 
   TestNetLog net_log;
 
-  session_deps_.proxy_service = base::MakeUnique<ProxyService>(
+  session_deps_.proxy_service = std::make_unique<ProxyService>(
       std::move(proxy_config_service), std::move(proxy_resolver_factory),
       &net_log);
 
@@ -11331,9 +11331,9 @@
   proxy_config.set_pac_url(GURL("http://fooproxyurl"));
 
   CapturingProxyResolver capturing_proxy_resolver;
-  session_deps_.proxy_service = base::MakeUnique<ProxyService>(
-      base::MakeUnique<ProxyConfigServiceFixed>(proxy_config),
-      base::MakeUnique<CapturingProxyResolverFactory>(
+  session_deps_.proxy_service = std::make_unique<ProxyService>(
+      std::make_unique<ProxyConfigServiceFixed>(proxy_config),
+      std::make_unique<CapturingProxyResolverFactory>(
           &capturing_proxy_resolver),
       nullptr);
   TestNetLog net_log;
@@ -11396,7 +11396,7 @@
 
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -11414,7 +11414,7 @@
   EXPECT_EQ("hello world", response_data);
 
   trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   rv = trans->Start(&request, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -11483,7 +11483,7 @@
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -11506,7 +11506,7 @@
       CreateSpdySession(session.get(), key, NetLogWithSource());
 
   trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   rv = trans->Start(&request, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -12361,7 +12361,7 @@
       // are multiple auth sessions for server auth in the same network
       // transaction using the same auth scheme.
       std::unique_ptr<HttpAuthHandlerMock> second_handler =
-          base::MakeUnique<HttpAuthHandlerMock>();
+          std::make_unique<HttpAuthHandlerMock>();
       second_handler->InitFromChallenge(&tokenizer, HttpAuth::AUTH_SERVER,
                                         empty_ssl_info, origin,
                                         NetLogWithSource());
@@ -12416,7 +12416,7 @@
 
     std::vector<std::unique_ptr<StaticSocketDataProvider>> data_providers;
     for (size_t i = 0; i < mock_reads.size(); ++i) {
-      data_providers.push_back(base::MakeUnique<StaticSocketDataProvider>(
+      data_providers.push_back(std::make_unique<StaticSocketDataProvider>(
           mock_reads[i].data(), mock_reads[i].size(), mock_writes[i].data(),
           mock_writes[i].size()));
       session_deps_.socket_factory->AddSocketDataProvider(
@@ -12496,7 +12496,7 @@
       1,   // Max sockets per group
       session_deps_.host_resolver.get(), session_deps_.socket_factory.get(),
       NULL, session_deps_.net_log);
-  auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+  auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
   mock_pool_manager->SetTransportSocketPool(transport_pool);
   session_peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
 
@@ -12784,7 +12784,7 @@
   session_deps_.host_resolver->set_synchronous_mode(true);
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   StaticSocketDataProvider data(data_reads, arraysize(data_reads), NULL, 0);
   data.set_connect_data(mock_connect);
@@ -13532,7 +13532,7 @@
 
 TEST_F(HttpNetworkTransactionTest, UseIPConnectionPooling) {
   // Set up a special HttpNetworkSession with a MockCachingHostResolver.
-  session_deps_.host_resolver = base::MakeUnique<MockCachingHostResolver>();
+  session_deps_.host_resolver = std::make_unique<MockCachingHostResolver>();
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   AddSSLSocketData();
@@ -13617,7 +13617,7 @@
 
 TEST_F(HttpNetworkTransactionTest, UseIPConnectionPoolingAfterResolution) {
   // Set up a special HttpNetworkSession with a MockCachingHostResolver.
-  session_deps_.host_resolver = base::MakeUnique<MockCachingHostResolver>();
+  session_deps_.host_resolver = std::make_unique<MockCachingHostResolver>();
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   AddSSLSocketData();
@@ -13699,7 +13699,7 @@
   ASSERT_TRUE(ip.AssignFromIPLiteral(ip_addr));
   IPEndPoint peer_addr = IPEndPoint(ip, 443);
 
-  session_deps_.host_resolver = base::MakeUnique<MockCachingHostResolver>();
+  session_deps_.host_resolver = std::make_unique<MockCachingHostResolver>();
   session_deps_.host_resolver->rules()->AddRule("www.example.org", ip_addr);
   session_deps_.host_resolver->rules()->AddRule("mail.example.org", ip_addr);
 
@@ -13827,7 +13827,7 @@
   ASSERT_TRUE(ip.AssignFromIPLiteral(ip_addr));
   IPEndPoint peer_addr = IPEndPoint(ip, 443);
 
-  session_deps_.host_resolver = base::MakeUnique<MockCachingHostResolver>();
+  session_deps_.host_resolver = std::make_unique<MockCachingHostResolver>();
   session_deps_.host_resolver->rules()->AddRule("www.example.org", ip_addr);
   session_deps_.host_resolver->rules()->AddRule("mail.example.org", ip_addr);
 
@@ -13966,7 +13966,7 @@
 TEST_F(HttpNetworkTransactionTest,
        UseIPConnectionPoolingWithHostCacheExpiration) {
   // Set up a special HttpNetworkSession with a OneTimeCachingHostResolver.
-  session_deps_.host_resolver = base::MakeUnique<OneTimeCachingHostResolver>(
+  session_deps_.host_resolver = std::make_unique<OneTimeCachingHostResolver>(
       HostPortPair("mail.example.com", 443));
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
@@ -14565,8 +14565,8 @@
   // all others direct.
   ProxyConfig proxy_config;
   proxy_config.proxy_rules().ParseFromString("http=https://proxy:443");
-  session_deps_.proxy_service = base::MakeUnique<ProxyService>(
-      base::MakeUnique<ProxyConfigServiceFixed>(proxy_config), nullptr,
+  session_deps_.proxy_service = std::make_unique<ProxyService>(
+      std::make_unique<ProxyConfigServiceFixed>(proxy_config), nullptr,
       nullptr);
 
   SSLSocketDataProvider ssl1(ASYNC, OK);  // to the proxy
@@ -14585,7 +14585,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl2);
   session_deps_.socket_factory->AddSocketDataProvider(&data2);
 
-  session_deps_.host_resolver = base::MakeUnique<MockCachingHostResolver>();
+  session_deps_.host_resolver = std::make_unique<MockCachingHostResolver>();
   session_deps_.host_resolver->rules()->AddRule("news.example.org", ip_addr);
   session_deps_.host_resolver->rules()->AddRule("proxy", ip_addr);
 
@@ -14726,7 +14726,7 @@
   // Use a separate test instance for the separate SpdySession that will be
   // created.
   SpdyTestUtil spdy_util_2;
-  auto spdy1_data = base::MakeUnique<SequencedSocketData>(
+  auto spdy1_data = std::make_unique<SequencedSocketData>(
       spdy1_reads, arraysize(spdy1_reads), spdy1_writes,
       arraysize(spdy1_writes));
   session_deps_.socket_factory->AddSocketDataProvider(spdy1_data.get());
@@ -14744,7 +14744,7 @@
       MockRead(SYNCHRONOUS, ERR_IO_PENDING, 3),
   };
 
-  auto spdy2_data = base::MakeUnique<SequencedSocketData>(
+  auto spdy2_data = std::make_unique<SequencedSocketData>(
       spdy2_reads, arraysize(spdy2_reads), spdy2_writes,
       arraysize(spdy2_writes));
   session_deps_.socket_factory->AddSocketDataProvider(spdy2_data.get());
@@ -14777,7 +14777,7 @@
   request1.url = GURL("https://www.a.com/");
   request1.load_flags = 0;
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   int rv = trans->Start(&request1, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -14807,7 +14807,7 @@
   request2.url = GURL("https://www.b.com/");
   request2.load_flags = 0;
   trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   rv = trans->Start(&request2, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -14836,7 +14836,7 @@
   request3.url = GURL("http://www.a.com/");
   request3.load_flags = 0;
   trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   rv = trans->Start(&request3, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
@@ -15237,7 +15237,7 @@
   // Create a new FakeStream and pass it to the request's
   // delegate. Returns a weak pointer to the FakeStream.
   base::WeakPtr<FakeStream> FinishStreamRequest() {
-    auto fake_stream = base::MakeUnique<FakeStream>(priority_);
+    auto fake_stream = std::make_unique<FakeStream>(priority_);
     // Do this before calling OnStreamReady() as OnStreamReady() may
     // immediately delete |fake_stream|.
     base::WeakPtr<FakeStream> weak_stream = fake_stream->AsWeakPtr();
@@ -15297,7 +15297,7 @@
       bool enable_ip_based_pooling,
       bool enable_alternative_services,
       const NetLogWithSource& net_log) override {
-    auto fake_request = base::MakeUnique<FakeStreamRequest>(priority, delegate);
+    auto fake_request = std::make_unique<FakeStreamRequest>(priority, delegate);
     last_stream_request_ = fake_request->AsWeakPtr();
     return std::move(fake_request);
   }
@@ -15326,7 +15326,7 @@
       bool enable_alternative_services,
       const NetLogWithSource& net_log) override {
     auto fake_request =
-        base::MakeUnique<FakeStreamRequest>(priority, delegate, create_helper);
+        std::make_unique<FakeStreamRequest>(priority, delegate, create_helper);
     last_stream_request_ = fake_request->AsWeakPtr();
     return std::move(fake_request);
   }
@@ -15478,7 +15478,7 @@
   std::unique_ptr<WebSocketHandshakeStreamBase> CreateBasicStream(
       std::unique_ptr<ClientSocketHandle> connection,
       bool using_proxy) override {
-    return base::MakeUnique<FakeWebSocketBasicHandshakeStream>(
+    return std::make_unique<FakeWebSocketBasicHandshakeStream>(
         std::move(connection), using_proxy);
   }
 
@@ -15764,7 +15764,7 @@
 TEST_F(HttpNetworkTransactionTest, PostReadsErrorResponseAfterReset) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -15848,7 +15848,7 @@
   request1.load_flags = 0;
 
   auto trans1 =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   int rv = trans1->Start(&request1, callback.callback(), NetLogWithSource());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
@@ -15870,7 +15870,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request2;
@@ -15902,7 +15902,7 @@
        PostReadsErrorResponseAfterResetPartialBodySent) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -16011,7 +16011,7 @@
 TEST_F(HttpNetworkTransactionTest, PostReadsErrorResponseAfterResetAnd100) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -16063,7 +16063,7 @@
 TEST_F(HttpNetworkTransactionTest, PostIgnoresNonErrorResponseAfterReset) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -16104,7 +16104,7 @@
        PostIgnoresNonErrorResponseAfterResetAnd100) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -16146,7 +16146,7 @@
 TEST_F(HttpNetworkTransactionTest, PostIgnoresHttp09ResponseAfterReset) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -16185,7 +16185,7 @@
 TEST_F(HttpNetworkTransactionTest, PostIgnoresPartial400HeadersAfterReset) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -16281,7 +16281,7 @@
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   FakeWebSocketStreamCreateHelper websocket_stream_create_helper;
   trans->SetWebSocketHandshakeStreamCreateHelper(
       &websocket_stream_create_helper);
@@ -16380,7 +16380,7 @@
       "Basic realm=MyRealm1", AuthCredentials(kFoo, kBar), "/");
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
   FakeWebSocketStreamCreateHelper websocket_stream_create_helper;
   trans->SetWebSocketHandshakeStreamCreateHelper(
       &websocket_stream_create_helper);
@@ -16406,7 +16406,7 @@
 TEST_F(HttpNetworkTransactionTest, TotalNetworkBytesPost) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -16450,7 +16450,7 @@
 TEST_F(HttpNetworkTransactionTest, TotalNetworkBytesPost100Continue) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("foo", 3));
+      std::make_unique<UploadBytesElementReader>("foo", 3));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
   HttpRequestInfo request;
@@ -16554,7 +16554,7 @@
   request.url = GURL("http://www.example.org/");
 
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   MockWrite data_writes[] = {
       MockWrite("GET / HTTP/1.1\r\n"
@@ -16603,7 +16603,7 @@
   // doesn't complete.
   throttler->set_throttle_new_requests(true);
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -16648,7 +16648,7 @@
   // doesn't complete.
   throttler->set_throttle_new_requests(true);
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -16688,7 +16688,7 @@
   session_deps_.socket_factory->AddSocketDataProvider(&reads);
 
   throttler->set_throttle_new_requests(true);
-  auto trans = base::MakeUnique<HttpNetworkTransaction>(IDLE, session.get());
+  auto trans = std::make_unique<HttpNetworkTransaction>(IDLE, session.get());
   // Start the transaction to associate a throttle with it.
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -16738,7 +16738,7 @@
   // doesn't complete.
   throttler->set_throttle_new_requests(true);
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -16750,7 +16750,7 @@
 
   // Create a new request, call SetPriority on it to unthrottle,
   // and make sure that allows the original request to complete.
-  auto trans1 = base::MakeUnique<HttpNetworkTransaction>(LOW, session.get());
+  auto trans1 = std::make_unique<HttpNetworkTransaction>(LOW, session.get());
   throttler->set_priority_change_closure(
       base::Bind(&TestNetworkStreamThrottler::UnthrottleAllRequests,
                  base::Unretained(throttler)));
@@ -16805,7 +16805,7 @@
   // doesn't complete.
   throttler->set_throttle_new_requests(true);
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 
   TestCompletionCallback callback;
   int rv = trans->Start(&request, callback.callback(), NetLogWithSource());
@@ -16849,7 +16849,7 @@
   StaticSocketDataProvider data(reads, arraysize(reads), nullptr, 0);
   session_deps_.socket_factory->AddSocketDataProvider(&data);
   session_deps_.channel_id_service =
-      base::MakeUnique<ChannelIDService>(new DefaultChannelIDStore(nullptr));
+      std::make_unique<ChannelIDService>(new DefaultChannelIDStore(nullptr));
   std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
@@ -16945,7 +16945,7 @@
   proxy_config.set_pac_mandatory(true);
   MockAsyncProxyResolver resolver;
   session_deps_.proxy_service.reset(new ProxyService(
-      base::MakeUnique<ProxyConfigServiceFixed>(proxy_config),
+      std::make_unique<ProxyConfigServiceFixed>(proxy_config),
       base::WrapUnique(new FailingProxyResolverFactory), nullptr));
 
   HttpRequestInfo request;
@@ -16971,7 +16971,7 @@
       new MockAsyncProxyResolverFactory(false);
   MockAsyncProxyResolver resolver;
   session_deps_.proxy_service.reset(
-      new ProxyService(base::MakeUnique<ProxyConfigServiceFixed>(proxy_config),
+      new ProxyService(std::make_unique<ProxyConfigServiceFixed>(proxy_config),
                        base::WrapUnique(proxy_resolver_factory), nullptr));
   HttpRequestInfo request;
   request.method = "GET";
diff --git a/net/http/http_proxy_client_socket.cc b/net/http/http_proxy_client_socket.cc
index bc7e294a..5084793 100644
--- a/net/http/http_proxy_client_socket.cc
+++ b/net/http/http_proxy_client_socket.cc
@@ -100,7 +100,7 @@
 
 std::unique_ptr<HttpStream>
 HttpProxyClientSocket::CreateConnectResponseStream() {
-  return base::MakeUnique<ProxyConnectRedirectHttpStream>(
+  return std::make_unique<ProxyConnectRedirectHttpStream>(
       redirect_has_load_timing_info_ ? &redirect_load_timing_info_ : nullptr);
 }
 
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index 650c7a4..8a2b6c3 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -355,7 +355,7 @@
                                           bool include_nested_pools) const {
   std::unique_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
   if (include_nested_pools) {
-    auto list = base::MakeUnique<base::ListValue>();
+    auto list = std::make_unique<base::ListValue>();
     if (transport_pool_) {
       list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool",
                                                    "transport_socket_pool",
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index 9f3703d0..5417859 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -83,7 +83,7 @@
                          NetLogWithSource().net_log()),
         field_trial_list_(nullptr),
         pool_(
-            base::MakeUnique<HttpProxyClientSocketPool>(kMaxSockets,
+            std::make_unique<HttpProxyClientSocketPool>(kMaxSockets,
                                                         kMaxSocketsPerGroup,
                                                         &transport_socket_pool_,
                                                         &ssl_socket_pool_,
@@ -120,7 +120,7 @@
 
     // Reset |pool_| so that the field trial parameters are read by the
     // |pool_|.
-    pool_ = base::MakeUnique<HttpProxyClientSocketPool>(
+    pool_ = std::make_unique<HttpProxyClientSocketPool>(
         kMaxSockets, kMaxSocketsPerGroup, &transport_socket_pool_,
         &ssl_socket_pool_, &estimator_, NetLogWithSource().net_log());
   }
diff --git a/net/http/http_request_headers.cc b/net/http/http_request_headers.cc
index b5c6dd8..b2fec43 100644
--- a/net/http/http_request_headers.cc
+++ b/net/http/http_request_headers.cc
@@ -191,9 +191,9 @@
 std::unique_ptr<base::Value> HttpRequestHeaders::NetLogCallback(
     const std::string* request_line,
     NetLogCaptureMode capture_mode) const {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("line", EscapeNonASCII(*request_line));
-  auto headers = base::MakeUnique<base::ListValue>();
+  auto headers = std::make_unique<base::ListValue>();
   for (HeaderVector::const_iterator it = headers_.begin(); it != headers_.end();
        ++it) {
     std::string log_value =
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index 593fe219..ea39c29 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -1266,8 +1266,8 @@
 
 std::unique_ptr<base::Value> HttpResponseHeaders::NetLogCallback(
     NetLogCaptureMode capture_mode) const {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
-  auto headers = base::MakeUnique<base::ListValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
+  auto headers = std::make_unique<base::ListValue>();
   headers->AppendString(EscapeNonASCII(GetStatusLine()));
   size_t iterator = 0;
   std::string name;
diff --git a/net/http/http_server_properties_impl_unittest.cc b/net/http/http_server_properties_impl_unittest.cc
index 163ced1..de1e0f3 100644
--- a/net/http/http_server_properties_impl_unittest.cc
+++ b/net/http/http_server_properties_impl_unittest.cc
@@ -117,7 +117,7 @@
   // Initializing https://www.google.com:443 and https://photos.google.com:443
   // as spdy servers.
   std::unique_ptr<SpdyServersMap> spdy_servers1 =
-      base::MakeUnique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
+      std::make_unique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
   spdy_servers1->Put(spdy_server_g, true);
   spdy_servers1->Put(spdy_server_p, true);
   impl_.SetSpdyServers(std::move(spdy_servers1));
@@ -143,14 +143,14 @@
 
   // Check by initializing empty spdy servers.
   std::unique_ptr<SpdyServersMap> spdy_servers =
-      base::MakeUnique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
+      std::make_unique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
   impl_.SetSpdyServers(std::move(spdy_servers));
   EXPECT_FALSE(impl_.SupportsRequestPriority(spdy_server_google));
 
   // Check by initializing www.google.com:443 and photos.google.com:443 as spdy
   // servers.
   std::unique_ptr<SpdyServersMap> spdy_servers1 =
-      base::MakeUnique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
+      std::make_unique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
   spdy_servers1->Put(spdy_server_g, true);
   spdy_servers1->Put(spdy_server_p, true);
   impl_.SetSpdyServers(std::move(spdy_servers1));
@@ -168,7 +168,7 @@
   // Check by initializing mail.google.com:443 and docs.google.com:443 as spdy
   // servers.
   std::unique_ptr<SpdyServersMap> spdy_servers2 =
-      base::MakeUnique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
+      std::make_unique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
   spdy_servers2->Put(spdy_server_m, true);
   spdy_servers2->Put(spdy_server_d, true);
   impl_.SetSpdyServers(std::move(spdy_servers2));
@@ -197,7 +197,7 @@
   // Change supports SPDY value for photos and mails servers and order of
   // initalization shouldn't matter.
   std::unique_ptr<SpdyServersMap> spdy_servers3 =
-      base::MakeUnique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
+      std::make_unique<SpdyServersMap>(SpdyServersMap::NO_AUTO_EVICT);
   spdy_servers3->Put(spdy_server_m, false);
   spdy_servers3->Put(spdy_server_p, false);
   impl_.SetSpdyServers(std::move(spdy_servers3));
@@ -438,7 +438,7 @@
   // Prepare |alternative_service_map| to be loaded by
   // SetAlternativeServiceServers().
   std::unique_ptr<AlternativeServiceMap> alternative_service_map =
-      base::MakeUnique<AlternativeServiceMap>(
+      std::make_unique<AlternativeServiceMap>(
           AlternativeServiceMap::NO_AUTO_EVICT);
   const AlternativeService alternative_service3(kProtoHTTP2, "bar3", 123);
   base::Time expiration3 = now + base::TimeDelta::FromDays(3);
@@ -499,7 +499,7 @@
   impl_.MarkAlternativeServiceBroken(alternative_service_with_foo_hostname);
 
   std::unique_ptr<AlternativeServiceMap> alternative_service_map =
-      base::MakeUnique<AlternativeServiceMap>(
+      std::make_unique<AlternativeServiceMap>(
           AlternativeServiceMap::NO_AUTO_EVICT);
   impl_.SetAlternativeServiceServers(std::move(alternative_service_map));
 
@@ -523,7 +523,7 @@
       AlternativeServiceInfo::CreateHttp2AlternativeServiceInfo(
           alternative_service, expiration);
   std::unique_ptr<AlternativeServiceMap> alternative_service_map =
-      base::MakeUnique<AlternativeServiceMap>(
+      std::make_unique<AlternativeServiceMap>(
           AlternativeServiceMap::NO_AUTO_EVICT);
   alternative_service_map->Put(
       server,
@@ -558,7 +558,7 @@
       AlternativeServiceInfo::CreateHttp2AlternativeServiceInfo(
           alternative_service, expiration);
   std::unique_ptr<AlternativeServiceMap> alternative_service_map =
-      base::MakeUnique<AlternativeServiceMap>(
+      std::make_unique<AlternativeServiceMap>(
           AlternativeServiceMap::NO_AUTO_EVICT);
   alternative_service_map->Put(
       canonical_server,
@@ -1148,7 +1148,7 @@
 
   // Check by initializing empty ServerNetworkStats.
   std::unique_ptr<ServerNetworkStatsMap> init_server_network_stats_map =
-      base::MakeUnique<ServerNetworkStatsMap>(
+      std::make_unique<ServerNetworkStatsMap>(
           ServerNetworkStatsMap::NO_AUTO_EVICT);
   impl_.SetServerNetworkStats(std::move(init_server_network_stats_map));
   const ServerNetworkStats* stats = impl_.GetServerNetworkStats(google_server);
@@ -1158,7 +1158,7 @@
   ServerNetworkStats stats_google;
   stats_google.srtt = base::TimeDelta::FromMicroseconds(10);
   stats_google.bandwidth_estimate = QuicBandwidth::FromBitsPerSecond(100);
-  init_server_network_stats_map = base::MakeUnique<ServerNetworkStatsMap>(
+  init_server_network_stats_map = std::make_unique<ServerNetworkStatsMap>(
       ServerNetworkStatsMap::NO_AUTO_EVICT);
   init_server_network_stats_map->Put(google_server, stats_google);
   impl_.SetServerNetworkStats(std::move(init_server_network_stats_map));
@@ -1182,7 +1182,7 @@
   // Prepare |server_network_stats_map| to be loaded by
   // SetServerNetworkStats().
   std::unique_ptr<ServerNetworkStatsMap> server_network_stats_map =
-      base::MakeUnique<ServerNetworkStatsMap>(
+      std::make_unique<ServerNetworkStatsMap>(
           ServerNetworkStatsMap::NO_AUTO_EVICT);
 
   // Change the values for |docs_server|.
@@ -1261,14 +1261,14 @@
 
   // Check empty map.
   std::unique_ptr<QuicServerInfoMap> init_quic_server_info_map =
-      base::MakeUnique<QuicServerInfoMap>(QuicServerInfoMap::NO_AUTO_EVICT);
+      std::make_unique<QuicServerInfoMap>(QuicServerInfoMap::NO_AUTO_EVICT);
   impl_.SetQuicServerInfoMap(std::move(init_quic_server_info_map));
   EXPECT_EQ(0u, impl_.quic_server_info_map().size());
 
   // Check by initializing with www.google.com:443.
   std::string google_server_info("google_quic_server_info");
   init_quic_server_info_map =
-      base::MakeUnique<QuicServerInfoMap>(QuicServerInfoMap::NO_AUTO_EVICT);
+      std::make_unique<QuicServerInfoMap>(QuicServerInfoMap::NO_AUTO_EVICT);
   init_quic_server_info_map->Put(google_quic_server_id, google_server_info);
   impl_.SetQuicServerInfoMap(std::move(init_quic_server_info_map));
 
@@ -1300,7 +1300,7 @@
   // Prepare |quic_server_info_map| to be loaded by
   // SetQuicServerInfoMap().
   std::unique_ptr<QuicServerInfoMap> quic_server_info_map =
-      base::MakeUnique<QuicServerInfoMap>(QuicServerInfoMap::NO_AUTO_EVICT);
+      std::make_unique<QuicServerInfoMap>(QuicServerInfoMap::NO_AUTO_EVICT);
   // Change the values for |docs_server|.
   std::string new_docs_server_info("new_docs_quic_server_info");
   quic_server_info_map->Put(docs_quic_server_id, new_docs_server_info);
diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
index f607a32..db96b915 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -91,7 +91,7 @@
 std::unique_ptr<base::Value> NetLogCallback(
     const base::Value& http_server_properties_dict,
     NetLogCaptureMode capture_mode) {
-  return base::MakeUnique<base::Value>(http_server_properties_dict.Clone());
+  return std::make_unique<base::Value>(http_server_properties_dict.Clone());
 }
 
 }  // namespace
@@ -540,7 +540,7 @@
     }
   }
 
-  std::unique_ptr<IPAddress> addr = base::MakeUnique<IPAddress>();
+  std::unique_ptr<IPAddress> addr = std::make_unique<IPAddress>();
   ReadSupportsQuic(http_server_properties_dict, addr.get());
 
   // String is "scheme://host:port" tuple of spdy server.
@@ -593,9 +593,9 @@
   if (http_server_properties_dict.GetListWithoutPathExpansion(
           kBrokenAlternativeServicesKey, &broken_alt_svc_list)) {
     broken_alternative_service_list =
-        base::MakeUnique<BrokenAlternativeServiceList>();
+        std::make_unique<BrokenAlternativeServiceList>();
     recently_broken_alternative_services =
-        base::MakeUnique<RecentlyBrokenAlternativeServices>(
+        std::make_unique<RecentlyBrokenAlternativeServices>(
             RecentlyBrokenAlternativeServices::NO_AUTO_EVICT);
 
     // Iterate list in reverse-MRU order
@@ -1066,12 +1066,12 @@
 
   // It is in MRU order.
   std::unique_ptr<std::vector<std::string>> spdy_servers =
-      base::MakeUnique<std::vector<std::string>>();
+      std::make_unique<std::vector<std::string>>();
   http_server_properties_impl_->GetSpdyServerList(
       spdy_servers.get(), kMaxSupportsSpdyServerHostsToPersist);
 
   std::unique_ptr<AlternativeServiceMap> alternative_service_map =
-      base::MakeUnique<AlternativeServiceMap>(
+      std::make_unique<AlternativeServiceMap>(
           kMaxAlternateProtocolHostsToPersist);
   const AlternativeServiceMap& map =
       http_server_properties_impl_->alternative_service_map();
@@ -1117,7 +1117,7 @@
   }
 
   std::unique_ptr<ServerNetworkStatsMap> server_network_stats_map =
-      base::MakeUnique<ServerNetworkStatsMap>(
+      std::make_unique<ServerNetworkStatsMap>(
           kMaxServerNetworkStatsHostsToPersist);
   const ServerNetworkStatsMap& network_stats_map =
       http_server_properties_impl_->server_network_stats_map();
@@ -1134,7 +1134,7 @@
   const QuicServerInfoMap& main_quic_server_info_map =
       http_server_properties_impl_->quic_server_info_map();
   if (main_quic_server_info_map.size() > 0) {
-    quic_server_info_map = base::MakeUnique<QuicServerInfoMap>(
+    quic_server_info_map = std::make_unique<QuicServerInfoMap>(
         max_server_configs_stored_in_properties());
     for (QuicServerInfoMap::const_reverse_iterator it =
              main_quic_server_info_map.rbegin();
@@ -1147,7 +1147,7 @@
   const BrokenAlternativeServiceList& broken_alternative_service_list =
       http_server_properties_impl_->broken_alternative_service_list();
   if (broken_alternative_service_list.size() > 0) {
-    broken_alt_svc_list = base::MakeUnique<BrokenAlternativeServiceList>();
+    broken_alt_svc_list = std::make_unique<BrokenAlternativeServiceList>();
     size_t count = 0;
     for (auto it = broken_alternative_service_list.begin();
          it != broken_alternative_service_list.end() &&
@@ -1163,7 +1163,7 @@
       http_server_properties_impl_->recently_broken_alternative_services();
   if (recently_broken_alt_services.size() > 0) {
     recently_broken_alt_svcs =
-        base::MakeUnique<RecentlyBrokenAlternativeServices>(
+        std::make_unique<RecentlyBrokenAlternativeServices>(
             kMaxRecentlyBrokenAlternativeServicesToPersist);
     size_t count = 0;
     for (auto it = recently_broken_alt_services.rbegin();
@@ -1175,7 +1175,7 @@
     }
   }
 
-  std::unique_ptr<IPAddress> last_quic_addr = base::MakeUnique<IPAddress>();
+  std::unique_ptr<IPAddress> last_quic_addr = std::make_unique<IPAddress>();
   http_server_properties_impl_->GetSupportsQuic(last_quic_addr.get());
   // Update the preferences on the pref thread.
   pref_task_runner_->PostTask(
@@ -1264,14 +1264,14 @@
 
   // Persist properties to the prefs in the MRU order.
   base::DictionaryValue http_server_properties_dict;
-  auto servers_list = base::MakeUnique<base::ListValue>();
+  auto servers_list = std::make_unique<base::ListValue>();
   for (ServerPrefMap::const_reverse_iterator map_it = server_pref_map.rbegin();
        map_it != server_pref_map.rend(); ++map_it) {
     const url::SchemeHostPort server = map_it->first;
     const ServerPref& server_pref = map_it->second;
 
-    auto servers_dict = base::MakeUnique<base::DictionaryValue>();
-    auto server_pref_dict = base::MakeUnique<base::DictionaryValue>();
+    auto servers_dict = std::make_unique<base::DictionaryValue>();
+    auto server_pref_dict = std::make_unique<base::DictionaryValue>();
 
     // Save supports_spdy.
     if (server_pref.supports_spdy) {
@@ -1346,7 +1346,7 @@
         base::Int64ToString(
             alternative_service_info.expiration().ToInternalValue()));
     std::unique_ptr<base::ListValue> advertised_versions_list =
-        base::MakeUnique<base::ListValue>();
+        std::make_unique<base::ListValue>();
     for (const auto& version : alternative_service_info.advertised_versions()) {
       advertised_versions_list->AppendInteger(version);
     }
@@ -1366,7 +1366,7 @@
   if (!last_quic_address.IsValid())
     return;
 
-  auto supports_quic_dict = base::MakeUnique<base::DictionaryValue>();
+  auto supports_quic_dict = std::make_unique<base::DictionaryValue>();
   supports_quic_dict->SetBoolean(kUsedQuicKey, true);
   supports_quic_dict->SetString(kAddressKey, last_quic_address.ToString());
   http_server_properties_dict->SetWithoutPathExpansion(
@@ -1376,7 +1376,7 @@
 void HttpServerPropertiesManager::SaveNetworkStatsToServerPrefs(
     const ServerNetworkStats& server_network_stats,
     base::DictionaryValue* server_pref_dict) {
-  auto server_network_stats_dict = base::MakeUnique<base::DictionaryValue>();
+  auto server_network_stats_dict = std::make_unique<base::DictionaryValue>();
   // Becasue JSON doesn't support int64_t, persist int64_t as a string.
   server_network_stats_dict->SetInteger(
       kSrttKey, static_cast<int>(server_network_stats.srtt.InMicroseconds()));
@@ -1389,12 +1389,12 @@
 void HttpServerPropertiesManager::SaveQuicServerInfoMapToServerPrefs(
     const QuicServerInfoMap& quic_server_info_map,
     base::DictionaryValue* http_server_properties_dict) {
-  auto quic_servers_dict = base::MakeUnique<base::DictionaryValue>();
+  auto quic_servers_dict = std::make_unique<base::DictionaryValue>();
   for (QuicServerInfoMap::const_reverse_iterator it =
            quic_server_info_map.rbegin();
        it != quic_server_info_map.rend(); ++it) {
     const QuicServerId& server_id = it->first;
-    auto quic_server_pref_dict = base::MakeUnique<base::DictionaryValue>();
+    auto quic_server_pref_dict = std::make_unique<base::DictionaryValue>();
     quic_server_pref_dict->SetKey(kServerInfoKey, base::Value(it->second));
     quic_servers_dict->SetWithoutPathExpansion(
         server_id.ToString(), std::move(quic_server_pref_dict));
@@ -1411,7 +1411,7 @@
   // JSON list will be in MRU order according to
   // |recently_broken_alternative_services|.
   std::unique_ptr<base::ListValue> json_list =
-      base::MakeUnique<base::ListValue>();
+      std::make_unique<base::ListValue>();
 
   // Maps recently-broken alternative services to the index where it's stored
   // in |json_list|.
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc
index 6c53325..bcac29d 100644
--- a/net/http/http_server_properties_manager_unittest.cc
+++ b/net/http/http_server_properties_manager_unittest.cc
@@ -273,7 +273,7 @@
   // Set up the prefs for https://www.google.com and https://mail.google.com and
   // then set it twice. Only expect a single cache update.
 
-  auto server_pref_dict = base::MakeUnique<base::DictionaryValue>();
+  auto server_pref_dict = std::make_unique<base::DictionaryValue>();
   url::SchemeHostPort google_server("https", "www.google.com", 443);
   url::SchemeHostPort mail_server("https", "mail.google.com", 443);
 
@@ -281,53 +281,53 @@
   server_pref_dict->SetBoolean("supports_spdy", true);
 
   // Set up alternative_services for https://www.google.com.
-  auto alternative_service_dict0 = base::MakeUnique<base::DictionaryValue>();
+  auto alternative_service_dict0 = std::make_unique<base::DictionaryValue>();
   alternative_service_dict0->SetInteger("port", 443);
   alternative_service_dict0->SetString("protocol_str", "h2");
-  auto alternative_service_dict1 = base::MakeUnique<base::DictionaryValue>();
+  auto alternative_service_dict1 = std::make_unique<base::DictionaryValue>();
   alternative_service_dict1->SetInteger("port", 1234);
   alternative_service_dict1->SetString("protocol_str", "quic");
-  auto alternative_service_list0 = base::MakeUnique<base::ListValue>();
+  auto alternative_service_list0 = std::make_unique<base::ListValue>();
   alternative_service_list0->Append(std::move(alternative_service_dict0));
   alternative_service_list0->Append(std::move(alternative_service_dict1));
   server_pref_dict->SetWithoutPathExpansion(
       "alternative_service", std::move(alternative_service_list0));
 
   // Set up ServerNetworkStats for https://www.google.com.
-  auto stats = base::MakeUnique<base::DictionaryValue>();
+  auto stats = std::make_unique<base::DictionaryValue>();
   stats->SetInteger("srtt", 10);
   server_pref_dict->SetWithoutPathExpansion("network_stats", std::move(stats));
 
   // Set the server preference for https://www.google.com.
-  auto servers_dict = base::MakeUnique<base::DictionaryValue>();
+  auto servers_dict = std::make_unique<base::DictionaryValue>();
   servers_dict->SetWithoutPathExpansion(
       GetParam() >= 5 ? "https://www.google.com" : "www.google.com:443",
       std::move(server_pref_dict));
   std::unique_ptr<base::ListValue> servers_list;
   if (GetParam() >= 4) {
-    servers_list = base::MakeUnique<base::ListValue>();
+    servers_list = std::make_unique<base::ListValue>();
     servers_list->Append(std::move(servers_dict));
-    servers_dict = base::MakeUnique<base::DictionaryValue>();
+    servers_dict = std::make_unique<base::DictionaryValue>();
   }
 
   // Set the preference for mail.google.com server.
-  auto server_pref_dict1 = base::MakeUnique<base::DictionaryValue>();
+  auto server_pref_dict1 = std::make_unique<base::DictionaryValue>();
 
   // Set supports_spdy for https://mail.google.com.
   server_pref_dict1->SetBoolean("supports_spdy", true);
 
   // Set up alternative_services for https://mail.google.com.
-  auto alternative_service_dict2 = base::MakeUnique<base::DictionaryValue>();
+  auto alternative_service_dict2 = std::make_unique<base::DictionaryValue>();
   alternative_service_dict2->SetString("protocol_str", "h2");
   alternative_service_dict2->SetInteger("port", 444);
-  auto alternative_service_list1 = base::MakeUnique<base::ListValue>();
+  auto alternative_service_list1 = std::make_unique<base::ListValue>();
   alternative_service_list1->Append(std::move(alternative_service_dict2));
   server_pref_dict1->SetWithoutPathExpansion(
       "alternative_service", std::move(alternative_service_list1));
 
   // Set up ServerNetworkStats for https://mail.google.com and it is the MRU
   // server.
-  auto stats1 = base::MakeUnique<base::DictionaryValue>();
+  auto stats1 = std::make_unique<base::DictionaryValue>();
   stats1->SetInteger("srtt", 20);
   server_pref_dict1->SetWithoutPathExpansion("network_stats",
                                              std::move(stats1));
@@ -352,7 +352,7 @@
     http_server_properties_dict.SetWithoutPathExpansion(
         "servers", std::move(servers_dict));
   }
-  auto supports_quic = base::MakeUnique<base::DictionaryValue>();
+  auto supports_quic = std::make_unique<base::DictionaryValue>();
   supports_quic->SetBoolean("used_quic", true);
   supports_quic->SetString("address", "127.0.0.1");
   http_server_properties_dict.SetWithoutPathExpansion("supports_quic",
@@ -361,14 +361,14 @@
   // Set quic_server_info for https://www.google.com, https://mail.google.com
   // and https://play.google.com and verify the MRU.
   http_server_props_manager_->SetMaxServerConfigsStoredInProperties(3);
-  auto quic_servers_dict = base::MakeUnique<base::DictionaryValue>();
-  auto quic_server_pref_dict1 = base::MakeUnique<base::DictionaryValue>();
+  auto quic_servers_dict = std::make_unique<base::DictionaryValue>();
+  auto quic_server_pref_dict1 = std::make_unique<base::DictionaryValue>();
   std::string quic_server_info1("quic_server_info1");
   quic_server_pref_dict1->SetKey("server_info", base::Value(quic_server_info1));
-  auto quic_server_pref_dict2 = base::MakeUnique<base::DictionaryValue>();
+  auto quic_server_pref_dict2 = std::make_unique<base::DictionaryValue>();
   std::string quic_server_info2("quic_server_info2");
   quic_server_pref_dict2->SetKey("server_info", base::Value(quic_server_info2));
-  auto quic_server_pref_dict3 = base::MakeUnique<base::DictionaryValue>();
+  auto quic_server_pref_dict3 = std::make_unique<base::DictionaryValue>();
   std::string quic_server_info3("quic_server_info3");
   quic_server_pref_dict3->SetKey("server_info", base::Value(quic_server_info3));
   // Set the quic_server_info1 for https://www.google.com.
@@ -469,32 +469,32 @@
   ExpectPrefsUpdate(1);
   ExpectScheduleUpdatePrefsOnNetworkSequence();
 
-  auto server_pref_dict = base::MakeUnique<base::DictionaryValue>();
+  auto server_pref_dict = std::make_unique<base::DictionaryValue>();
 
   // Set supports_spdy for www.google.com:65536.
   server_pref_dict->SetBoolean("supports_spdy", true);
 
   // Set up alternative_service for www.google.com:65536.
-  auto alternative_service_dict = base::MakeUnique<base::DictionaryValue>();
+  auto alternative_service_dict = std::make_unique<base::DictionaryValue>();
   alternative_service_dict->SetString("protocol_str", "h2");
   alternative_service_dict->SetInteger("port", 80);
-  auto alternative_service_list = base::MakeUnique<base::ListValue>();
+  auto alternative_service_list = std::make_unique<base::ListValue>();
   alternative_service_list->Append(std::move(alternative_service_dict));
   server_pref_dict->SetWithoutPathExpansion(
       "alternative_service", std::move(alternative_service_list));
 
   // Set up ServerNetworkStats for www.google.com:65536.
-  auto stats = base::MakeUnique<base::DictionaryValue>();
+  auto stats = std::make_unique<base::DictionaryValue>();
   stats->SetInteger("srtt", 10);
   server_pref_dict->SetWithoutPathExpansion("network_stats", std::move(stats));
 
   // Set the server preference for www.google.com:65536.
-  auto servers_dict = base::MakeUnique<base::DictionaryValue>();
+  auto servers_dict = std::make_unique<base::DictionaryValue>();
   servers_dict->SetWithoutPathExpansion("www.google.com:65536",
                                         std::move(server_pref_dict));
   base::DictionaryValue http_server_properties_dict;
   if (GetParam() >= 4) {
-    auto servers_list = base::MakeUnique<base::ListValue>();
+    auto servers_list = std::make_unique<base::ListValue>();
     servers_list->Append(std::move(servers_dict));
     if (GetParam() == 5) {
       HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1);
@@ -512,8 +512,8 @@
   }
 
   // Set quic_server_info for www.google.com:65536.
-  auto quic_servers_dict = base::MakeUnique<base::DictionaryValue>();
-  auto quic_server_pref_dict1 = base::MakeUnique<base::DictionaryValue>();
+  auto quic_servers_dict = std::make_unique<base::DictionaryValue>();
+  auto quic_server_pref_dict1 = std::make_unique<base::DictionaryValue>();
   quic_server_pref_dict1->SetKey("server_info",
                                  base::Value("quic_server_info1"));
   quic_servers_dict->SetWithoutPathExpansion("http://mail.google.com:65536",
@@ -558,27 +558,27 @@
   ExpectPrefsUpdate(1);
   ExpectScheduleUpdatePrefsOnNetworkSequence();
 
-  auto server_pref_dict = base::MakeUnique<base::DictionaryValue>();
+  auto server_pref_dict = std::make_unique<base::DictionaryValue>();
 
   // Set supports_spdy for www.google.com:80.
   server_pref_dict->SetBoolean("supports_spdy", true);
 
   // Set up alternative_service for www.google.com:80.
-  auto alternative_service_dict = base::MakeUnique<base::DictionaryValue>();
+  auto alternative_service_dict = std::make_unique<base::DictionaryValue>();
   alternative_service_dict->SetString("protocol_str", "h2");
   alternative_service_dict->SetInteger("port", 65536);
-  auto alternative_service_list = base::MakeUnique<base::ListValue>();
+  auto alternative_service_list = std::make_unique<base::ListValue>();
   alternative_service_list->Append(std::move(alternative_service_dict));
   server_pref_dict->SetWithoutPathExpansion(
       "alternative_service", std::move(alternative_service_list));
 
   // Set the server preference for www.google.com:80.
-  auto servers_dict = base::MakeUnique<base::DictionaryValue>();
+  auto servers_dict = std::make_unique<base::DictionaryValue>();
   servers_dict->SetWithoutPathExpansion("www.google.com:80",
                                         std::move(server_pref_dict));
   base::DictionaryValue http_server_properties_dict;
   if (GetParam() >= 4) {
-    auto servers_list = base::MakeUnique<base::ListValue>();
+    auto servers_list = std::make_unique<base::ListValue>();
     servers_list->Append(std::move(servers_dict));
     if (GetParam() == 5) {
       HttpServerPropertiesManager::SetVersion(&http_server_properties_dict, -1);
@@ -1060,19 +1060,19 @@
 TEST_P(HttpServerPropertiesManagerTest, BadSupportsQuic) {
   ExpectCacheUpdate();
 
-  auto servers_dict = base::MakeUnique<base::DictionaryValue>();
+  auto servers_dict = std::make_unique<base::DictionaryValue>();
   std::unique_ptr<base::ListValue> servers_list;
   if (GetParam() >= 4)
-    servers_list = base::MakeUnique<base::ListValue>();
+    servers_list = std::make_unique<base::ListValue>();
 
   for (int i = 1; i <= 200; ++i) {
     // Set up alternative_service for www.google.com:i.
-    auto alternative_service_dict = base::MakeUnique<base::DictionaryValue>();
+    auto alternative_service_dict = std::make_unique<base::DictionaryValue>();
     alternative_service_dict->SetString("protocol_str", "quic");
     alternative_service_dict->SetInteger("port", i);
-    auto alternative_service_list = base::MakeUnique<base::ListValue>();
+    auto alternative_service_list = std::make_unique<base::ListValue>();
     alternative_service_list->Append(std::move(alternative_service_dict));
-    auto server_pref_dict = base::MakeUnique<base::DictionaryValue>();
+    auto server_pref_dict = std::make_unique<base::DictionaryValue>();
     server_pref_dict->SetWithoutPathExpansion(
         "alternative_service", std::move(alternative_service_list));
     if (GetParam() >= 5) {
@@ -1085,12 +1085,12 @@
     }
     if (GetParam() >= 4) {
       servers_list->AppendIfNotPresent(std::move(servers_dict));
-      servers_dict = base::MakeUnique<base::DictionaryValue>();
+      servers_dict = std::make_unique<base::DictionaryValue>();
     }
   }
 
   // Set the server preference for http://mail.google.com server.
-  auto server_pref_dict1 = base::MakeUnique<base::DictionaryValue>();
+  auto server_pref_dict1 = std::make_unique<base::DictionaryValue>();
   if (GetParam() >= 5) {
     servers_dict->SetWithoutPathExpansion("https://mail.google.com",
                                           std::move(server_pref_dict1));
@@ -1117,7 +1117,7 @@
   }
 
   // Set up SupportsQuic for 127.0.0.1
-  auto supports_quic = base::MakeUnique<base::DictionaryValue>();
+  auto supports_quic = std::make_unique<base::DictionaryValue>();
   supports_quic->SetBoolean("used_quic", true);
   supports_quic->SetString("address", "127.0.0.1");
   http_server_properties_dict.SetWithoutPathExpansion("supports_quic",
@@ -1510,8 +1510,8 @@
 
 // Test that expired alternative service entries on disk are ignored.
 TEST_P(HttpServerPropertiesManagerTest, DoNotLoadExpiredAlternativeService) {
-  auto alternative_service_list = base::MakeUnique<base::ListValue>();
-  auto expired_dict = base::MakeUnique<base::DictionaryValue>();
+  auto alternative_service_list = std::make_unique<base::ListValue>();
+  auto expired_dict = std::make_unique<base::DictionaryValue>();
   expired_dict->SetString("protocol_str", "h2");
   expired_dict->SetString("host", "expired.example.com");
   expired_dict->SetInteger("port", 443);
@@ -1521,7 +1521,7 @@
       "expiration", base::Int64ToString(time_one_day_ago.ToInternalValue()));
   alternative_service_list->Append(std::move(expired_dict));
 
-  auto valid_dict = base::MakeUnique<base::DictionaryValue>();
+  auto valid_dict = std::make_unique<base::DictionaryValue>();
   valid_dict->SetString("protocol_str", "h2");
   valid_dict->SetString("host", "valid.example.com");
   valid_dict->SetInteger("port", 443);
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index 568fc05..7f2ea14 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -112,7 +112,7 @@
     const NetLogWithSource& net_log) {
   AddJobControllerCountToHistograms();
 
-  auto job_controller = base::MakeUnique<JobController>(
+  auto job_controller = std::make_unique<JobController>(
       this, delegate, session_, job_factory_.get(), request_info,
       /* is_preconnect = */ false, enable_ip_based_pooling,
       enable_alternative_services, server_ssl_config, proxy_ssl_config);
@@ -139,7 +139,7 @@
 
   DCHECK(!for_websockets_);
 
-  auto job_controller = base::MakeUnique<JobController>(
+  auto job_controller = std::make_unique<JobController>(
       this, nullptr, session_, job_factory_.get(), request_info,
       /* is_preconnect = */ true,
       /* enable_ip_based_pooling = */ true,
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index 27781df..80c600d9 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -129,7 +129,7 @@
     bool using_quic,
     RequestPriority priority,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   if (source.IsValid())
     source.AddToEventParameters(dict.get());
   dict->SetString("original_url", original_url->GetOrigin().spec());
@@ -145,7 +145,7 @@
 std::unique_ptr<base::Value> NetLogHttpStreamProtoCallback(
     NextProto negotiated_protocol,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
 
   dict->SetString("proto", NextProtoToString(negotiated_protocol));
   return std::move(dict);
@@ -1139,7 +1139,7 @@
   if (delegate_->for_websockets())
     return ERR_NOT_IMPLEMENTED;
   if (stream_type_ == HttpStreamRequest::BIDIRECTIONAL_STREAM) {
-    bidirectional_stream_impl_ = base::MakeUnique<BidirectionalStreamSpdyImpl>(
+    bidirectional_stream_impl_ = std::make_unique<BidirectionalStreamSpdyImpl>(
         session, net_log_.source());
     return OK;
   }
@@ -1150,7 +1150,7 @@
 
   bool use_relative_url =
       direct || request_info_.url.SchemeIs(url::kHttpsScheme);
-  stream_ = base::MakeUnique<SpdyHttpStream>(session, use_relative_url,
+  stream_ = std::make_unique<SpdyHttpStream>(session, use_relative_url,
                                              net_log_.source());
   return OK;
 }
@@ -1191,7 +1191,7 @@
           delegate_->websocket_handshake_stream_create_helper()
               ->CreateBasicStream(std::move(connection_), using_proxy);
     } else {
-      stream_ = base::MakeUnique<HttpBasicStream>(
+      stream_ = std::make_unique<HttpBasicStream>(
           std::move(connection_), using_proxy,
           session_->params().http_09_on_non_default_ports_enabled);
     }
@@ -1471,7 +1471,7 @@
     GURL origin_url,
     bool enable_ip_based_pooling,
     NetLog* net_log) {
-  return base::MakeUnique<HttpStreamFactoryImpl::Job>(
+  return std::make_unique<HttpStreamFactoryImpl::Job>(
       delegate, job_type, session, request_info, priority, proxy_info,
       server_ssl_config, proxy_ssl_config, destination, origin_url,
       kProtoUnknown, QUIC_VERSION_UNSUPPORTED, ProxyServer(),
@@ -1494,7 +1494,7 @@
     QuicVersion quic_version,
     bool enable_ip_based_pooling,
     NetLog* net_log) {
-  return base::MakeUnique<HttpStreamFactoryImpl::Job>(
+  return std::make_unique<HttpStreamFactoryImpl::Job>(
       delegate, job_type, session, request_info, priority, proxy_info,
       server_ssl_config, proxy_ssl_config, destination, origin_url,
       alternative_protocol, quic_version, ProxyServer(),
@@ -1516,7 +1516,7 @@
     const ProxyServer& alternative_proxy_server,
     bool enable_ip_based_pooling,
     NetLog* net_log) {
-  return base::MakeUnique<HttpStreamFactoryImpl::Job>(
+  return std::make_unique<HttpStreamFactoryImpl::Job>(
       delegate, job_type, session, request_info, priority, proxy_info,
       server_ssl_config, proxy_ssl_config, destination, origin_url,
       kProtoUnknown, QUIC_VERSION_UNSUPPORTED, alternative_proxy_server,
diff --git a/net/http/http_stream_factory_impl_job_controller.cc b/net/http/http_stream_factory_impl_job_controller.cc
index 0ae9f706..ca52a77b 100644
--- a/net/http/http_stream_factory_impl_job_controller.cc
+++ b/net/http/http_stream_factory_impl_job_controller.cc
@@ -52,7 +52,7 @@
     const GURL* url,
     bool is_preconnect,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("url", url->possibly_invalid_spec());
   dict->SetBoolean("is_preconnect", is_preconnect);
   return std::move(dict);
@@ -131,7 +131,7 @@
   stream_type_ = stream_type;
   priority_ = priority;
 
-  auto request = base::MakeUnique<Request>(
+  auto request = std::make_unique<Request>(
       request_info_.url, this, delegate,
       websocket_handshake_stream_create_helper, source_net_log, stream_type);
   // Keep a raw pointer but release ownership of Request instance.
diff --git a/net/http/http_stream_factory_impl_job_controller_unittest.cc b/net/http/http_stream_factory_impl_job_controller_unittest.cc
index 4c87f782..3ac4398 100644
--- a/net/http/http_stream_factory_impl_job_controller_unittest.cc
+++ b/net/http/http_stream_factory_impl_job_controller_unittest.cc
@@ -204,7 +204,7 @@
 
   void Initialize(const HttpRequestInfo& request_info) {
     ASSERT_FALSE(test_proxy_delegate_);
-    auto test_proxy_delegate = base::MakeUnique<TestProxyDelegate>();
+    auto test_proxy_delegate = std::make_unique<TestProxyDelegate>();
     test_proxy_delegate_ = test_proxy_delegate.get();
 
     test_proxy_delegate->set_alternative_proxy_server(
@@ -231,7 +231,7 @@
     session_context.quic_crypto_client_stream_factory =
         &crypto_client_stream_factory_;
     session_context.quic_random = &random_generator_;
-    session_ = base::MakeUnique<HttpNetworkSession>(params, session_context);
+    session_ = std::make_unique<HttpNetworkSession>(params, session_context);
     factory_ =
         static_cast<HttpStreamFactoryImpl*>(session_->http_stream_factory());
     if (create_job_controller_) {
@@ -320,7 +320,7 @@
   proxy_config.set_pac_url(GURL("http://fooproxyurl"));
   proxy_config.set_pac_mandatory(true);
   session_deps_.proxy_service.reset(new ProxyService(
-      base::MakeUnique<ProxyConfigServiceFixed>(proxy_config),
+      std::make_unique<ProxyConfigServiceFixed>(proxy_config),
       base::WrapUnique(new FailingProxyResolverFactory), nullptr));
   HttpRequestInfo request_info;
   request_info.method = "GET";
@@ -355,7 +355,7 @@
       new MockAsyncProxyResolverFactory(false);
   MockAsyncProxyResolver resolver;
   session_deps_.proxy_service.reset(
-      new ProxyService(base::MakeUnique<ProxyConfigServiceFixed>(proxy_config),
+      new ProxyService(std::make_unique<ProxyConfigServiceFixed>(proxy_config),
                        base::WrapUnique(proxy_resolver_factory), nullptr));
   HttpRequestInfo request_info;
   request_info.method = "GET";
@@ -415,7 +415,7 @@
                   std::unique_ptr<ProxyDelegate> proxy_delegate) {
     session_deps_.proxy_delegate = std::move(proxy_delegate);
     session_deps_.proxy_service = std::move(proxy_service);
-    session_ = base::MakeUnique<HttpNetworkSession>(
+    session_ = std::make_unique<HttpNetworkSession>(
         SpdySessionDependencies::CreateSessionParams(&session_deps_),
         SpdySessionDependencies::CreateSessionContext(&session_deps_));
     factory_ =
@@ -453,7 +453,7 @@
   std::unique_ptr<ProxyService> proxy_service =
       ProxyService::CreateFixedFromPacResult(
           "HTTPS badproxy:99; HTTPS badfallbackproxy:98; DIRECT");
-  auto test_proxy_delegate = base::MakeUnique<TestProxyDelegate>();
+  auto test_proxy_delegate = std::make_unique<TestProxyDelegate>();
   TestProxyDelegate* test_proxy_delegate_raw = test_proxy_delegate.get();
 
   // Before starting the test, verify that there are no proxies marked as bad.
@@ -575,7 +575,7 @@
   MockAsyncProxyResolverFactory* proxy_resolver_factory =
       new MockAsyncProxyResolverFactory(false);
   ProxyService* proxy_service =
-      new ProxyService(base::MakeUnique<ProxyConfigServiceFixed>(proxy_config),
+      new ProxyService(std::make_unique<ProxyConfigServiceFixed>(proxy_config),
                        base::WrapUnique(proxy_resolver_factory), nullptr);
   HttpRequestInfo request_info;
   request_info.method = "GET";
@@ -604,7 +604,7 @@
   new_proxy_config.set_pac_url(new_pac_url);
   new_proxy_config.set_pac_mandatory(true);
   auto new_proxy_config_service =
-      base::MakeUnique<ProxyConfigServiceFixed>(new_proxy_config);
+      std::make_unique<ProxyConfigServiceFixed>(new_proxy_config);
   proxy_service->ResetConfigService(std::move(new_proxy_config_service));
   base::RunLoop().RunUntilIdle();
   ASSERT_EQ(1u, proxy_resolver_factory->pending_requests().size());
@@ -627,7 +627,7 @@
 
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        OnStreamFailedWithNoAlternativeJob) {
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(ASYNC, ERR_FAILED));
 
   HttpRequestInfo request_info;
@@ -651,7 +651,7 @@
 
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        OnStreamReadyWithNoAlternativeJob) {
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(ASYNC, OK));
 
   HttpRequestInfo request_info;
@@ -678,10 +678,10 @@
   // Use COLD_START to make the alt job pending.
   crypto_client_stream_factory_.set_handshake_mode(
       MockCryptoClientStream::COLD_START);
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, OK);
 
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(ASYNC, OK));
   HttpRequestInfo request_info;
   request_info.method = "GET";
@@ -711,7 +711,7 @@
 // supported.
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        DoNotCreateAltJobIfQuicVersionsUnsupported) {
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(ASYNC, OK));
   HttpRequestInfo request_info;
   request_info.method = "GET";
@@ -736,9 +736,9 @@
 }
 
 TEST_F(HttpStreamFactoryImplJobControllerTest, OnStreamFailedForBothJobs) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddConnect(ASYNC, ERR_FAILED);
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(ASYNC, ERR_FAILED));
 
   HttpRequestInfo request_info;
@@ -767,12 +767,12 @@
 
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        AltJobFailsAfterMainJobSucceeds) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(ASYNC, ERR_FAILED);
   crypto_client_stream_factory_.set_handshake_mode(
       MockCryptoClientStream::COLD_START);
 
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   SSLSocketDataProvider ssl_data(SYNCHRONOUS, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data);
@@ -810,12 +810,12 @@
 
 // Tests that when alt job succeeds, main job is destroyed.
 TEST_F(HttpStreamFactoryImplJobControllerTest, AltJobSucceedsMainJobDestroyed) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   // Use cold start and complete alt job manually.
   crypto_client_stream_factory_.set_handshake_mode(
       MockCryptoClientStream::COLD_START);
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, ERR_IO_PENDING));
 
   HttpRequestInfo request_info;
@@ -836,7 +836,7 @@
 
   // Make |alternative_job| succeed.
   HttpStream* http_stream =
-      new HttpBasicStream(base::MakeUnique<ClientSocketHandle>(), false, false);
+      new HttpBasicStream(std::make_unique<ClientSocketHandle>(), false, false);
 
   EXPECT_CALL(request_delegate_, OnStreamReadyImpl(_, _, http_stream));
 
@@ -858,7 +858,7 @@
 // Regression test for crbug.com/678768.
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        AltJobSucceedsMainJobBlockedControllerDestroyed) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddWrite(client_maker_.MakeInitialSettingsPacket(1, nullptr));
   quic_data_->AddRead(ASYNC, OK);
 
@@ -937,13 +937,13 @@
 // JobController will be cleaned up.
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        OrphanedJobCompletesControllerDestroyed) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   // Use cold start and complete alt job manually.
   crypto_client_stream_factory_.set_handshake_mode(
       MockCryptoClientStream::COLD_START);
 
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   SSLSocketDataProvider ssl_data(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data);
@@ -980,7 +980,7 @@
 
   // Make |alternative_job| succeed.
   HttpStream* http_stream =
-      new HttpBasicStream(base::MakeUnique<ClientSocketHandle>(), false, false);
+      new HttpBasicStream(std::make_unique<ClientSocketHandle>(), false, false);
   job_factory_.alternative_job()->SetStream(http_stream);
   // This should not call request_delegate_::OnStreamReady.
   job_controller_->OnStreamReady(job_factory_.alternative_job(), SSLConfig());
@@ -990,14 +990,14 @@
 
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        AltJobSucceedsAfterMainJobFailed) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   // Use cold start and complete alt job manually.
   crypto_client_stream_factory_.set_handshake_mode(
       MockCryptoClientStream::COLD_START);
 
   // One failed TCP connect.
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, ERR_FAILED));
 
   HttpRequestInfo request_info;
@@ -1023,7 +1023,7 @@
 
   // Make |alternative_job| succeed.
   HttpStream* http_stream =
-      new HttpBasicStream(base::MakeUnique<ClientSocketHandle>(), false, false);
+      new HttpBasicStream(std::make_unique<ClientSocketHandle>(), false, false);
 
   EXPECT_CALL(request_delegate_, OnStreamReadyImpl(_, _, http_stream));
 
@@ -1038,10 +1038,10 @@
 
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        MainJobSucceedsAfterAltJobFailed) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddConnect(SYNCHRONOUS, ERR_FAILED);
 
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   SSLSocketDataProvider ssl_data(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data);
@@ -1082,9 +1082,9 @@
 // then the alternative service is not marked as broken.
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        MainJobSucceedsAfterConnectionChanged) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddConnect(SYNCHRONOUS, ERR_NETWORK_CHANGED);
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   SSLSocketDataProvider ssl_data(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data);
@@ -1124,12 +1124,12 @@
 // Get load state after main job fails and before alternative job succeeds.
 TEST_F(HttpStreamFactoryImplJobControllerTest, GetLoadStateAfterMainJobFailed) {
   // Use COLD_START to complete alt job manually.
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   crypto_client_stream_factory_.set_handshake_mode(
       MockCryptoClientStream::COLD_START);
 
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(ASYNC, ERR_FAILED));
 
   HttpRequestInfo request_info;
@@ -1158,7 +1158,7 @@
 
   // |alternative_job| succeeds and should report status to Request.
   HttpStream* http_stream =
-      new HttpBasicStream(base::MakeUnique<ClientSocketHandle>(), false, false);
+      new HttpBasicStream(std::make_unique<ClientSocketHandle>(), false, false);
   job_factory_.alternative_job()->SetStream(http_stream);
 
   EXPECT_CALL(request_delegate_, OnStreamReadyImpl(_, _, http_stream));
@@ -1169,12 +1169,12 @@
 
 TEST_F(HttpStreamFactoryImplJobControllerTest, ResumeMainJobWhenAltJobStalls) {
   // Use COLD_START to stall alt job.
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   crypto_client_stream_factory_.set_handshake_mode(
       MockCryptoClientStream::COLD_START);
 
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   SSLSocketDataProvider ssl_data(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data);
@@ -1226,7 +1226,7 @@
 
 TEST_F(HttpStreamFactoryImplJobControllerTest, DelayedTCP) {
   base::ScopedMockTimeMessageLoopTaskRunner test_task_runner;
-  auto failing_resolver = base::MakeUnique<MockHostResolver>();
+  auto failing_resolver = std::make_unique<MockHostResolver>();
   failing_resolver->set_ondemand_mode(true);
   failing_resolver->rules()->AddSimulatedFailure("*google.com");
   session_deps_.host_resolver = std::move(failing_resolver);
@@ -1292,7 +1292,7 @@
   base::ScopedMockTimeMessageLoopTaskRunner test_task_runner;
   // The max delay time should be in sync with .cc file.
   base::TimeDelta kMaxDelayTimeForMainJob = base::TimeDelta::FromSeconds(3);
-  auto failing_resolver = base::MakeUnique<MockHostResolver>();
+  auto failing_resolver = std::make_unique<MockHostResolver>();
   failing_resolver->set_ondemand_mode(true);
   failing_resolver->rules()->AddSimulatedFailure("*google.com");
   session_deps_.host_resolver = std::move(failing_resolver);
@@ -1348,7 +1348,7 @@
   // could verify the main job is resumed with appropriate delay.
   base::ScopedMockTimeMessageLoopTaskRunner test_task_runner;
 
-  auto failing_resolver = base::MakeUnique<MockHostResolver>();
+  auto failing_resolver = std::make_unique<MockHostResolver>();
   failing_resolver->set_ondemand_mode(true);
   failing_resolver->rules()->AddSimulatedFailure("*google.com");
   session_deps_.host_resolver = std::move(failing_resolver);
@@ -1411,7 +1411,7 @@
 // scheme is HTTPS.
 TEST_F(HttpStreamFactoryImplJobControllerTest, HttpsURL) {
   // Using hanging resolver will cause the alternative job to hang indefinitely.
-  session_deps_.host_resolver = base::MakeUnique<HangingResolver>();
+  session_deps_.host_resolver = std::make_unique<HangingResolver>();
 
   HttpRequestInfo request_info;
   request_info.method = "GET";
@@ -1435,7 +1435,7 @@
 // does not fetch the resource through a proxy.
 TEST_F(HttpStreamFactoryImplJobControllerTest, HttpURLWithNoProxy) {
   // Using hanging resolver will cause the alternative job to hang indefinitely.
-  session_deps_.host_resolver = base::MakeUnique<HangingResolver>();
+  session_deps_.host_resolver = std::make_unique<HangingResolver>();
 
   HttpRequestInfo request_info;
   request_info.method = "GET";
@@ -1464,7 +1464,7 @@
   // could verify the main job is resumed with appropriate delay.
   base::ScopedMockTimeMessageLoopTaskRunner test_task_runner;
 
-  auto failing_resolver = base::MakeUnique<MockHostResolver>();
+  auto failing_resolver = std::make_unique<MockHostResolver>();
   failing_resolver->set_ondemand_mode(true);
   failing_resolver->rules()->AddSimulatedFailure("*myproxy.org");
   session_deps_.host_resolver = std::move(failing_resolver);
@@ -1519,9 +1519,9 @@
 // Verifies that if the alternative proxy server job fails immediately, the
 // main job is not blocked.
 TEST_F(HttpStreamFactoryImplJobControllerTest, FailAlternativeProxy) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddConnect(SYNCHRONOUS, ERR_FAILED);
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   SSLSocketDataProvider ssl_data(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data);
@@ -1569,9 +1569,9 @@
   // Use COLD_START to make the alt job pending.
   crypto_client_stream_factory_.set_handshake_mode(
       MockCryptoClientStream::COLD_START);
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   SSLSocketDataProvider ssl_data(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data);
@@ -1618,7 +1618,7 @@
 
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        PreconnectToHostWithValidAltSvc) {
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddWrite(client_maker_.MakeInitialSettingsPacket(1, nullptr));
   quic_data_->AddRead(ASYNC, OK);
 
@@ -1646,7 +1646,7 @@
 // When preconnect to a H2 supported server, only 1 connection is opened.
 TEST_F(HttpStreamFactoryImplJobControllerTest,
        PreconnectMultipleStreamsToH2Server) {
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(ASYNC, OK));
   SetPreconnect();
 
@@ -1683,7 +1683,7 @@
 TEST_F(JobControllerLimitMultipleH2Requests, MultipleRequests) {
   // Make sure there is only one socket connect.
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING)};
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(reads, arraysize(reads),
+  tcp_data_ = std::make_unique<SequencedSocketData>(reads, arraysize(reads),
                                                     nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(ASYNC, OK));
   SSLSocketDataProvider ssl_data(ASYNC, OK);
@@ -1704,7 +1704,7 @@
   std::vector<std::unique_ptr<HttpStreamRequest>> requests;
   for (int i = 0; i < kNumRequests; ++i) {
     request_delegates.emplace_back(
-        base::MakeUnique<MockHttpStreamRequestDelegate>());
+        std::make_unique<MockHttpStreamRequestDelegate>());
     HttpStreamFactoryImpl::JobController* job_controller =
         new HttpStreamFactoryImpl::JobController(
             factory_, request_delegates[i].get(), session_.get(), &job_factory_,
@@ -1777,7 +1777,7 @@
   std::vector<std::unique_ptr<HttpStreamRequest>> requests;
   for (int i = 0; i < kNumRequests; ++i) {
     request_delegates.push_back(
-        base::MakeUnique<MockHttpStreamRequestDelegate>());
+        std::make_unique<MockHttpStreamRequestDelegate>());
     HttpStreamFactoryImpl::JobController* job_controller =
         new HttpStreamFactoryImpl::JobController(
             factory_, request_delegates[i].get(), session_.get(), &job_factory_,
@@ -1849,7 +1849,7 @@
   std::vector<std::unique_ptr<HttpStreamRequest>> requests;
   for (int i = 0; i < kNumRequests; ++i) {
     request_delegates.emplace_back(
-        base::MakeUnique<MockHttpStreamRequestDelegate>());
+        std::make_unique<MockHttpStreamRequestDelegate>());
     HttpStreamFactoryImpl::JobController* job_controller =
         new HttpStreamFactoryImpl::JobController(
             factory_, request_delegates[i].get(), session_.get(), &job_factory_,
@@ -1884,7 +1884,7 @@
 
 TEST_F(JobControllerLimitMultipleH2Requests, MultiplePreconnects) {
   // Make sure there is only one socket connect.
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(ASYNC, OK));
   SSLSocketDataProvider ssl_data(ASYNC, OK);
   ssl_data.next_proto = kProtoHTTP2;
@@ -1902,7 +1902,7 @@
   std::vector<std::unique_ptr<MockHttpStreamRequestDelegate>> request_delegates;
   for (int i = 0; i < kNumRequests; ++i) {
     request_delegates.emplace_back(
-        base::MakeUnique<MockHttpStreamRequestDelegate>());
+        std::make_unique<MockHttpStreamRequestDelegate>());
     HttpStreamFactoryImpl::JobController* job_controller =
         new HttpStreamFactoryImpl::JobController(
             factory_, request_delegates[i].get(), session_.get(), &job_factory_,
@@ -1948,7 +1948,7 @@
   std::vector<std::unique_ptr<HttpStreamRequest>> requests;
   for (int i = 0; i < 2; ++i) {
     request_delegates.emplace_back(
-        base::MakeUnique<MockHttpStreamRequestDelegate>());
+        std::make_unique<MockHttpStreamRequestDelegate>());
     HttpStreamFactoryImpl::JobController* job_controller =
         new HttpStreamFactoryImpl::JobController(
             factory_, request_delegates[i].get(), session_.get(), &job_factory_,
@@ -1980,10 +1980,10 @@
 TEST_F(JobControllerLimitMultipleH2Requests, QuicJobNotThrottled) {
   crypto_client_stream_factory_.set_handshake_mode(
       MockCryptoClientStream::COLD_START);
-  quic_data_ = base::MakeUnique<MockQuicData>();
+  quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING)};
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(reads, arraysize(reads),
+  tcp_data_ = std::make_unique<SequencedSocketData>(reads, arraysize(reads),
                                                     nullptr, 0);
 
   tcp_data_->set_connect_data(MockConnect(ASYNC, OK));
@@ -2044,12 +2044,12 @@
   const bool enable_ip_based_pooling = ::testing::get<0>(GetParam());
   const bool enable_alternative_services = ::testing::get<1>(GetParam());
   if (enable_alternative_services) {
-    quic_data_ = base::MakeUnique<MockQuicData>();
+    quic_data_ = std::make_unique<MockQuicData>();
     quic_data_->AddConnect(SYNCHRONOUS, OK);
     quic_data_->AddWrite(client_maker_.MakeInitialSettingsPacket(1, nullptr));
     quic_data_->AddRead(ASYNC, OK);
   }
-  tcp_data_ = base::MakeUnique<SequencedSocketData>(nullptr, 0, nullptr, 0);
+  tcp_data_ = std::make_unique<SequencedSocketData>(nullptr, 0, nullptr, 0);
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
   SSLSocketDataProvider ssl_data(ASYNC, OK);
   session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data);
@@ -2097,7 +2097,7 @@
 
   void Initialize() {
     session_deps_.http_server_properties =
-        base::MakeUnique<MockHttpServerProperties>();
+        std::make_unique<MockHttpServerProperties>();
     session_ = SpdySessionDependencies::SpdyCreateSession(&session_deps_);
     factory_ =
         static_cast<HttpStreamFactoryImpl*>(session_->http_stream_factory());
diff --git a/net/http/http_stream_factory_impl_request_unittest.cc b/net/http/http_stream_factory_impl_request_unittest.cc
index 585f612..151049d 100644
--- a/net/http/http_stream_factory_impl_request_unittest.cc
+++ b/net/http/http_stream_factory_impl_request_unittest.cc
@@ -28,7 +28,7 @@
 TEST_F(HttpStreamFactoryImplRequestTest, SetPriority) {
   SequencedSocketData data(nullptr, 0, nullptr, 0);
   data.set_connect_data(MockConnect(ASYNC, OK));
-  auto ssl_data = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_data = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   SpdySessionDependencies session_deps(ProxyService::CreateDirect());
   session_deps.socket_factory->AddSocketDataProvider(&data);
   session_deps.socket_factory->AddSSLSocketDataProvider(ssl_data.get());
@@ -41,7 +41,7 @@
   TestJobFactory job_factory;
   HttpRequestInfo request_info;
   request_info.url = GURL("http://www.example.com/");
-  auto job_controller = base::MakeUnique<HttpStreamFactoryImpl::JobController>(
+  auto job_controller = std::make_unique<HttpStreamFactoryImpl::JobController>(
       factory, &request_delegate, session.get(), &job_factory, request_info,
       /* is_preconnect = */ false,
       /* enable_ip_based_pooling = */ true,
diff --git a/net/http/http_stream_factory_impl_unittest.cc b/net/http/http_stream_factory_impl_unittest.cc
index 4f4df3a..3d0a912 100644
--- a/net/http/http_stream_factory_impl_unittest.cc
+++ b/net/http/http_stream_factory_impl_unittest.cc
@@ -323,7 +323,7 @@
   std::unique_ptr<WebSocketHandshakeStreamBase> CreateBasicStream(
       std::unique_ptr<ClientSocketHandle> connection,
       bool using_proxy) override {
-    return base::MakeUnique<WebSocketBasicHandshakeStream>(
+    return std::make_unique<WebSocketBasicHandshakeStream>(
         std::move(connection));
   }
 };
@@ -503,7 +503,7 @@
             session_deps.transport_security_state.get(),
             session_deps.cert_transparency_verifier.get(),
             session_deps.ct_policy_enforcer.get());
-    auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+    auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
     mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
     mock_pool_manager->SetSSLSocketPool(ssl_conn_pool);
     peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
@@ -535,7 +535,7 @@
             session_deps.transport_security_state.get(),
             session_deps.cert_transparency_verifier.get(),
             session_deps.ct_policy_enforcer.get());
-    auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+    auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
     mock_pool_manager->SetSocketPoolForHTTPProxy(
         proxy_host, base::WrapUnique(http_proxy_pool));
     mock_pool_manager->SetSocketPoolForSSLWithProxy(
@@ -569,7 +569,7 @@
             session_deps.transport_security_state.get(),
             session_deps.cert_transparency_verifier.get(),
             session_deps.ct_policy_enforcer.get());
-    auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+    auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
     mock_pool_manager->SetSocketPoolForSOCKSProxy(
         proxy_host, base::WrapUnique(socks_proxy_pool));
     mock_pool_manager->SetSocketPoolForSSLWithProxy(
@@ -608,7 +608,7 @@
             session_deps.transport_security_state.get(),
             session_deps.cert_transparency_verifier.get(),
             session_deps.ct_policy_enforcer.get());
-    auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+    auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
     mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
     mock_pool_manager->SetSSLSocketPool(ssl_conn_pool);
     peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
@@ -638,7 +638,7 @@
           session_deps.transport_security_state.get(),
           session_deps.cert_transparency_verifier.get(),
           session_deps.ct_policy_enforcer.get());
-  auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+  auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
   mock_pool_manager->SetTransportSocketPool(transport_conn_pool);
   peer.SetClientSocketPoolManager(std::move(mock_pool_manager));
 
@@ -738,7 +738,7 @@
     session_context.http_server_properties = &http_server_properties;
 
     auto session =
-        base::MakeUnique<HttpNetworkSession>(session_params, session_context);
+        std::make_unique<HttpNetworkSession>(session_params, session_context);
     session->quic_stream_factory()->set_require_confirmation(false);
 
     StaticSocketDataProvider socket_data1;
@@ -828,7 +828,7 @@
   void AddSocketDataToFactory(MockClientSocketFactory* factory) {
     MockRead* reads = reads_.empty() ? nullptr : &reads_[0];
     MockWrite* writes = writes_.empty() ? nullptr : &writes_[0];
-    socket_data_ = base::MakeUnique<SequencedSocketData>(
+    socket_data_ = std::make_unique<SequencedSocketData>(
         reads, reads_.size(), writes, writes_.size());
     factory->AddSocketDataProvider(socket_data_.get());
   }
@@ -910,7 +910,7 @@
           set_alternative_proxy_server);
 
       auto session =
-          base::MakeUnique<HttpNetworkSession>(session_params, session_context);
+          std::make_unique<HttpNetworkSession>(session_params, session_context);
 
       // Before starting the test, verify that there are no proxies marked as
       // bad.
@@ -1036,7 +1036,7 @@
 
     HostPortPair host_port_pair("badproxy", 99);
     auto session =
-        base::MakeUnique<HttpNetworkSession>(session_params, session_context);
+        std::make_unique<HttpNetworkSession>(session_params, session_context);
 
     // Before starting the test, verify that there are no proxies marked as
     // bad.
@@ -1135,7 +1135,7 @@
     session_context.http_server_properties = &http_server_properties;
 
     auto session =
-        base::MakeUnique<HttpNetworkSession>(session_params, session_context);
+        std::make_unique<HttpNetworkSession>(session_params, session_context);
     HttpNetworkSessionPeer peer(session.get());
     HostPortPair proxy_host("http_proxy", 80);
     CapturePreconnectsHttpProxySocketPool* http_proxy_pool =
@@ -1150,7 +1150,7 @@
             session_deps.transport_security_state.get(),
             session_deps.cert_transparency_verifier.get(),
             session_deps.ct_policy_enforcer.get());
-    auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+    auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
     mock_pool_manager->SetSocketPoolForHTTPProxy(
         proxy_host, base::WrapUnique(http_proxy_pool));
     mock_pool_manager->SetSocketPoolForSSLWithProxy(
@@ -1189,7 +1189,7 @@
       session_context.http_server_properties = &http_server_properties;
 
       auto session =
-          base::MakeUnique<HttpNetworkSession>(session_params, session_context);
+          std::make_unique<HttpNetworkSession>(session_params, session_context);
 
       HttpNetworkSessionPeer peer(session.get());
       HostPortPair proxy_host("myproxy.org", 443);
@@ -1212,7 +1212,7 @@
                 session_deps.ct_policy_enforcer.get());
 
         auto mock_pool_manager =
-            base::MakeUnique<MockClientSocketPoolManager>();
+            std::make_unique<MockClientSocketPoolManager>();
         mock_pool_manager->SetSocketPoolForHTTPProxy(
             proxy_host, base::WrapUnique(http_proxy_pool));
         mock_pool_manager->SetSocketPoolForSSLWithProxy(
@@ -1281,7 +1281,7 @@
   session_context.http_server_properties = &http_server_properties;
 
   auto session =
-      base::MakeUnique<HttpNetworkSession>(session_params, session_context);
+      std::make_unique<HttpNetworkSession>(session_params, session_context);
 
   HttpNetworkSessionPeer peer(session.get());
   HostPortPair proxy_host("myproxy.org", 443);
@@ -1299,7 +1299,7 @@
           session_deps.cert_transparency_verifier.get(),
           session_deps.ct_policy_enforcer.get());
 
-  auto mock_pool_manager = base::MakeUnique<MockClientSocketPoolManager>();
+  auto mock_pool_manager = std::make_unique<MockClientSocketPoolManager>();
   mock_pool_manager->SetSocketPoolForHTTPProxy(
       proxy_host, base::WrapUnique(http_proxy_pool));
   mock_pool_manager->SetSocketPoolForSSLWithProxy(
@@ -1696,7 +1696,7 @@
       ProxyService::CreateFixed("https://myproxy.org:443"));
 
   // Set up the proxy server as a server that supports request priorities.
-  auto http_server_properties = base::MakeUnique<HttpServerPropertiesImpl>();
+  auto http_server_properties = std::make_unique<HttpServerPropertiesImpl>();
   url::SchemeHostPort spdy_server("https", "myproxy.org", 443);
   http_server_properties->SetSupportsSpdy(spdy_server, true);
   session_deps.http_server_properties = std::move(http_server_properties);
@@ -1959,7 +1959,7 @@
 
 TEST_F(HttpStreamFactoryTest, RequestSpdyHttpStreamHttpURL) {
   url::SchemeHostPort scheme_host_port("http", "myproxy.org", 443);
-  auto session_deps = base::MakeUnique<SpdySessionDependencies>(
+  auto session_deps = std::make_unique<SpdySessionDependencies>(
       ProxyService::CreateFixedFromPacResult("HTTPS myproxy.org:443"));
   std::unique_ptr<ProxyService> proxy_service =
       ProxyService::CreateFixedFromPacResult("HTTPS myproxy.org:443");
@@ -2023,7 +2023,7 @@
   SSLSocketDataProvider ssl_socket_data(ASYNC, OK);
   ssl_socket_data.next_proto = kProtoHTTP2;
   for (int i = 0; i < kNumIdleSockets; i++) {
-    auto provider = base::MakeUnique<SequencedSocketData>(
+    auto provider = std::make_unique<SequencedSocketData>(
         reads, arraysize(reads), nullptr, 0);
     provider->set_connect_data(MockConnect(ASYNC, OK));
     session_deps.socket_factory->AddSocketDataProvider(provider.get());
@@ -2044,7 +2044,7 @@
             host_port_pair, false, OnHostResolutionCallback(),
             TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
 
-    auto connection = base::MakeUnique<ClientSocketHandle>();
+    auto connection = std::make_unique<ClientSocketHandle>();
     TestCompletionCallback callback;
 
     SSLConfig ssl_config;
@@ -2341,7 +2341,7 @@
   mock_quic_data.AddSocketDataToFactory(&socket_factory());
 
   // Add hanging data for http job.
-  auto hanging_data = base::MakeUnique<StaticSocketDataProvider>();
+  auto hanging_data = std::make_unique<StaticSocketDataProvider>();
   MockConnect hanging_connect(SYNCHRONOUS, ERR_IO_PENDING);
   hanging_data->set_connect_data(hanging_connect);
   socket_factory().AddSocketDataProvider(hanging_data.get());
@@ -2405,7 +2405,7 @@
 TEST_P(HttpStreamFactoryBidirectionalQuicTest,
        RequestBidirectionalStreamImplQuicNotEnabled) {
   // Make the http job fail.
-  auto http_job_data = base::MakeUnique<StaticSocketDataProvider>();
+  auto http_job_data = std::make_unique<StaticSocketDataProvider>();
   MockConnect failed_connect(ASYNC, ERR_CONNECTION_REFUSED);
   http_job_data->set_connect_data(failed_connect);
   socket_factory().AddSocketDataProvider(http_job_data.get());
@@ -2467,7 +2467,7 @@
   mock_quic_data.AddSocketDataToFactory(&socket_factory());
 
   // Make the http job fail.
-  auto http_job_data = base::MakeUnique<StaticSocketDataProvider>();
+  auto http_job_data = std::make_unique<StaticSocketDataProvider>();
   MockConnect failed_connect(ASYNC, ERR_CONNECTION_REFUSED);
   http_job_data->set_connect_data(failed_connect);
   socket_factory().AddSocketDataProvider(http_job_data.get());
diff --git a/net/http/http_stream_factory_test_util.cc b/net/http/http_stream_factory_test_util.cc
index eb45c36dc..8333f704 100644
--- a/net/http/http_stream_factory_test_util.cc
+++ b/net/http/http_stream_factory_test_util.cc
@@ -74,7 +74,7 @@
   if (override_main_job_url_)
     origin_url = main_job_alternative_url_;
 
-  auto main_job = base::MakeUnique<MockHttpStreamFactoryImplJob>(
+  auto main_job = std::make_unique<MockHttpStreamFactoryImplJob>(
       delegate, job_type, session, request_info, priority, proxy_info,
       SSLConfig(), SSLConfig(), destination, origin_url, kProtoUnknown,
       QUIC_VERSION_UNSUPPORTED, ProxyServer(), enable_ip_based_pooling,
@@ -101,7 +101,7 @@
     QuicVersion quic_version,
     bool enable_ip_based_pooling,
     NetLog* net_log) {
-  auto alternative_job = base::MakeUnique<MockHttpStreamFactoryImplJob>(
+  auto alternative_job = std::make_unique<MockHttpStreamFactoryImplJob>(
       delegate, job_type, session, request_info, priority, proxy_info,
       SSLConfig(), SSLConfig(), destination, origin_url, alternative_protocol,
       quic_version, ProxyServer(), enable_ip_based_pooling, net_log);
@@ -126,7 +126,7 @@
     const ProxyServer& alternative_proxy_server,
     bool enable_ip_based_pooling,
     NetLog* net_log) {
-  auto alternative_job = base::MakeUnique<MockHttpStreamFactoryImplJob>(
+  auto alternative_job = std::make_unique<MockHttpStreamFactoryImplJob>(
       delegate, job_type, session, request_info, priority, proxy_info,
       SSLConfig(), SSLConfig(), destination, origin_url, kProtoUnknown,
       QUIC_VERSION_UNSUPPORTED, alternative_proxy_server,
diff --git a/net/http/http_stream_parser_unittest.cc b/net/http/http_stream_parser_unittest.cc
index e9d9cde..7a16d42 100644
--- a/net/http/http_stream_parser_unittest.cc
+++ b/net/http/http_stream_parser_unittest.cc
@@ -342,7 +342,7 @@
 TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_EmptyBody) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   std::unique_ptr<UploadDataStream> body(
-      base::MakeUnique<ElementsUploadDataStream>(std::move(element_readers),
+      std::make_unique<ElementsUploadDataStream>(std::move(element_readers),
                                                  0));
   ASSERT_THAT(body->Init(CompletionCallback(), NetLogWithSource()), IsOk());
   // Shouldn't be merged if upload data is empty.
@@ -373,7 +373,7 @@
   {
     std::vector<std::unique_ptr<UploadElementReader>> element_readers;
 
-    element_readers.push_back(base::MakeUnique<UploadFileElementReader>(
+    element_readers.push_back(std::make_unique<UploadFileElementReader>(
         base::ThreadTaskRunnerHandle::Get().get(), temp_file_path, 0, 0,
         base::Time()));
 
@@ -395,7 +395,7 @@
 TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_SmallBodyInMemory) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   const std::string payload = "123";
-  element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+  element_readers.push_back(std::make_unique<UploadBytesElementReader>(
       payload.data(), payload.size()));
 
   std::unique_ptr<UploadDataStream> body(
@@ -409,7 +409,7 @@
 TEST(HttpStreamParser, ShouldMergeRequestHeadersAndBody_LargeBodyInMemory) {
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   const std::string payload(10000, 'a');  // 'a' x 10000.
-  element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+  element_readers.push_back(std::make_unique<UploadBytesElementReader>(
       payload.data(), payload.size()));
 
   std::unique_ptr<UploadDataStream> body(
@@ -554,7 +554,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   element_readers.push_back(
-      base::MakeUnique<UploadBytesElementReader>("hello world!", 12));
+      std::make_unique<UploadBytesElementReader>("hello world!", 12));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
   ASSERT_THAT(upload_data_stream.Init(TestCompletionCallback().callback(),
                                       NetLogWithSource()),
diff --git a/net/http/mock_http_cache.cc b/net/http/mock_http_cache.cc
index bf81c4ee..c21e1fc0d 100644
--- a/net/http/mock_http_cache.cc
+++ b/net/http/mock_http_cache.cc
@@ -606,12 +606,12 @@
     : MockHttpCache(std::move(disk_cache_factory), false) {}
 
 MockHttpCache::MockHttpCache(bool is_main_cache)
-    : MockHttpCache(base::MakeUnique<MockBackendFactory>(), is_main_cache) {}
+    : MockHttpCache(std::make_unique<MockBackendFactory>(), is_main_cache) {}
 
 MockHttpCache::MockHttpCache(
     std::unique_ptr<HttpCache::BackendFactory> disk_cache_factory,
     bool is_main_cache)
-    : http_cache_(base::MakeUnique<MockNetworkLayer>(),
+    : http_cache_(std::make_unique<MockNetworkLayer>(),
                   std::move(disk_cache_factory),
                   is_main_cache) {}
 
diff --git a/net/http/transport_security_persister.cc b/net/http/transport_security_persister.cc
index 7919dcb..edd8724 100644
--- a/net/http/transport_security_persister.cc
+++ b/net/http/transport_security_persister.cc
@@ -30,7 +30,7 @@
 
 std::unique_ptr<base::ListValue> SPKIHashesToListValue(
     const HashValueVector& hashes) {
-  auto pins = base::MakeUnique<base::ListValue>();
+  auto pins = std::make_unique<base::ListValue>();
   for (size_t i = 0; i != hashes.size(); i++)
     pins->AppendString(hashes[i].ToString());
   return pins;
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
index 8d47cbb2..718c70b8 100644
--- a/net/http/transport_security_state.cc
+++ b/net/http/transport_security_state.cc
@@ -101,13 +101,13 @@
 std::unique_ptr<base::ListValue> GetPEMEncodedChainAsList(
     const net::X509Certificate* cert_chain) {
   if (!cert_chain)
-    return base::MakeUnique<base::ListValue>();
+    return std::make_unique<base::ListValue>();
 
   std::unique_ptr<base::ListValue> result(new base::ListValue());
   std::vector<std::string> pem_encoded_chain;
   cert_chain->GetPEMEncodedChain(&pem_encoded_chain);
   for (const std::string& cert : pem_encoded_chain)
-    result->Append(base::MakeUnique<base::Value>(cert));
+    result->Append(std::make_unique<base::Value>(cert));
 
   return result;
 }
diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc
index 931f4f3b..fc4e5d4 100644
--- a/net/http/transport_security_state_unittest.cc
+++ b/net/http/transport_security_state_unittest.cc
@@ -2878,7 +2878,7 @@
   hashes.clear();
   hashes.push_back(HashValue(symantec_hash_value));
   base::FieldTrialList field_trial_list(
-      base::MakeUnique<base::MockEntropyProvider>());
+      std::make_unique<base::MockEntropyProvider>());
   base::FieldTrialList::CreateFieldTrial("EnforceCTForProblematicRoots",
                                          "disabled");
 
diff --git a/net/log/file_net_log_observer_unittest.cc b/net/log/file_net_log_observer_unittest.cc
index 908b54e1..80949448 100644
--- a/net/log/file_net_log_observer_unittest.cc
+++ b/net/log/file_net_log_observer_unittest.cc
@@ -177,7 +177,7 @@
     return nullptr;
   }
 
-  std::unique_ptr<ParsedNetLog> result = base::MakeUnique<ParsedNetLog>();
+  std::unique_ptr<ParsedNetLog> result = std::make_unique<ParsedNetLog>();
 
   ::testing::AssertionResult init_result = result->InitFromFileContents(input);
   EXPECT_TRUE(init_result);
@@ -436,7 +436,7 @@
   const char kDummyPolledDataPath[] = "dummy_path";
   const char kDummyPolledDataString[] = "dummy_info";
   std::unique_ptr<base::DictionaryValue> dummy_polled_data =
-      base::MakeUnique<base::DictionaryValue>();
+      std::make_unique<base::DictionaryValue>();
   dummy_polled_data->SetString(kDummyPolledDataPath, kDummyPolledDataString);
 
   logger_->StopObserving(std::move(dummy_polled_data), closure.closure());
@@ -462,7 +462,7 @@
   // Start all the threads. Waiting for them to start is to hopefuly improve
   // the odds of hitting interesting races once events start being added.
   for (size_t i = 0; i < threads.size(); ++i) {
-    threads[i] = base::MakeUnique<base::Thread>(
+    threads[i] = std::make_unique<base::Thread>(
         base::StringPrintf("WorkerThread%i", static_cast<int>(i)));
     threads[i]->Start();
     threads[i]->WaitUntilThreadStarted();
@@ -816,7 +816,7 @@
   // Start all the threads. Waiting for them to start is to hopefully improve
   // the odds of hitting interesting races once events start being added.
   for (size_t i = 0; i < threads.size(); ++i) {
-    threads[i] = base::MakeUnique<base::Thread>(
+    threads[i] = std::make_unique<base::Thread>(
         base::StringPrintf("WorkerThread%i", static_cast<int>(i)));
     threads[i]->Start();
     threads[i]->WaitUntilThreadStarted();
@@ -851,7 +851,7 @@
   // Start all the threads. Waiting for them to start is to hopefully improve
   // the odds of hitting interesting races once events start being added.
   for (size_t i = 0; i < threads.size(); ++i) {
-    threads[i] = base::MakeUnique<base::Thread>(
+    threads[i] = std::make_unique<base::Thread>(
         base::StringPrintf("WorkerThread%i", static_cast<int>(i)));
     threads[i]->Start();
     threads[i]->WaitUntilThreadStarted();
diff --git a/net/log/net_log.cc b/net/log/net_log.cc
index 87afebef..24f1c392 100644
--- a/net/log/net_log.cc
+++ b/net/log/net_log.cc
@@ -201,7 +201,7 @@
 
 // static
 std::unique_ptr<base::Value> NetLog::GetEventTypesAsValue() {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   for (int i = 0; i < static_cast<int>(NetLogEventType::COUNT); ++i) {
     dict->SetInteger(EventTypeToString(static_cast<NetLogEventType>(i)), i);
   }
@@ -224,7 +224,7 @@
 
 // static
 std::unique_ptr<base::Value> NetLog::GetSourceTypesAsValue() {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   for (int i = 0; i < static_cast<int>(NetLogSourceType::COUNT); ++i) {
     dict->SetInteger(SourceTypeToString(static_cast<NetLogSourceType>(i)), i);
   }
diff --git a/net/log/net_log_unittest.cc b/net/log/net_log_unittest.cc
index a128f0f..b26abb4 100644
--- a/net/log/net_log_unittest.cc
+++ b/net/log/net_log_unittest.cc
@@ -43,7 +43,7 @@
 
 std::unique_ptr<base::Value> CaptureModeToValue(
     NetLogCaptureMode capture_mode) {
-  return base::MakeUnique<base::Value>(CaptureModeToInt(capture_mode));
+  return std::make_unique<base::Value>(CaptureModeToInt(capture_mode));
 }
 
 std::unique_ptr<base::Value> NetCaptureModeCallback(
diff --git a/net/log/net_log_util.cc b/net/log/net_log_util.cc
index 84049014..a081d02 100644
--- a/net/log/net_log_util.cc
+++ b/net/log/net_log_util.cc
@@ -266,7 +266,7 @@
   // older builds of Chrome. Safe to remove this once M45 is on the stable
   // channel.
   constants_dict->Set("logLevelType",
-                      base::MakeUnique<base::DictionaryValue>());
+                      std::make_unique<base::DictionaryValue>());
 
   // Information about the relationship between address family enums and
   // their symbolic names.
@@ -306,13 +306,13 @@
   // TODO(eroman): Is this needed?
   // "clientInfo" key is required for some log readers. Provide a default empty
   // value for compatibility.
-  constants_dict->Set("clientInfo", base::MakeUnique<base::DictionaryValue>());
+  constants_dict->Set("clientInfo", std::make_unique<base::DictionaryValue>());
 
   // Add a list of active field experiments.
   {
     base::FieldTrial::ActiveGroups active_groups;
     base::FieldTrialList::GetActiveFieldTrialGroups(&active_groups);
-    auto field_trial_groups = base::MakeUnique<base::ListValue>();
+    auto field_trial_groups = std::make_unique<base::ListValue>();
     for (base::FieldTrial::ActiveGroups::const_iterator it =
              active_groups.begin();
          it != active_groups.end(); ++it) {
@@ -353,14 +353,14 @@
     const ProxyRetryInfoMap& bad_proxies_map =
         context->proxy_service()->proxy_retry_info();
 
-    auto list = base::MakeUnique<base::ListValue>();
+    auto list = std::make_unique<base::ListValue>();
 
     for (ProxyRetryInfoMap::const_iterator it = bad_proxies_map.begin();
          it != bad_proxies_map.end(); ++it) {
       const std::string& proxy_uri = it->first;
       const ProxyRetryInfo& retry_info = it->second;
 
-      auto dict = base::MakeUnique<base::DictionaryValue>();
+      auto dict = std::make_unique<base::DictionaryValue>();
       dict->SetString("proxy_uri", proxy_uri);
       dict->SetString("bad_until",
                       NetLog::TickCountToString(retry_info.bad_until));
@@ -377,14 +377,14 @@
     DCHECK(host_resolver);
     HostCache* cache = host_resolver->GetHostCache();
     if (cache) {
-      auto dict = base::MakeUnique<base::DictionaryValue>();
+      auto dict = std::make_unique<base::DictionaryValue>();
       std::unique_ptr<base::Value> dns_config =
           host_resolver->GetDnsConfigAsValue();
       if (dns_config)
         dict->Set("dns_config", std::move(dns_config));
 
-      auto cache_info_dict = base::MakeUnique<base::DictionaryValue>();
-      auto cache_contents_list = base::MakeUnique<base::ListValue>();
+      auto cache_info_dict = std::make_unique<base::DictionaryValue>();
+      auto cache_contents_list = std::make_unique<base::ListValue>();
 
       cache_info_dict->SetInteger("capacity",
                                   static_cast<int>(cache->max_entries()));
@@ -414,7 +414,7 @@
   }
 
   if (info_sources & NET_INFO_SPDY_STATUS) {
-    auto status_dict = base::MakeUnique<base::DictionaryValue>();
+    auto status_dict = std::make_unique<base::DictionaryValue>();
 
     status_dict->SetBoolean("enable_http2",
                             http_network_session->params().enable_http2);
@@ -449,8 +449,8 @@
   }
 
   if (info_sources & NET_INFO_HTTP_CACHE) {
-    auto info_dict = base::MakeUnique<base::DictionaryValue>();
-    auto stats_dict = base::MakeUnique<base::DictionaryValue>();
+    auto info_dict = std::make_unique<base::DictionaryValue>();
+    auto stats_dict = std::make_unique<base::DictionaryValue>();
 
     disk_cache::Backend* disk_cache = GetDiskCacheBackend(context);
 
diff --git a/net/nqe/event_creator_unittest.cc b/net/nqe/event_creator_unittest.cc
index bc9acfb0..2c6a8e3 100644
--- a/net/nqe/event_creator_unittest.cc
+++ b/net/nqe/event_creator_unittest.cc
@@ -38,7 +38,7 @@
 // Verify that the net log events are recorded correctly.
 TEST(NetworkQualityEstimatorEventCreatorTest, Notified) {
   // std::unique_ptr<BoundTestNetLog>
-  // net_log(base::MakeUnique<BoundTestNetLog>());
+  // net_log(std::make_unique<BoundTestNetLog>());
   BoundTestNetLog net_log;
 
   EventCreator event_creator(net_log.bound());
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc
index 591df53..503a911 100644
--- a/net/nqe/network_quality_estimator.cc
+++ b/net/nqe/network_quality_estimator.cc
@@ -410,13 +410,6 @@
   if (observed_http_rtt <= base::TimeDelta())
     return;
   DCHECK_GE(observed_http_rtt, base::TimeDelta());
-  if (observed_http_rtt < peak_network_quality_.http_rtt() ||
-      peak_network_quality_.http_rtt() == nqe::internal::InvalidRTT()) {
-    peak_network_quality_ = nqe::internal::NetworkQuality(
-        observed_http_rtt, peak_network_quality_.transport_rtt(),
-        peak_network_quality_.downstream_throughput_kbps());
-  }
-
   Observation http_rtt_observation(observed_http_rtt.InMilliseconds(),
                                    tick_clock_->NowTicks(), signal_strength_,
                                    NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP);
@@ -765,7 +758,6 @@
 
   // Clear the local state.
   last_connection_change_ = tick_clock_->NowTicks();
-  peak_network_quality_ = nqe::internal::NetworkQuality();
   downstream_throughput_kbps_observations_.Clear();
   rtt_ms_observations_.Clear();
 
@@ -854,20 +846,6 @@
 
 void NetworkQualityEstimator::RecordMetricsOnConnectionTypeChanged() const {
   DCHECK(thread_checker_.CalledOnValidThread());
-  if (peak_network_quality_.http_rtt() != nqe::internal::InvalidRTT()) {
-    base::HistogramBase* rtt_histogram =
-        GetHistogram("FastestRTT.", current_network_id_.type, 10 * 1000);
-    rtt_histogram->Add(peak_network_quality_.http_rtt().InMilliseconds());
-  }
-
-  if (peak_network_quality_.downstream_throughput_kbps() !=
-      nqe::internal::kInvalidThroughput) {
-    base::HistogramBase* downstream_throughput_histogram =
-        GetHistogram("PeakKbps.", current_network_id_.type, 1000 * 1000);
-    downstream_throughput_histogram->Add(
-        peak_network_quality_.downstream_throughput_kbps());
-  }
-
   base::TimeDelta rtt;
   if (GetRecentHttpRTT(base::TimeTicks(), &rtt)) {
     // Add the 50th percentile value.
@@ -928,10 +906,6 @@
     // Add the 50th percentile value.
     UMA_HISTOGRAM_TIMES("NQE.MainFrame.RTT.Percentile50",
                         estimated_quality_at_last_main_frame_.http_rtt());
-    base::HistogramBase* rtt_percentile = GetHistogram(
-        "MainFrame.RTT.Percentile50.", current_network_id_.type, 10 * 1000);
-    rtt_percentile->Add(
-        estimated_quality_at_last_main_frame_.http_rtt().InMilliseconds());
   }
   UMA_HISTOGRAM_BOOLEAN("NQE.EstimateAvailable.MainFrame.RTT",
                         estimated_quality_at_last_main_frame_.http_rtt() !=
@@ -942,11 +916,6 @@
     // Add the 50th percentile value.
     UMA_HISTOGRAM_TIMES("NQE.MainFrame.TransportRTT.Percentile50",
                         estimated_quality_at_last_main_frame_.transport_rtt());
-    base::HistogramBase* transport_rtt_percentile =
-        GetHistogram("MainFrame.TransportRTT.Percentile50.",
-                     current_network_id_.type, 10 * 1000);
-    transport_rtt_percentile->Add(
-        estimated_quality_at_last_main_frame_.transport_rtt().InMilliseconds());
   }
   UMA_HISTOGRAM_BOOLEAN("NQE.EstimateAvailable.MainFrame.TransportRTT",
                         estimated_quality_at_last_main_frame_.transport_rtt() !=
@@ -958,10 +927,6 @@
     UMA_HISTOGRAM_COUNTS_1M(
         "NQE.MainFrame.Kbps.Percentile50",
         estimated_quality_at_last_main_frame_.downstream_throughput_kbps());
-    base::HistogramBase* throughput_percentile = GetHistogram(
-        "MainFrame.Kbps.Percentile50.", current_network_id_.type, 1000 * 1000);
-    throughput_percentile->Add(
-        estimated_quality_at_last_main_frame_.downstream_throughput_kbps());
   }
   UMA_HISTOGRAM_BOOLEAN(
       "NQE.EstimateAvailable.MainFrame.Kbps",
@@ -971,17 +936,6 @@
   UMA_HISTOGRAM_ENUMERATION("NQE.MainFrame.EffectiveConnectionType",
                             effective_connection_type_at_last_main_frame_,
                             EFFECTIVE_CONNECTION_TYPE_LAST);
-  base::HistogramBase* effective_connection_type_histogram =
-      base::Histogram::FactoryGet(
-          std::string("NQE.MainFrame.EffectiveConnectionType.") +
-              NetworkQualityEstimatorParams::GetNameForConnectionType(
-                  current_network_id_.type),
-          0, EFFECTIVE_CONNECTION_TYPE_LAST,
-          EFFECTIVE_CONNECTION_TYPE_LAST /* Number of buckets */,
-          base::HistogramBase::kUmaTargetedHistogramFlag);
-
-  effective_connection_type_histogram->Add(
-      effective_connection_type_at_last_main_frame_);
 }
 
 void NetworkQualityEstimator::ComputeBandwidthDelayProduct() {
@@ -1724,13 +1678,6 @@
 
   DCHECK_NE(nqe::internal::kInvalidThroughput, downstream_kbps);
 
-  if (downstream_kbps > peak_network_quality_.downstream_throughput_kbps() ||
-      peak_network_quality_.downstream_throughput_kbps() ==
-          nqe::internal::kInvalidThroughput) {
-    peak_network_quality_ = nqe::internal::NetworkQuality(
-        peak_network_quality_.http_rtt(), peak_network_quality_.transport_rtt(),
-        downstream_kbps);
-  }
   Observation throughput_observation(downstream_kbps, tick_clock_->NowTicks(),
                                      signal_strength_,
                                      NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP);
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h
index 95a15546..eef60570 100644
--- a/net/nqe/network_quality_estimator.h
+++ b/net/nqe/network_quality_estimator.h
@@ -554,14 +554,6 @@
   // ID of the current network.
   nqe::internal::NetworkID current_network_id_;
 
-  // Peak network quality (fastest round-trip-time (RTT) and highest
-  // downstream throughput) measured since last connectivity change. RTT is
-  // measured from time the request is sent until the first byte received.
-  // The accuracy is decreased by ignoring these factors:
-  // 1) Multiple URLRequests can occur concurrently.
-  // 2) Includes server processing time.
-  nqe::internal::NetworkQuality peak_network_quality_;
-
   // Buffer that holds throughput observations (in kilobits per second) sorted
   // by timestamp.
   ObservationBuffer downstream_throughput_kbps_observations_;
diff --git a/net/nqe/network_quality_estimator_test_util.cc b/net/nqe/network_quality_estimator_test_util.cc
index ff39d6f..929aedd 100644
--- a/net/nqe/network_quality_estimator_test_util.cc
+++ b/net/nqe/network_quality_estimator_test_util.cc
@@ -42,7 +42,7 @@
                                   true,
                                   true,
                                   false,
-                                  base::MakeUnique<BoundTestNetLog>()) {}
+                                  std::make_unique<BoundTestNetLog>()) {}
 
 TestNetworkQualityEstimator::TestNetworkQualityEstimator(
     std::unique_ptr<net::ExternalEstimateProvider> external_estimate_provider,
@@ -69,7 +69,7 @@
     std::unique_ptr<BoundTestNetLog> net_log)
     : NetworkQualityEstimator(
           std::move(external_estimate_provider),
-          base::MakeUnique<NetworkQualityEstimatorParams>(variation_params),
+          std::make_unique<NetworkQualityEstimatorParams>(variation_params),
           net_log->bound().net_log()),
 
       current_network_type_(NetworkChangeNotifier::CONNECTION_UNKNOWN),
@@ -90,7 +90,7 @@
 TestNetworkQualityEstimator::TestNetworkQualityEstimator(
     std::unique_ptr<NetworkQualityEstimatorParams> params)
     : TestNetworkQualityEstimator(std::move(params),
-                                  base::MakeUnique<BoundTestNetLog>()) {}
+                                  std::make_unique<BoundTestNetLog>()) {}
 
 TestNetworkQualityEstimator::TestNetworkQualityEstimator(
     std::unique_ptr<NetworkQualityEstimatorParams> params,
diff --git a/net/nqe/network_quality_estimator_unittest.cc b/net/nqe/network_quality_estimator_unittest.cc
index bfb9ddc..cb6e778 100644
--- a/net/nqe/network_quality_estimator_unittest.cc
+++ b/net/nqe/network_quality_estimator_unittest.cc
@@ -245,14 +245,9 @@
                       "downstream_throughput_kbps"));
 
   // Check UMA histograms.
-  histogram_tester.ExpectTotalCount("NQE.PeakKbps.Unknown", 0);
-  histogram_tester.ExpectTotalCount("NQE.FastestRTT.Unknown", 0);
   histogram_tester.ExpectUniqueSample(
       "NQE.MainFrame.EffectiveConnectionType",
       EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_UNKNOWN, 1);
-  histogram_tester.ExpectUniqueSample(
-      "NQE.MainFrame.EffectiveConnectionType.Unknown",
-      EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_UNKNOWN, 1);
   histogram_tester.ExpectUniqueSample("NQE.EstimateAvailable.MainFrame.RTT", 0,
                                       1);
   histogram_tester.ExpectUniqueSample(
@@ -276,8 +271,6 @@
   request2->Start();
   base::RunLoop().Run();
   histogram_tester.ExpectTotalCount("NQE.MainFrame.EffectiveConnectionType", 2);
-  histogram_tester.ExpectTotalCount(
-      "NQE.MainFrame.EffectiveConnectionType.Unknown", 2);
   histogram_tester.ExpectBucketCount("NQE.EstimateAvailable.MainFrame.RTT", 1,
                                      1);
   histogram_tester.ExpectUniqueSample(
@@ -289,9 +282,6 @@
       NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI, "test-1");
   histogram_tester.ExpectUniqueSample("NQE.CachedNetworkQualityAvailable",
                                       false, 1);
-  histogram_tester.ExpectTotalCount("NQE.PeakKbps.Unknown", 1);
-  histogram_tester.ExpectTotalCount("NQE.FastestRTT.Unknown", 1);
-
   histogram_tester.ExpectTotalCount("NQE.RatioMedianRTT.WiFi", 0);
 
   histogram_tester.ExpectTotalCount("NQE.RTT.Percentile0.Unknown", 1);
@@ -308,22 +298,14 @@
 
   // Verify that metrics are logged correctly on main-frame requests.
   histogram_tester.ExpectTotalCount("NQE.MainFrame.RTT.Percentile50", 1);
-  histogram_tester.ExpectTotalCount("NQE.MainFrame.RTT.Percentile50.Unknown",
-                                    1);
   histogram_tester.ExpectTotalCount("NQE.MainFrame.TransportRTT.Percentile50",
                                     0);
-  histogram_tester.ExpectTotalCount(
-      "NQE.MainFrame.TransportRTT.Percentile50.Unknown", 0);
   histogram_tester.ExpectTotalCount("NQE.MainFrame.Kbps.Percentile50", 1);
-  histogram_tester.ExpectTotalCount("NQE.MainFrame.Kbps.Percentile50.Unknown",
-                                    1);
 
   estimator.SimulateNetworkChange(
       NetworkChangeNotifier::ConnectionType::CONNECTION_WIFI, std::string());
   histogram_tester.ExpectUniqueSample("NQE.CachedNetworkQualityAvailable",
                                       false, 1);
-  histogram_tester.ExpectTotalCount("NQE.PeakKbps.Unknown", 1);
-  histogram_tester.ExpectTotalCount("NQE.FastestRTT.Unknown", 1);
 
   EXPECT_FALSE(estimator.GetRecentHttpRTT(base::TimeTicks(), &rtt));
   EXPECT_FALSE(
@@ -335,9 +317,9 @@
   request3->SetLoadFlags(request2->load_flags() | LOAD_MAIN_FRAME_DEPRECATED);
   request3->Start();
   base::RunLoop().Run();
-  histogram_tester.ExpectUniqueSample(
-      "NQE.MainFrame.EffectiveConnectionType.WiFi",
-      EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_UNKNOWN, 1);
+  histogram_tester.ExpectBucketCount(
+      "NQE.MainFrame.EffectiveConnectionType",
+      EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_UNKNOWN, 2);
   histogram_tester.ExpectTotalCount("NQE.MainFrame.EffectiveConnectionType", 3);
   histogram_tester.ExpectBucketCount("NQE.EstimateAvailable.MainFrame.RTT", 0,
                                      2);
@@ -660,7 +642,7 @@
   TestNetworkQualityEstimator estimator(
       nullptr, variation_params, false, false,
       true /* add_default_platform_observations */,
-      base::MakeUnique<BoundTestNetLog>());
+      std::make_unique<BoundTestNetLog>());
 
   estimator.SimulateNetworkChange(
       NetworkChangeNotifier::ConnectionType::CONNECTION_UNKNOWN, "unknown-1");
@@ -776,7 +758,7 @@
   TestNetworkQualityEstimator estimator(
       nullptr, variation_params, false, false,
       true /* add_default_platform_observations */,
-      base::MakeUnique<BoundTestNetLog>());
+      std::make_unique<BoundTestNetLog>());
   estimator.SimulateNetworkChange(
       NetworkChangeNotifier::ConnectionType::CONNECTION_UNKNOWN, "unknown-1");
 
@@ -808,13 +790,6 @@
   EXPECT_EQ(200, kbps);
   EXPECT_EQ(kbps, estimator.GetDownstreamThroughputKbps().value());
 
-  // Peak network quality should not be affected by the network quality
-  // estimator field trial.
-  EXPECT_EQ(nqe::internal::InvalidRTT(),
-            estimator.peak_network_quality_.http_rtt());
-  EXPECT_EQ(nqe::internal::kInvalidThroughput,
-            estimator.peak_network_quality_.downstream_throughput_kbps());
-
   // Simulate network change to 2G. Only the Kbps default estimate should be
   // available.
   estimator.SimulateNetworkChange(
@@ -1624,7 +1599,7 @@
         std::unique_ptr<net::ExternalEstimateProvider>(), variation_params,
         test.allow_small_localhost_requests,
         test.allow_small_localhost_requests, false,
-        base::MakeUnique<BoundTestNetLog>());
+        std::make_unique<BoundTestNetLog>());
 
     base::TimeDelta rtt;
     EXPECT_FALSE(estimator.GetRecentHttpRTT(base::TimeTicks(), &rtt));
@@ -1716,9 +1691,6 @@
 
   histogram_tester.ExpectUniqueSample("NQE.MainFrame.EffectiveConnectionType",
                                       EFFECTIVE_CONNECTION_TYPE_2G, 1);
-  histogram_tester.ExpectUniqueSample(
-      "NQE.MainFrame.EffectiveConnectionType.Unknown",
-      EFFECTIVE_CONNECTION_TYPE_2G, 1);
 
   // Next request should not trigger recomputation of effective connection type
   // since there has been no change in the clock.
@@ -2062,9 +2034,6 @@
   EXPECT_EQ(1U, observer.effective_connection_types().size());
   histogram_tester.ExpectUniqueSample("NQE.MainFrame.EffectiveConnectionType",
                                       EFFECTIVE_CONNECTION_TYPE_2G, 1);
-  histogram_tester.ExpectUniqueSample(
-      "NQE.MainFrame.EffectiveConnectionType.WiFi",
-      EFFECTIVE_CONNECTION_TYPE_2G, 1);
   histogram_tester.ExpectUniqueSample("NQE.EstimateAvailable.MainFrame.RTT", 0,
                                       1);
   histogram_tester.ExpectUniqueSample(
@@ -2225,7 +2194,7 @@
   TestNetworkQualityEstimator estimator(
       nullptr, variation_params, true, true,
       true /* add_default_platform_observations */,
-      base::MakeUnique<BoundTestNetLog>());
+      std::make_unique<BoundTestNetLog>());
   estimator.SimulateNetworkChange(
       NetworkChangeNotifier::ConnectionType::CONNECTION_2G, "test");
 
@@ -2306,13 +2275,9 @@
   histogram_tester.ExpectUniqueSample("NQE.EstimateAvailable.MainFrame.Kbps", 1,
                                       num_requests);
 
-  histogram_tester.ExpectTotalCount(
-      "NQE.MainFrame.TransportRTT.Percentile50.2G", num_requests);
   histogram_tester.ExpectTotalCount("NQE.MainFrame.EffectiveConnectionType",
                                     num_requests);
-  histogram_tester.ExpectTotalCount("NQE.MainFrame.EffectiveConnectionType.2G",
-                                    num_requests);
-  histogram_tester.ExpectBucketCount("NQE.MainFrame.EffectiveConnectionType.2G",
+  histogram_tester.ExpectBucketCount("NQE.MainFrame.EffectiveConnectionType",
                                      EFFECTIVE_CONNECTION_TYPE_UNKNOWN, 0);
   ExpectBucketCountAtLeast(&histogram_tester, "NQE.RTT.ObservationSource",
                            NETWORK_QUALITY_OBSERVATION_SOURCE_TCP, 1);
@@ -2994,7 +2959,7 @@
   TestNetworkQualityEstimator estimator(
       std::unique_ptr<net::ExternalEstimateProvider>(), variation_params, true,
       true, false /* use_default_platform_values */,
-      base::MakeUnique<BoundTestNetLog>());
+      std::make_unique<BoundTestNetLog>());
 
   // Add observers.
   TestRTTObserver rtt_observer;
@@ -3106,7 +3071,7 @@
   TestNetworkQualityEstimator estimator(
       std::unique_ptr<net::ExternalEstimateProvider>(), variation_params, true,
       true, false /* use_default_platform_values */,
-      base::MakeUnique<BoundTestNetLog>());
+      std::make_unique<BoundTestNetLog>());
 
   // Add observers.
   TestRTTObserver rtt_observer;
diff --git a/net/nqe/network_quality_estimator_util_unittest.cc b/net/nqe/network_quality_estimator_util_unittest.cc
index 896ac7b7..d7adf11b 100644
--- a/net/nqe/network_quality_estimator_util_unittest.cc
+++ b/net/nqe/network_quality_estimator_util_unittest.cc
@@ -28,7 +28,7 @@
 // reading of the network quality prefs is not enabled..
 TEST(NetworkQualityEstimatorUtilTest, ReservedHost) {
   std::unique_ptr<BoundTestNetLog> net_log =
-      base::MakeUnique<BoundTestNetLog>();
+      std::make_unique<BoundTestNetLog>();
   MockCachingHostResolver mock_host_resolver;
 
   scoped_refptr<net::RuleBasedHostResolverProc> rules(
@@ -101,7 +101,7 @@
 // the cached entry is used.
 TEST(NetworkQualityEstimatorUtilTest, ReservedHostUncached) {
   std::unique_ptr<BoundTestNetLog> net_log =
-      base::MakeUnique<BoundTestNetLog>();
+      std::make_unique<BoundTestNetLog>();
   MockCachingHostResolver mock_host_resolver;
 
   scoped_refptr<net::RuleBasedHostResolverProc> rules(
@@ -141,7 +141,7 @@
 // Verify that IsPrivateHost() returns correct results for local hosts.
 TEST(NetworkQualityEstimatorUtilTest, Localhost) {
   std::unique_ptr<BoundTestNetLog> net_log =
-      base::MakeUnique<BoundTestNetLog>();
+      std::make_unique<BoundTestNetLog>();
   BoundTestNetLog* net_log_ptr = net_log.get();
 
   net::HostResolver::Options options;
diff --git a/net/nqe/socket_watcher_factory.cc b/net/nqe/socket_watcher_factory.cc
index 63e520a..be450da 100644
--- a/net/nqe/socket_watcher_factory.cc
+++ b/net/nqe/socket_watcher_factory.cc
@@ -33,7 +33,7 @@
 SocketWatcherFactory::CreateSocketPerformanceWatcher(
     const Protocol protocol,
     const AddressList& address_list) {
-  return base::MakeUnique<SocketWatcher>(
+  return std::make_unique<SocketWatcher>(
       protocol, address_list, min_notification_interval_,
       allow_rtt_private_address_, task_runner_,
       updated_rtt_observation_callback_, tick_clock_);
diff --git a/net/nqe/throughput_analyzer_unittest.cc b/net/nqe/throughput_analyzer_unittest.cc
index 865a247..58afa838 100644
--- a/net/nqe/throughput_analyzer_unittest.cc
+++ b/net/nqe/throughput_analyzer_unittest.cc
@@ -46,7 +46,7 @@
             base::Bind(
                 &TestThroughputAnalyzer::OnNewThroughputObservationAvailable,
                 base::Unretained(this)),
-            base::MakeUnique<BoundTestNetLog>()->bound()),
+            std::make_unique<BoundTestNetLog>()->bound()),
         throughput_observations_received_(0),
         bits_received_(0) {}
 
diff --git a/net/proxy/dhcp_proxy_script_fetcher_factory.cc b/net/proxy/dhcp_proxy_script_fetcher_factory.cc
index 1c673e5..4c1c0a2 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_factory.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_factory.cc
@@ -21,9 +21,9 @@
 std::unique_ptr<DhcpProxyScriptFetcher> DhcpProxyScriptFetcherFactory::Create(
     URLRequestContext* context) {
 #if defined(OS_WIN)
-  return base::MakeUnique<DhcpProxyScriptFetcherWin>(context);
+  return std::make_unique<DhcpProxyScriptFetcherWin>(context);
 #else
-  return base::MakeUnique<DoNothingDhcpProxyScriptFetcher>();
+  return std::make_unique<DoNothingDhcpProxyScriptFetcher>();
 #endif
 }
 
diff --git a/net/proxy/mock_proxy_resolver.cc b/net/proxy/mock_proxy_resolver.cc
index 78082a1..de33df38 100644
--- a/net/proxy/mock_proxy_resolver.cc
+++ b/net/proxy/mock_proxy_resolver.cc
@@ -110,7 +110,7 @@
     int rv,
     ProxyResolver* resolver) {
   DCHECK(resolver);
-  CompleteNow(rv, base::MakeUnique<ForwardingProxyResolver>(resolver));
+  CompleteNow(rv, std::make_unique<ForwardingProxyResolver>(resolver));
 }
 
 void MockAsyncProxyResolverFactory::Request::FactoryDestroyed() {
diff --git a/net/proxy/mojo_proxy_resolver_factory_impl.cc b/net/proxy/mojo_proxy_resolver_factory_impl.cc
index 59b5b78..c663011 100644
--- a/net/proxy/mojo_proxy_resolver_factory_impl.cc
+++ b/net/proxy/mojo_proxy_resolver_factory_impl.cc
@@ -58,7 +58,7 @@
                  base::Unretained(this)));
   factory_->CreateProxyResolverV8Tracing(
       pac_script,
-      base::MakeUnique<MojoProxyResolverV8TracingBindings<
+      std::make_unique<MojoProxyResolverV8TracingBindings<
           interfaces::ProxyResolverFactoryRequestClient>>(client_ptr_.get()),
       &proxy_resolver_impl_,
       base::Bind(&MojoProxyResolverFactoryImpl::Job::OnProxyResolverCreated,
@@ -75,7 +75,7 @@
 
 void MojoProxyResolverFactoryImpl::Job::OnProxyResolverCreated(int error) {
   if (error == OK) {
-    mojo::MakeStrongBinding(base::MakeUnique<MojoProxyResolverImpl>(
+    mojo::MakeStrongBinding(std::make_unique<MojoProxyResolverImpl>(
                                 std::move(proxy_resolver_impl_)),
                             std::move(proxy_request_));
   }
@@ -100,7 +100,7 @@
   // The Job will call RemoveJob on |this| when either the create request
   // finishes or |request| or |client| encounters a connection error.
   std::unique_ptr<Job> job =
-      base::MakeUnique<Job>(this, ProxyResolverScriptData::FromUTF8(pac_script),
+      std::make_unique<Job>(this, ProxyResolverScriptData::FromUTF8(pac_script),
                             proxy_resolver_impl_factory_.get(),
                             std::move(request), std::move(client));
   Job* job_ptr = job.get();
diff --git a/net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc b/net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc
index 945e9e5..3acf427d 100644
--- a/net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc
+++ b/net/proxy/mojo_proxy_resolver_factory_impl_unittest.cc
@@ -99,7 +99,7 @@
  public:
   void SetUp() override {
     mock_factory_ = new TestProxyResolverFactory(&waiter_);
-    mojo::MakeStrongBinding(base::MakeUnique<MojoProxyResolverFactoryImpl>(
+    mojo::MakeStrongBinding(std::make_unique<MojoProxyResolverFactoryImpl>(
                                 base::WrapUnique(mock_factory_)),
                             mojo::MakeRequest(&factory_));
   }
diff --git a/net/proxy/mojo_proxy_resolver_impl.cc b/net/proxy/mojo_proxy_resolver_impl.cc
index a35f5a7..a52cb768 100644
--- a/net/proxy/mojo_proxy_resolver_impl.cc
+++ b/net/proxy/mojo_proxy_resolver_impl.cc
@@ -55,7 +55,7 @@
     interfaces::ProxyResolverRequestClientPtr client) {
   DVLOG(1) << "GetProxyForUrl(" << url << ")";
   std::unique_ptr<Job> job =
-      base::MakeUnique<Job>(std::move(client), this, url);
+      std::make_unique<Job>(std::move(client), this, url);
   Job* job_ptr = job.get();
   resolve_jobs_[job_ptr] = std::move(job);
   job_ptr->Start();
@@ -81,8 +81,9 @@
 void MojoProxyResolverImpl::Job::Start() {
   resolver_->resolver_->GetProxyForURL(
       url_, &result_, base::Bind(&Job::GetProxyDone, base::Unretained(this)),
-      &request_, base::MakeUnique<MojoProxyResolverV8TracingBindings<
-                     interfaces::ProxyResolverRequestClient>>(client_.get()));
+      &request_,
+      std::make_unique<MojoProxyResolverV8TracingBindings<
+          interfaces::ProxyResolverRequestClient>>(client_.get()));
   client_.set_connection_error_handler(base::Bind(
       &MojoProxyResolverImpl::Job::OnConnectionError, base::Unretained(this)));
 }
diff --git a/net/proxy/proxy_bypass_rules.cc b/net/proxy/proxy_bypass_rules.cc
index 3cd509c3..5418660b 100644
--- a/net/proxy/proxy_bypass_rules.cc
+++ b/net/proxy/proxy_bypass_rules.cc
@@ -51,7 +51,7 @@
   }
 
   std::unique_ptr<Rule> Clone() const override {
-    return base::MakeUnique<HostnamePatternRule>(
+    return std::make_unique<HostnamePatternRule>(
         optional_scheme_, hostname_pattern_, optional_port_);
   }
 
@@ -73,7 +73,7 @@
   std::string ToString() const override { return "<local>"; }
 
   std::unique_ptr<Rule> Clone() const override {
-    return base::MakeUnique<BypassLocalRule>();
+    return std::make_unique<BypassLocalRule>();
   }
 };
 
@@ -112,7 +112,7 @@
   std::string ToString() const override { return description_; }
 
   std::unique_ptr<Rule> Clone() const override {
-    return base::MakeUnique<BypassIPBlockRule>(
+    return std::make_unique<BypassIPBlockRule>(
         description_, optional_scheme_, ip_prefix_, prefix_length_in_bits_);
   }
 
@@ -197,13 +197,13 @@
   if (hostname_pattern.empty())
     return false;
 
-  rules_.push_back(base::MakeUnique<HostnamePatternRule>(
+  rules_.push_back(std::make_unique<HostnamePatternRule>(
       optional_scheme, hostname_pattern, optional_port));
   return true;
 }
 
 void ProxyBypassRules::AddRuleToBypassLocal() {
-  rules_.push_back(base::MakeUnique<BypassLocalRule>());
+  rules_.push_back(std::make_unique<BypassLocalRule>());
 }
 
 bool ProxyBypassRules::AddRuleFromString(const std::string& raw) {
@@ -287,7 +287,7 @@
     if (!ParseCIDRBlock(raw, &ip_prefix, &prefix_length_in_bits))
       return false;
 
-    rules_.push_back(base::MakeUnique<BypassIPBlockRule>(
+    rules_.push_back(std::make_unique<BypassIPBlockRule>(
         raw, scheme, ip_prefix, prefix_length_in_bits));
 
     return true;
diff --git a/net/proxy/proxy_config.cc b/net/proxy/proxy_config.cc
index 48b7ec7..75b2c62 100644
--- a/net/proxy/proxy_config.cc
+++ b/net/proxy/proxy_config.cc
@@ -262,7 +262,7 @@
       if (proxy_rules_.reverse_bypass)
         dict->SetBoolean("reverse_bypass", true);
 
-      auto list = base::MakeUnique<base::ListValue>();
+      auto list = std::make_unique<base::ListValue>();
 
       for (ProxyBypassRules::RuleList::const_iterator it =
               bypass.rules().begin();
diff --git a/net/proxy/proxy_config_service_win.cc b/net/proxy/proxy_config_service_win.cc
index 6341c61..e127dec 100644
--- a/net/proxy/proxy_config_service_win.cc
+++ b/net/proxy/proxy_config_service_win.cc
@@ -97,7 +97,7 @@
 bool ProxyConfigServiceWin::AddKeyToWatchList(HKEY rootkey,
                                               const wchar_t* subkey) {
   std::unique_ptr<base::win::RegKey> key =
-      base::MakeUnique<base::win::RegKey>();
+      std::make_unique<base::win::RegKey>();
   if (key->Create(rootkey, subkey, KEY_NOTIFY) != ERROR_SUCCESS)
     return false;
 
diff --git a/net/proxy/proxy_resolver_factory_mojo.cc b/net/proxy/proxy_resolver_factory_mojo.cc
index 7674a295..145ea01 100644
--- a/net/proxy/proxy_resolver_factory_mojo.cc
+++ b/net/proxy/proxy_resolver_factory_mojo.cc
@@ -275,7 +275,7 @@
   if (!mojo_proxy_resolver_ptr_)
     return ERR_PAC_SCRIPT_TERMINATED;
 
-  *request = base::MakeUnique<Job>(this, url, results, callback, net_log);
+  *request = std::make_unique<Job>(this, url, results, callback, net_log);
 
   return ERR_IO_PENDING;
 }
diff --git a/net/proxy/proxy_resolver_factory_mojo_unittest.cc b/net/proxy/proxy_resolver_factory_mojo_unittest.cc
index 29ba630..c592469 100644
--- a/net/proxy/proxy_resolver_factory_mojo_unittest.cc
+++ b/net/proxy/proxy_resolver_factory_mojo_unittest.cc
@@ -276,13 +276,13 @@
       break;
     }
     case GetProxyForUrlAction::MAKE_DNS_REQUEST: {
-      auto request = base::MakeUnique<HostResolver::RequestInfo>(
+      auto request = std::make_unique<HostResolver::RequestInfo>(
           HostPortPair(url.spec(), 12345));
       interfaces::HostResolverRequestClientPtr dns_client;
       mojo::MakeRequest(&dns_client);
       client->ResolveDns(std::move(request), std::move(dns_client));
       blocked_clients_.push_back(
-          base::MakeUnique<interfaces::ProxyResolverRequestClientPtr>(
+          std::make_unique<interfaces::ProxyResolverRequestClientPtr>(
               std::move(client)));
       break;
     }
@@ -419,14 +419,14 @@
     case CreateProxyResolverAction::DROP_CLIENT: {
       // Save |request| so its pipe isn't closed.
       blocked_resolver_requests_.push_back(
-          base::MakeUnique<mojo::InterfaceRequest<interfaces::ProxyResolver>>(
+          std::make_unique<mojo::InterfaceRequest<interfaces::ProxyResolver>>(
               std::move(request)));
       break;
     }
     case CreateProxyResolverAction::DROP_RESOLVER: {
       // Save |client| so its pipe isn't closed.
       blocked_clients_.push_back(
-          base::MakeUnique<interfaces::ProxyResolverFactoryRequestClientPtr>(
+          std::make_unique<interfaces::ProxyResolverFactoryRequestClientPtr>(
               std::move(client)));
       break;
     }
@@ -444,13 +444,13 @@
       break;
     }
     case CreateProxyResolverAction::MAKE_DNS_REQUEST: {
-      auto request = base::MakeUnique<HostResolver::RequestInfo>(
+      auto request = std::make_unique<HostResolver::RequestInfo>(
           HostPortPair(pac_script, 12345));
       interfaces::HostResolverRequestClientPtr dns_client;
       mojo::MakeRequest(&dns_client);
       client->ResolveDns(std::move(request), std::move(dns_client));
       blocked_clients_.push_back(
-          base::MakeUnique<interfaces::ProxyResolverFactoryRequestClientPtr>(
+          std::make_unique<interfaces::ProxyResolverFactoryRequestClientPtr>(
               std::move(client)));
       break;
     }
@@ -531,7 +531,7 @@
   }
 
   std::unique_ptr<Request> MakeRequest(const GURL& url) {
-    return base::MakeUnique<Request>(proxy_resolver_mojo_.get(), url);
+    return std::make_unique<Request>(proxy_resolver_mojo_.get(), url);
   }
 
   std::unique_ptr<base::ScopedClosureRunner> CreateResolver(
@@ -539,7 +539,7 @@
       mojo::InterfaceRequest<interfaces::ProxyResolver> req,
       interfaces::ProxyResolverFactoryRequestClientPtr client) override {
     factory_ptr_->CreateResolver(pac_script, std::move(req), std::move(client));
-    return base::MakeUnique<base::ScopedClosureRunner>(
+    return std::make_unique<base::ScopedClosureRunner>(
         on_delete_callback_.closure());
   }
 
diff --git a/net/proxy/proxy_resolver_v8_tracing_unittest.cc b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
index 8050973..6f8c410 100644
--- a/net/proxy/proxy_resolver_v8_tracing_unittest.cc
+++ b/net/proxy/proxy_resolver_v8_tracing_unittest.cc
@@ -95,7 +95,7 @@
   }
 
   std::unique_ptr<ProxyResolverV8Tracing::Bindings> CreateBindings() {
-    return base::MakeUnique<ForwardingBindings>(this);
+    return std::make_unique<ForwardingBindings>(this);
   }
 
  private:
diff --git a/net/proxy/proxy_script_fetcher_impl_unittest.cc b/net/proxy/proxy_script_fetcher_impl_unittest.cc
index d46909c..9ac49b4 100644
--- a/net/proxy/proxy_script_fetcher_impl_unittest.cc
+++ b/net/proxy/proxy_script_fetcher_impl_unittest.cc
@@ -102,16 +102,16 @@
     session_context.proxy_service = proxy_service();
     session_context.ssl_config_service = ssl_config_service();
     session_context.http_server_properties = http_server_properties();
-    storage_.set_http_network_session(base::MakeUnique<HttpNetworkSession>(
+    storage_.set_http_network_session(std::make_unique<HttpNetworkSession>(
         HttpNetworkSession::Params(), session_context));
-    storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>(
+    storage_.set_http_transaction_factory(std::make_unique<HttpCache>(
         storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0),
         false));
     std::unique_ptr<URLRequestJobFactoryImpl> job_factory =
-        base::MakeUnique<URLRequestJobFactoryImpl>();
+        std::make_unique<URLRequestJobFactoryImpl>();
 #if !BUILDFLAG(DISABLE_FILE_SUPPORT)
     job_factory->SetProtocolHandler("file",
-                                    base::MakeUnique<FileProtocolHandler>(
+                                    std::make_unique<FileProtocolHandler>(
                                         base::ThreadTaskRunnerHandle::Get()));
 #endif
     storage_.set_job_factory(std::move(job_factory));
@@ -526,7 +526,7 @@
   base::string16 text;
   for (int i = 0; i < num_requests; i++) {
     std::unique_ptr<ProxyScriptFetcherImpl> pac_fetcher =
-        base::MakeUnique<ProxyScriptFetcherImpl>(&context_);
+        std::make_unique<ProxyScriptFetcherImpl>(&context_);
     GURL url(test_server_.GetURL("/hung"));
     // Fine to use the same string and callback for all of these, as they should
     // all hang.
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index 338fa95..0277b10 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -223,9 +223,9 @@
 
   std::unique_ptr<ProxyResolverFactory> CreateProxyResolverFactory() override {
 #if defined(OS_WIN)
-    return base::MakeUnique<ProxyResolverFactoryWinHttp>();
+    return std::make_unique<ProxyResolverFactoryWinHttp>();
 #elif defined(OS_MACOSX)
-    return base::MakeUnique<ProxyResolverFactoryMac>();
+    return std::make_unique<ProxyResolverFactoryMac>();
 #else
     NOTREACHED();
     return NULL;
@@ -300,8 +300,8 @@
 std::unique_ptr<base::Value> NetLogBadProxyListCallback(
     const ProxyRetryInfoMap* retry_info,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
-  auto list = base::MakeUnique<base::ListValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
+  auto list = std::make_unique<base::ListValue>();
 
   for (ProxyRetryInfoMap::const_iterator iter = retry_info->begin();
        iter != retry_info->end(); ++iter) {
@@ -962,7 +962,7 @@
 
   return base::WrapUnique(new ProxyService(
       std::move(proxy_config_service),
-      base::MakeUnique<ProxyResolverFactoryForSystem>(kDefaultNumPacThreads),
+      std::make_unique<ProxyResolverFactoryForSystem>(kDefaultNumPacThreads),
       net_log));
 }
 
@@ -980,7 +980,7 @@
   // TODO(eroman): This isn't quite right, won't work if |pc| specifies
   //               a PAC script.
   return CreateUsingSystemProxyResolver(
-      base::MakeUnique<ProxyConfigServiceFixed>(pc), NULL);
+      std::make_unique<ProxyConfigServiceFixed>(pc), NULL);
 }
 
 // static
@@ -1014,7 +1014,7 @@
 
   return base::WrapUnique(new ProxyService(
       std::move(proxy_config_service),
-      base::MakeUnique<ProxyResolverFactoryForPacResult>(pac_string), NULL));
+      std::make_unique<ProxyResolverFactoryForPacResult>(pac_string), NULL));
 }
 
 int ProxyService::ResolveProxy(const GURL& raw_url,
@@ -1487,11 +1487,11 @@
 ProxyService::CreateSystemProxyConfigService(
     const scoped_refptr<base::SequencedTaskRunner>& io_task_runner) {
 #if defined(OS_WIN)
-  return base::MakeUnique<ProxyConfigServiceWin>();
+  return std::make_unique<ProxyConfigServiceWin>();
 #elif defined(OS_IOS)
-  return base::MakeUnique<ProxyConfigServiceIOS>();
+  return std::make_unique<ProxyConfigServiceIOS>();
 #elif defined(OS_MACOSX)
-  return base::MakeUnique<ProxyConfigServiceMac>(io_task_runner);
+  return std::make_unique<ProxyConfigServiceMac>(io_task_runner);
 #elif defined(OS_CHROMEOS)
   LOG(ERROR) << "ProxyConfigService for ChromeOS should be created in "
              << "profile_io_data.cc::CreateProxyConfigService and this should "
@@ -1516,12 +1516,12 @@
 
   return std::move(linux_config_service);
 #elif defined(OS_ANDROID)
-  return base::MakeUnique<ProxyConfigServiceAndroid>(
+  return std::make_unique<ProxyConfigServiceAndroid>(
       io_task_runner, base::ThreadTaskRunnerHandle::Get());
 #else
   LOG(WARNING) << "Failed to choose a system proxy settings fetcher "
                   "for this platform.";
-  return base::MakeUnique<ProxyConfigServiceDirect>();
+  return std::make_unique<ProxyConfigServiceDirect>();
 #endif
 }
 
diff --git a/net/proxy/proxy_service_mojo.cc b/net/proxy/proxy_service_mojo.cc
index 394bcf7..3443f18 100644
--- a/net/proxy/proxy_service_mojo.cc
+++ b/net/proxy/proxy_service_mojo.cc
@@ -35,7 +35,7 @@
 
   std::unique_ptr<ProxyService> proxy_service(new ProxyService(
       std::move(proxy_config_service),
-      base::MakeUnique<ProxyResolverFactoryMojo>(
+      std::make_unique<ProxyResolverFactoryMojo>(
           mojo_proxy_factory, host_resolver,
           base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate,
                      base::ThreadTaskRunnerHandle::Get()),
diff --git a/net/proxy/proxy_service_mojo_unittest.cc b/net/proxy/proxy_service_mojo_unittest.cc
index 46338339..be263c6 100644
--- a/net/proxy/proxy_service_mojo_unittest.cc
+++ b/net/proxy/proxy_service_mojo_unittest.cc
@@ -132,9 +132,10 @@
 
     fetcher_ = new MockProxyScriptFetcher;
     proxy_service_ = CreateProxyServiceUsingMojoFactory(
-        this, base::MakeUnique<ProxyConfigServiceFixed>(
-                  ProxyConfig::CreateFromCustomPacURL(GURL(kPacUrl))),
-        fetcher_, base::MakeUnique<DoNothingDhcpProxyScriptFetcher>(),
+        this,
+        std::make_unique<ProxyConfigServiceFixed>(
+            ProxyConfig::CreateFromCustomPacURL(GURL(kPacUrl))),
+        fetcher_, std::make_unique<DoNothingDhcpProxyScriptFetcher>(),
         &mock_host_resolver_, &net_log_, &network_delegate_);
   }
 
@@ -144,7 +145,7 @@
       interfaces::ProxyResolverFactoryRequestClientPtr client) override {
     TestMojoProxyResolverFactory::GetInstance()->CreateResolver(
         pac_script, std::move(req), std::move(client));
-    return base::MakeUnique<base::ScopedClosureRunner>(
+    return std::make_unique<base::ScopedClosureRunner>(
         on_delete_closure_.closure());
   }
 
diff --git a/net/proxy/proxy_service_unittest.cc b/net/proxy/proxy_service_unittest.cc
index d9ed8f0..d3c2239 100644
--- a/net/proxy/proxy_service_unittest.cc
+++ b/net/proxy/proxy_service_unittest.cc
@@ -369,7 +369,7 @@
   MockAsyncProxyResolverFactory* factory =
       new MockAsyncProxyResolverFactory(false);
   ProxyService service(
-      base::MakeUnique<MockProxyConfigService>(ProxyConfig::CreateDirect()),
+      std::make_unique<MockProxyConfigService>(ProxyConfig::CreateDirect()),
       base::WrapUnique(factory), nullptr);
 
   GURL url("http://www.google.com/");
@@ -405,7 +405,7 @@
   config.set_auto_detect(false);
   config.proxy_rules().bypass_rules.ParseFromString("*.org");
 
-  ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+  ProxyService service(std::make_unique<MockProxyConfigService>(config),
                        nullptr, nullptr);
 
   GURL url("http://www.google.com/");
@@ -461,7 +461,7 @@
   config.set_auto_detect(false);
   config.proxy_rules().bypass_rules.ParseFromString("*.org");
 
-  ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+  ProxyService service(std::make_unique<MockProxyConfigService>(config),
                        nullptr, nullptr);
 
   GURL url("http://www.google.com/");
@@ -1076,7 +1076,7 @@
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, base::MakeUnique<DoNothingDhcpProxyScriptFetcher>());
+      fetcher, std::make_unique<DoNothingDhcpProxyScriptFetcher>());
 
   // Start resolve request.
   GURL url("http://www.google.com/");
@@ -1695,7 +1695,7 @@
   config.set_auto_detect(false);
   config.proxy_rules().bypass_rules.ParseFromString("*.org");
 
-  ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+  ProxyService service(std::make_unique<MockProxyConfigService>(config),
                        nullptr, nullptr);
 
   int rv;
@@ -1736,7 +1736,7 @@
 
   EXPECT_EQ(3u, additional_bad_proxies.size());
 
-  ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+  ProxyService service(std::make_unique<MockProxyConfigService>(config),
                        nullptr, nullptr);
   ProxyInfo proxy_info;
   proxy_info.UseProxyList(proxy_list);
@@ -1757,7 +1757,7 @@
   config.proxy_rules().ParseFromString("http=foopy1:8080;https=foopy2:8080");
   config.set_auto_detect(false);
   {
-    ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+    ProxyService service(std::make_unique<MockProxyConfigService>(config),
                          nullptr, nullptr);
     GURL test_url("http://www.msn.com");
     ProxyInfo info;
@@ -1770,7 +1770,7 @@
     EXPECT_EQ("foopy1:8080", info.proxy_server().ToURI());
   }
   {
-    ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+    ProxyService service(std::make_unique<MockProxyConfigService>(config),
                          nullptr, nullptr);
     GURL test_url("ftp://ftp.google.com");
     ProxyInfo info;
@@ -1783,7 +1783,7 @@
     EXPECT_EQ("direct://", info.proxy_server().ToURI());
   }
   {
-    ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+    ProxyService service(std::make_unique<MockProxyConfigService>(config),
                          nullptr, nullptr);
     GURL test_url("https://webbranch.techcu.com");
     ProxyInfo info;
@@ -1797,7 +1797,7 @@
   }
   {
     config.proxy_rules().ParseFromString("foopy1:8080");
-    ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+    ProxyService service(std::make_unique<MockProxyConfigService>(config),
                          nullptr, nullptr);
     GURL test_url("http://www.microsoft.com");
     ProxyInfo info;
@@ -1819,7 +1819,7 @@
     ProxyConfig config;
     config.set_source(PROXY_CONFIG_SOURCE_TEST);
     config.proxy_rules().ParseFromString("https=foopy2:8080");
-    ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+    ProxyService service(std::make_unique<MockProxyConfigService>(config),
                          nullptr, nullptr);
     GURL test_url("http://www.google.com");
     ProxyInfo info;
@@ -1835,7 +1835,7 @@
     ProxyConfig config;
     config.set_source(PROXY_CONFIG_SOURCE_TEST);
     config.proxy_rules().ParseFromString("https=foopy2:8080");
-    ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+    ProxyService service(std::make_unique<MockProxyConfigService>(config),
                          nullptr, nullptr);
     GURL test_url("https://www.google.com");
     ProxyInfo info;
@@ -1850,7 +1850,7 @@
   {
     ProxyConfig config;
     config.set_source(PROXY_CONFIG_SOURCE_TEST);
-    ProxyService service(base::MakeUnique<MockProxyConfigService>(config),
+    ProxyService service(std::make_unique<MockProxyConfigService>(config),
                          nullptr, nullptr);
     GURL test_url("http://www.google.com");
     ProxyInfo info;
@@ -2619,7 +2619,7 @@
   ProxyConfig config1;
   config1.proxy_rules().ParseFromString("foopy1:8080");
   config1.set_auto_detect(false);
-  ProxyService service(base::MakeUnique<MockProxyConfigService>(config1),
+  ProxyService service(std::make_unique<MockProxyConfigService>(config1),
                        nullptr, nullptr);
 
   ProxyInfo info;
@@ -2633,7 +2633,7 @@
   ProxyConfig config2;
   config2.proxy_rules().ParseFromString("foopy2:8080");
   config2.set_auto_detect(false);
-  service.ResetConfigService(base::MakeUnique<MockProxyConfigService>(config2));
+  service.ResetConfigService(std::make_unique<MockProxyConfigService>(config2));
   TestCompletionCallback callback2;
   rv = service.ResolveProxy(GURL("http://request2"), std::string(), &info,
                             callback2.callback(), nullptr, nullptr,
@@ -2710,7 +2710,7 @@
 
   MockProxyScriptFetcher* fetcher = new MockProxyScriptFetcher;
   service.SetProxyScriptFetchers(
-      fetcher, base::MakeUnique<DoNothingDhcpProxyScriptFetcher>());
+      fetcher, std::make_unique<DoNothingDhcpProxyScriptFetcher>());
 
   // Disable the "wait after IP address changes" hack, so this unit-test can
   // complete quickly.
diff --git a/net/proxy/proxy_service_v8.cc b/net/proxy/proxy_service_v8.cc
index 8a71be4..4e25907 100644
--- a/net/proxy/proxy_service_v8.cc
+++ b/net/proxy/proxy_service_v8.cc
@@ -34,7 +34,7 @@
 
   std::unique_ptr<ProxyService> proxy_service(new ProxyService(
       std::move(proxy_config_service),
-      base::MakeUnique<ProxyResolverFactoryV8TracingWrapper>(
+      std::make_unique<ProxyResolverFactoryV8TracingWrapper>(
           host_resolver, net_log,
           base::Bind(&NetworkDelegateErrorObserver::Create, network_delegate,
                      base::ThreadTaskRunnerHandle::Get())),
diff --git a/net/proxy/test_mojo_proxy_resolver_factory.cc b/net/proxy/test_mojo_proxy_resolver_factory.cc
index 9a0223a2..0d83277 100644
--- a/net/proxy/test_mojo_proxy_resolver_factory.cc
+++ b/net/proxy/test_mojo_proxy_resolver_factory.cc
@@ -25,7 +25,7 @@
 }
 
 TestMojoProxyResolverFactory::TestMojoProxyResolverFactory() {
-  mojo::MakeStrongBinding(base::MakeUnique<MojoProxyResolverFactoryImpl>(),
+  mojo::MakeStrongBinding(std::make_unique<MojoProxyResolverFactoryImpl>(),
                           mojo::MakeRequest(&factory_));
 }
 
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
index 8b291f5..c4f0ef9 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
+++ b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
@@ -74,7 +74,7 @@
   TestDelegateBase(IOBuffer* read_buf, int read_buf_len)
       : TestDelegateBase(read_buf,
                          read_buf_len,
-                         base::MakeUnique<base::Timer>(false, false)) {}
+                         std::make_unique<base::Timer>(false, false)) {}
 
   TestDelegateBase(IOBuffer* read_buf,
                    int read_buf_len,
@@ -164,7 +164,7 @@
              const NetLogWithSource& net_log,
              std::unique_ptr<QuicChromiumClientSession::Handle> session) {
     not_expect_callback_ = true;
-    stream_ = base::MakeUnique<BidirectionalStreamQuicImpl>(std::move(session));
+    stream_ = std::make_unique<BidirectionalStreamQuicImpl>(std::move(session));
     stream_->Start(request_info, net_log, send_request_headers_automatically_,
                    this, nullptr);
     not_expect_callback_ = false;
diff --git a/net/quic/chromium/crypto/channel_id_chromium.cc b/net/quic/chromium/crypto/channel_id_chromium.cc
index c451d893..1266b3ea 100644
--- a/net/quic/chromium/crypto/channel_id_chromium.cc
+++ b/net/quic/chromium/crypto/channel_id_chromium.cc
@@ -206,7 +206,7 @@
     const std::string& hostname,
     std::unique_ptr<ChannelIDKey>* channel_id_key,
     ChannelIDSourceCallback* callback) {
-  std::unique_ptr<Job> job = base::MakeUnique<Job>(this, channel_id_service_);
+  std::unique_ptr<Job> job = std::make_unique<Job>(this, channel_id_service_);
   QuicAsyncStatus status =
       job->GetChannelIDKey(hostname, channel_id_key, callback);
   if (status == QUIC_PENDING) {
diff --git a/net/quic/chromium/crypto/proof_verifier_chromium.cc b/net/quic/chromium/crypto/proof_verifier_chromium.cc
index badfb36a..e6c9821 100644
--- a/net/quic/chromium/crypto/proof_verifier_chromium.cc
+++ b/net/quic/chromium/crypto/proof_verifier_chromium.cc
@@ -557,7 +557,7 @@
   }
   const ProofVerifyContextChromium* chromium_context =
       reinterpret_cast<const ProofVerifyContextChromium*>(verify_context);
-  std::unique_ptr<Job> job = base::MakeUnique<Job>(
+  std::unique_ptr<Job> job = std::make_unique<Job>(
       this, cert_verifier_, ct_policy_enforcer_, transport_security_state_,
       cert_transparency_verifier_, chromium_context->cert_verify_flags,
       chromium_context->net_log);
@@ -584,7 +584,7 @@
   }
   const ProofVerifyContextChromium* chromium_context =
       reinterpret_cast<const ProofVerifyContextChromium*>(verify_context);
-  std::unique_ptr<Job> job = base::MakeUnique<Job>(
+  std::unique_ptr<Job> job = std::make_unique<Job>(
       this, cert_verifier_, ct_policy_enforcer_, transport_security_state_,
       cert_transparency_verifier_, chromium_context->cert_verify_flags,
       chromium_context->net_log);
diff --git a/net/quic/chromium/crypto/proof_verifier_chromium_test.cc b/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
index e7e6ddd..fc5d35c 100644
--- a/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
+++ b/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
@@ -151,7 +151,7 @@
     std::string signature;
     source.GetProof(QuicSocketAddress(), kTestHostname, kTestConfig,
                     QUIC_VERSION_35, kTestChloHash, QuicTagVector(),
-                    base::MakeUnique<SignatureSaver>(&signature));
+                    std::make_unique<SignatureSaver>(&signature));
     return signature;
   }
 
diff --git a/net/quic/chromium/crypto_test_utils_chromium.cc b/net/quic/chromium/crypto_test_utils_chromium.cc
index 8380b73..91b6c98 100644
--- a/net/quic/chromium/crypto_test_utils_chromium.cc
+++ b/net/quic/chromium/crypto_test_utils_chromium.cc
@@ -102,7 +102,7 @@
       GetTestCertsDirectory(), "quic_test_ecc.example.com.crt");
   cert_verifier->AddResultForCertAndHost(verify_result.verified_cert.get(),
                                          "test.example.com", verify_result, OK);
-  return base::MakeUnique<TestProofVerifierChromium>(
+  return std::make_unique<TestProofVerifierChromium>(
       std::move(cert_verifier), base::WrapUnique(new TransportSecurityState),
       base::WrapUnique(new MultiLogCTVerifier),
       base::WrapUnique(new CTPolicyEnforcer), "quic_root.crt");
diff --git a/net/quic/chromium/quic_chromium_client_session.cc b/net/quic/chromium/quic_chromium_client_session.cc
index 0caa4719..3225335b 100644
--- a/net/quic/chromium/quic_chromium_client_session.cc
+++ b/net/quic/chromium/quic_chromium_client_session.cc
@@ -295,7 +295,7 @@
   if (!session_)
     return nullptr;
 
-  return base::MakeUnique<QuicConnection::ScopedPacketBundler>(
+  return std::make_unique<QuicConnection::ScopedPacketBundler>(
       session_->connection(), bundling_mode);
 }
 
@@ -334,7 +334,7 @@
   if (!session_)
     return ERR_CONNECTION_CLOSED;
 
-  // base::MakeUnique does not work because the StreamRequest constructor
+  // std::make_unique does not work because the StreamRequest constructor
   // is private.
   stream_request_ = std::unique_ptr<StreamRequest>(
       new StreamRequest(this, requires_confirmation));
@@ -638,13 +638,14 @@
       migration_pending_(false),
       weak_factory_(this) {
   sockets_.push_back(std::move(socket));
-  packet_readers_.push_back(base::MakeUnique<QuicChromiumPacketReader>(
+  packet_readers_.push_back(std::make_unique<QuicChromiumPacketReader>(
       sockets_.back().get(), clock, this, yield_after_packets,
       yield_after_duration, net_log_));
   crypto_stream_.reset(
       crypto_client_stream_factory->CreateQuicCryptoClientStream(
-          server_id, this, base::MakeUnique<ProofVerifyContextChromium>(
-                               cert_verify_flags, net_log_),
+          server_id, this,
+          std::make_unique<ProofVerifyContextChromium>(cert_verify_flags,
+                                                       net_log_),
           crypto_config));
   connection->set_debug_visitor(logger_.get());
   connection->set_creator_debug_delegate(logger_.get());
@@ -775,10 +776,8 @@
 
 void QuicChromiumClientSession::Initialize() {
   QuicSpdyClientSessionBase::Initialize();
-  SetHpackEncoderDebugVisitor(
-      base::MakeUnique<HpackEncoderDebugVisitor>());
-  SetHpackDecoderDebugVisitor(
-      base::MakeUnique<HpackDecoderDebugVisitor>());
+  SetHpackEncoderDebugVisitor(std::make_unique<HpackEncoderDebugVisitor>());
+  SetHpackDecoderDebugVisitor(std::make_unique<HpackDecoderDebugVisitor>());
   set_max_uncompressed_header_bytes(kMaxUncompressedHeaderSize);
 }
 
@@ -1671,7 +1670,7 @@
 
 std::unique_ptr<QuicChromiumClientSession::Handle>
 QuicChromiumClientSession::CreateHandle() {
-  return base::MakeUnique<QuicChromiumClientSession::Handle>(
+  return std::make_unique<QuicChromiumClientSession::Handle>(
       weak_factory_.GetWeakPtr());
 }
 
@@ -1806,7 +1805,7 @@
     // promise has been received.
     GURL pushed_url = GetUrlFromHeaderBlock(headers);
     if (push_delegate_) {
-      push_delegate_->OnPush(base::MakeUnique<QuicServerPushHelper>(
+      push_delegate_->OnPush(std::make_unique<QuicServerPushHelper>(
                                  weak_factory_.GetWeakPtr(), pushed_url),
                              net_log_);
     }
diff --git a/net/quic/chromium/quic_connection_logger.cc b/net/quic/chromium/quic_connection_logger.cc
index 9b65050..c501b93 100644
--- a/net/quic/chromium/quic_connection_logger.cc
+++ b/net/quic/chromium/quic_connection_logger.cc
@@ -109,13 +109,13 @@
 std::unique_ptr<base::Value> NetLogQuicAckFrameCallback(
     const QuicAckFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("largest_observed",
                   base::Uint64ToString(frame->largest_observed));
   dict->SetString("delta_time_largest_observed_us",
                   base::Int64ToString(frame->ack_delay_time.ToMicroseconds()));
 
-  auto missing = base::MakeUnique<base::ListValue>();
+  auto missing = std::make_unique<base::ListValue>();
   if (!frame->packets.Empty()) {
     // V34 and above express acked packets, but only print
     // missing packets, because it's typically a shorter list.
@@ -128,11 +128,11 @@
   }
   dict->Set("missing_packets", std::move(missing));
 
-  auto received = base::MakeUnique<base::ListValue>();
+  auto received = std::make_unique<base::ListValue>();
   const PacketTimeVector& received_times = frame->received_packet_times;
   for (PacketTimeVector::const_iterator it = received_times.begin();
        it != received_times.end(); ++it) {
-    auto info = base::MakeUnique<base::DictionaryValue>();
+    auto info = std::make_unique<base::DictionaryValue>();
     info->SetInteger("packet_number", static_cast<int>(it->first));
     info->SetString("received",
                     base::Int64ToString(it->second.ToDebuggingValue()));
@@ -191,8 +191,8 @@
 std::unique_ptr<base::Value> NetLogQuicStopWaitingFrameCallback(
     const QuicStopWaitingFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
-  auto sent_info = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
+  auto sent_info = std::make_unique<base::DictionaryValue>();
   sent_info->SetString("least_unacked",
                        base::Uint64ToString(frame->least_unacked));
   dict->Set("sent_info", std::move(sent_info));
@@ -202,8 +202,8 @@
 std::unique_ptr<base::Value> NetLogQuicVersionNegotiationPacketCallback(
     const QuicVersionNegotiationPacket* packet,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
-  auto versions = base::MakeUnique<base::ListValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
+  auto versions = std::make_unique<base::ListValue>();
   for (QuicVersionVector::const_iterator it = packet->versions.begin();
        it != packet->versions.end(); ++it) {
     versions->AppendString(QuicVersionToString(*it));
@@ -249,8 +249,8 @@
   // More fields could be logged in the future.
   std::vector<std::string> dns_names;
   cert->GetDNSNames(&dns_names);
-  auto dict = base::MakeUnique<base::DictionaryValue>();
-  auto subjects = base::MakeUnique<base::ListValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
+  auto subjects = std::make_unique<base::ListValue>();
   for (auto& dns_name : dns_names) {
     subjects->GetList().emplace_back(std::move(dns_name));
   }
diff --git a/net/quic/chromium/quic_end_to_end_unittest.cc b/net/quic/chromium/quic_end_to_end_unittest.cc
index 3cc1c9ed..97a8147 100644
--- a/net/quic/chromium/quic_end_to_end_unittest.cc
+++ b/net/quic/chromium/quic_end_to_end_unittest.cc
@@ -211,7 +211,7 @@
   void InitializePostRequest(size_t length) {
     GenerateBody(length);
     std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-    element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+    element_readers.push_back(std::make_unique<UploadBytesElementReader>(
         request_body_.data(), request_body_.length()));
     upload_data_stream_.reset(
         new ElementsUploadDataStream(std::move(element_readers), 0));
diff --git a/net/quic/chromium/quic_http_stream_test.cc b/net/quic/chromium/quic_http_stream_test.cc
index c3ffa5b5..75964846 100644
--- a/net/quic/chromium/quic_http_stream_test.cc
+++ b/net/quic/chromium/quic_http_stream_test.cc
@@ -1101,10 +1101,10 @@
   Initialize();
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-  element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+  element_readers.push_back(std::make_unique<UploadBytesElementReader>(
       kUploadData, strlen(kUploadData)));
   upload_data_stream_ =
-      base::MakeUnique<ElementsUploadDataStream>(std::move(element_readers), 0);
+      std::make_unique<ElementsUploadDataStream>(std::move(element_readers), 0);
   request_.method = "POST";
   request_.url = GURL("https://www.example.org/");
   request_.upload_data_stream = upload_data_stream_.get();
@@ -1172,10 +1172,10 @@
   Initialize();
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-  element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+  element_readers.push_back(std::make_unique<UploadBytesElementReader>(
       kUploadData, strlen(kUploadData)));
   upload_data_stream_ =
-      base::MakeUnique<ElementsUploadDataStream>(std::move(element_readers), 0);
+      std::make_unique<ElementsUploadDataStream>(std::move(element_readers), 0);
   request_.method = "POST";
   request_.url = GURL("https://www.example.org/");
   request_.upload_data_stream = upload_data_stream_.get();
@@ -1247,7 +1247,7 @@
   AddWrite(ConstructClientAckPacket(5, 3, 1, 1));
   Initialize();
 
-  upload_data_stream_ = base::MakeUnique<ChunkedUploadDataStream>(0);
+  upload_data_stream_ = std::make_unique<ChunkedUploadDataStream>(0);
   auto* chunked_upload_stream =
       static_cast<ChunkedUploadDataStream*>(upload_data_stream_.get());
   chunked_upload_stream->AppendData(kUploadData, chunk_size, false);
@@ -1321,7 +1321,7 @@
   AddWrite(ConstructClientAckPacket(5, 3, 1, 1));
   Initialize();
 
-  upload_data_stream_ = base::MakeUnique<ChunkedUploadDataStream>(0);
+  upload_data_stream_ = std::make_unique<ChunkedUploadDataStream>(0);
   auto* chunked_upload_stream =
       static_cast<ChunkedUploadDataStream*>(upload_data_stream_.get());
   chunked_upload_stream->AppendData(kUploadData, chunk_size, false);
@@ -1390,7 +1390,7 @@
   AddWrite(ConstructClientAckPacket(4, 3, 1, 1));
   Initialize();
 
-  upload_data_stream_ = base::MakeUnique<ChunkedUploadDataStream>(0);
+  upload_data_stream_ = std::make_unique<ChunkedUploadDataStream>(0);
   auto* chunked_upload_stream =
       static_cast<ChunkedUploadDataStream*>(upload_data_stream_.get());
 
@@ -1559,7 +1559,7 @@
   AddWrite(SYNCHRONOUS, ERR_FAILED);
   Initialize();
 
-  upload_data_stream_ = base::MakeUnique<ChunkedUploadDataStream>(0);
+  upload_data_stream_ = std::make_unique<ChunkedUploadDataStream>(0);
   auto* chunked_upload_stream =
       static_cast<ChunkedUploadDataStream*>(upload_data_stream_.get());
 
@@ -1591,7 +1591,7 @@
   AddWrite(SYNCHRONOUS, ERR_FAILED);
   Initialize();
 
-  upload_data_stream_ = base::MakeUnique<ChunkedUploadDataStream>(0);
+  upload_data_stream_ = std::make_unique<ChunkedUploadDataStream>(0);
 
   request_.method = "POST";
   request_.url = GURL("https://www.example.org/");
@@ -1621,7 +1621,7 @@
   AddWrite(SYNCHRONOUS, ERR_FAILED);
   Initialize();
 
-  upload_data_stream_ = base::MakeUnique<ChunkedUploadDataStream>(0);
+  upload_data_stream_ = std::make_unique<ChunkedUploadDataStream>(0);
   auto* chunked_upload_stream =
       static_cast<ChunkedUploadDataStream*>(upload_data_stream_.get());
   size_t chunk_size = strlen(kUploadData);
@@ -2129,7 +2129,7 @@
 
   Initialize();
 
-  upload_data_stream_ = base::MakeUnique<ReadErrorUploadDataStream>(
+  upload_data_stream_ = std::make_unique<ReadErrorUploadDataStream>(
       ReadErrorUploadDataStream::FailureMode::SYNC);
   request_.method = "POST";
   request_.url = GURL("https://www.example.org/");
@@ -2165,7 +2165,7 @@
 
   Initialize();
 
-  upload_data_stream_ = base::MakeUnique<ReadErrorUploadDataStream>(
+  upload_data_stream_ = std::make_unique<ReadErrorUploadDataStream>(
       ReadErrorUploadDataStream::FailureMode::ASYNC);
   request_.method = "POST";
   request_.url = GURL("https://www.example.org/");
diff --git a/net/quic/chromium/quic_network_transaction_unittest.cc b/net/quic/chromium/quic_network_transaction_unittest.cc
index 9d675c2..6d49481c 100644
--- a/net/quic/chromium/quic_network_transaction_unittest.cc
+++ b/net/quic/chromium/quic_network_transaction_unittest.cc
@@ -1917,7 +1917,7 @@
   scoped_refptr<TestTaskRunner> quic_task_runner_(new TestTaskRunner(&clock_));
   QuicStreamFactoryPeer::SetAlarmFactory(
       session_->quic_stream_factory(),
-      base::MakeUnique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
+      std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
@@ -2015,7 +2015,7 @@
   scoped_refptr<TestTaskRunner> quic_task_runner_(new TestTaskRunner(&clock_));
   QuicStreamFactoryPeer::SetAlarmFactory(
       session_->quic_stream_factory(),
-      base::MakeUnique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
+      std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
@@ -2117,12 +2117,12 @@
   scoped_refptr<TestTaskRunner> quic_task_runner_(new TestTaskRunner(&clock_));
   QuicStreamFactoryPeer::SetAlarmFactory(
       session_->quic_stream_factory(),
-      base::MakeUnique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
+      std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
 
-  auto trans = base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
+  auto trans = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
                                                         session_.get());
   TestCompletionCallback callback;
   int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
@@ -2289,7 +2289,7 @@
   scoped_refptr<TestTaskRunner> quic_task_runner_(new TestTaskRunner(&clock_));
   QuicStreamFactoryPeer::SetAlarmFactory(
       session_->quic_stream_factory(),
-      base::MakeUnique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
+      std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
@@ -2406,7 +2406,7 @@
   scoped_refptr<TestTaskRunner> quic_task_runner_(new TestTaskRunner(&clock_));
   QuicStreamFactoryPeer::SetAlarmFactory(
       session_->quic_stream_factory(),
-      base::MakeUnique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
+      std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
@@ -2519,7 +2519,7 @@
   scoped_refptr<TestTaskRunner> quic_task_runner_(new TestTaskRunner(&clock_));
   QuicStreamFactoryPeer::SetAlarmFactory(
       session_->quic_stream_factory(),
-      base::MakeUnique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
+      std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
@@ -2646,7 +2646,7 @@
   scoped_refptr<TestTaskRunner> quic_task_runner_(new TestTaskRunner(&clock_));
   QuicStreamFactoryPeer::SetAlarmFactory(
       session_->quic_stream_factory(),
-      base::MakeUnique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
+      std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
@@ -2759,12 +2759,12 @@
   scoped_refptr<TestTaskRunner> quic_task_runner_(new TestTaskRunner(&clock_));
   QuicStreamFactoryPeer::SetAlarmFactory(
       session_->quic_stream_factory(),
-      base::MakeUnique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
+      std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
   AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
 
-  auto trans = base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
+  auto trans = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
                                                         session_.get());
   TestCompletionCallback callback;
   int rv = trans->Start(&request_, callback.callback(), net_log_.bound());
@@ -4800,7 +4800,7 @@
   // Start a push transaction that will be cancelled after the connection
   // is closed, but before the callback is executed.
   request_.url = GURL("https://mail.example.org/pushed.jpg");
-  auto trans2 = base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
+  auto trans2 = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
                                                          session_.get());
   TestCompletionCallback callback2;
   int rv = trans2->Start(&request_, callback2.callback(), net_log_.bound());
diff --git a/net/quic/chromium/quic_proxy_client_socket.cc b/net/quic/chromium/quic_proxy_client_socket.cc
index 9db736e..e1e39a1 100644
--- a/net/quic/chromium/quic_proxy_client_socket.cc
+++ b/net/quic/chromium/quic_proxy_client_socket.cc
@@ -58,7 +58,7 @@
 
 std::unique_ptr<HttpStream>
 QuicProxyClientSocket::CreateConnectResponseStream() {
-  return base::MakeUnique<ProxyConnectRedirectHttpStream>(
+  return std::make_unique<ProxyConnectRedirectHttpStream>(
       redirect_has_load_timing_info_ ? &redirect_load_timing_info_ : nullptr);
 }
 
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc
index b5ac9c0c8..c0275089 100644
--- a/net/quic/chromium/quic_stream_factory.cc
+++ b/net/quic/chromium/quic_stream_factory.cc
@@ -663,7 +663,7 @@
   if (!session_ || !session_->IsConnected())
     return nullptr;
 
-  return base::MakeUnique<QuicHttpStream>(std::move(session_));
+  return std::make_unique<QuicHttpStream>(std::move(session_));
 }
 
 std::unique_ptr<BidirectionalStreamImpl>
@@ -671,7 +671,7 @@
   if (!session_ || !session_->IsConnected())
     return nullptr;
 
-  return base::MakeUnique<BidirectionalStreamQuicImpl>(std::move(session_));
+  return std::make_unique<BidirectionalStreamQuicImpl>(std::move(session_));
 }
 
 QuicStreamFactory::QuicStreamFactory(
@@ -967,7 +967,7 @@
   ignore_result(StartCertVerifyJob(server_id, cert_verify_flags, net_log));
 
   QuicSessionKey key(destination, server_id);
-  std::unique_ptr<Job> job = base::MakeUnique<Job>(
+  std::unique_ptr<Job> job = std::make_unique<Job>(
       this, quic_version, host_resolver_, key, WasQuicRecentlyBroken(server_id),
       cert_verify_flags, net_log);
   int rv = job->Run(base::Bind(&QuicStreamFactory::OnJobComplete,
@@ -1532,7 +1532,7 @@
   QuicConnectionId connection_id = random_generator_->RandUint64();
   std::unique_ptr<QuicServerInfo> server_info;
   if (store_server_configs_in_properties_) {
-    server_info = base::MakeUnique<PropertiesBasedQuicServerInfo>(
+    server_info = std::make_unique<PropertiesBasedQuicServerInfo>(
         server_id, http_server_properties_);
   }
   InitializeCachedStateInCryptoConfig(server_id, server_info, &connection_id);
diff --git a/net/quic/chromium/quic_stream_factory_test.cc b/net/quic/chromium/quic_stream_factory_test.cc
index 06b4389..28f5949 100644
--- a/net/quic/chromium/quic_stream_factory_test.cc
+++ b/net/quic/chromium/quic_stream_factory_test.cc
@@ -510,7 +510,7 @@
     QuicServerId quic_server_id(kDefaultServerHostName, 443,
                                 PRIVACY_MODE_DISABLED);
     std::unique_ptr<QuicServerInfo> quic_server_info =
-        base::MakeUnique<PropertiesBasedQuicServerInfo>(
+        std::make_unique<PropertiesBasedQuicServerInfo>(
             quic_server_id, &http_server_properties_);
 
     // Update quic_server_info's server_config and persist it.
@@ -549,7 +549,7 @@
 
     QuicServerId quic_server_id2(kServer2HostName, 443, PRIVACY_MODE_DISABLED);
     std::unique_ptr<QuicServerInfo> quic_server_info2 =
-        base::MakeUnique<PropertiesBasedQuicServerInfo>(
+        std::make_unique<PropertiesBasedQuicServerInfo>(
             quic_server_id2, &http_server_properties_);
     // Update quic_server_info2's server_config and persist it.
     QuicServerInfo::State* state2 = quic_server_info2->mutable_state();
diff --git a/net/quic/chromium/quic_test_packet_maker.cc b/net/quic/chromium/quic_test_packet_maker.cc
index bf86a12..d73b55c9 100644
--- a/net/quic/chromium/quic_test_packet_maker.cc
+++ b/net/quic/chromium/quic_test_packet_maker.cc
@@ -309,7 +309,7 @@
   std::vector<std::unique_ptr<QuicStreamFrame>> stream_frames;
   for (size_t i = 0; i < data_writes.size(); ++i) {
     bool is_fin = fin && (i == data_writes.size() - 1);
-    stream_frames.push_back(base::MakeUnique<QuicStreamFrame>(
+    stream_frames.push_back(std::make_unique<QuicStreamFrame>(
         stream_id, is_fin, offset, QuicStringPiece(data_writes[i])));
     offset += data_writes[i].length();
   }
@@ -392,7 +392,7 @@
   std::vector<std::unique_ptr<QuicStreamFrame>> stream_frames;
   for (size_t i = 0; i < data_writes.size(); ++i) {
     bool is_fin = fin && (i == data_writes.size() - 1);
-    stream_frames.push_back(base::MakeUnique<QuicStreamFrame>(
+    stream_frames.push_back(std::make_unique<QuicStreamFrame>(
         stream_id, is_fin, offset, QuicStringPiece(data_writes[i])));
     offset += data_writes[i].length();
   }
diff --git a/net/quic/core/crypto/crypto_server_config_protobuf.h b/net/quic/core/crypto/crypto_server_config_protobuf.h
index fe0cc4e..0077f3b2 100644
--- a/net/quic/core/crypto/crypto_server_config_protobuf.h
+++ b/net/quic/core/crypto/crypto_server_config_protobuf.h
@@ -56,7 +56,7 @@
   void set_config(QuicStringPiece config) { config.CopyToString(&config_); }
 
   QuicServerConfigProtobuf::PrivateKey* add_key() {
-    keys_.push_back(base::MakeUnique<PrivateKey>());
+    keys_.push_back(std::make_unique<PrivateKey>());
     return keys_.back().get();
   }
 
diff --git a/net/quic/platform/impl/quic_ptr_util_impl.h b/net/quic/platform/impl/quic_ptr_util_impl.h
index 93fe585a..7066a20 100644
--- a/net/quic/platform/impl/quic_ptr_util_impl.h
+++ b/net/quic/platform/impl/quic_ptr_util_impl.h
@@ -10,7 +10,7 @@
 
 template <typename T, typename... Args>
 std::unique_ptr<T> QuicMakeUniqueImpl(Args&&... args) {
-  return base::MakeUnique<T>(std::forward<Args>(args)...);
+  return std::make_unique<T>(std::forward<Args>(args)...);
 }
 
 template <typename T>
diff --git a/net/reporting/reporting_browsing_data_remover_unittest.cc b/net/reporting/reporting_browsing_data_remover_unittest.cc
index cd4a728..289d3e8 100644
--- a/net/reporting/reporting_browsing_data_remover_unittest.cc
+++ b/net/reporting/reporting_browsing_data_remover_unittest.cc
@@ -66,10 +66,10 @@
 
 TEST_F(ReportingBrowsingDataRemoverTest, RemoveNothing) {
   cache()->AddReport(kUrl1_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->AddReport(kUrl2_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin1_, kEndpoint_,
                      ReportingClient::Subdomains::EXCLUDE, kGroup_,
@@ -86,10 +86,10 @@
 
 TEST_F(ReportingBrowsingDataRemoverTest, RemoveAllReports) {
   cache()->AddReport(kUrl1_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->AddReport(kUrl2_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin1_, kEndpoint_,
                      ReportingClient::Subdomains::EXCLUDE, kGroup_,
@@ -106,10 +106,10 @@
 
 TEST_F(ReportingBrowsingDataRemoverTest, RemoveAllClients) {
   cache()->AddReport(kUrl1_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->AddReport(kUrl2_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin1_, kEndpoint_,
                      ReportingClient::Subdomains::EXCLUDE, kGroup_,
@@ -126,10 +126,10 @@
 
 TEST_F(ReportingBrowsingDataRemoverTest, RemoveAllReportsAndClients) {
   cache()->AddReport(kUrl1_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->AddReport(kUrl2_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin1_, kEndpoint_,
                      ReportingClient::Subdomains::EXCLUDE, kGroup_,
@@ -146,10 +146,10 @@
 
 TEST_F(ReportingBrowsingDataRemoverTest, RemoveSomeReports) {
   cache()->AddReport(kUrl1_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->AddReport(kUrl2_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin1_, kEndpoint_,
                      ReportingClient::Subdomains::EXCLUDE, kGroup_,
@@ -170,10 +170,10 @@
 
 TEST_F(ReportingBrowsingDataRemoverTest, RemoveSomeClients) {
   cache()->AddReport(kUrl1_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->AddReport(kUrl2_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin1_, kEndpoint_,
                      ReportingClient::Subdomains::EXCLUDE, kGroup_,
diff --git a/net/reporting/reporting_cache.cc b/net/reporting/reporting_cache.cc
index 87c270d6..4e0df56 100644
--- a/net/reporting/reporting_cache.cc
+++ b/net/reporting/reporting_cache.cc
@@ -71,7 +71,7 @@
                  std::unique_ptr<const base::Value> body,
                  base::TimeTicks queued,
                  int attempts) override {
-    auto report = base::MakeUnique<ReportingReport>(
+    auto report = std::make_unique<ReportingReport>(
         url, group, type, std::move(body), queued, attempts);
 
     auto inserted =
@@ -217,7 +217,7 @@
       RemoveClient(old_client);
     }
 
-    AddClient(base::MakeUnique<ReportingClient>(origin, endpoint, subdomains,
+    AddClient(std::make_unique<ReportingClient>(origin, endpoint, subdomains,
                                                 group, expires),
               last_used);
 
@@ -463,7 +463,7 @@
 // static
 std::unique_ptr<ReportingCache> ReportingCache::Create(
     ReportingContext* context) {
-  return base::MakeUnique<ReportingCacheImpl>(context);
+  return std::make_unique<ReportingCacheImpl>(context);
 }
 
 ReportingCache::~ReportingCache() {}
diff --git a/net/reporting/reporting_cache_unittest.cc b/net/reporting/reporting_cache_unittest.cc
index d1924ff..8b1e3fb 100644
--- a/net/reporting/reporting_cache_unittest.cc
+++ b/net/reporting/reporting_cache_unittest.cc
@@ -83,7 +83,7 @@
   EXPECT_TRUE(reports.empty());
 
   cache()->AddReport(kUrl1_, kGroup1_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(), kNow_, 0);
+                     std::make_unique<base::DictionaryValue>(), kNow_, 0);
   EXPECT_EQ(1, observer()->cache_update_count());
 
   cache()->GetReports(&reports);
@@ -117,9 +117,9 @@
 
 TEST_F(ReportingCacheTest, RemoveAllReports) {
   cache()->AddReport(kUrl1_, kGroup1_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(), kNow_, 0);
+                     std::make_unique<base::DictionaryValue>(), kNow_, 0);
   cache()->AddReport(kUrl1_, kGroup1_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(), kNow_, 0);
+                     std::make_unique<base::DictionaryValue>(), kNow_, 0);
   EXPECT_EQ(2, observer()->cache_update_count());
 
   std::vector<const ReportingReport*> reports;
@@ -135,7 +135,7 @@
 
 TEST_F(ReportingCacheTest, RemovePendingReports) {
   cache()->AddReport(kUrl1_, kGroup1_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(), kNow_, 0);
+                     std::make_unique<base::DictionaryValue>(), kNow_, 0);
   EXPECT_EQ(1, observer()->cache_update_count());
 
   std::vector<const ReportingReport*> reports;
@@ -166,7 +166,7 @@
 
 TEST_F(ReportingCacheTest, RemoveAllPendingReports) {
   cache()->AddReport(kUrl1_, kGroup1_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(), kNow_, 0);
+                     std::make_unique<base::DictionaryValue>(), kNow_, 0);
   EXPECT_EQ(1, observer()->cache_update_count());
 
   std::vector<const ReportingReport*> reports;
@@ -430,7 +430,7 @@
   // Enqueue the maximum number of reports, spaced apart in time.
   for (size_t i = 0; i < max_report_count; ++i) {
     cache()->AddReport(kUrl1_, kGroup1_, kType_,
-                       base::MakeUnique<base::DictionaryValue>(),
+                       std::make_unique<base::DictionaryValue>(),
                        tick_clock()->NowTicks(), 0);
     tick_clock()->Advance(base::TimeDelta::FromMinutes(1));
   }
@@ -438,7 +438,7 @@
 
   // Add one more report to force the cache to evict one.
   cache()->AddReport(kUrl1_, kGroup1_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(), kNow_, 0);
+                     std::make_unique<base::DictionaryValue>(), kNow_, 0);
 
   // Make sure the cache evicted a report to make room for the new one, and make
   // sure the report evicted was the earliest-queued one.
@@ -458,7 +458,7 @@
   // Enqueue the maximum number of reports, spaced apart in time.
   for (size_t i = 0; i < max_report_count; ++i) {
     cache()->AddReport(kUrl1_, kGroup1_, kType_,
-                       base::MakeUnique<base::DictionaryValue>(),
+                       std::make_unique<base::DictionaryValue>(),
                        tick_clock()->NowTicks(), 0);
     tick_clock()->Advance(base::TimeDelta::FromMinutes(1));
   }
@@ -472,7 +472,7 @@
   // Add one more report to force the cache to evict one. Since the cache has
   // only pending reports, it will be forced to evict the *new* report!
   cache()->AddReport(kUrl1_, kGroup1_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(), kNow_, 0);
+                     std::make_unique<base::DictionaryValue>(), kNow_, 0);
 
   // Make sure the cache evicted a report, and make sure the report evicted was
   // the new, non-pending one.
diff --git a/net/reporting/reporting_context.cc b/net/reporting/reporting_context.cc
index 5e3809a..0cfa173 100644
--- a/net/reporting/reporting_context.cc
+++ b/net/reporting/reporting_context.cc
@@ -37,8 +37,8 @@
   ReportingContextImpl(const ReportingPolicy& policy,
                        URLRequestContext* request_context)
       : ReportingContext(policy,
-                         base::MakeUnique<base::DefaultClock>(),
-                         base::MakeUnique<base::DefaultTickClock>(),
+                         std::make_unique<base::DefaultClock>(),
+                         std::make_unique<base::DefaultTickClock>(),
                          ReportingUploader::Create(request_context),
                          ReportingDelegate::Create(request_context)) {}
 };
@@ -49,7 +49,7 @@
 std::unique_ptr<ReportingContext> ReportingContext::Create(
     const ReportingPolicy& policy,
     URLRequestContext* request_context) {
-  return base::MakeUnique<ReportingContextImpl>(policy, request_context);
+  return std::make_unique<ReportingContextImpl>(policy, request_context);
 }
 
 ReportingContext::~ReportingContext() {}
diff --git a/net/reporting/reporting_delegate.cc b/net/reporting/reporting_delegate.cc
index 25dfdf14..d9284ed 100644
--- a/net/reporting/reporting_delegate.cc
+++ b/net/reporting/reporting_delegate.cc
@@ -56,7 +56,7 @@
 // static
 std::unique_ptr<ReportingDelegate> ReportingDelegate::Create(
     URLRequestContext* request_context) {
-  return base::MakeUnique<ReportingDelegateImpl>(request_context);
+  return std::make_unique<ReportingDelegateImpl>(request_context);
 }
 
 ReportingDelegate::~ReportingDelegate() {}
diff --git a/net/reporting/reporting_delivery_agent.cc b/net/reporting/reporting_delivery_agent.cc
index 08bc9fb..3319413d9 100644
--- a/net/reporting/reporting_delivery_agent.cc
+++ b/net/reporting/reporting_delivery_agent.cc
@@ -36,7 +36,7 @@
 
   for (const ReportingReport* report : reports) {
     std::unique_ptr<base::DictionaryValue> report_value =
-        base::MakeUnique<base::DictionaryValue>();
+        std::make_unique<base::DictionaryValue>();
 
     report_value->SetInteger("age", (now - report->queued).InMilliseconds());
     report_value->SetString("type", report->type);
@@ -55,7 +55,7 @@
  public:
   ReportingDeliveryAgentImpl(ReportingContext* context)
       : context_(context),
-        timer_(base::MakeUnique<base::OneShotTimer>()),
+        timer_(std::make_unique<base::OneShotTimer>()),
         weak_factory_(this) {
     context_->AddObserver(this);
   }
@@ -163,7 +163,7 @@
           endpoint, json,
           base::Bind(&ReportingDeliveryAgentImpl::OnUploadComplete,
                      weak_factory_.GetWeakPtr(),
-                     base::MakeUnique<Delivery>(endpoint, reports)));
+                     std::make_unique<Delivery>(endpoint, reports)));
     }
   }
 
@@ -217,7 +217,7 @@
 // static
 std::unique_ptr<ReportingDeliveryAgent> ReportingDeliveryAgent::Create(
     ReportingContext* context) {
-  return base::MakeUnique<ReportingDeliveryAgentImpl>(context);
+  return std::make_unique<ReportingDeliveryAgentImpl>(context);
 }
 
 ReportingDeliveryAgent::~ReportingDeliveryAgent() {}
diff --git a/net/reporting/reporting_delivery_agent_unittest.cc b/net/reporting/reporting_delivery_agent_unittest.cc
index f1a575a..d4deee7 100644
--- a/net/reporting/reporting_delivery_agent_unittest.cc
+++ b/net/reporting/reporting_delivery_agent_unittest.cc
@@ -98,7 +98,7 @@
   cache()->SetClient(kOrigin_, kEndpoint_, ReportingClient::Subdomains::EXCLUDE,
                      kGroup_, tomorrow());
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(delivery_timer()->IsRunning());
@@ -132,7 +132,7 @@
   ASSERT_TRUE(FindClientInCache(cache(), kDifferentOrigin, kEndpoint_));
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(delivery_timer()->IsRunning());
@@ -162,7 +162,7 @@
   cache()->SetClient(kOrigin_, kEndpoint_, ReportingClient::Subdomains::EXCLUDE,
                      kGroup_, tomorrow());
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(delivery_timer()->IsRunning());
@@ -205,10 +205,10 @@
                      ReportingClient::Subdomains::EXCLUDE, kGroup_, tomorrow());
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->AddReport(kDifferentUrl, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(delivery_timer()->IsRunning());
@@ -232,7 +232,7 @@
                      ReportingClient::Subdomains::EXCLUDE, kGroup_, tomorrow());
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(delivery_timer()->IsRunning());
@@ -240,7 +240,7 @@
   EXPECT_EQ(1u, pending_uploads().size());
 
   cache()->AddReport(kDifferentUrl, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(delivery_timer()->IsRunning());
@@ -270,7 +270,7 @@
                      ReportingClient::Subdomains::EXCLUDE, kGroup_, tomorrow());
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(delivery_timer()->IsRunning());
@@ -278,7 +278,7 @@
   EXPECT_EQ(1u, pending_uploads().size());
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(delivery_timer()->IsRunning());
@@ -309,10 +309,10 @@
                      tomorrow());
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->AddReport(kUrl_, kDifferentGroup, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(delivery_timer()->IsRunning());
diff --git a/net/reporting/reporting_endpoint_manager.cc b/net/reporting/reporting_endpoint_manager.cc
index cd54026..cb372cf 100644
--- a/net/reporting/reporting_endpoint_manager.cc
+++ b/net/reporting/reporting_endpoint_manager.cc
@@ -78,7 +78,7 @@
 
   void InformOfEndpointRequest(const GURL& endpoint, bool succeeded) override {
     if (!base::ContainsKey(endpoint_backoff_, endpoint)) {
-      endpoint_backoff_[endpoint] = base::MakeUnique<BackoffEntry>(
+      endpoint_backoff_[endpoint] = std::make_unique<BackoffEntry>(
           &policy().endpoint_backoff_policy, tick_clock());
     }
     endpoint_backoff_[endpoint]->InformOfRequest(succeeded);
@@ -107,7 +107,7 @@
 // static
 std::unique_ptr<ReportingEndpointManager> ReportingEndpointManager::Create(
     ReportingContext* context) {
-  return base::MakeUnique<ReportingEndpointManagerImpl>(context);
+  return std::make_unique<ReportingEndpointManagerImpl>(context);
 }
 
 ReportingEndpointManager::~ReportingEndpointManager() {}
diff --git a/net/reporting/reporting_garbage_collector.cc b/net/reporting/reporting_garbage_collector.cc
index 188cda1..b4e8b8a9 100644
--- a/net/reporting/reporting_garbage_collector.cc
+++ b/net/reporting/reporting_garbage_collector.cc
@@ -25,7 +25,7 @@
                                       public ReportingObserver {
  public:
   ReportingGarbageCollectorImpl(ReportingContext* context)
-      : context_(context), timer_(base::MakeUnique<base::OneShotTimer>()) {
+      : context_(context), timer_(std::make_unique<base::OneShotTimer>()) {
     context_->AddObserver(this);
   }
 
@@ -84,7 +84,7 @@
 // static
 std::unique_ptr<ReportingGarbageCollector> ReportingGarbageCollector::Create(
     ReportingContext* context) {
-  return base::MakeUnique<ReportingGarbageCollectorImpl>(context);
+  return std::make_unique<ReportingGarbageCollectorImpl>(context);
 }
 
 ReportingGarbageCollector::~ReportingGarbageCollector() {}
diff --git a/net/reporting/reporting_garbage_collector_unittest.cc b/net/reporting/reporting_garbage_collector_unittest.cc
index 19ed2b3..f4602495 100644
--- a/net/reporting/reporting_garbage_collector_unittest.cc
+++ b/net/reporting/reporting_garbage_collector_unittest.cc
@@ -42,7 +42,7 @@
   EXPECT_FALSE(garbage_collection_timer()->IsRunning());
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   EXPECT_TRUE(garbage_collection_timer()->IsRunning());
@@ -54,7 +54,7 @@
 
 TEST_F(ReportingGarbageCollectorTest, Report) {
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   garbage_collection_timer()->Fire();
 
@@ -63,7 +63,7 @@
 
 TEST_F(ReportingGarbageCollectorTest, ExpiredReport) {
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   tick_clock()->Advance(2 * policy().max_report_age);
   garbage_collection_timer()->Fire();
@@ -73,7 +73,7 @@
 
 TEST_F(ReportingGarbageCollectorTest, FailedReport) {
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
 
   std::vector<const ReportingReport*> reports;
diff --git a/net/reporting/reporting_network_change_observer.cc b/net/reporting/reporting_network_change_observer.cc
index 99bb5a6..2141efa 100644
--- a/net/reporting/reporting_network_change_observer.cc
+++ b/net/reporting/reporting_network_change_observer.cc
@@ -57,7 +57,7 @@
 // static
 std::unique_ptr<ReportingNetworkChangeObserver>
 ReportingNetworkChangeObserver::Create(ReportingContext* context) {
-  return base::MakeUnique<ReportingNetworkChangeObserverImpl>(context);
+  return std::make_unique<ReportingNetworkChangeObserverImpl>(context);
 }
 
 ReportingNetworkChangeObserver::~ReportingNetworkChangeObserver() {}
diff --git a/net/reporting/reporting_network_change_observer_unittest.cc b/net/reporting/reporting_network_change_observer_unittest.cc
index 919b390d..9968886 100644
--- a/net/reporting/reporting_network_change_observer_unittest.cc
+++ b/net/reporting/reporting_network_change_observer_unittest.cc
@@ -59,7 +59,7 @@
   UsePolicy(new_policy);
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin_, kEndpoint_, ReportingClient::Subdomains::EXCLUDE,
                      kGroup_,
@@ -80,7 +80,7 @@
   UsePolicy(new_policy);
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin_, kEndpoint_, ReportingClient::Subdomains::EXCLUDE,
                      kGroup_,
@@ -101,7 +101,7 @@
   UsePolicy(new_policy);
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin_, kEndpoint_, ReportingClient::Subdomains::EXCLUDE,
                      kGroup_,
@@ -122,7 +122,7 @@
   UsePolicy(new_policy);
 
   cache()->AddReport(kUrl_, kGroup_, kType_,
-                     base::MakeUnique<base::DictionaryValue>(),
+                     std::make_unique<base::DictionaryValue>(),
                      tick_clock()->NowTicks(), 0);
   cache()->SetClient(kOrigin_, kEndpoint_, ReportingClient::Subdomains::EXCLUDE,
                      kGroup_,
diff --git a/net/reporting/reporting_persister.cc b/net/reporting/reporting_persister.cc
index 92cdfbd..762165e 100644
--- a/net/reporting/reporting_persister.cc
+++ b/net/reporting/reporting_persister.cc
@@ -25,7 +25,7 @@
 namespace {
 
 std::unique_ptr<base::Value> SerializeOrigin(const url::Origin& origin) {
-  auto serialized = base::MakeUnique<base::DictionaryValue>();
+  auto serialized = std::make_unique<base::DictionaryValue>();
 
   serialized->SetString("scheme", origin.scheme());
   serialized->SetString("host", origin.host());
@@ -87,7 +87,7 @@
   }
 
   std::unique_ptr<base::Value> SerializeReport(const ReportingReport& report) {
-    auto serialized = base::MakeUnique<base::DictionaryValue>();
+    auto serialized = std::make_unique<base::DictionaryValue>();
 
     serialized->SetString("url", report.url.spec());
     serialized->SetString("group", report.group);
@@ -141,7 +141,7 @@
     std::vector<const ReportingReport*> reports;
     cache()->GetReports(&reports);
 
-    auto serialized = base::MakeUnique<base::ListValue>();
+    auto serialized = std::make_unique<base::ListValue>();
     for (const ReportingReport* report : reports)
       serialized->Append(SerializeReport(*report));
 
@@ -161,7 +161,7 @@
   }
 
   std::unique_ptr<base::Value> SerializeClient(const ReportingClient& client) {
-    auto serialized = base::MakeUnique<base::DictionaryValue>();
+    auto serialized = std::make_unique<base::DictionaryValue>();
 
     serialized->Set("origin", SerializeOrigin(client.origin));
     serialized->SetString("endpoint", client.endpoint.spec());
@@ -215,7 +215,7 @@
     std::vector<const ReportingClient*> clients;
     cache()->GetClients(&clients);
 
-    auto serialized = base::MakeUnique<base::ListValue>();
+    auto serialized = std::make_unique<base::ListValue>();
     for (const ReportingClient* client : clients)
       serialized->Append(SerializeClient(*client));
 
@@ -237,7 +237,7 @@
   static const int kSupportedVersion = 1;
 
   std::unique_ptr<base::Value> Serialize() {
-    auto serialized = base::MakeUnique<base::DictionaryValue>();
+    auto serialized = std::make_unique<base::DictionaryValue>();
 
     serialized->SetInteger("reporting_serialized_cache_version",
                            kSupportedVersion);
@@ -314,7 +314,7 @@
 // static
 std::unique_ptr<ReportingPersister> ReportingPersister::Create(
     ReportingContext* context) {
-  return base::MakeUnique<ReportingPersisterImpl>(context);
+  return std::make_unique<ReportingPersisterImpl>(context);
 }
 
 ReportingPersister::~ReportingPersister() {}
diff --git a/net/reporting/reporting_service.cc b/net/reporting/reporting_service.cc
index 8be14d66..12dc140 100644
--- a/net/reporting/reporting_service.cc
+++ b/net/reporting/reporting_service.cc
@@ -69,14 +69,14 @@
 std::unique_ptr<ReportingService> ReportingService::Create(
     const ReportingPolicy& policy,
     URLRequestContext* request_context) {
-  return base::MakeUnique<ReportingServiceImpl>(
+  return std::make_unique<ReportingServiceImpl>(
       ReportingContext::Create(policy, request_context));
 }
 
 // static
 std::unique_ptr<ReportingService> ReportingService::CreateForTesting(
     std::unique_ptr<ReportingContext> reporting_context) {
-  return base::MakeUnique<ReportingServiceImpl>(std::move(reporting_context));
+  return std::make_unique<ReportingServiceImpl>(std::move(reporting_context));
 }
 
 }  // namespace net
diff --git a/net/reporting/reporting_service_unittest.cc b/net/reporting/reporting_service_unittest.cc
index 064700e..e6a3328 100644
--- a/net/reporting/reporting_service_unittest.cc
+++ b/net/reporting/reporting_service_unittest.cc
@@ -44,7 +44,7 @@
 
 TEST_F(ReportingServiceTest, QueueReport) {
   service()->QueueReport(kUrl_, kGroup_, kType_,
-                         base::MakeUnique<base::DictionaryValue>());
+                         std::make_unique<base::DictionaryValue>());
 
   std::vector<const ReportingReport*> reports;
   context()->cache()->GetReports(&reports);
diff --git a/net/reporting/reporting_test_util.cc b/net/reporting/reporting_test_util.cc
index 0b8237fb..d5f0a8c 100644
--- a/net/reporting/reporting_test_util.cc
+++ b/net/reporting/reporting_test_util.cc
@@ -100,7 +100,7 @@
 void TestReportingUploader::StartUpload(const GURL& url,
                                         const std::string& json,
                                         const Callback& callback) {
-  pending_uploads_.push_back(base::MakeUnique<PendingUploadImpl>(
+  pending_uploads_.push_back(std::make_unique<PendingUploadImpl>(
       url, json, callback, base::Bind(&ErasePendingUpload, &pending_uploads_)));
 }
 
@@ -128,10 +128,10 @@
 
 TestReportingContext::TestReportingContext(const ReportingPolicy& policy)
     : ReportingContext(policy,
-                       base::MakeUnique<base::SimpleTestClock>(),
-                       base::MakeUnique<base::SimpleTestTickClock>(),
-                       base::MakeUnique<TestReportingUploader>(),
-                       base::MakeUnique<TestReportingDelegate>()),
+                       std::make_unique<base::SimpleTestClock>(),
+                       std::make_unique<base::SimpleTestTickClock>(),
+                       std::make_unique<TestReportingUploader>(),
+                       std::make_unique<TestReportingDelegate>()),
       delivery_timer_(new base::MockTimer(/* retain_user_task= */ false,
                                           /* is_repeating= */ false)),
       garbage_collection_timer_(
@@ -170,7 +170,7 @@
 void ReportingTestBase::CreateContext(const ReportingPolicy& policy,
                                       base::Time now,
                                       base::TimeTicks now_ticks) {
-  context_ = base::MakeUnique<TestReportingContext>(policy);
+  context_ = std::make_unique<TestReportingContext>(policy);
   clock()->SetNow(now);
   tick_clock()->SetNowTicks(now_ticks);
 }
diff --git a/net/reporting/reporting_uploader.cc b/net/reporting/reporting_uploader.cc
index 7ffe0ed..1ed285e 100644
--- a/net/reporting/reporting_uploader.cc
+++ b/net/reporting/reporting_uploader.cc
@@ -97,7 +97,7 @@
     // Have to grab the unique_ptr* first to ensure request.get() happens
     // before std::move(request).
     std::unique_ptr<Upload>* upload = &uploads_[request.get()];
-    *upload = base::MakeUnique<Upload>(std::move(request), callback);
+    *upload = std::make_unique<Upload>(std::move(request), callback);
   }
 
   // URLRequest::Delegate implementation:
@@ -170,7 +170,7 @@
 // static
 std::unique_ptr<ReportingUploader> ReportingUploader::Create(
     const URLRequestContext* context) {
-  return base::MakeUnique<ReportingUploaderImpl>(context);
+  return std::make_unique<ReportingUploaderImpl>(context);
 }
 
 }  // namespace net
diff --git a/net/reporting/reporting_uploader_unittest.cc b/net/reporting/reporting_uploader_unittest.cc
index dd04e49..a3a1526 100644
--- a/net/reporting/reporting_uploader_unittest.cc
+++ b/net/reporting/reporting_uploader_unittest.cc
@@ -48,7 +48,7 @@
 std::unique_ptr<test_server::HttpResponse> ReturnResponse(
     HttpStatusCode code,
     const test_server::HttpRequest& request) {
-  auto response = base::MakeUnique<test_server::BasicHttpResponse>();
+  auto response = std::make_unique<test_server::BasicHttpResponse>();
   response->set_code(code);
   response->set_content("");
   response->set_content_type("text/plain");
@@ -57,7 +57,7 @@
 
 std::unique_ptr<test_server::HttpResponse> ReturnInvalidResponse(
     const test_server::HttpRequest& request) {
-  return base::MakeUnique<test_server::RawHttpResponse>(
+  return std::make_unique<test_server::RawHttpResponse>(
       "", "Not a valid HTTP response.");
 }
 
@@ -178,7 +178,7 @@
   if (request.relative_url != "/")
     return std::unique_ptr<test_server::HttpResponse>();
 
-  auto response = base::MakeUnique<test_server::BasicHttpResponse>();
+  auto response = std::make_unique<test_server::BasicHttpResponse>();
   response->set_code(HTTP_FOUND);
   response->AddCustomHeader("Location", location);
   response->set_content(
@@ -256,7 +256,7 @@
 
 std::unique_ptr<test_server::HttpResponse> SendCookie(
     const test_server::HttpRequest& request) {
-  auto response = base::MakeUnique<test_server::BasicHttpResponse>();
+  auto response = std::make_unique<test_server::BasicHttpResponse>();
   response->set_code(HTTP_OK);
   response->AddCustomHeader("Set-Cookie", "foo=bar");
   response->set_content("");
@@ -287,7 +287,7 @@
     int* request_count_out,
     const test_server::HttpRequest& request) {
   ++*request_count_out;
-  auto response = base::MakeUnique<test_server::BasicHttpResponse>();
+  auto response = std::make_unique<test_server::BasicHttpResponse>();
   response->set_code(HTTP_OK);
   response->AddCustomHeader("Cache-Control", "max-age=86400");
   response->set_content("");
diff --git a/net/sdch/sdch_owner.cc b/net/sdch/sdch_owner.cc
index bd33662d..55cc92f 100644
--- a/net/sdch/sdch_owner.cc
+++ b/net/sdch/sdch_owner.cc
@@ -125,7 +125,7 @@
 void InitializePrefStore(SdchOwner::PrefStorage* store) {
   std::unique_ptr<base::DictionaryValue> empty_store(new base::DictionaryValue);
   empty_store->SetInteger(kVersionKey, kVersion);
-  empty_store->Set(kDictionariesKey, base::MakeUnique<base::DictionaryValue>());
+  empty_store->Set(kDictionariesKey, std::make_unique<base::DictionaryValue>());
   store->SetValue(std::move(empty_store));
 }
 
diff --git a/net/server/http_server.cc b/net/server/http_server.cc
index 77c2c0d..d1353d58f 100644
--- a/net/server/http_server.cc
+++ b/net/server/http_server.cc
@@ -160,7 +160,7 @@
   }
 
   std::unique_ptr<HttpConnection> connection_ptr =
-      base::MakeUnique<HttpConnection>(++last_id_, std::move(accepted_socket_));
+      std::make_unique<HttpConnection>(++last_id_, std::move(accepted_socket_));
   HttpConnection* connection = connection_ptr.get();
   id_to_connection_[connection->id()] = std::move(connection_ptr);
   delegate_->OnConnect(connection->id());
@@ -245,7 +245,7 @@
     connection->socket()->GetPeerAddress(&request.peer);
 
     if (request.HasHeaderValue("connection", "upgrade")) {
-      connection->SetWebSocket(base::MakeUnique<WebSocket>(this, connection));
+      connection->SetWebSocket(std::make_unique<WebSocket>(this, connection));
       read_buf->DidConsume(pos);
       delegate_->OnWebSocketRequest(connection->id(), request);
       if (HasClosedConnection(connection))
diff --git a/net/server/http_server_fuzzer.cc b/net/server/http_server_fuzzer.cc
index 55cdaf8..f722d24 100644
--- a/net/server/http_server_fuzzer.cc
+++ b/net/server/http_server_fuzzer.cc
@@ -96,7 +96,7 @@
   base::FuzzedDataProvider data_provider(data, size);
 
   std::unique_ptr<net::ServerSocket> server_socket(
-      base::MakeUnique<net::FuzzedServerSocket>(&data_provider, &test_net_log));
+      std::make_unique<net::FuzzedServerSocket>(&data_provider, &test_net_log));
   CHECK_EQ(net::OK,
            server_socket->ListenWithAddressAndPort("127.0.0.1", 80, 5));
 
diff --git a/net/server/web_socket_encoder.cc b/net/server/web_socket_encoder.cc
index 114eb36..2b30548e 100644
--- a/net/server/web_socket_encoder.cc
+++ b/net/server/web_socket_encoder.cc
@@ -218,9 +218,9 @@
     }
     DCHECK(response.IsValidAsResponse());
     DCHECK(offer.IsCompatibleWith(response));
-    auto deflater = base::MakeUnique<WebSocketDeflater>(
+    auto deflater = std::make_unique<WebSocketDeflater>(
         response.server_context_take_over_mode());
-    auto inflater = base::MakeUnique<WebSocketInflater>(kInflaterChunkSize,
+    auto inflater = std::make_unique<WebSocketInflater>(kInflaterChunkSize,
                                                         kInflaterChunkSize);
     if (!deflater->Initialize(response.PermissiveServerMaxWindowBits()) ||
         !inflater->Initialize(response.PermissiveClientMaxWindowBits())) {
@@ -264,9 +264,9 @@
     return base::WrapUnique(new WebSocketEncoder(FOR_CLIENT, nullptr, nullptr));
   }
 
-  auto deflater = base::MakeUnique<WebSocketDeflater>(
+  auto deflater = std::make_unique<WebSocketDeflater>(
       params.client_context_take_over_mode());
-  auto inflater = base::MakeUnique<WebSocketInflater>(kInflaterChunkSize,
+  auto inflater = std::make_unique<WebSocketInflater>(kInflaterChunkSize,
                                                       kInflaterChunkSize);
   if (!deflater->Initialize(params.PermissiveClientMaxWindowBits()) ||
       !inflater->Initialize(params.PermissiveServerMaxWindowBits())) {
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index 591680c..6b2986b 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -693,7 +693,7 @@
 std::unique_ptr<base::DictionaryValue>
 ClientSocketPoolBaseHelper::GetInfoAsValue(const std::string& name,
                                            const std::string& type) const {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("name", name);
   dict->SetString("type", type);
   dict->SetInteger("handed_out_socket_count", handed_out_socket_count_);
@@ -706,11 +706,11 @@
   if (group_map_.empty())
     return dict;
 
-  auto all_groups_dict = base::MakeUnique<base::DictionaryValue>();
+  auto all_groups_dict = std::make_unique<base::DictionaryValue>();
   for (GroupMap::const_iterator it = group_map_.begin();
        it != group_map_.end(); it++) {
     const Group* group = it->second;
-    auto group_dict = base::MakeUnique<base::DictionaryValue>();
+    auto group_dict = std::make_unique<base::DictionaryValue>();
 
     group_dict->SetInteger("pending_request_count",
                            group->pending_request_count());
@@ -722,7 +722,7 @@
 
     group_dict->SetInteger("active_socket_count", group->active_socket_count());
 
-    auto idle_socket_list = base::MakeUnique<base::ListValue>();
+    auto idle_socket_list = std::make_unique<base::ListValue>();
     std::list<IdleSocket>::const_iterator idle_socket;
     for (idle_socket = group->idle_sockets().begin();
          idle_socket != group->idle_sockets().end();
@@ -732,7 +732,7 @@
     }
     group_dict->Set("idle_sockets", std::move(idle_socket_list));
 
-    auto connect_jobs_list = base::MakeUnique<base::ListValue>();
+    auto connect_jobs_list = std::make_unique<base::ListValue>();
     for (auto job = group->jobs().begin(); job != group->jobs().end(); job++) {
       int source_id = (*job)->net_log().source().id;
       connect_jobs_list->AppendInteger(source_id);
diff --git a/net/socket/client_socket_pool_manager_impl.cc b/net/socket/client_socket_pool_manager_impl.cc
index b9920a1..d5bbc50 100644
--- a/net/socket/client_socket_pool_manager_impl.cc
+++ b/net/socket/client_socket_pool_manager_impl.cc
@@ -230,7 +230,7 @@
   std::pair<TransportSocketPoolMap::iterator, bool> tcp_ret =
       transport_socket_pools_for_socks_proxies_.insert(std::make_pair(
           socks_proxy,
-          base::MakeUnique<TransportClientSocketPool>(
+          std::make_unique<TransportClientSocketPool>(
               sockets_per_proxy_server, sockets_per_group, host_resolver_,
               socket_factory_, nullptr, net_log_)));
   DCHECK(tcp_ret.second);
@@ -238,7 +238,7 @@
   std::pair<SOCKSSocketPoolMap::iterator, bool> ret =
       socks_socket_pools_.insert(std::make_pair(
           socks_proxy,
-          base::MakeUnique<SOCKSClientSocketPool>(
+          std::make_unique<SOCKSClientSocketPool>(
               sockets_per_proxy_server, sockets_per_group, host_resolver_,
               tcp_ret.first->second.get(), nullptr, net_log_)));
 
@@ -272,7 +272,7 @@
   std::pair<TransportSocketPoolMap::iterator, bool> tcp_http_ret =
       transport_socket_pools_for_http_proxies_.insert(std::make_pair(
           http_proxy,
-          base::MakeUnique<TransportClientSocketPool>(
+          std::make_unique<TransportClientSocketPool>(
               sockets_per_proxy_server, sockets_per_group, host_resolver_,
               socket_factory_, socket_performance_watcher_factory_, net_log_)));
   DCHECK(tcp_http_ret.second);
@@ -280,7 +280,7 @@
   std::pair<TransportSocketPoolMap::iterator, bool> tcp_https_ret =
       transport_socket_pools_for_https_proxies_.insert(std::make_pair(
           http_proxy,
-          base::MakeUnique<TransportClientSocketPool>(
+          std::make_unique<TransportClientSocketPool>(
               sockets_per_proxy_server, sockets_per_group, host_resolver_,
               socket_factory_, socket_performance_watcher_factory_, net_log_)));
   DCHECK(tcp_https_ret.second);
@@ -288,7 +288,7 @@
   std::pair<SSLSocketPoolMap::iterator, bool> ssl_https_ret =
       ssl_socket_pools_for_https_proxies_.insert(std::make_pair(
           http_proxy,
-          base::MakeUnique<SSLClientSocketPool>(
+          std::make_unique<SSLClientSocketPool>(
               sockets_per_proxy_server, sockets_per_group, cert_verifier_,
               channel_id_service_, transport_security_state_,
               cert_transparency_verifier_, ct_policy_enforcer_,
@@ -300,7 +300,7 @@
 
   std::pair<HTTPProxySocketPoolMap::iterator, bool> ret =
       http_proxy_socket_pools_.insert(std::make_pair(
-          http_proxy, base::MakeUnique<HttpProxyClientSocketPool>(
+          http_proxy, std::make_unique<HttpProxyClientSocketPool>(
                           sockets_per_proxy_server, sockets_per_group,
                           tcp_http_ret.first->second.get(),
                           ssl_https_ret.first->second.get(),
@@ -323,7 +323,7 @@
   std::pair<SSLSocketPoolMap::iterator, bool> ret =
       ssl_socket_pools_for_proxies_.insert(std::make_pair(
           proxy_server,
-          base::MakeUnique<SSLClientSocketPool>(
+          std::make_unique<SSLClientSocketPool>(
               sockets_per_proxy_server, sockets_per_group, cert_verifier_,
               channel_id_service_, transport_security_state_,
               cert_transparency_verifier_, ct_policy_enforcer_,
diff --git a/net/socket/fuzzed_server_socket.cc b/net/socket/fuzzed_server_socket.cc
index 6f3c08e..6ec0169f 100644
--- a/net/socket/fuzzed_server_socket.cc
+++ b/net/socket/fuzzed_server_socket.cc
@@ -49,7 +49,7 @@
 void FuzzedServerSocket::DispatchAccept(std::unique_ptr<StreamSocket>* socket,
                                         const CompletionCallback& callback) {
   std::unique_ptr<FuzzedSocket> connected_socket(
-      base::MakeUnique<FuzzedSocket>(data_provider_, net_log_));
+      std::make_unique<FuzzedSocket>(data_provider_, net_log_));
   // The Connect call should always succeed synchronously, without using the
   // callback, since connected_socket->set_fuzz_connect_result(true) has not
   // been called.
diff --git a/net/socket/fuzzed_socket_factory.cc b/net/socket/fuzzed_socket_factory.cc
index 38df1be..c096af6c 100644
--- a/net/socket/fuzzed_socket_factory.cc
+++ b/net/socket/fuzzed_socket_factory.cc
@@ -139,7 +139,7 @@
     const RandIntCallback& rand_int_cb,
     NetLog* net_log,
     const NetLogSource& source) {
-  return base::MakeUnique<FuzzedDatagramClientSocket>(data_provider_);
+  return std::make_unique<FuzzedDatagramClientSocket>(data_provider_);
 }
 
 std::unique_ptr<StreamSocket> FuzzedSocketFactory::CreateTransportClientSocket(
@@ -160,7 +160,7 @@
     const HostPortPair& host_and_port,
     const SSLConfig& ssl_config,
     const SSLClientSocketContext& context) {
-  return base::MakeUnique<FailingSSLClientSocket>();
+  return std::make_unique<FailingSSLClientSocket>();
 }
 
 void FuzzedSocketFactory::ClearSSLSessionCache() {}
diff --git a/net/socket/socket_bio_adapter_unittest.cc b/net/socket/socket_bio_adapter_unittest.cc
index 8bd65496..bedf28da6 100644
--- a/net/socket/socket_bio_adapter_unittest.cc
+++ b/net/socket/socket_bio_adapter_unittest.cc
@@ -177,7 +177,7 @@
   SequencedSocketData data(reads, arraysize(reads), nullptr, 0);
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 100, 100, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 100, 100, this);
   BIO* bio = adapter->bio();
   EXPECT_FALSE(adapter->HasPendingReadData());
 
@@ -218,7 +218,7 @@
   SequencedSocketData data(reads, arraysize(reads), nullptr, 0);
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 100, 100, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 100, 100, this);
   BIO* bio = adapter->bio();
   EXPECT_FALSE(adapter->HasPendingReadData());
 
@@ -281,7 +281,7 @@
   SequencedSocketData data(reads, arraysize(reads), nullptr, 0);
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 100, 100, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 100, 100, this);
 
   ExpectReadError(adapter->bio(), ERR_CONNECTION_CLOSED, tracer);
 }
@@ -297,7 +297,7 @@
   SequencedSocketData data(reads, arraysize(reads), nullptr, 0);
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 100, 100, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 100, 100, this);
 
   char buf;
   ExpectBlockingRead(adapter->bio(), &buf, 1);
@@ -320,7 +320,7 @@
   SequencedSocketData data(nullptr, 0, writes, arraysize(writes));
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 10, 10, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 10, 10, this);
   BIO* bio = adapter->bio();
 
   // Test data entering and leaving the buffer synchronously. The second write
@@ -365,7 +365,7 @@
   SequencedSocketData data(nullptr, 0, writes, arraysize(writes));
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 10, 10, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 10, 10, this);
   BIO* bio = adapter->bio();
 
   // Data which fits in the buffer is returned synchronously, even if not
@@ -480,7 +480,7 @@
   SequencedSocketData data(nullptr, 0, writes, arraysize(writes));
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 100, 100, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 100, 100, this);
   BIO* bio = adapter->bio();
 
   // The write fails, but there is a write buffer, so errors are delayed.
@@ -507,7 +507,7 @@
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 100, 100, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 100, 100, this);
   BIO* bio = adapter->bio();
 
   // Attempt to read from the transport. It will block indefinitely.
@@ -540,7 +540,7 @@
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 100, 100, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 100, 100, this);
   BIO* bio = adapter->bio();
 
   // Attempt to read from the transport. It will block indefinitely.
@@ -575,7 +575,7 @@
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 5, 5, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 5, 5, this);
   BIO* bio = adapter->bio();
 
   // Attempt to read from the transport. It will block indefinitely.
@@ -610,7 +610,7 @@
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 5, 5, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 5, 5, this);
   BIO* bio = adapter->bio();
 
   // Arrange for OnReadReady and OnWriteReady to both be signaled due to write
@@ -635,7 +635,7 @@
   SequencedSocketData data(nullptr, 0, nullptr, 0);
   std::unique_ptr<StreamSocket> socket = MakeTestSocket(&data);
   std::unique_ptr<SocketBIOAdapter> adapter =
-      base::MakeUnique<SocketBIOAdapter>(socket.get(), 100, 100, this);
+      std::make_unique<SocketBIOAdapter>(socket.get(), 100, 100, this);
 
   // Retain an additional reference to the BIO.
   bssl::UniquePtr<BIO> bio(adapter->bio());
diff --git a/net/socket/ssl_client_socket_pool.cc b/net/socket/ssl_client_socket_pool.cc
index 3fabcf8f..f7c6f5b1 100644
--- a/net/socket/ssl_client_socket_pool.cc
+++ b/net/socket/ssl_client_socket_pool.cc
@@ -726,7 +726,7 @@
     bool include_nested_pools) const {
   std::unique_ptr<base::DictionaryValue> dict(base_.GetInfoAsValue(name, type));
   if (include_nested_pools) {
-    auto list = base::MakeUnique<base::ListValue>();
+    auto list = std::make_unique<base::ListValue>();
     if (transport_pool_) {
       list->Append(transport_pool_->GetInfoAsValue("transport_socket_pool",
                                                    "transport_socket_pool",
diff --git a/net/spdy/chromium/bidirectional_stream_spdy_impl_unittest.cc b/net/spdy/chromium/bidirectional_stream_spdy_impl_unittest.cc
index 18af57d..9db6bb3 100644
--- a/net/spdy/chromium/bidirectional_stream_spdy_impl_unittest.cc
+++ b/net/spdy/chromium/bidirectional_stream_spdy_impl_unittest.cc
@@ -68,7 +68,7 @@
   TestDelegateBase(base::WeakPtr<SpdySession> session,
                    IOBuffer* read_buf,
                    int read_buf_len)
-      : stream_(base::MakeUnique<BidirectionalStreamSpdyImpl>(session,
+      : stream_(std::make_unique<BidirectionalStreamSpdyImpl>(session,
                                                               NetLogSource())),
         read_buf_(read_buf),
         read_buf_len_(read_buf_len),
@@ -134,7 +134,7 @@
              const NetLogWithSource& net_log) {
     stream_->Start(request, net_log,
                    /*send_request_headers_automatically=*/false, this,
-                   base::MakeUnique<base::Timer>(false, false));
+                   std::make_unique<base::Timer>(false, false));
     not_expect_callback_ = false;
   }
 
@@ -153,7 +153,7 @@
   // Sets whether the delegate should wait until the completion of the stream.
   void SetRunUntilCompletion(bool run_until_completion) {
     run_until_completion_ = run_until_completion;
-    loop_ = base::MakeUnique<base::RunLoop>();
+    loop_ = std::make_unique<base::RunLoop>();
   }
 
   // Wait until the stream reaches completion.
@@ -257,7 +257,7 @@
                    size_t writes_count) {
     ASSERT_TRUE(ssl_data_.cert.get());
     session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl_data_);
-    sequenced_data_ = base::MakeUnique<SequencedSocketData>(
+    sequenced_data_ = std::make_unique<SequencedSocketData>(
         reads, reads_count, writes, writes_count);
     session_deps_.socket_factory->AddSocketDataProvider(sequenced_data_.get());
     session_deps_.net_log = net_log_.bound().net_log();
@@ -304,7 +304,7 @@
                                        base::SizeTToString(kBodyDataSize));
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  auto delegate = base::MakeUnique<TestDelegateBase>(
+  auto delegate = std::make_unique<TestDelegateBase>(
       session_, read_buffer.get(), kReadBufferSize);
   delegate->SetRunUntilCompletion(true);
   delegate->Start(&request_info, net_log_.bound());
@@ -357,9 +357,9 @@
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
   scoped_refptr<IOBuffer> read_buffer2(new IOBuffer(kReadBufferSize));
-  auto delegate = base::MakeUnique<TestDelegateBase>(
+  auto delegate = std::make_unique<TestDelegateBase>(
       session_, read_buffer.get(), kReadBufferSize);
-  auto delegate2 = base::MakeUnique<TestDelegateBase>(
+  auto delegate2 = std::make_unique<TestDelegateBase>(
       session_, read_buffer2.get(), kReadBufferSize);
   delegate->SetRunUntilCompletion(true);
   delegate2->SetRunUntilCompletion(true);
@@ -404,7 +404,7 @@
                                        base::SizeTToString(kBodyDataSize * 3));
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  auto delegate = base::MakeUnique<TestDelegateBase>(
+  auto delegate = std::make_unique<TestDelegateBase>(
       session_, read_buffer.get(), kReadBufferSize);
   delegate->SetRunUntilCompletion(true);
   delegate->Start(&request_info, net_log_.bound());
@@ -456,7 +456,7 @@
                                        base::SizeTToString(kBodyDataSize * 3));
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
-  auto delegate = base::MakeUnique<TestDelegateBase>(
+  auto delegate = std::make_unique<TestDelegateBase>(
       session_, read_buffer.get(), kReadBufferSize);
   delegate->SetRunUntilCompletion(true);
   delegate->Start(&request_info, net_log_.bound());
diff --git a/net/spdy/chromium/buffered_spdy_framer.cc b/net/spdy/chromium/buffered_spdy_framer.cc
index ecd5fab..52cea7c 100644
--- a/net/spdy/chromium/buffered_spdy_framer.cc
+++ b/net/spdy/chromium/buffered_spdy_framer.cc
@@ -62,7 +62,7 @@
                                    bool end) {
   frames_received_++;
   DCHECK(!control_frame_fields_.get());
-  control_frame_fields_ = base::MakeUnique<ControlFrameFields>();
+  control_frame_fields_ = std::make_unique<ControlFrameFields>();
   control_frame_fields_->type = SpdyFrameType::HEADERS;
   control_frame_fields_->stream_id = stream_id;
   control_frame_fields_->has_priority = has_priority;
@@ -100,7 +100,7 @@
 SpdyHeadersHandlerInterface* BufferedSpdyFramer::OnHeaderFrameStart(
     SpdyStreamId stream_id) {
   coalescer_ =
-      base::MakeUnique<HeaderCoalescer>(max_header_list_size_, net_log_);
+      std::make_unique<HeaderCoalescer>(max_header_list_size_, net_log_);
   return coalescer_.get();
 }
 
@@ -161,7 +161,7 @@
 void BufferedSpdyFramer::OnGoAway(SpdyStreamId last_accepted_stream_id,
                                   SpdyErrorCode error_code) {
   DCHECK(!goaway_fields_);
-  goaway_fields_ = base::MakeUnique<GoAwayFields>();
+  goaway_fields_ = std::make_unique<GoAwayFields>();
   goaway_fields_->last_accepted_stream_id = last_accepted_stream_id;
   goaway_fields_->error_code = error_code;
 }
@@ -192,7 +192,7 @@
                                        bool end) {
   frames_received_++;
   DCHECK(!control_frame_fields_.get());
-  control_frame_fields_ = base::MakeUnique<ControlFrameFields>();
+  control_frame_fields_ = std::make_unique<ControlFrameFields>();
   control_frame_fields_->type = SpdyFrameType::PUSH_PROMISE;
   control_frame_fields_->stream_id = stream_id;
   control_frame_fields_->promised_stream_id = promised_stream_id;
@@ -250,7 +250,7 @@
     SpdyStreamId stream_id,
     SpdyErrorCode error_code) const {
   SpdyRstStreamIR rst_ir(stream_id, error_code);
-  return base::MakeUnique<SpdySerializedFrame>(
+  return std::make_unique<SpdySerializedFrame>(
       spdy_framer_.SerializeRstStream(rst_ir));
 }
 
@@ -263,7 +263,7 @@
        ++it) {
     settings_ir.AddSetting(it->first, it->second);
   }
-  return base::MakeUnique<SpdySerializedFrame>(
+  return std::make_unique<SpdySerializedFrame>(
       spdy_framer_.SerializeSettings(settings_ir));
 }
 
@@ -273,7 +273,7 @@
     bool is_ack) const {
   SpdyPingIR ping_ir(unique_id);
   ping_ir.set_is_ack(is_ack);
-  return base::MakeUnique<SpdySerializedFrame>(
+  return std::make_unique<SpdySerializedFrame>(
       spdy_framer_.SerializePing(ping_ir));
 }
 
@@ -283,7 +283,7 @@
     SpdyStreamId stream_id,
     uint32_t delta_window_size) const {
   SpdyWindowUpdateIR update_ir(stream_id, delta_window_size);
-  return base::MakeUnique<SpdySerializedFrame>(
+  return std::make_unique<SpdySerializedFrame>(
       spdy_framer_.SerializeWindowUpdate(update_ir));
 }
 
@@ -295,7 +295,7 @@
     SpdyDataFlags flags) {
   SpdyDataIR data_ir(stream_id, SpdyStringPiece(data, len));
   data_ir.set_fin((flags & DATA_FLAG_FIN) != 0);
-  return base::MakeUnique<SpdySerializedFrame>(
+  return std::make_unique<SpdySerializedFrame>(
       spdy_framer_.SerializeData(data_ir));
 }
 
@@ -307,7 +307,7 @@
     int weight,
     bool exclusive) const {
   SpdyPriorityIR priority_ir(stream_id, dependency_id, weight, exclusive);
-  return base::MakeUnique<SpdySerializedFrame>(
+  return std::make_unique<SpdySerializedFrame>(
       spdy_framer_.SerializePriority(priority_ir));
 }
 
diff --git a/net/spdy/chromium/header_coalescer.cc b/net/spdy/chromium/header_coalescer.cc
index eb0d3dc..fc4a45d8 100644
--- a/net/spdy/chromium/header_coalescer.cc
+++ b/net/spdy/chromium/header_coalescer.cc
@@ -22,7 +22,7 @@
     SpdyStringPiece header_value,
     SpdyStringPiece error_message,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("header_name", EscapeExternalHandlerValue(header_name));
   dict->SetString(
       "header_value",
diff --git a/net/spdy/chromium/spdy_buffer.cc b/net/spdy/chromium/spdy_buffer.cc
index fbb14bb..2d488f7 100644
--- a/net/spdy/chromium/spdy_buffer.cc
+++ b/net/spdy/chromium/spdy_buffer.cc
@@ -30,9 +30,9 @@
   CHECK_GT(size, 0u);
   CHECK_LE(size, kMaxSpdyFrameSize);
 
-  auto frame_data = base::MakeUnique<char[]>(size);
+  auto frame_data = std::make_unique<char[]>(size);
   std::memcpy(frame_data.get(), data, size);
-  return base::MakeUnique<SpdySerializedFrame>(frame_data.release(), size,
+  return std::make_unique<SpdySerializedFrame>(frame_data.release(), size,
                                                true /* owns_buffer */);
 }
 
diff --git a/net/spdy/chromium/spdy_buffer_unittest.cc b/net/spdy/chromium/spdy_buffer_unittest.cc
index d5cb5b8..c714ad2 100644
--- a/net/spdy/chromium/spdy_buffer_unittest.cc
+++ b/net/spdy/chromium/spdy_buffer_unittest.cc
@@ -34,7 +34,7 @@
 // Construct a SpdyBuffer from a SpdySerializedFrame and make sure its data
 // points to the frame's underlying data.
 TEST_F(SpdyBufferTest, FrameConstructor) {
-  SpdyBuffer buffer(base::MakeUnique<SpdySerializedFrame>(
+  SpdyBuffer buffer(std::make_unique<SpdySerializedFrame>(
       const_cast<char*>(kData), kDataSize, false /* owns_buffer */));
 
   EXPECT_EQ(kData, buffer.GetRemainingData());
@@ -121,7 +121,7 @@
 // Make sure the IOBuffer returned by GetIOBufferForRemainingData()
 // outlives the buffer itself.
 TEST_F(SpdyBufferTest, IOBufferForRemainingDataOutlivesBuffer) {
-  auto buffer = base::MakeUnique<SpdyBuffer>(kData, kDataSize);
+  auto buffer = std::make_unique<SpdyBuffer>(kData, kDataSize);
   scoped_refptr<IOBuffer> io_buffer = buffer->GetIOBufferForRemainingData();
   buffer.reset();
 
diff --git a/net/spdy/chromium/spdy_http_stream.cc b/net/spdy/chromium/spdy_http_stream.cc
index 2eb9cb64..04340710 100644
--- a/net/spdy/chromium/spdy_http_stream.cc
+++ b/net/spdy/chromium/spdy_http_stream.cc
@@ -37,7 +37,7 @@
                                bool direct,
                                NetLogSource source_dependency)
     : MultiplexedHttpStream(
-          base::MakeUnique<MultiplexedSessionHandle>(spdy_session)),
+          std::make_unique<MultiplexedSessionHandle>(spdy_session)),
       spdy_session_(spdy_session),
       is_reused_(spdy_session_->IsReused()),
       source_dependency_(source_dependency),
@@ -316,7 +316,7 @@
 
   if (!response_info_) {
     DCHECK_EQ(stream_->type(), SPDY_PUSH_STREAM);
-    push_response_info_ = base::MakeUnique<HttpResponseInfo>();
+    push_response_info_ = std::make_unique<HttpResponseInfo>();
     response_info_ = push_response_info_.get();
   }
 
diff --git a/net/spdy/chromium/spdy_http_stream_unittest.cc b/net/spdy/chromium/spdy_http_stream_unittest.cc
index d715f51..720bcf5 100644
--- a/net/spdy/chromium/spdy_http_stream_unittest.cc
+++ b/net/spdy/chromium/spdy_http_stream_unittest.cc
@@ -146,7 +146,7 @@
                    size_t reads_count,
                    MockWrite* writes,
                    size_t writes_count) {
-    sequenced_data_ = base::MakeUnique<SequencedSocketData>(
+    sequenced_data_ = std::make_unique<SequencedSocketData>(
         reads, reads_count, writes, writes_count);
     session_deps_.socket_factory->AddSocketDataProvider(sequenced_data_.get());
 
@@ -198,7 +198,7 @@
   HttpRequestHeaders headers;
   NetLogWithSource net_log;
   auto http_stream =
-      base::MakeUnique<SpdyHttpStream>(session_, true, net_log.source());
+      std::make_unique<SpdyHttpStream>(session_, true, net_log.source());
   // Make sure getting load timing information the stream early does not crash.
   LoadTimingInfo load_timing_info;
   EXPECT_FALSE(http_stream->GetLoadTimingInfo(&load_timing_info));
@@ -261,7 +261,7 @@
   HttpRequestHeaders headers1;
   NetLogWithSource net_log;
   auto http_stream1 =
-      base::MakeUnique<SpdyHttpStream>(session_, true, net_log.source());
+      std::make_unique<SpdyHttpStream>(session_, true, net_log.source());
 
   HttpRequestInfo request2;
   request2.method = "GET";
@@ -270,7 +270,7 @@
   HttpResponseInfo response2;
   HttpRequestHeaders headers2;
   auto http_stream2 =
-      base::MakeUnique<SpdyHttpStream>(session_, true, net_log.source());
+      std::make_unique<SpdyHttpStream>(session_, true, net_log.source());
 
   // First write.
   ASSERT_THAT(http_stream1->InitializeStream(&request1, DEFAULT_PRIORITY,
@@ -545,7 +545,7 @@
 
   NetLogWithSource net_log;
   auto http_stream =
-      base::MakeUnique<SpdyHttpStream>(session_, true, net_log.source());
+      std::make_unique<SpdyHttpStream>(session_, true, net_log.source());
   ASSERT_THAT(http_stream->InitializeStream(&request, DEFAULT_PRIORITY, net_log,
                                             CompletionCallback()),
               IsOk());
@@ -640,7 +640,7 @@
 
   NetLogWithSource net_log;
   auto http_stream =
-      base::MakeUnique<SpdyHttpStream>(session_, true, net_log.source());
+      std::make_unique<SpdyHttpStream>(session_, true, net_log.source());
   ASSERT_THAT(http_stream->InitializeStream(&request, DEFAULT_PRIORITY, net_log,
                                             CompletionCallback()),
               IsOk());
@@ -724,7 +724,7 @@
 
   NetLogWithSource net_log;
   auto http_stream =
-      base::MakeUnique<SpdyHttpStream>(session_, true, net_log.source());
+      std::make_unique<SpdyHttpStream>(session_, true, net_log.source());
   ASSERT_THAT(http_stream->InitializeStream(&request, DEFAULT_PRIORITY, net_log,
                                             CompletionCallback()),
               IsOk());
@@ -784,7 +784,7 @@
   HttpRequestHeaders headers;
   NetLogWithSource net_log;
   auto http_stream =
-      base::MakeUnique<SpdyHttpStream>(session_, true, net_log.source());
+      std::make_unique<SpdyHttpStream>(session_, true, net_log.source());
   ASSERT_THAT(http_stream->InitializeStream(&request, DEFAULT_PRIORITY, net_log,
                                             CompletionCallback()),
               IsOk());
@@ -837,7 +837,7 @@
 
   NetLogWithSource net_log;
   auto http_stream =
-      base::MakeUnique<SpdyHttpStream>(session_, true, net_log.source());
+      std::make_unique<SpdyHttpStream>(session_, true, net_log.source());
   ASSERT_THAT(http_stream->InitializeStream(&request, DEFAULT_PRIORITY, net_log,
                                             CompletionCallback()),
               IsOk());
diff --git a/net/spdy/chromium/spdy_log_util.cc b/net/spdy/chromium/spdy_log_util.cc
index 86e4a198..7a6f589 100644
--- a/net/spdy/chromium/spdy_log_util.cc
+++ b/net/spdy/chromium/spdy_log_util.cc
@@ -26,7 +26,7 @@
 std::unique_ptr<base::ListValue> ElideSpdyHeaderBlockForNetLog(
     const SpdyHeaderBlock& headers,
     NetLogCaptureMode capture_mode) {
-  auto headers_list = base::MakeUnique<base::ListValue>();
+  auto headers_list = std::make_unique<base::ListValue>();
   for (SpdyHeaderBlock::const_iterator it = headers.begin();
        it != headers.end(); ++it) {
     headers_list->AppendString(
diff --git a/net/spdy/chromium/spdy_network_transaction_unittest.cc b/net/spdy/chromium/spdy_network_transaction_unittest.cc
index 61152c93..ace5e70 100644
--- a/net/spdy/chromium/spdy_network_transaction_unittest.cc
+++ b/net/spdy/chromium/spdy_network_transaction_unittest.cc
@@ -110,7 +110,7 @@
         : request_(request),
           priority_(priority),
           session_deps_(session_deps.get() == nullptr
-                            ? base::MakeUnique<SpdySessionDependencies>()
+                            ? std::make_unique<SpdySessionDependencies>()
                             : std::move(session_deps)),
           log_(log) {
       session_deps_->net_log = log.net_log();
@@ -133,7 +133,7 @@
     void RunPreTestSetup() {
       // We're now ready to use SSL-npn SPDY.
       trans_ =
-          base::MakeUnique<HttpNetworkTransaction>(priority_, session_.get());
+          std::make_unique<HttpNetworkTransaction>(priority_, session_.get());
     }
 
     // Start the transaction, read some data, finish.
@@ -223,7 +223,7 @@
     }
 
     void AddData(SocketDataProvider* data) {
-      auto ssl_provider = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+      auto ssl_provider = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
       ssl_provider->cert =
           ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem");
       AddDataWithSSLSocketDataProvider(data, std::move(ssl_provider));
@@ -302,9 +302,9 @@
   const HttpRequestInfo& CreatePostRequest() {
     if (!post_request_initialized_) {
       std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-      element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+      element_readers.push_back(std::make_unique<UploadBytesElementReader>(
           kUploadData, kUploadDataSize));
-      upload_data_stream_ = base::MakeUnique<ElementsUploadDataStream>(
+      upload_data_stream_ = std::make_unique<ElementsUploadDataStream>(
           std::move(element_readers), 0);
 
       post_request_.method = "POST";
@@ -323,10 +323,10 @@
                base::WriteFile(file_path, kUploadData, kUploadDataSize));
 
       std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-      element_readers.push_back(base::MakeUnique<UploadFileElementReader>(
+      element_readers.push_back(std::make_unique<UploadFileElementReader>(
           base::ThreadTaskRunnerHandle::Get().get(), file_path, 0,
           kUploadDataSize, base::Time()));
-      upload_data_stream_ = base::MakeUnique<ElementsUploadDataStream>(
+      upload_data_stream_ = std::make_unique<ElementsUploadDataStream>(
           std::move(element_readers), 0);
 
       post_request_.method = "POST";
@@ -348,10 +348,10 @@
     CHECK(base::MakeFileUnreadable(file_path));
 
     std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-    element_readers.push_back(base::MakeUnique<UploadFileElementReader>(
+    element_readers.push_back(std::make_unique<UploadFileElementReader>(
         base::ThreadTaskRunnerHandle::Get().get(), file_path, 0,
         kUploadDataSize, base::Time()));
-    upload_data_stream_ = base::MakeUnique<ElementsUploadDataStream>(
+    upload_data_stream_ = std::make_unique<ElementsUploadDataStream>(
         std::move(element_readers), 0);
 
     post_request_.method = "POST";
@@ -373,15 +373,15 @@
                base::WriteFile(file_path, kUploadData, kUploadDataSize));
 
       std::vector<std::unique_ptr<UploadElementReader>> element_readers;
-      element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+      element_readers.push_back(std::make_unique<UploadBytesElementReader>(
           kUploadData, kFileRangeOffset));
-      element_readers.push_back(base::MakeUnique<UploadFileElementReader>(
+      element_readers.push_back(std::make_unique<UploadFileElementReader>(
           base::ThreadTaskRunnerHandle::Get().get(), file_path,
           kFileRangeOffset, kFileRangeLength, base::Time()));
-      element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+      element_readers.push_back(std::make_unique<UploadBytesElementReader>(
           kUploadData + kFileRangeOffset + kFileRangeLength,
           kUploadDataSize - (kFileRangeOffset + kFileRangeLength)));
-      upload_data_stream_ = base::MakeUnique<ElementsUploadDataStream>(
+      upload_data_stream_ = std::make_unique<ElementsUploadDataStream>(
           std::move(element_readers), 0);
 
       post_request_.method = "POST";
@@ -395,7 +395,7 @@
   const HttpRequestInfo& CreateChunkedPostRequest() {
     if (!chunked_post_request_initialized_) {
       upload_chunked_data_stream_ =
-          base::MakeUnique<ChunkedUploadDataStream>(0);
+          std::make_unique<ChunkedUploadDataStream>(0);
       chunked_post_request_.method = "POST";
       chunked_post_request_.url = default_url_;
       chunked_post_request_.upload_data_stream =
@@ -589,11 +589,11 @@
 
 // Verify HttpNetworkTransaction constructor.
 TEST_F(SpdyNetworkTransactionTest, Constructor) {
-  auto session_deps = base::MakeUnique<SpdySessionDependencies>();
+  auto session_deps = std::make_unique<SpdySessionDependencies>();
   std::unique_ptr<HttpNetworkSession> session(
       SpdySessionDependencies::SpdyCreateSession(session_deps.get()));
   auto trans =
-      base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
+      std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY, session.get());
 }
 
 TEST_F(SpdyNetworkTransactionTest, Get) {
@@ -1266,11 +1266,11 @@
                                      NetLogWithSource(), nullptr);
   helper.RunPreTestSetup();
   helper.AddData(&data);
-  auto trans1 = base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
+  auto trans1 = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
                                                          helper.session());
-  auto trans2 = base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
+  auto trans2 = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
                                                          helper.session());
-  auto trans3 = base::MakeUnique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
+  auto trans3 = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
                                                          helper.session());
 
   TestCompletionCallback callback1;
@@ -4238,7 +4238,7 @@
   SequencedSocketData data0(reads0, arraysize(reads0), writes0,
                             arraysize(writes0));
 
-  auto ssl_provider0 = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider0 = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   // Expect HTTP/2 protocols too in SSLConfig.
   ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP2);
   ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP11);
@@ -4258,7 +4258,7 @@
   SequencedSocketData data1(reads1, arraysize(reads1), writes1,
                             arraysize(writes1));
 
-  auto ssl_provider1 = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider1 = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   // Expect only HTTP/1.1 protocol in SSLConfig.
   ssl_provider1->next_protos_expected_in_ssl_config.push_back(kProtoHTTP11);
   // Force HTTP/1.1.
@@ -4298,7 +4298,7 @@
   HttpRequestInfo request;
   request.method = "GET";
   request.url = default_url_;
-  auto session_deps = base::MakeUnique<SpdySessionDependencies>(
+  auto session_deps = std::make_unique<SpdySessionDependencies>(
       ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70"));
   // Do not force SPDY so that second socket can negotiate HTTP/1.1.
   NormalSpdyTransactionHelper helper(
@@ -4314,7 +4314,7 @@
   SequencedSocketData data0(reads0, arraysize(reads0), writes0,
                             arraysize(writes0));
 
-  auto ssl_provider0 = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider0 = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   // Expect HTTP/2 protocols too in SSLConfig.
   ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP2);
   ssl_provider0->next_protos_expected_in_ssl_config.push_back(kProtoHTTP11);
@@ -4344,7 +4344,7 @@
   SequencedSocketData data1(reads1, arraysize(reads1), writes1,
                             arraysize(writes1));
 
-  auto ssl_provider1 = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider1 = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   // Expect only HTTP/1.1 protocol in SSLConfig.
   ssl_provider1->next_protos_expected_in_ssl_config.push_back(kProtoHTTP11);
   // Force HTTP/1.1.
@@ -4352,7 +4352,7 @@
   helper.AddDataWithSSLSocketDataProvider(&data1, std::move(ssl_provider1));
 
   // A third socket is needed for the tunnelled connection.
-  auto ssl_provider2 = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider2 = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   helper.session_deps()->socket_factory->AddSSLSocketDataProvider(
       ssl_provider2.get());
 
@@ -4385,7 +4385,7 @@
 
 // Test to make sure we can correctly connect through a proxy.
 TEST_F(SpdyNetworkTransactionTest, ProxyConnect) {
-  auto session_deps = base::MakeUnique<SpdySessionDependencies>(
+  auto session_deps = std::make_unique<SpdySessionDependencies>(
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
   NormalSpdyTransactionHelper helper(CreateGetRequest(), DEFAULT_PRIORITY,
                                      NetLogWithSource(),
@@ -4412,7 +4412,7 @@
       CreateMockRead(resp, 3), CreateMockRead(body, 4),
       MockRead(ASYNC, 0, 0, 5),
   };
-  auto data = base::MakeUnique<SequencedSocketData>(reads, arraysize(reads),
+  auto data = std::make_unique<SequencedSocketData>(reads, arraysize(reads),
                                                     writes, arraysize(writes));
 
   helper.AddData(data.get());
@@ -4444,7 +4444,7 @@
   // myproxy:70. For this test there will be no fallback, so it is equivalent
   // to simply DIRECT. The reason for appending the second proxy is to verify
   // that the session pool key used does is just "DIRECT".
-  auto session_deps = base::MakeUnique<SpdySessionDependencies>(
+  auto session_deps = std::make_unique<SpdySessionDependencies>(
       ProxyService::CreateFixedFromPacResult("DIRECT; PROXY myproxy:70"));
   // When setting up the first transaction, we store the SpdySessionPool so that
   // we can use the same pool in the second transaction.
@@ -4525,7 +4525,7 @@
       MockRead(ASYNC, 0, 5)  // EOF
   };
 
-  auto data_proxy = base::MakeUnique<SequencedSocketData>(
+  auto data_proxy = std::make_unique<SequencedSocketData>(
       reads2, arraysize(reads2), writes2, arraysize(writes2));
 
   // Create another request to www.example.org, but this time through a proxy.
@@ -4533,7 +4533,7 @@
   request_proxy.method = "GET";
   request_proxy.url = GURL(GetDefaultUrlWithPath("/foo.dat"));
   request_proxy.load_flags = 0;
-  auto session_deps_proxy = base::MakeUnique<SpdySessionDependencies>(
+  auto session_deps_proxy = std::make_unique<SpdySessionDependencies>(
       ProxyService::CreateFixedFromPacResult("PROXY myproxy:70"));
   NormalSpdyTransactionHelper helper_proxy(request_proxy, DEFAULT_PRIORITY,
                                            NetLogWithSource(),
@@ -5031,8 +5031,8 @@
 
     // Enable cross-origin push. Since we are not using a proxy, this should
     // not actually enable cross-origin SPDY push.
-    auto session_deps = base::MakeUnique<SpdySessionDependencies>();
-    auto proxy_delegate = base::MakeUnique<TestProxyDelegate>();
+    auto session_deps = std::make_unique<SpdySessionDependencies>();
+    auto proxy_delegate = std::make_unique<TestProxyDelegate>();
     proxy_delegate->set_trusted_spdy_proxy(net::ProxyServer::FromURI(
         "https://123.45.67.89:443", net::ProxyServer::SCHEME_HTTP));
     session_deps->proxy_delegate = std::move(proxy_delegate);
@@ -5237,13 +5237,13 @@
 
   // "spdy_pooling.pem" is valid for www.example.org, but not for
   // docs.example.org.
-  auto ssl_provider0 = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider0 = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   ssl_provider0->cert =
       ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem");
   helper.AddDataWithSSLSocketDataProvider(&data0, std::move(ssl_provider0));
 
   // "wildcard.pem" is valid for both www.example.org and docs.example.org.
-  auto ssl_provider1 = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider1 = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   ssl_provider1->cert =
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem");
   helper.AddDataWithSSLSocketDataProvider(&data1, std::move(ssl_provider1));
@@ -5554,7 +5554,7 @@
 // fail under specific circumstances.
 TEST_F(SpdyNetworkTransactionTest, WindowUpdateReceived) {
   static int kFrameCount = 2;
-  auto content = base::MakeUnique<SpdyString>(kMaxSpdyFrameChunkSize, 'a');
+  auto content = std::make_unique<SpdyString>(kMaxSpdyFrameChunkSize, 'a');
   SpdySerializedFrame req(spdy_util_.ConstructSpdyPost(
       kDefaultUrl, 1, kMaxSpdyFrameChunkSize * kFrameCount, LOWEST, nullptr,
       0));
@@ -5593,7 +5593,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   for (int i = 0; i < kFrameCount; ++i) {
-    element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+    element_readers.push_back(std::make_unique<UploadBytesElementReader>(
         content->c_str(), content->size()));
   }
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
@@ -5725,7 +5725,7 @@
   SequencedSocketData data(reads.data(), reads.size(), writes.data(),
                            writes.size());
 
-  auto session_deps = base::MakeUnique<SpdySessionDependencies>();
+  auto session_deps = std::make_unique<SpdySessionDependencies>();
   session_deps->session_max_recv_window_size = session_max_recv_window_size;
   session_deps->http2_settings[SETTINGS_INITIAL_WINDOW_SIZE] =
       stream_max_recv_window_size;
@@ -5787,7 +5787,7 @@
   // set content-length header correctly)
   static int kFrameCount = 3;
 
-  auto content = base::MakeUnique<SpdyString>(kMaxSpdyFrameChunkSize, 'a');
+  auto content = std::make_unique<SpdyString>(kMaxSpdyFrameChunkSize, 'a');
   SpdySerializedFrame req(spdy_util_.ConstructSpdyPost(
       kDefaultUrl, 1, kMaxSpdyFrameChunkSize * kFrameCount, LOWEST, nullptr,
       0));
@@ -5814,7 +5814,7 @@
 
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   for (int i = 0; i < kFrameCount; ++i) {
-    element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+    element_readers.push_back(std::make_unique<UploadBytesElementReader>(
         content->c_str(), content->size()));
   }
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
@@ -5955,7 +5955,7 @@
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   SpdyString upload_data_string(kBufferSize * num_upload_buffers, 'a');
   upload_data_string.append(kUploadData, kUploadDataSize);
-  element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+  element_readers.push_back(std::make_unique<UploadBytesElementReader>(
       upload_data_string.c_str(), upload_data_string.size()));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
@@ -6114,7 +6114,7 @@
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   SpdyString upload_data_string(kBufferSize * num_upload_buffers, 'a');
   upload_data_string.append(kUploadData, kUploadDataSize);
-  element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+  element_readers.push_back(std::make_unique<UploadBytesElementReader>(
       upload_data_string.c_str(), upload_data_string.size()));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
@@ -6278,7 +6278,7 @@
   std::vector<std::unique_ptr<UploadElementReader>> element_readers;
   SpdyString upload_data_string(kBufferSize * num_upload_buffers, 'a');
   upload_data_string.append(kUploadData, kUploadDataSize);
-  element_readers.push_back(base::MakeUnique<UploadBytesElementReader>(
+  element_readers.push_back(std::make_unique<UploadBytesElementReader>(
       upload_data_string.c_str(), upload_data_string.size()));
   ElementsUploadDataStream upload_data_stream(std::move(element_readers), 0);
 
@@ -6674,7 +6674,7 @@
 };
 
 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSVersionTooOld) {
-  auto ssl_provider = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_SSL3,
                                 &ssl_provider->connection_status);
 
@@ -6682,7 +6682,7 @@
 }
 
 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) {
-  auto ssl_provider = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   // Set to TLS_RSA_WITH_NULL_MD5
   SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status);
 
@@ -6694,7 +6694,7 @@
 // and makes sure that it results in an ERROR_CODE_INADEQUATE_SECURITY
 // even for a non-secure request URL.
 TEST_F(SpdyNetworkTransactionTest, InsecureUrlCreatesSecureSpdySession) {
-  auto ssl_provider = base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK);
+  auto ssl_provider = std::make_unique<SSLSocketDataProvider>(ASYNC, OK);
   SSLConnectionStatusSetVersion(SSL_CONNECTION_VERSION_SSL3,
                                 &ssl_provider->connection_status);
 
@@ -6708,7 +6708,7 @@
   request.url = GURL("http://www.example.org/");
 
   // Need secure proxy so that insecure URL can use HTTP/2.
-  auto session_deps = base::MakeUnique<SpdySessionDependencies>(
+  auto session_deps = std::make_unique<SpdySessionDependencies>(
       ProxyService::CreateFixedFromPacResult("HTTPS myproxy:70"));
   NormalSpdyTransactionHelper helper(
       request, DEFAULT_PRIORITY, NetLogWithSource(), std::move(session_deps));
diff --git a/net/spdy/chromium/spdy_proxy_client_socket.cc b/net/spdy/chromium/spdy_proxy_client_socket.cc
index 5397c08..7820853 100644
--- a/net/spdy/chromium/spdy_proxy_client_socket.cc
+++ b/net/spdy/chromium/spdy_proxy_client_socket.cc
@@ -95,7 +95,7 @@
 
 std::unique_ptr<HttpStream>
 SpdyProxyClientSocket::CreateConnectResponseStream() {
-  return base::MakeUnique<ProxyConnectRedirectHttpStream>(
+  return std::make_unique<ProxyConnectRedirectHttpStream>(
       redirect_has_load_timing_info_ ? &redirect_load_timing_info_ : nullptr);
 }
 
diff --git a/net/spdy/chromium/spdy_proxy_client_socket_unittest.cc b/net/spdy/chromium/spdy_proxy_client_socket_unittest.cc
index 5f3bb80..372d162 100644
--- a/net/spdy/chromium/spdy_proxy_client_socket_unittest.cc
+++ b/net/spdy/chromium/spdy_proxy_client_socket_unittest.cc
@@ -182,7 +182,7 @@
                                            size_t reads_count,
                                            MockWrite* writes,
                                            size_t writes_count) {
-  data_ = base::MakeUnique<SequencedSocketData>(reads, reads_count, writes,
+  data_ = std::make_unique<SequencedSocketData>(reads, reads_count, writes,
                                                 writes_count);
   data_->set_connect_data(connect_data_);
   session_deps_.socket_factory->AddSocketDataProvider(data_.get());
@@ -206,7 +206,7 @@
   ASSERT_TRUE(spdy_stream.get() != NULL);
 
   // Create the SpdyProxyClientSocket.
-  sock_ = base::MakeUnique<SpdyProxyClientSocket>(
+  sock_ = std::make_unique<SpdyProxyClientSocket>(
       spdy_stream, user_agent_, endpoint_host_port_pair_, net_log_.bound(),
       new HttpAuthController(
           HttpAuth::AUTH_PROXY, GURL("https://" + proxy_host_port_.ToString()),
diff --git a/net/spdy/chromium/spdy_read_queue_unittest.cc b/net/spdy/chromium/spdy_read_queue_unittest.cc
index 612cab5..c3cb0ccf 100644
--- a/net/spdy/chromium/spdy_read_queue_unittest.cc
+++ b/net/spdy/chromium/spdy_read_queue_unittest.cc
@@ -49,7 +49,7 @@
   // Pad the buffer so we can detect out-of-bound writes.
   size_t padding = std::max(static_cast<size_t>(4096), queue->GetTotalSize());
   size_t buffer_size_with_padding = padding + max_buffer_size + padding;
-  auto buffer = base::MakeUnique<char[]>(buffer_size_with_padding);
+  auto buffer = std::make_unique<char[]>(buffer_size_with_padding);
   std::memset(buffer.get(), 0, buffer_size_with_padding);
   char* buffer_data = buffer.get() + padding;
 
@@ -116,7 +116,7 @@
 }
 
 TEST_F(SpdyReadQueueTest, Clear) {
-  auto buffer = base::MakeUnique<SpdyBuffer>(kData, kDataSize);
+  auto buffer = std::make_unique<SpdyBuffer>(kData, kDataSize);
   bool discarded = false;
   size_t discarded_bytes = 0;
   buffer->AddConsumeCallback(
diff --git a/net/spdy/chromium/spdy_session.cc b/net/spdy/chromium/spdy_session.cc
index a2b3d32..2d21004 100644
--- a/net/spdy/chromium/spdy_session.cc
+++ b/net/spdy/chromium/spdy_session.cc
@@ -109,7 +109,7 @@
     bool exclusive,
     NetLogSource source_dependency,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->Set("headers", ElideSpdyHeaderBlockForNetLog(*headers, capture_mode));
   dict->SetBoolean("fin", fin);
   dict->SetInteger("stream_id", stream_id);
@@ -130,7 +130,7 @@
     bool fin,
     SpdyStreamId stream_id,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->Set("headers", ElideSpdyHeaderBlockForNetLog(*headers, capture_mode));
   dict->SetBoolean("fin", fin);
   dict->SetInteger("stream_id", stream_id);
@@ -141,7 +141,7 @@
     int net_error,
     const SpdyString* description,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("net_error", net_error);
   dict->SetString("description", *description);
   return std::move(dict);
@@ -150,7 +150,7 @@
 std::unique_ptr<base::Value> NetLogSpdySessionCallback(
     const HostPortProxyPair* host_pair,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("host", host_pair->first.ToString());
   dict->SetString("proxy", host_pair->second.ToPacString());
   return std::move(dict);
@@ -159,7 +159,7 @@
 std::unique_ptr<base::Value> NetLogSpdyInitializedCallback(
     NetLogSource source,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   if (source.IsValid()) {
     source.AddToEventParameters(dict.get());
   }
@@ -170,8 +170,8 @@
 std::unique_ptr<base::Value> NetLogSpdySendSettingsCallback(
     const SettingsMap* settings,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
-  auto settings_list = base::MakeUnique<base::ListValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
+  auto settings_list = std::make_unique<base::ListValue>();
   for (SettingsMap::const_iterator it = settings->begin();
        it != settings->end(); ++it) {
     const SpdySettingsIds id = it->first;
@@ -189,7 +189,7 @@
     SpdySettingsIds id,
     uint32_t value,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   const char* settings_string;
   SettingsIdToString(id, &settings_string);
   dict->SetString("id", SpdyStringPrintf("%u (%s)", id, settings_string));
@@ -201,7 +201,7 @@
     SpdyStreamId stream_id,
     uint32_t delta,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("stream_id", static_cast<int>(stream_id));
   dict->SetInteger("delta", delta);
   return std::move(dict);
@@ -211,7 +211,7 @@
     int32_t delta,
     int32_t window_size,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("delta", delta);
   dict->SetInteger("window_size", window_size);
   return std::move(dict);
@@ -222,7 +222,7 @@
     int size,
     bool fin,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("stream_id", static_cast<int>(stream_id));
   dict->SetInteger("size", size);
   dict->SetBoolean("fin", fin);
@@ -233,7 +233,7 @@
     SpdyStreamId stream_id,
     SpdyErrorCode error_code,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("stream_id", static_cast<int>(stream_id));
   dict->SetString(
       "error_code",
@@ -246,7 +246,7 @@
     SpdyErrorCode error_code,
     const SpdyString* description,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("stream_id", static_cast<int>(stream_id));
   dict->SetString(
       "error_code",
@@ -260,7 +260,7 @@
     bool is_ack,
     const char* type,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("unique_id", static_cast<int>(unique_id));
   dict->SetString("type", type);
   dict->SetBoolean("is_ack", is_ack);
@@ -274,7 +274,7 @@
     SpdyErrorCode error_code,
     SpdyStringPiece debug_data,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("last_accepted_stream_id", static_cast<int>(last_stream_id));
   dict->SetInteger("active_streams", active_streams);
   dict->SetInteger("unclaimed_streams", unclaimed_streams);
@@ -291,7 +291,7 @@
     SpdyStreamId stream_id,
     SpdyStreamId promised_stream_id,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->Set("headers", ElideSpdyHeaderBlockForNetLog(*headers, capture_mode));
   dict->SetInteger("id", stream_id);
   dict->SetInteger("promised_stream_id", promised_stream_id);
@@ -302,7 +302,7 @@
     SpdyStreamId stream_id,
     const GURL* url,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("stream_id", stream_id);
   dict->SetString("url", url->spec());
   return std::move(dict);
@@ -315,7 +315,7 @@
     size_t max_concurrent_streams,
     const SpdyString& url,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("num_active_streams", num_active_streams);
   dict->SetInteger("num_created_streams", num_created_streams);
   dict->SetInteger("num_pushed_streams", num_pushed_streams);
@@ -330,7 +330,7 @@
     int weight,
     bool exclusive,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("stream_id", stream_id);
   dict->SetInteger("parent_stream_id", parent_stream_id);
   dict->SetInteger("weight", weight);
@@ -884,7 +884,7 @@
   session_send_window_size_ = kDefaultInitialWindowSize;
   session_recv_window_size_ = kDefaultInitialWindowSize;
 
-  buffered_spdy_framer_ = base::MakeUnique<BufferedSpdyFramer>(
+  buffered_spdy_framer_ = std::make_unique<BufferedSpdyFramer>(
       initial_settings_.find(SETTINGS_MAX_HEADER_LIST_SIZE)->second, net_log_);
   buffered_spdy_framer_->set_visitor(this);
   buffered_spdy_framer_->set_debug_visitor(this);
@@ -968,7 +968,7 @@
 
   streams_initiated_count_++;
 
-  return base::MakeUnique<SpdySerializedFrame>(
+  return std::make_unique<SpdySerializedFrame>(
       buffered_spdy_framer_->SerializeFrame(headers));
 }
 
@@ -1069,7 +1069,7 @@
           stream_id, data->data(), static_cast<uint32_t>(effective_len),
           flags));
 
-  auto data_buffer = base::MakeUnique<SpdyBuffer>(std::move(frame));
+  auto data_buffer = std::make_unique<SpdyBuffer>(std::move(frame));
 
   // Send window size is based on payload size, so nothing to do if this is
   // just a FIN with no payload.
@@ -1232,13 +1232,13 @@
 }
 
 std::unique_ptr<base::Value> SpdySession::GetInfoAsValue() const {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
 
   dict->SetInteger("source_id", net_log_.source().id);
 
   dict->SetString("host_port_pair", host_port_pair().ToString());
   if (!pooled_aliases_.empty()) {
-    auto alias_list = base::MakeUnique<base::ListValue>();
+    auto alias_list = std::make_unique<base::ListValue>();
     for (const auto& alias : pooled_aliases_) {
       alias_list->AppendString(alias.host_port_pair().ToString());
     }
@@ -1425,7 +1425,7 @@
     return ERR_CONNECTION_CLOSED;
   }
 
-  auto new_stream = base::MakeUnique<SpdyStream>(
+  auto new_stream = std::make_unique<SpdyStream>(
       request.type(), GetWeakPtr(), request.url(), request.priority(),
       stream_initial_send_window_size_, stream_max_recv_window_size_,
       request.net_log());
@@ -1638,7 +1638,7 @@
     return;
   }
 
-  auto stream = base::MakeUnique<SpdyStream>(
+  auto stream = std::make_unique<SpdyStream>(
       SPDY_PUSH_STREAM, GetWeakPtr(), gurl, request_priority,
       stream_initial_send_window_size_, stream_max_recv_window_size_, net_log_);
   stream->set_stream_id(stream_id);
@@ -1673,7 +1673,7 @@
 
   // Notify the push_delegate that a push promise has been received.
   if (push_delegate_) {
-    push_delegate_->OnPush(base::MakeUnique<SpdyServerPushHelper>(
+    push_delegate_->OnPush(std::make_unique<SpdyServerPushHelper>(
                                weak_factory_.GetWeakPtr(), gurl),
                            net_log_);
   }
@@ -1775,8 +1775,8 @@
   // be serialized. We do this by queueing all PRIORITY frames at HIGHEST
   // priority.
   EnqueueWrite(HIGHEST, SpdyFrameType::PRIORITY,
-               base::MakeUnique<SimpleBufferProducer>(
-                   base::MakeUnique<SpdyBuffer>(std::move(frame))),
+               std::make_unique<SimpleBufferProducer>(
+                   std::make_unique<SpdyBuffer>(std::move(frame))),
                base::WeakPtr<SpdyStream>());
 }
 
@@ -2144,7 +2144,7 @@
       kHttp2ConnectionHeaderPrefixSize + settings_frame->size();
   if (send_window_update)
     initial_frame_size += window_update_frame->size();
-  auto initial_frame_data = base::MakeUnique<char[]>(initial_frame_size);
+  auto initial_frame_data = std::make_unique<char[]>(initial_frame_size);
   size_t offset = 0;
 
   memcpy(initial_frame_data.get() + offset, kHttp2ConnectionHeaderPrefix,
@@ -2160,7 +2160,7 @@
            window_update_frame->size());
   }
 
-  auto initial_frame = base::MakeUnique<SpdySerializedFrame>(
+  auto initial_frame = std::make_unique<SpdySerializedFrame>(
       initial_frame_data.release(), initial_frame_size,
       /* owns_buffer = */ true);
   EnqueueSessionWrite(HIGHEST, SpdyFrameType::SETTINGS,
@@ -2314,9 +2314,9 @@
          frame_type == SpdyFrameType::WINDOW_UPDATE ||
          frame_type == SpdyFrameType::PING ||
          frame_type == SpdyFrameType::GOAWAY);
-  auto buffer = base::MakeUnique<SpdyBuffer>(std::move(frame));
+  auto buffer = std::make_unique<SpdyBuffer>(std::move(frame));
   EnqueueWrite(priority, frame_type,
-               base::MakeUnique<SimpleBufferProducer>(std::move(buffer)),
+               std::make_unique<SimpleBufferProducer>(std::move(buffer)),
                base::WeakPtr<SpdyStream>());
 }
 
@@ -2471,7 +2471,7 @@
     // Enqueue a GOAWAY to inform the peer of why we're closing the connection.
     SpdyGoAwayIR goaway_ir(last_accepted_push_stream_id_,
                            MapNetErrorToGoAwayStatus(err), description);
-    auto frame = base::MakeUnique<SpdySerializedFrame>(
+    auto frame = std::make_unique<SpdySerializedFrame>(
         buffered_spdy_framer_->SerializeFrame(goaway_ir));
     EnqueueSessionWrite(HIGHEST, SpdyFrameType::GOAWAY, std::move(frame));
   }
@@ -2744,7 +2744,7 @@
   if (data) {
     DCHECK_GT(len, 0u);
     CHECK_LE(len, static_cast<size_t>(kReadBufferSize));
-    buffer = base::MakeUnique<SpdyBuffer>(data, len);
+    buffer = std::make_unique<SpdyBuffer>(data, len);
 
     DecreaseRecvWindowSize(static_cast<int32_t>(len));
     buffer->AddConsumeCallback(base::Bind(&SpdySession::OnReadBufferConsumed,
@@ -2811,7 +2811,7 @@
   // Send an acknowledgment of the setting.
   SpdySettingsIR settings_ir;
   settings_ir.set_is_ack(true);
-  auto frame = base::MakeUnique<SpdySerializedFrame>(
+  auto frame = std::make_unique<SpdySerializedFrame>(
       buffered_spdy_framer_->SerializeFrame(settings_ir));
   EnqueueSessionWrite(HIGHEST, SpdyFrameType::SETTINGS, std::move(frame));
 }
diff --git a/net/spdy/chromium/spdy_session_fuzzer.cc b/net/spdy/chromium/spdy_session_fuzzer.cc
index f8ed8c69..8a8f312 100644
--- a/net/spdy/chromium/spdy_session_fuzzer.cc
+++ b/net/spdy/chromium/spdy_session_fuzzer.cc
@@ -84,7 +84,7 @@
     const HostPortPair& host_and_port,
     const SSLConfig& ssl_config,
     const SSLClientSocketContext& context) {
-  return base::MakeUnique<MockSSLClientSocket>(std::move(transport_socket),
+  return std::make_unique<MockSSLClientSocket>(std::move(transport_socket),
                                                host_and_port, ssl_config,
                                                mock_ssl_data_.GetNext());
 }
diff --git a/net/spdy/chromium/spdy_session_pool.cc b/net/spdy/chromium/spdy_session_pool.cc
index a8aca9b..1a0d464 100644
--- a/net/spdy/chromium/spdy_session_pool.cc
+++ b/net/spdy/chromium/spdy_session_pool.cc
@@ -101,7 +101,7 @@
   UMA_HISTOGRAM_ENUMERATION(
       "Net.SpdySessionGet", IMPORTED_FROM_SOCKET, SPDY_SESSION_GET_MAX);
 
-  auto new_session = base::MakeUnique<SpdySession>(
+  auto new_session = std::make_unique<SpdySession>(
       key, http_server_properties_, transport_security_state_,
       quic_supported_versions_, enable_sending_initial_data_,
       enable_ping_based_connection_checking_, session_max_recv_window_size_,
@@ -354,7 +354,7 @@
 
 std::unique_ptr<base::Value> SpdySessionPool::SpdySessionPoolInfoToValue()
     const {
-  auto list = base::MakeUnique<base::ListValue>();
+  auto list = std::make_unique<base::ListValue>();
 
   for (AvailableSessionMap::const_iterator it = available_sessions_.begin();
        it != available_sessions_.end(); ++it) {
@@ -427,14 +427,14 @@
     if (request->stream_type() == HttpStreamRequest::BIDIRECTIONAL_STREAM) {
       request->OnBidirectionalStreamImplReadyOnPooledConnection(
           used_ssl_config, used_proxy_info,
-          base::MakeUnique<BidirectionalStreamSpdyImpl>(spdy_session,
+          std::make_unique<BidirectionalStreamSpdyImpl>(spdy_session,
                                                         source_dependency));
     } else {
       bool use_relative_url =
           direct || request->url().SchemeIs(url::kHttpsScheme);
       request->OnStreamReadyOnPooledConnection(
           used_ssl_config, used_proxy_info,
-          base::MakeUnique<SpdyHttpStream>(spdy_session, use_relative_url,
+          std::make_unique<SpdyHttpStream>(spdy_session, use_relative_url,
                                            source_dependency));
     }
   }
diff --git a/net/spdy/chromium/spdy_session_pool_unittest.cc b/net/spdy/chromium/spdy_session_pool_unittest.cc
index 7ba0887..4d25d16c 100644
--- a/net/spdy/chromium/spdy_session_pool_unittest.cc
+++ b/net/spdy/chromium/spdy_session_pool_unittest.cc
@@ -53,7 +53,7 @@
   }
 
   void AddSSLSocketData() {
-    auto ssl = base::MakeUnique<SSLSocketDataProvider>(SYNCHRONOUS, OK);
+    auto ssl = std::make_unique<SSLSocketDataProvider>(SYNCHRONOUS, OK);
     ssl->cert = ImportCertFromFile(GetTestCertsDirectory(), "spdy_pooling.pem");
     ASSERT_TRUE(ssl->cert);
     session_deps_.socket_factory->AddSSLSocketDataProvider(ssl.get());
@@ -873,7 +873,7 @@
   EXPECT_TRUE(HasSpdySession(spdy_session_pool_, key));
   base::trace_event::MemoryDumpArgs dump_args = {GetParam()};
   auto process_memory_dump =
-      base::MakeUnique<base::trace_event::ProcessMemoryDump>(nullptr,
+      std::make_unique<base::trace_event::ProcessMemoryDump>(nullptr,
                                                              dump_args);
   base::trace_event::MemoryAllocatorDump* parent_dump =
       process_memory_dump->CreateAllocatorDump(
diff --git a/net/spdy/chromium/spdy_session_unittest.cc b/net/spdy/chromium/spdy_session_unittest.cc
index 4eab49a..fe25445 100644
--- a/net/spdy/chromium/spdy_session_unittest.cc
+++ b/net/spdy/chromium/spdy_session_unittest.cc
@@ -155,7 +155,7 @@
     DCHECK(!spdy_session_pool_);
     http_session_ =
         SpdySessionDependencies::SpdyCreateSession(&session_deps_);
-    auto test_push_delegate = base::MakeUnique<TestServerPushDelegate>();
+    auto test_push_delegate = std::make_unique<TestServerPushDelegate>();
     test_push_delegate_ = test_push_delegate.get();
     http_session_->SetServerPushDelegate(std::move(test_push_delegate));
     spdy_session_pool_ = http_session_->spdy_session_pool();
@@ -288,7 +288,7 @@
   }
 
   SpdyStreamRequest request1;
-  auto request2 = base::MakeUnique<SpdyStreamRequest>();
+  auto request2 = std::make_unique<SpdyStreamRequest>();
 
   StreamRequestDestroyingCallback callback1;
   ASSERT_EQ(ERR_IO_PENDING,
@@ -646,7 +646,7 @@
   size_t joint_size = goaway.size() * 2 + body.size();
 
   // Compose interleaved |goaway| and |body| frames into a single read.
-  auto buffer = base::MakeUnique<char[]>(joint_size);
+  auto buffer = std::make_unique<char[]>(joint_size);
   {
     size_t out = 0;
     memcpy(&buffer[out], goaway.data(), goaway.size());
@@ -1900,7 +1900,7 @@
 
   // Use unique_ptr to let us invalidate the memory when we want to, to trigger
   // a valgrind error if the callback is invoked when it's not supposed to be.
-  auto callback = base::MakeUnique<TestCompletionCallback>();
+  auto callback = std::make_unique<TestCompletionCallback>();
 
   SpdyStreamRequest request;
   ASSERT_THAT(
@@ -3346,7 +3346,7 @@
   scoped_refptr<TransportSocketParams> params2(new TransportSocketParams(
       host_port2, false, OnHostResolutionCallback(),
       TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
-  auto connection2 = base::MakeUnique<ClientSocketHandle>();
+  auto connection2 = std::make_unique<ClientSocketHandle>();
   EXPECT_EQ(ERR_IO_PENDING,
             connection2->Init(host_port2.ToString(), params2, DEFAULT_PRIORITY,
                               ClientSocketPool::RespectLimits::ENABLED,
@@ -3426,7 +3426,7 @@
   scoped_refptr<TransportSocketParams> params3(new TransportSocketParams(
       host_port3, false, OnHostResolutionCallback(),
       TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
-  auto connection3 = base::MakeUnique<ClientSocketHandle>();
+  auto connection3 = std::make_unique<ClientSocketHandle>();
   EXPECT_EQ(ERR_IO_PENDING,
             connection3->Init(host_port3.ToString(), params3, DEFAULT_PRIORITY,
                               ClientSocketPool::RespectLimits::ENABLED,
@@ -3505,7 +3505,7 @@
   scoped_refptr<TransportSocketParams> params2(new TransportSocketParams(
       host_port2, false, OnHostResolutionCallback(),
       TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
-  auto connection2 = base::MakeUnique<ClientSocketHandle>();
+  auto connection2 = std::make_unique<ClientSocketHandle>();
   EXPECT_EQ(ERR_IO_PENDING,
             connection2->Init(host_port2.ToString(), params2, DEFAULT_PRIORITY,
                               ClientSocketPool::RespectLimits::ENABLED,
@@ -5079,7 +5079,7 @@
   SequencedSocketData data(reads, arraysize(reads), writes, arraysize(writes));
   session_deps_.socket_factory->AddSocketDataProvider(&data);
 
-  auto proxy_delegate = base::MakeUnique<TestProxyDelegate>();
+  auto proxy_delegate = std::make_unique<TestProxyDelegate>();
   proxy_delegate->set_trusted_spdy_proxy(
       net::ProxyServer(net::ProxyServer::SCHEME_HTTPS,
                        HostPortPair(GURL(kDefaultUrl).host(), 443)));
@@ -5597,7 +5597,7 @@
     reads_.push_back(CreateMockRead(altsvc_frame_, 0));
     reads_.push_back(MockRead(ASYNC, 0, 1));
 
-    data_ = base::MakeUnique<SequencedSocketData>(reads_.data(), reads_.size(),
+    data_ = std::make_unique<SequencedSocketData>(reads_.data(), reads_.size(),
                                                   nullptr, 0);
     session_deps_.socket_factory->AddSocketDataProvider(data_.get());
   }
diff --git a/net/spdy/chromium/spdy_stream.cc b/net/spdy/chromium/spdy_stream.cc
index 358b0fa..40e696c 100644
--- a/net/spdy/chromium/spdy_stream.cc
+++ b/net/spdy/chromium/spdy_stream.cc
@@ -38,7 +38,7 @@
     int net_error,
     const SpdyString* description,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("stream_id", static_cast<int>(stream_id));
   dict->SetString("net_error", ErrorToShortString(net_error));
   dict->SetString("description", *description);
@@ -50,7 +50,7 @@
     int32_t delta,
     int32_t window_size,
     NetLogCaptureMode /* capture_mode */) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetInteger("stream_id", stream_id);
   dict->SetInteger("delta", delta);
   dict->SetInteger("window_size", window_size);
@@ -79,7 +79,7 @@
       return std::unique_ptr<SpdyBuffer>();
     }
     DCHECK_GT(stream_->stream_id(), 0u);
-    return base::MakeUnique<SpdyBuffer>(stream_->ProduceHeadersFrame());
+    return std::make_unique<SpdyBuffer>(stream_->ProduceHeadersFrame());
   }
   size_t EstimateMemoryUsage() const override { return 0; }
 
@@ -705,7 +705,7 @@
   pending_send_status_ = send_status;
   session_->EnqueueStreamWrite(
       GetWeakPtr(), SpdyFrameType::HEADERS,
-      base::MakeUnique<HeadersBufferProducer>(GetWeakPtr()));
+      std::make_unique<HeadersBufferProducer>(GetWeakPtr()));
   return ERR_IO_PENDING;
 }
 
@@ -872,7 +872,7 @@
 
   session_->EnqueueStreamWrite(
       GetWeakPtr(), SpdyFrameType::DATA,
-      base::MakeUnique<SimpleBufferProducer>(std::move(data_buffer)));
+      std::make_unique<SimpleBufferProducer>(std::move(data_buffer)));
 }
 
 void SpdyStream::SaveResponseHeaders(const SpdyHeaderBlock& response_headers) {
diff --git a/net/spdy/chromium/spdy_test_util_common.cc b/net/spdy/chromium/spdy_test_util_common.cc
index 11ac911..0f376f1 100644
--- a/net/spdy/chromium/spdy_test_util_common.cc
+++ b/net/spdy/chromium/spdy_test_util_common.cc
@@ -70,7 +70,7 @@
 // |num_chunks| is the number of chunks to create.
 std::unique_ptr<MockWrite[]> ChopWriteFrame(const SpdySerializedFrame& frame,
                                             int num_chunks) {
-  auto chunks = base::MakeUnique<MockWrite[]>(num_chunks);
+  auto chunks = std::make_unique<MockWrite[]>(num_chunks);
   int chunk_size = frame.size() / num_chunks;
   for (int index = 0; index < num_chunks; index++) {
     const char* ptr = frame.data() + (index * chunk_size);
@@ -168,7 +168,7 @@
   for (const auto* frame : frames) {
     total_size += frame->size();
   }
-  auto data = base::MakeUnique<char[]>(total_size);
+  auto data = std::make_unique<char[]>(total_size);
   char* ptr = data.get();
   for (const auto* frame : frames) {
     memcpy(ptr, frame->data(), frame->size());
@@ -322,7 +322,7 @@
 
 std::unique_ptr<crypto::ECSignatureCreator>
 MockECSignatureCreatorFactory::Create(crypto::ECPrivateKey* key) {
-  return base::MakeUnique<MockECSignatureCreator>(key);
+  return std::make_unique<MockECSignatureCreator>(key);
 }
 
 SpdySessionDependencies::SpdySessionDependencies()
@@ -381,7 +381,7 @@
       CreateSessionContext(session_deps);
   session_context.client_socket_factory = factory;
   auto http_session =
-      base::MakeUnique<HttpNetworkSession>(session_params, session_context);
+      std::make_unique<HttpNetworkSession>(session_params, session_context);
   SpdySessionPoolPeer pool_peer(http_session->spdy_session_pool());
   pool_peer.SetEnableSendingInitialData(false);
   return http_session;
@@ -459,7 +459,7 @@
       HttpAuthHandlerFactory::CreateDefault(host_resolver()));
   storage_.set_http_server_properties(
       std::unique_ptr<HttpServerProperties>(new HttpServerPropertiesImpl()));
-  storage_.set_job_factory(base::MakeUnique<URLRequestJobFactoryImpl>());
+  storage_.set_job_factory(std::make_unique<URLRequestJobFactoryImpl>());
   HttpNetworkSession::Params session_params;
   session_params.enable_spdy_ping_based_connection_checking = false;
 
@@ -475,11 +475,11 @@
   session_context.http_auth_handler_factory = http_auth_handler_factory();
   session_context.http_server_properties = http_server_properties();
   storage_.set_http_network_session(
-      base::MakeUnique<HttpNetworkSession>(session_params, session_context));
+      std::make_unique<HttpNetworkSession>(session_params, session_context));
   SpdySessionPoolPeer pool_peer(
       storage_.http_network_session()->spdy_session_pool());
   pool_peer.SetEnableSendingInitialData(false);
-  storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>(
+  storage_.set_http_transaction_factory(std::make_unique<HttpCache>(
       storage_.http_network_session(), HttpCache::DefaultBackend::InMemory(0),
       false));
 }
@@ -510,7 +510,7 @@
           key.host_port_pair(), false, OnHostResolutionCallback(),
           TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DEFAULT));
 
-  auto connection = base::MakeUnique<ClientSocketHandle>();
+  auto connection = std::make_unique<ClientSocketHandle>();
   TestCompletionCallback callback;
 
   int rv = ERR_UNEXPECTED;
@@ -627,8 +627,8 @@
     Error expected_status) {
   EXPECT_NE(expected_status, ERR_IO_PENDING);
   EXPECT_FALSE(HasSpdySession(pool, key));
-  auto handle = base::MakeUnique<ClientSocketHandle>();
-  handle->SetSocket(base::MakeUnique<FakeSpdySessionClientSocket>(
+  auto handle = std::make_unique<ClientSocketHandle>();
+  handle->SetSocket(std::make_unique<FakeSpdySessionClientSocket>(
       expected_status == OK ? ERR_IO_PENDING : expected_status));
   base::WeakPtr<SpdySession> spdy_session =
       pool->CreateAvailableSessionFromSocket(key, std::move(handle),
diff --git a/net/spdy/chromium/spdy_write_queue_unittest.cc b/net/spdy/chromium/spdy_write_queue_unittest.cc
index f301e328..5c0af6c 100644
--- a/net/spdy/chromium/spdy_write_queue_unittest.cc
+++ b/net/spdy/chromium/spdy_write_queue_unittest.cc
@@ -21,8 +21,6 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
-using base::MakeUnique;
-
 namespace net {
 
 namespace {
@@ -35,11 +33,12 @@
 // Makes a SpdyFrameProducer producing a frame with the data in the
 // given string.
 std::unique_ptr<SpdyBufferProducer> StringToProducer(const SpdyString& s) {
-  auto data = MakeUnique<char[]>(s.size());
+  auto data = std::make_unique<char[]>(s.size());
   std::memcpy(data.get(), s.data(), s.size());
-  auto frame = MakeUnique<SpdySerializedFrame>(data.release(), s.size(), true);
-  auto buffer = MakeUnique<SpdyBuffer>(std::move(frame));
-  return MakeUnique<SimpleBufferProducer>(std::move(buffer));
+  auto frame =
+      std::make_unique<SpdySerializedFrame>(data.release(), s.size(), true);
+  auto buffer = std::make_unique<SpdyBuffer>(std::move(frame));
+  return std::make_unique<SimpleBufferProducer>(std::move(buffer));
 }
 
 // Makes a SpdyBufferProducer producing a frame with the data in the
@@ -53,7 +52,7 @@
 class RequeingBufferProducer : public SpdyBufferProducer {
  public:
   explicit RequeingBufferProducer(SpdyWriteQueue* queue) {
-    buffer_ = MakeUnique<SpdyBuffer>(kOriginal, arraysize(kOriginal));
+    buffer_ = std::make_unique<SpdyBuffer>(kOriginal, arraysize(kOriginal));
     buffer_->AddConsumeCallback(
         base::Bind(RequeingBufferProducer::ConsumeCallback, queue));
   }
@@ -70,8 +69,9 @@
   static void ConsumeCallback(SpdyWriteQueue* queue,
                               size_t size,
                               SpdyBuffer::ConsumeSource source) {
-    auto buffer = MakeUnique<SpdyBuffer>(kRequeued, arraysize(kRequeued));
-    auto buffer_producer = MakeUnique<SimpleBufferProducer>(std::move(buffer));
+    auto buffer = std::make_unique<SpdyBuffer>(kRequeued, arraysize(kRequeued));
+    auto buffer_producer =
+        std::make_unique<SimpleBufferProducer>(std::move(buffer));
 
     queue->Enqueue(MEDIUM, SpdyFrameType::RST_STREAM,
                    std::move(buffer_producer), base::WeakPtr<SpdyStream>());
@@ -100,9 +100,9 @@
 // -- be careful to not call any functions that expect the session to
 // be there.
 std::unique_ptr<SpdyStream> MakeTestStream(RequestPriority priority) {
-  return MakeUnique<SpdyStream>(SPDY_BIDIRECTIONAL_STREAM,
-                                base::WeakPtr<SpdySession>(), GURL(), priority,
-                                0, 0, NetLogWithSource());
+  return std::make_unique<SpdyStream>(SPDY_BIDIRECTIONAL_STREAM,
+                                      base::WeakPtr<SpdySession>(), GURL(),
+                                      priority, 0, 0, NetLogWithSource());
 }
 
 // Add some frame producers of different priority. The producers
@@ -290,7 +290,7 @@
 TEST_F(SpdyWriteQueueTest, RequeingProducerWithoutReentrance) {
   SpdyWriteQueue queue;
   queue.Enqueue(DEFAULT_PRIORITY, SpdyFrameType::HEADERS,
-                MakeUnique<RequeingBufferProducer>(&queue),
+                std::make_unique<RequeingBufferProducer>(&queue),
                 base::WeakPtr<SpdyStream>());
   {
     SpdyFrameType frame_type;
@@ -317,7 +317,7 @@
 TEST_F(SpdyWriteQueueTest, ReentranceOnClear) {
   SpdyWriteQueue queue;
   queue.Enqueue(DEFAULT_PRIORITY, SpdyFrameType::HEADERS,
-                MakeUnique<RequeingBufferProducer>(&queue),
+                std::make_unique<RequeingBufferProducer>(&queue),
                 base::WeakPtr<SpdyStream>());
 
   queue.Clear();
@@ -338,7 +338,7 @@
 
   SpdyWriteQueue queue;
   queue.Enqueue(DEFAULT_PRIORITY, SpdyFrameType::HEADERS,
-                MakeUnique<RequeingBufferProducer>(&queue),
+                std::make_unique<RequeingBufferProducer>(&queue),
                 stream->GetWeakPtr());
 
   queue.RemovePendingWritesForStreamsAfter(1);
@@ -359,7 +359,7 @@
 
   SpdyWriteQueue queue;
   queue.Enqueue(DEFAULT_PRIORITY, SpdyFrameType::HEADERS,
-                MakeUnique<RequeingBufferProducer>(&queue),
+                std::make_unique<RequeingBufferProducer>(&queue),
                 stream->GetWeakPtr());
 
   queue.RemovePendingWritesForStream(stream->GetWeakPtr());
diff --git a/net/spdy/core/spdy_header_block.cc b/net/spdy/core/spdy_header_block.cc
index b99c313a..9fda908 100644
--- a/net/spdy/core/spdy_header_block.cc
+++ b/net/spdy/core/spdy_header_block.cc
@@ -331,8 +331,8 @@
 std::unique_ptr<base::Value> SpdyHeaderBlockNetLogCallback(
     const SpdyHeaderBlock* headers,
     NetLogCaptureMode capture_mode) {
-  auto dict = base::MakeUnique<base::DictionaryValue>();
-  auto headers_dict = base::MakeUnique<base::DictionaryValue>();
+  auto dict = std::make_unique<base::DictionaryValue>();
+  auto headers_dict = std::make_unique<base::DictionaryValue>();
   for (SpdyHeaderBlock::const_iterator it = headers->begin();
        it != headers->end(); ++it) {
     headers_dict->SetKey(
diff --git a/net/spdy/platform/impl/spdy_ptr_util_impl.h b/net/spdy/platform/impl/spdy_ptr_util_impl.h
index bcccbc24..30936f91 100644
--- a/net/spdy/platform/impl/spdy_ptr_util_impl.h
+++ b/net/spdy/platform/impl/spdy_ptr_util_impl.h
@@ -14,7 +14,7 @@
 
 template <typename T, typename... Args>
 std::unique_ptr<T> SpdyMakeUniqueImpl(Args&&... args) {
-  return base::MakeUnique<T>(std::forward<Args>(args)...);
+  return std::make_unique<T>(std::forward<Args>(args)...);
 }
 
 template <typename T>
diff --git a/net/ssl/client_cert_identity_test_util.cc b/net/ssl/client_cert_identity_test_util.cc
index 2a3873f..01d04cf 100644
--- a/net/ssl/client_cert_identity_test_util.cc
+++ b/net/ssl/client_cert_identity_test_util.cc
@@ -48,11 +48,11 @@
   if (!ssl_private_key)
     return nullptr;
 
-  return base::MakeUnique<FakeClientCertIdentity>(cert, ssl_private_key);
+  return std::make_unique<FakeClientCertIdentity>(cert, ssl_private_key);
 }
 
 std::unique_ptr<FakeClientCertIdentity> FakeClientCertIdentity::Copy() {
-  return base::MakeUnique<FakeClientCertIdentity>(certificate(), key_);
+  return std::make_unique<FakeClientCertIdentity>(certificate(), key_);
 }
 
 void FakeClientCertIdentity::AcquirePrivateKey(
@@ -74,7 +74,7 @@
     const CertificateList& certs) {
   ClientCertIdentityList result;
   for (const auto& cert : certs) {
-    result.push_back(base::MakeUnique<FakeClientCertIdentity>(cert, nullptr));
+    result.push_back(std::make_unique<FakeClientCertIdentity>(cert, nullptr));
   }
   return result;
 }
diff --git a/net/ssl/client_cert_identity_unittest.cc b/net/ssl/client_cert_identity_unittest.cc
index eff89ba..6a60cb4 100644
--- a/net/ssl/client_cert_identity_unittest.cc
+++ b/net/ssl/client_cert_identity_unittest.cc
@@ -28,7 +28,7 @@
       base::Time::UnixEpoch(), base::Time::UnixEpoch(), &der_cert));
   cert = X509Certificate::CreateFromBytes(der_cert.data(), der_cert.size());
   ASSERT_TRUE(cert);
-  certs.push_back(base::MakeUnique<FakeClientCertIdentity>(cert, nullptr));
+  certs.push_back(std::make_unique<FakeClientCertIdentity>(cert, nullptr));
 
   const base::Time now = base::Time::Now();
 
@@ -38,7 +38,7 @@
       &der_cert));
   cert = X509Certificate::CreateFromBytes(der_cert.data(), der_cert.size());
   ASSERT_TRUE(cert);
-  certs.push_back(base::MakeUnique<FakeClientCertIdentity>(cert, nullptr));
+  certs.push_back(std::make_unique<FakeClientCertIdentity>(cert, nullptr));
 
   ASSERT_TRUE(x509_util::CreateSelfSignedCert(
       key.get(), x509_util::DIGEST_SHA1, "CN=older cert", 3,
@@ -46,7 +46,7 @@
       &der_cert));
   cert = X509Certificate::CreateFromBytes(der_cert.data(), der_cert.size());
   ASSERT_TRUE(cert);
-  certs.push_back(base::MakeUnique<FakeClientCertIdentity>(cert, nullptr));
+  certs.push_back(std::make_unique<FakeClientCertIdentity>(cert, nullptr));
 
   ASSERT_TRUE(x509_util::CreateSelfSignedCert(
       key.get(), x509_util::DIGEST_SHA1, "CN=newer cert", 2,
@@ -54,7 +54,7 @@
       &der_cert));
   cert = X509Certificate::CreateFromBytes(der_cert.data(), der_cert.size());
   ASSERT_TRUE(cert);
-  certs.push_back(base::MakeUnique<FakeClientCertIdentity>(cert, nullptr));
+  certs.push_back(std::make_unique<FakeClientCertIdentity>(cert, nullptr));
 
   std::sort(certs.begin(), certs.end(), ClientCertIdentitySorter());
 
diff --git a/net/ssl/client_cert_store_mac.cc b/net/ssl/client_cert_store_mac.cc
index a1e3b75..bf2584c 100644
--- a/net/ssl/client_cert_store_mac.cc
+++ b/net/ssl/client_cert_store_mac.cc
@@ -308,10 +308,10 @@
         CFEqual(preferred_sec_identity, sec_identity.get())) {
       // Only one certificate should match.
       DCHECK(!preferred_identity.get());
-      preferred_identity = base::MakeUnique<ClientCertIdentityMac>(
+      preferred_identity = std::make_unique<ClientCertIdentityMac>(
           std::move(cert), std::move(sec_identity));
     } else {
-      regular_identities.push_back(base::MakeUnique<ClientCertIdentityMac>(
+      regular_identities.push_back(std::make_unique<ClientCertIdentityMac>(
           std::move(cert), std::move(sec_identity)));
     }
   }
diff --git a/net/ssl/client_cert_store_mac_unittest.cc b/net/ssl/client_cert_store_mac_unittest.cc
index 1243e1e1..78d24ec 100644
--- a/net/ssl/client_cert_store_mac_unittest.cc
+++ b/net/ssl/client_cert_store_mac_unittest.cc
@@ -37,7 +37,7 @@
       const SSLCertRequestInfo& request,
       ClientCertIdentityList* selected_certs) {
     std::unique_ptr<ClientCertIdentity> preferred_identity(
-        base::MakeUnique<FakeClientCertIdentity>(preferred_cert, nullptr));
+        std::make_unique<FakeClientCertIdentity>(preferred_cert, nullptr));
 
     return store_.SelectClientCertsGivenPreferredForTesting(
         std::move(preferred_identity),
diff --git a/net/ssl/client_cert_store_nss.cc b/net/ssl/client_cert_store_nss.cc
index b2e804d5..35888c8 100644
--- a/net/ssl/client_cert_store_nss.cc
+++ b/net/ssl/client_cert_store_nss.cc
@@ -193,7 +193,7 @@
       DVLOG(2) << "x509_util::CreateX509CertificateFromCERTCertificate failed";
       continue;
     }
-    identities->push_back(base::MakeUnique<ClientCertIdentityNSS>(
+    identities->push_back(std::make_unique<ClientCertIdentityNSS>(
         cert, x509_util::DupCERTCertificate(node->cert), password_delegate));
   }
   CERT_DestroyCertList(found_certs);
diff --git a/net/ssl/client_cert_store_win.cc b/net/ssl/client_cert_store_win.cc
index e4a59de..019a411 100644
--- a/net/ssl/client_cert_store_win.cc
+++ b/net/ssl/client_cert_store_win.cc
@@ -198,7 +198,7 @@
         x509_util::CreateX509CertificateFromCertContexts(cert_context2,
                                                          intermediates);
     if (cert) {
-      selected_identities.push_back(base::MakeUnique<ClientCertIdentityWin>(
+      selected_identities.push_back(std::make_unique<ClientCertIdentityWin>(
           std::move(cert),
           cert_context2,     // Takes ownership of |cert_context2|.
           current_thread));  // The key must be acquired on the same thread, as
diff --git a/net/ssl/default_channel_id_store_unittest.cc b/net/ssl/default_channel_id_store_unittest.cc
index 986161b..be9553a 100644
--- a/net/ssl/default_channel_id_store_unittest.cc
+++ b/net/ssl/default_channel_id_store_unittest.cc
@@ -103,7 +103,7 @@
 
   for (it = channel_ids_.begin(); it != channel_ids_.end(); ++it) {
     channel_ids->push_back(
-        base::MakeUnique<DefaultChannelIDStore::ChannelID>(it->second));
+        std::make_unique<DefaultChannelIDStore::ChannelID>(it->second));
   }
 
   base::ThreadTaskRunnerHandle::Get()->PostTask(
@@ -148,12 +148,12 @@
   DefaultChannelIDStore store(persistent_store.get());
   // Load has not occurred yet.
   EXPECT_EQ(0, store.GetChannelIDCount());
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "verisign.com", base::Time(), crypto::ECPrivateKey::Create()));
   // Wait for load & queued set task.
   base::RunLoop().RunUntilIdle();
   EXPECT_EQ(2, store.GetChannelIDCount());
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "twitter.com", base::Time(), crypto::ECPrivateKey::Create()));
   // Set should be synchronous now that load is done.
   EXPECT_EQ(3, store.GetChannelIDCount());
@@ -188,10 +188,10 @@
 
   std::unique_ptr<crypto::ECPrivateKey> key;
   EXPECT_EQ(0, store.GetChannelIDCount());
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "verisign.com", base::Time::FromInternalValue(123),
       crypto::ECPrivateKey::Create()));
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "verisign.com", base::Time::FromInternalValue(456),
       expected_key->Copy()));
 
@@ -234,11 +234,11 @@
   scoped_refptr<MockPersistentStore> persistent_store(new MockPersistentStore);
   DefaultChannelIDStore store(persistent_store.get());
 
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "verisign.com", base::Time(), crypto::ECPrivateKey::Create()));
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "google.com", base::Time(), crypto::ECPrivateKey::Create()));
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "harvard.com", base::Time(), crypto::ECPrivateKey::Create()));
   // Wait for load & queued set tasks.
   base::RunLoop().RunUntilIdle();
@@ -254,11 +254,11 @@
   scoped_refptr<MockPersistentStore> persistent_store(new MockPersistentStore);
   DefaultChannelIDStore store(persistent_store.get());
 
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "verisign.com", base::Time(), crypto::ECPrivateKey::Create()));
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "google.com", base::Time(), crypto::ECPrivateKey::Create()));
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "harvard.com", base::Time(), crypto::ECPrivateKey::Create()));
   // Wait for load & queued set tasks.
   base::RunLoop().RunUntilIdle();
@@ -318,12 +318,12 @@
 
   std::unique_ptr<crypto::ECPrivateKey> key;
   EXPECT_EQ(0, store.GetChannelIDCount());
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "verisign.com", base::Time(), crypto::ECPrivateKey::Create()));
   // Wait for load & queued set task.
   base::RunLoop().RunUntilIdle();
 
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "google.com", base::Time(), crypto::ECPrivateKey::Create()));
 
   EXPECT_EQ(2, store.GetChannelIDCount());
@@ -397,13 +397,13 @@
   DefaultChannelIDStore store(persistent_store.get());
 
   EXPECT_EQ(0, store.GetChannelIDCount());
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "verisign.com", base::Time(), crypto::ECPrivateKey::Create()));
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "google.com", base::Time(), crypto::ECPrivateKey::Create()));
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "harvard.com", base::Time(), crypto::ECPrivateKey::Create()));
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "mit.com", base::Time(), crypto::ECPrivateKey::Create()));
   // Wait for load & queued set tasks.
   base::RunLoop().RunUntilIdle();
@@ -424,9 +424,9 @@
   std::unique_ptr<crypto::ECPrivateKey> copied_key(
       crypto::ECPrivateKey::Create());
 
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "preexisting.com", base::Time(), preexisting_key->Copy()));
-  store.SetChannelID(base::MakeUnique<ChannelIDStore::ChannelID>(
+  store.SetChannelID(std::make_unique<ChannelIDStore::ChannelID>(
       "both.com", base::Time(), crypto::ECPrivateKey::Create()));
   // Wait for load & queued set tasks.
   base::RunLoop().RunUntilIdle();
diff --git a/net/ssl/ssl_client_session_cache_unittest.cc b/net/ssl/ssl_client_session_cache_unittest.cc
index 07ae81b..dd10721 100644
--- a/net/ssl/ssl_client_session_cache_unittest.cc
+++ b/net/ssl/ssl_client_session_cache_unittest.cc
@@ -21,7 +21,7 @@
 
 std::unique_ptr<base::SimpleTestClock> MakeTestClock() {
   std::unique_ptr<base::SimpleTestClock> clock =
-      base::MakeUnique<base::SimpleTestClock>();
+      std::make_unique<base::SimpleTestClock>();
   // SimpleTestClock starts at the null base::Time which converts to and from
   // time_t confusingly.
   clock->SetNow(base::Time::FromTimeT(1000000000));
diff --git a/net/ssl/ssl_platform_key_android.cc b/net/ssl/ssl_platform_key_android.cc
index 97ea9b5..894cb8f3 100644
--- a/net/ssl/ssl_platform_key_android.cc
+++ b/net/ssl/ssl_platform_key_android.cc
@@ -213,7 +213,7 @@
   }
 
   return make_scoped_refptr(new ThreadedSSLPrivateKey(
-      base::MakeUnique<SSLPlatformKeyAndroid>(type, key, max_length, sys_rsa),
+      std::make_unique<SSLPlatformKeyAndroid>(type, key, max_length, sys_rsa),
       GetSSLPlatformKeyTaskRunner()));
 }
 
diff --git a/net/ssl/ssl_platform_key_mac.cc b/net/ssl/ssl_platform_key_mac.cc
index bcba0bd..4476cc4 100644
--- a/net/ssl/ssl_platform_key_mac.cc
+++ b/net/ssl/ssl_platform_key_mac.cc
@@ -357,7 +357,7 @@
 
   if (__builtin_available(macOS 10.12, *)) {
     return make_scoped_refptr(
-        new ThreadedSSLPrivateKey(base::MakeUnique<SSLPlatformKeySecKey>(
+        new ThreadedSSLPrivateKey(std::make_unique<SSLPlatformKeySecKey>(
                                       key_type, max_length, private_key),
                                   GetSSLPlatformKeyTaskRunner()));
   }
@@ -370,7 +370,7 @@
   }
 
   return make_scoped_refptr(new ThreadedSSLPrivateKey(
-      base::MakeUnique<SSLPlatformKeyCSSM>(key_type, max_length, private_key,
+      std::make_unique<SSLPlatformKeyCSSM>(key_type, max_length, private_key,
                                            cssm_key),
       GetSSLPlatformKeyTaskRunner()));
 }
diff --git a/net/ssl/ssl_platform_key_nss.cc b/net/ssl/ssl_platform_key_nss.cc
index 194c390b..062d4a2 100644
--- a/net/ssl/ssl_platform_key_nss.cc
+++ b/net/ssl/ssl_platform_key_nss.cc
@@ -169,7 +169,7 @@
     return nullptr;
 
   return make_scoped_refptr(new ThreadedSSLPrivateKey(
-      base::MakeUnique<SSLPlatformKeyNSS>(type, std::move(key)),
+      std::make_unique<SSLPlatformKeyNSS>(type, std::move(key)),
       GetSSLPlatformKeyTaskRunner()));
 }
 
diff --git a/net/ssl/ssl_platform_key_win.cc b/net/ssl/ssl_platform_key_win.cc
index 44ec97c..422956a 100644
--- a/net/ssl/ssl_platform_key_win.cc
+++ b/net/ssl/ssl_platform_key_win.cc
@@ -237,7 +237,7 @@
     HCRYPTPROV prov,
     DWORD key_spec) {
   return make_scoped_refptr(new ThreadedSSLPrivateKey(
-      base::MakeUnique<SSLPlatformKeyCAPI>(prov, key_spec),
+      std::make_unique<SSLPlatformKeyCAPI>(prov, key_spec),
       GetSSLPlatformKeyTaskRunner()));
 }
 
@@ -255,7 +255,7 @@
   }
 
   return make_scoped_refptr(new ThreadedSSLPrivateKey(
-      base::MakeUnique<SSLPlatformKeyCNG>(key, key_type, max_length),
+      std::make_unique<SSLPlatformKeyCNG>(key, key_type, max_length),
       GetSSLPlatformKeyTaskRunner()));
 }
 
diff --git a/net/ssl/test_ssl_private_key.cc b/net/ssl/test_ssl_private_key.cc
index 732e2ea0..38d9d30d 100644
--- a/net/ssl/test_ssl_private_key.cc
+++ b/net/ssl/test_ssl_private_key.cc
@@ -105,7 +105,7 @@
     return nullptr;
 
   return make_scoped_refptr(new ThreadedSSLPrivateKey(
-      base::MakeUnique<TestSSLPlatformKey>(std::move(key)),
+      std::make_unique<TestSSLPlatformKey>(std::move(key)),
       GetSSLPlatformKeyTaskRunner()));
 }
 
diff --git a/net/test/embedded_test_server/default_handlers.cc b/net/test/embedded_test_server/default_handlers.cc
index 34285f6..38a8c3c1 100644
--- a/net/test/embedded_test_server/default_handlers.cc
+++ b/net/test/embedded_test_server/default_handlers.cc
@@ -176,7 +176,7 @@
 // /echo-raw
 // Returns the query string as the raw response (no HTTP headers).
 std::unique_ptr<HttpResponse> HandleEchoRaw(const HttpRequest& request) {
-  return base::MakeUnique<RawHttpResponse>("", request.GetURL().query());
+  return std::make_unique<RawHttpResponse>("", request.GetURL().query());
 }
 
 // /set-cookie?COOKIES
@@ -618,7 +618,7 @@
 // /hung
 // Never returns a response.
 std::unique_ptr<HttpResponse> HandleHungResponse(const HttpRequest& request) {
-  return base::MakeUnique<HungHttpResponse>();
+  return std::make_unique<HungHttpResponse>();
 }
 
 // Return headers, then hangs.
@@ -639,7 +639,7 @@
 // Never returns a response.
 std::unique_ptr<HttpResponse> HandleHungAfterHeadersResponse(
     const HttpRequest& request) {
-  return base::MakeUnique<HungAfterHeadersHttpResponse>();
+  return std::make_unique<HungAfterHeadersHttpResponse>();
 }
 
 // /gzip-body?<body>
diff --git a/net/test/embedded_test_server/embedded_test_server.cc b/net/test/embedded_test_server/embedded_test_server.cc
index 8c7fd33..df705db8 100644
--- a/net/test/embedded_test_server/embedded_test_server.cc
+++ b/net/test/embedded_test_server/embedded_test_server.cc
@@ -392,7 +392,7 @@
     socket = DoSSLUpgrade(std::move(socket));
 
   std::unique_ptr<HttpConnection> http_connection_ptr =
-      base::MakeUnique<HttpConnection>(
+      std::make_unique<HttpConnection>(
           std::move(socket), base::Bind(&EmbeddedTestServer::HandleRequest,
                                         base::Unretained(this)));
   HttpConnection* http_connection = http_connection_ptr.get();
diff --git a/net/test/embedded_test_server/request_handler_util.cc b/net/test/embedded_test_server/request_handler_util.cc
index 8982efb..2d26e24 100644
--- a/net/test/embedded_test_server/request_handler_util.cc
+++ b/net/test/embedded_test_server/request_handler_util.cc
@@ -200,7 +200,7 @@
     if (!base::ReadFileToString(headers_path, &headers_contents))
       return nullptr;
 
-    return base::MakeUnique<RawHttpResponse>(headers_contents, file_contents);
+    return std::make_unique<RawHttpResponse>(headers_contents, file_contents);
   }
 
   std::unique_ptr<BasicHttpResponse> http_response(new BasicHttpResponse);
diff --git a/net/test/net_test_suite.cc b/net/test/net_test_suite.cc
index 1a89449..29e53db0 100644
--- a/net/test/net_test_suite.cc
+++ b/net/test/net_test_suite.cc
@@ -68,6 +68,6 @@
   host_resolver_proc_->AddRule("*", "127.0.0.1");
 
   scoped_task_environment_ =
-      base::MakeUnique<base::test::ScopedTaskEnvironment>(
+      std::make_unique<base::test::ScopedTaskEnvironment>(
           base::test::ScopedTaskEnvironment::MainThreadType::IO);
 }
diff --git a/net/test/spawned_test_server/base_test_server.cc b/net/test/spawned_test_server/base_test_server.cc
index 3c284ddc..79b1ba9 100644
--- a/net/test/spawned_test_server/base_test_server.cc
+++ b/net/test/spawned_test_server/base_test_server.cc
@@ -88,14 +88,14 @@
     BaseTestServer::SSLOptions::TLSIntoleranceType type) {
   switch (type) {
     case BaseTestServer::SSLOptions::TLS_INTOLERANCE_ALERT:
-      return base::MakeUnique<base::Value>("alert");
+      return std::make_unique<base::Value>("alert");
     case BaseTestServer::SSLOptions::TLS_INTOLERANCE_CLOSE:
-      return base::MakeUnique<base::Value>("close");
+      return std::make_unique<base::Value>("close");
     case BaseTestServer::SSLOptions::TLS_INTOLERANCE_RESET:
-      return base::MakeUnique<base::Value>("reset");
+      return std::make_unique<base::Value>("reset");
     default:
       NOTREACHED();
-      return base::MakeUnique<base::Value>("");
+      return std::make_unique<base::Value>("");
   }
 }
 
@@ -494,16 +494,16 @@
   arguments->SetString("data-dir", document_root_.value());
 
   if (VLOG_IS_ON(1) || log_to_console_)
-    arguments->Set("log-to-console", base::MakeUnique<base::Value>());
+    arguments->Set("log-to-console", std::make_unique<base::Value>());
 
   if (ws_basic_auth_) {
     DCHECK(type_ == TYPE_WS || type_ == TYPE_WSS);
-    arguments->Set("ws-basic-auth", base::MakeUnique<base::Value>());
+    arguments->Set("ws-basic-auth", std::make_unique<base::Value>());
   }
 
   if (no_anonymous_ftp_user_) {
     DCHECK_EQ(TYPE_FTP, type_);
-    arguments->Set("no-anonymous-ftp-user", base::MakeUnique<base::Value>());
+    arguments->Set("no-anonymous-ftp-user", std::make_unique<base::Value>());
   }
 
   if (UsingSSL(type_)) {
@@ -523,7 +523,7 @@
 
     // Check the client certificate related arguments.
     if (ssl_options_.request_client_certificate)
-      arguments->Set("ssl-client-auth", base::MakeUnique<base::Value>());
+      arguments->Set("ssl-client-auth", std::make_unique<base::Value>());
     std::unique_ptr<base::ListValue> ssl_client_certs(new base::ListValue());
 
     std::vector<base::FilePath>::const_iterator it;
@@ -550,11 +550,11 @@
   }
 
   if (type_ == TYPE_HTTPS) {
-    arguments->Set("https", base::MakeUnique<base::Value>());
+    arguments->Set("https", std::make_unique<base::Value>());
 
     if (ssl_options_.server_certificate ==
         SSLOptions::CERT_AUTO_AIA_INTERMEDIATE)
-      arguments->Set("aia-intermediate", base::MakeUnique<base::Value>());
+      arguments->Set("aia-intermediate", std::make_unique<base::Value>());
 
     std::string ocsp_arg = ssl_options_.GetOCSPArgument();
     if (!ocsp_arg.empty())
@@ -583,14 +583,14 @@
     if (bulk_cipher_values->GetSize())
       arguments->Set("ssl-bulk-cipher", std::move(bulk_cipher_values));
     if (ssl_options_.record_resume)
-      arguments->Set("https-record-resume", base::MakeUnique<base::Value>());
+      arguments->Set("https-record-resume", std::make_unique<base::Value>());
     if (ssl_options_.tls_intolerant != SSLOptions::TLS_INTOLERANT_NONE) {
       arguments->SetInteger("tls-intolerant", ssl_options_.tls_intolerant);
       arguments->Set("tls-intolerance-type", GetTLSIntoleranceType(
           ssl_options_.tls_intolerance_type));
     }
     if (ssl_options_.fallback_scsv_enabled)
-      arguments->Set("fallback-scsv", base::MakeUnique<base::Value>());
+      arguments->Set("fallback-scsv", std::make_unique<base::Value>());
     if (!ssl_options_.signed_cert_timestamps_tls_ext.empty()) {
       std::string b64_scts_tls_ext;
       base::Base64Encode(ssl_options_.signed_cert_timestamps_tls_ext,
@@ -598,10 +598,10 @@
       arguments->SetString("signed-cert-timestamps-tls-ext", b64_scts_tls_ext);
     }
     if (ssl_options_.staple_ocsp_response)
-      arguments->Set("staple-ocsp-response", base::MakeUnique<base::Value>());
+      arguments->Set("staple-ocsp-response", std::make_unique<base::Value>());
     if (ssl_options_.ocsp_server_unavailable) {
       arguments->Set("ocsp-server-unavailable",
-                     base::MakeUnique<base::Value>());
+                     std::make_unique<base::Value>());
     }
     if (!ssl_options_.alpn_protocols.empty()) {
       std::unique_ptr<base::ListValue> alpn_protocols(new base::ListValue());
@@ -618,13 +618,13 @@
       arguments->Set("npn-protocols", std::move(npn_protocols));
     }
     if (ssl_options_.alert_after_handshake)
-      arguments->Set("alert-after-handshake", base::MakeUnique<base::Value>());
+      arguments->Set("alert-after-handshake", std::make_unique<base::Value>());
 
     if (ssl_options_.disable_channel_id)
-      arguments->Set("disable-channel-id", base::MakeUnique<base::Value>());
+      arguments->Set("disable-channel-id", std::make_unique<base::Value>());
     if (ssl_options_.disable_extended_master_secret) {
       arguments->Set("disable-extended-master-secret",
-                     base::MakeUnique<base::Value>());
+                     std::make_unique<base::Value>());
     }
     if (!ssl_options_.supported_token_binding_params.empty()) {
       std::unique_ptr<base::ListValue> token_binding_params(
diff --git a/net/test/spawned_test_server/remote_test_server.cc b/net/test/spawned_test_server/remote_test_server.cc
index 9a52f3b..f000ff8 100644
--- a/net/test/spawned_test_server/remote_test_server.cc
+++ b/net/test/spawned_test_server/remote_test_server.cc
@@ -82,7 +82,7 @@
   if (!GenerateArguments(&arguments_dict))
     return false;
 
-  arguments_dict.Set("on-remote-server", base::MakeUnique<base::Value>());
+  arguments_dict.Set("on-remote-server", std::make_unique<base::Value>());
 
   // Append the 'server-type' argument which is used by spawner server to
   // pass right server type to Python test server.
diff --git a/net/test/url_request/url_request_hanging_read_job.cc b/net/test/url_request/url_request_hanging_read_job.cc
index 5e36dc1..2c947c8 100644
--- a/net/test/url_request/url_request_hanging_read_job.cc
+++ b/net/test/url_request/url_request_hanging_read_job.cc
@@ -97,9 +97,9 @@
   // Add |hostname| to URLRequestFilter for HTTP and HTTPS.
   URLRequestFilter* filter = URLRequestFilter::GetInstance();
   filter->AddHostnameInterceptor("http", kMockHostname,
-                                 base::MakeUnique<MockJobInterceptor>());
+                                 std::make_unique<MockJobInterceptor>());
   filter->AddHostnameInterceptor("https", kMockHostname,
-                                 base::MakeUnique<MockJobInterceptor>());
+                                 std::make_unique<MockJobInterceptor>());
 }
 
 // static
diff --git a/net/test/url_request/url_request_mock_data_job.cc b/net/test/url_request/url_request_mock_data_job.cc
index e984b070..f526a35a 100644
--- a/net/test/url_request/url_request_mock_data_job.cc
+++ b/net/test/url_request/url_request_mock_data_job.cc
@@ -177,9 +177,9 @@
   // Add |hostname| to URLRequestFilter for HTTP and HTTPS.
   URLRequestFilter* filter = URLRequestFilter::GetInstance();
   filter->AddHostnameInterceptor("http", hostname,
-                                 base::MakeUnique<MockJobInterceptor>());
+                                 std::make_unique<MockJobInterceptor>());
   filter->AddHostnameInterceptor("https", hostname,
-                                 base::MakeUnique<MockJobInterceptor>());
+                                 std::make_unique<MockJobInterceptor>());
 }
 
 // static
diff --git a/net/tools/cert_verify_tool/verify_using_path_builder.cc b/net/tools/cert_verify_tool/verify_using_path_builder.cc
index 9c3d55e..804f454 100644
--- a/net/tools/cert_verify_tool/verify_using_path_builder.cc
+++ b/net/tools/cert_verify_tool/verify_using_path_builder.cc
@@ -151,7 +151,7 @@
   //
   // TODO(akalin): Remove this once http://crbug.com/146421 is fixed.
   url_request_context_builder.set_proxy_config_service(
-      base::MakeUnique<net::ProxyConfigServiceFixed>(net::ProxyConfig()));
+      std::make_unique<net::ProxyConfigServiceFixed>(net::ProxyConfig()));
 #endif
   *context = url_request_context_builder.Build();
 
diff --git a/net/tools/get_server_time/get_server_time.cc b/net/tools/get_server_time/get_server_time.cc
index d45ea0c..121f2776 100644
--- a/net/tools/get_server_time/get_server_time.cc
+++ b/net/tools/get_server_time/get_server_time.cc
@@ -148,7 +148,7 @@
   //
   // TODO(akalin): Remove this once http://crbug.com/146421 is fixed.
   builder.set_proxy_config_service(
-      base::MakeUnique<net::ProxyConfigServiceFixed>(net::ProxyConfig()));
+      std::make_unique<net::ProxyConfigServiceFixed>(net::ProxyConfig()));
 #endif
   std::unique_ptr<net::URLRequestContext> context(builder.Build());
   context->set_net_log(net_log);
diff --git a/net/tools/transport_security_state_generator/huffman/huffman_builder.cc b/net/tools/transport_security_state_generator/huffman/huffman_builder.cc
index 6bf2cde..24aae11b 100644
--- a/net/tools/transport_security_state_generator/huffman/huffman_builder.cc
+++ b/net/tools/transport_security_state_generator/huffman/huffman_builder.cc
@@ -124,7 +124,7 @@
   nodes.reserve(counts_.size());
 
   for (const auto& item : counts_) {
-    nodes.push_back(base::MakeUnique<HuffmanNode>(item.first, item.second,
+    nodes.push_back(std::make_unique<HuffmanNode>(item.first, item.second,
                                                   nullptr, nullptr));
   }
 
@@ -137,7 +137,7 @@
       }
     }
 
-    nodes.push_back(base::MakeUnique<HuffmanNode>(i, 0, nullptr, nullptr));
+    nodes.push_back(std::make_unique<HuffmanNode>(i, 0, nullptr, nullptr));
   }
 
   std::stable_sort(nodes.begin(), nodes.end(), CompareNodes);
diff --git a/net/url_request/report_sender.cc b/net/url_request/report_sender.cc
index f9d5854..07da4a7 100644
--- a/net/url_request/report_sender.cc
+++ b/net/url_request/report_sender.cc
@@ -59,7 +59,7 @@
       report_uri, DEFAULT_PRIORITY, this, traffic_annotation_);
   url_request->SetUserData(
       &kUserDataKey,
-      base::MakeUnique<CallbackInfo>(success_callback, error_callback));
+      std::make_unique<CallbackInfo>(success_callback, error_callback));
 
   url_request->SetLoadFlags(
       LOAD_BYPASS_CACHE | LOAD_DISABLE_CACHE | LOAD_DO_NOT_SEND_AUTH_DATA |
diff --git a/net/url_request/url_fetcher_impl_unittest.cc b/net/url_request/url_fetcher_impl_unittest.cc
index 782edaf..4e55a21 100644
--- a/net/url_request/url_fetcher_impl_unittest.cc
+++ b/net/url_request/url_fetcher_impl_unittest.cc
@@ -191,7 +191,7 @@
     context_storage_.set_host_resolver(
         std::unique_ptr<HostResolver>(mock_resolver_));
     context_storage_.set_throttler_manager(
-        base::MakeUnique<URLRequestThrottlerManager>());
+        std::make_unique<URLRequestThrottlerManager>());
     Init();
   }
 
@@ -530,7 +530,7 @@
 // the expected response is received.
 TEST_F(URLFetcherTest, SequencedTaskTest) {
   auto sequenced_task_runner = base::CreateSequencedTaskRunnerWithTraits({});
-  auto delegate = base::MakeUnique<WaitingURLFetcherDelegate>();
+  auto delegate = std::make_unique<WaitingURLFetcherDelegate>();
   sequenced_task_runner->PostTask(
       FROM_HERE, base::Bind(&WaitingURLFetcherDelegate::CreateFetcher,
                             base::Unretained(delegate.get()),
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index d939129f..ae88efac 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -397,7 +397,7 @@
     context->set_http_user_agent_settings(shared_http_user_agent_settings_);
   } else {
     storage->set_http_user_agent_settings(
-        base::MakeUnique<StaticHttpUserAgentSettings>(accept_language_,
+        std::make_unique<StaticHttpUserAgentSettings>(accept_language_,
                                                       user_agent_));
   }
 
@@ -462,7 +462,7 @@
   }
 
   storage->set_transport_security_state(
-      base::MakeUnique<TransportSecurityState>());
+      std::make_unique<TransportSecurityState>());
   if (!transport_security_persister_path_.empty()) {
     // Use a low priority because saving this should not block anything
     // user-visible. Block shutdown to ensure it does get persisted to disk,
@@ -500,19 +500,19 @@
     storage->set_cert_transparency_verifier(std::move(ct_verifier_));
   } else {
     std::unique_ptr<MultiLogCTVerifier> ct_verifier =
-        base::MakeUnique<MultiLogCTVerifier>();
+        std::make_unique<MultiLogCTVerifier>();
     ct_verifier->AddLogs(ct::CreateLogVerifiersForKnownLogs());
     storage->set_cert_transparency_verifier(std::move(ct_verifier));
   }
   if (ct_policy_enforcer_) {
     storage->set_ct_policy_enforcer(std::move(ct_policy_enforcer_));
   } else {
-    storage->set_ct_policy_enforcer(base::MakeUnique<CTPolicyEnforcer>());
+    storage->set_ct_policy_enforcer(std::make_unique<CTPolicyEnforcer>());
   }
 
   if (throttling_enabled_) {
     storage->set_throttler_manager(
-        base::MakeUnique<URLRequestThrottlerManager>());
+        std::make_unique<URLRequestThrottlerManager>());
   }
 
   if (!proxy_service_) {
@@ -544,7 +544,7 @@
     network_session_context.proxy_delegate = shared_proxy_delegate_;
   }
 
-  storage->set_http_network_session(base::MakeUnique<HttpNetworkSession>(
+  storage->set_http_network_session(std::make_unique<HttpNetworkSession>(
       http_network_session_params_, network_session_context));
 
   std::unique_ptr<HttpTransactionFactory> http_transaction_factory;
@@ -554,7 +554,7 @@
             .Run(storage->http_network_session());
   } else {
     http_transaction_factory =
-        base::MakeUnique<HttpNetworkLayer>(storage->http_network_session());
+        std::make_unique<HttpNetworkLayer>(storage->http_network_session());
   }
 
   if (http_cache_enabled_) {
@@ -608,7 +608,7 @@
   if (file_enabled_) {
     job_factory->SetProtocolHandler(
         url::kFileScheme,
-        base::MakeUnique<FileProtocolHandler>(base::CreateTaskRunnerWithTraits(
+        std::make_unique<FileProtocolHandler>(base::CreateTaskRunnerWithTraits(
             {base::MayBlock(), base::TaskPriority::USER_BLOCKING,
              base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})));
   }
diff --git a/net/url_request/url_request_context_builder_mojo.cc b/net/url_request/url_request_context_builder_mojo.cc
index 43a4fc2..e968301b 100644
--- a/net/url_request/url_request_context_builder_mojo.cc
+++ b/net/url_request/url_request_context_builder_mojo.cc
@@ -35,7 +35,7 @@
   std::unique_ptr<net::DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher =
       dhcp_fetcher_factory_->Create(url_request_context);
   std::unique_ptr<net::ProxyScriptFetcher> proxy_script_fetcher =
-      base::MakeUnique<ProxyScriptFetcherImpl>(url_request_context);
+      std::make_unique<ProxyScriptFetcherImpl>(url_request_context);
   return CreateProxyServiceUsingMojoFactory(
       mojo_proxy_resolver_factory_, std::move(proxy_config_service),
       proxy_script_fetcher.release(), std::move(dhcp_proxy_script_fetcher),
diff --git a/net/url_request/url_request_context_builder_mojo_unittest.cc b/net/url_request/url_request_context_builder_mojo_unittest.cc
index f413db7..4f5e1a06 100644
--- a/net/url_request/url_request_context_builder_mojo_unittest.cc
+++ b/net/url_request/url_request_context_builder_mojo_unittest.cc
@@ -35,7 +35,7 @@
   if (request.relative_url != kPacPath)
     return nullptr;
   std::unique_ptr<test_server::BasicHttpResponse> response =
-      base::MakeUnique<test_server::BasicHttpResponse>();
+      std::make_unique<test_server::BasicHttpResponse>();
   response->set_content(base::StringPrintf(
       "function FindProxyForURL(url, host) { return 'PROXY %s;'; }",
       HostPortPair::FromURL(request.base_url).ToString().c_str()));
@@ -59,7 +59,7 @@
   EXPECT_TRUE(test_server_.Start());
   TestMojoProxyResolverFactory::GetInstance()->set_resolver_created(false);
 
-  builder_.set_proxy_config_service(base::MakeUnique<ProxyConfigServiceFixed>(
+  builder_.set_proxy_config_service(std::make_unique<ProxyConfigServiceFixed>(
       ProxyConfig::CreateFromCustomPacURL(test_server_.GetURL(kPacPath))));
   builder_.set_mojo_proxy_resolver_factory(
       TestMojoProxyResolverFactory::GetInstance());
@@ -85,7 +85,7 @@
   test_server_.SetConnectionListener(&connection_listener);
   EXPECT_TRUE(test_server_.Start());
 
-  builder_.set_proxy_config_service(base::MakeUnique<ProxyConfigServiceFixed>(
+  builder_.set_proxy_config_service(std::make_unique<ProxyConfigServiceFixed>(
       ProxyConfig::CreateFromCustomPacURL(test_server_.GetURL("/hung"))));
   builder_.set_mojo_proxy_resolver_factory(
       TestMojoProxyResolverFactory::GetInstance());
diff --git a/net/url_request/url_request_context_builder_unittest.cc b/net/url_request/url_request_context_builder_unittest.cc
index 69b94bb..182ab193 100644
--- a/net/url_request/url_request_context_builder_unittest.cc
+++ b/net/url_request/url_request_context_builder_unittest.cc
@@ -64,7 +64,7 @@
         base::FilePath(FILE_PATH_LITERAL("net/data/url_request_unittest")));
 #if defined(OS_LINUX) || defined(OS_ANDROID)
     builder_.set_proxy_config_service(
-        base::MakeUnique<ProxyConfigServiceFixed>(ProxyConfig::CreateDirect()));
+        std::make_unique<ProxyConfigServiceFixed>(ProxyConfig::CreateDirect()));
 #endif  // defined(OS_LINUX) || defined(OS_ANDROID)
   }
 
@@ -120,7 +120,7 @@
   const int kBasicReturnCode = OK;
   std::unique_ptr<HttpAuthHandler> handler;
   builder_.SetHttpAuthHandlerFactory(
-      base::MakeUnique<MockHttpAuthHandlerFactory>("ExtraScheme",
+      std::make_unique<MockHttpAuthHandlerFactory>("ExtraScheme",
                                                    kBasicReturnCode));
   std::unique_ptr<URLRequestContext> context(builder_.Build());
   SSLInfo null_ssl_info;
diff --git a/net/url_request/url_request_context_unittest.cc b/net/url_request/url_request_context_unittest.cc
index 147e350..f239c035 100644
--- a/net/url_request/url_request_context_unittest.cc
+++ b/net/url_request/url_request_context_unittest.cc
@@ -33,7 +33,7 @@
   URLRequestContextBuilder builder;
 #if defined(OS_LINUX) || defined(OS_ANDROID)
   builder.set_proxy_config_service(
-      base::MakeUnique<ProxyConfigServiceFixed>(ProxyConfig::CreateDirect()));
+      std::make_unique<ProxyConfigServiceFixed>(ProxyConfig::CreateDirect()));
 #endif  // defined(OS_LINUX) || defined(OS_ANDROID)
   std::unique_ptr<URLRequestContext> context(builder.Build());
   context->OnMemoryDump(dump_args, process_memory_dump.get());
diff --git a/net/url_request/url_request_data_job_fuzzer.cc b/net/url_request/url_request_data_job_fuzzer.cc
index 41ca4ff..ac1ce14 100644
--- a/net/url_request/url_request_data_job_fuzzer.cc
+++ b/net/url_request/url_request_data_job_fuzzer.cc
@@ -32,7 +32,7 @@
   URLRequestDataJobFuzzerHarness()
       : task_runner_(base::ThreadTaskRunnerHandle::Get()), context_(true) {
     job_factory_.SetProtocolHandler(
-        "data", base::MakeUnique<net::DataProtocolHandler>());
+        "data", std::make_unique<net::DataProtocolHandler>());
     context_.set_job_factory(&job_factory_);
     context_.Init();
   }
diff --git a/net/url_request/url_request_ftp_fuzzer.cc b/net/url_request/url_request_ftp_fuzzer.cc
index 06491527..ea76aae 100644
--- a/net/url_request/url_request_ftp_fuzzer.cc
+++ b/net/url_request/url_request_ftp_fuzzer.cc
@@ -40,7 +40,7 @@
 
   // FtpTransactionFactory:
   std::unique_ptr<net::FtpTransaction> CreateTransaction() override {
-    return base::MakeUnique<net::FtpNetworkTransaction>(host_resolver_,
+    return std::make_unique<net::FtpNetworkTransaction>(host_resolver_,
                                                         client_socket_factory_);
   }
 
@@ -70,7 +70,7 @@
   net::URLRequestJobFactoryImpl job_factory;
   job_factory.SetProtocolHandler(
       "ftp", net::FtpProtocolHandler::CreateForTesting(
-                 base::MakeUnique<FuzzedFtpTransactionFactory>(
+                 std::make_unique<FuzzedFtpTransactionFactory>(
                      &host_resolver, &fuzzed_socket_factory)));
   url_request_context.set_job_factory(&job_factory);
 
diff --git a/net/url_request/url_request_ftp_job.cc b/net/url_request/url_request_ftp_job.cc
index dcb914a8..8afd5d8 100644
--- a/net/url_request/url_request_ftp_job.cc
+++ b/net/url_request/url_request_ftp_job.cc
@@ -372,7 +372,7 @@
     if (ftp_transaction_ && auth_data_->state == AUTH_STATE_HAVE_AUTH)
       ftp_auth_cache_->Remove(origin, auth_data_->credentials);
   } else {
-    auth_data_ = base::MakeUnique<AuthData>();
+    auth_data_ = std::make_unique<AuthData>();
   }
   auth_data_->state = AUTH_STATE_NEED_AUTH;
 
diff --git a/net/url_request/url_request_ftp_job_unittest.cc b/net/url_request/url_request_ftp_job_unittest.cc
index 90c48f1b..5ced002 100644
--- a/net/url_request/url_request_ftp_job_unittest.cc
+++ b/net/url_request/url_request_ftp_job_unittest.cc
@@ -87,7 +87,7 @@
     set_network_delegate(network_delegate);
     std::unique_ptr<FtpProtocolHandler> ftp_protocol_handler(
         FtpProtocolHandler::CreateForTesting(
-            base::MakeUnique<MockFtpTransactionFactory>()));
+            std::make_unique<MockFtpTransactionFactory>()));
     auth_cache_ = ftp_protocol_handler->ftp_auth_cache_.get();
     std::unique_ptr<URLRequestJobFactoryImpl> job_factory =
         base::WrapUnique(new URLRequestJobFactoryImpl);
@@ -255,7 +255,7 @@
  public:
   URLRequestFtpJobTest()
       : request_context_(&socket_factory_,
-                         base::MakeUnique<ProxyService>(
+                         std::make_unique<ProxyService>(
                              base::WrapUnique(new SimpleProxyConfigService),
                              nullptr,
                              nullptr),
@@ -269,7 +269,7 @@
   void AddSocket(MockRead* reads, size_t reads_size,
                  MockWrite* writes, size_t writes_size) {
     std::unique_ptr<SequencedSocketData> socket_data(
-        base::MakeUnique<SequencedSocketData>(reads, reads_size, writes,
+        std::make_unique<SequencedSocketData>(reads, reads_size, writes,
                                               writes_size));
     socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
     socket_factory_.AddSocketDataProvider(socket_data.get());
diff --git a/net/url_request/url_request_http_job_unittest.cc b/net/url_request/url_request_http_job_unittest.cc
index c95fb33..34edc95 100644
--- a/net/url_request/url_request_http_job_unittest.cc
+++ b/net/url_request/url_request_http_job_unittest.cc
@@ -145,7 +145,7 @@
   std::unique_ptr<URLRequest> request =
       context_.CreateRequest(GURL("http://www.example.com"), DEFAULT_PRIORITY,
                              &delegate_, TRAFFIC_ANNOTATION_FOR_TESTS);
-  auto job = base::MakeUnique<TestURLRequestHttpJob>(request.get());
+  auto job = std::make_unique<TestURLRequestHttpJob>(request.get());
   job->set_use_null_source_stream(true);
   test_job_interceptor_->set_main_intercept_job(std::move(job));
   request->Start();
@@ -170,7 +170,7 @@
   std::unique_ptr<URLRequest> request =
       context_.CreateRequest(GURL("http://www.example.com"), DEFAULT_PRIORITY,
                              &delegate_, TRAFFIC_ANNOTATION_FOR_TESTS);
-  auto job = base::MakeUnique<TestURLRequestHttpJob>(request.get());
+  auto job = std::make_unique<TestURLRequestHttpJob>(request.get());
   test_job_interceptor_->set_main_intercept_job(std::move(job));
   request->Start();
 
@@ -197,7 +197,7 @@
   std::unique_ptr<URLRequest> request =
       context_.CreateRequest(GURL("http://www.example.com"), DEFAULT_PRIORITY,
                              &delegate_, TRAFFIC_ANNOTATION_FOR_TESTS);
-  auto job = base::MakeUnique<TestURLRequestHttpJob>(request.get());
+  auto job = std::make_unique<TestURLRequestHttpJob>(request.get());
   test_job_interceptor_->set_main_intercept_job(std::move(job));
   request->Start();
 
@@ -251,7 +251,7 @@
   }
 
   void EnableSdch() {
-    context_.SetSdchManager(base::MakeUnique<SdchManager>());
+    context_.SetSdchManager(std::make_unique<SdchManager>());
   }
 
   MockNetworkLayer network_layer_;
@@ -873,7 +873,7 @@
 // Make sure that SetPriority actually sets the URLRequestHttpJob's
 // priority, before start.  Other tests handle the after start case.
 TEST_F(URLRequestHttpJobTest, SetPriorityBasic) {
-  auto job = base::MakeUnique<TestURLRequestHttpJob>(req_.get());
+  auto job = std::make_unique<TestURLRequestHttpJob>(req_.get());
   EXPECT_EQ(DEFAULT_PRIORITY, job->priority());
 
   job->SetPriority(LOWEST);
@@ -887,7 +887,7 @@
 // transaction on start.
 TEST_F(URLRequestHttpJobTest, SetTransactionPriorityOnStart) {
   test_job_interceptor_->set_main_intercept_job(
-      base::MakeUnique<TestURLRequestHttpJob>(req_.get()));
+      std::make_unique<TestURLRequestHttpJob>(req_.get()));
   req_->SetPriority(LOW);
 
   EXPECT_FALSE(network_layer_.last_transaction());
@@ -902,7 +902,7 @@
 // its transaction.
 TEST_F(URLRequestHttpJobTest, SetTransactionPriority) {
   test_job_interceptor_->set_main_intercept_job(
-      base::MakeUnique<TestURLRequestHttpJob>(req_.get()));
+      std::make_unique<TestURLRequestHttpJob>(req_.get()));
   req_->SetPriority(LOW);
   req_->Start();
   ASSERT_TRUE(network_layer_.last_transaction());
@@ -917,7 +917,7 @@
   EnableSdch();
   req_->set_method("GET");  // Redundant with default.
   test_job_interceptor_->set_main_intercept_job(
-      base::MakeUnique<TestURLRequestHttpJob>(req_.get()));
+      std::make_unique<TestURLRequestHttpJob>(req_.get()));
   req_->Start();
   EXPECT_TRUE(TransactionAcceptsSdchEncoding());
 }
@@ -927,7 +927,7 @@
   EnableSdch();
   req_->set_method("POST");
   test_job_interceptor_->set_main_intercept_job(
-      base::MakeUnique<TestURLRequestHttpJob>(req_.get()));
+      std::make_unique<TestURLRequestHttpJob>(req_.get()));
   req_->Start();
   EXPECT_FALSE(TransactionAcceptsSdchEncoding());
 }
@@ -1008,7 +1008,7 @@
 class URLRequestHttpJobWithSdchSupportTest : public ::testing::Test {
  protected:
   URLRequestHttpJobWithSdchSupportTest() : context_(true) {
-    auto params = base::MakeUnique<HttpNetworkSession::Params>();
+    auto params = std::make_unique<HttpNetworkSession::Params>();
     context_.set_http_network_session_params(std::move(params));
     context_.set_client_socket_factory(&socket_factory_);
     context_.Init();
@@ -1110,7 +1110,7 @@
  protected:
   URLRequestHttpJobWithBrotliSupportTest()
       : context_(new TestURLRequestContext(true)) {
-    auto params = base::MakeUnique<HttpNetworkSession::Params>();
+    auto params = std::make_unique<HttpNetworkSession::Params>();
     context_->set_enable_brotli(true);
     context_->set_http_network_session_params(std::move(params));
     context_->set_client_socket_factory(&socket_factory_);
@@ -1367,7 +1367,7 @@
 
 TEST_F(URLRequestHttpJobWebSocketTest, CreateHelperPassedThrough) {
   std::unique_ptr<MockCreateHelper> create_helper =
-      base::MakeUnique<::testing::StrictMock<MockCreateHelper>>();
+      std::make_unique<::testing::StrictMock<MockCreateHelper>>();
   FakeWebSocketHandshakeStream* fake_handshake_stream(
       new FakeWebSocketHandshakeStream);
   // Ownership of fake_handshake_stream is transferred when CreateBasicStream()
diff --git a/net/url_request/url_request_job.cc b/net/url_request/url_request_job.cc
index 2b6f83a..d7feb59 100644
--- a/net/url_request/url_request_job.cc
+++ b/net/url_request/url_request_job.cc
@@ -689,7 +689,7 @@
 }
 
 std::unique_ptr<SourceStream> URLRequestJob::SetUpSourceStream() {
-  return base::MakeUnique<URLRequestJobSourceStream>(this);
+  return std::make_unique<URLRequestJobSourceStream>(this);
 }
 
 void URLRequestJob::DestroySourceStream() {
diff --git a/net/url_request/url_request_quic_perftest.cc b/net/url_request/url_request_quic_perftest.cc
index b913c52f..6d7e027 100644
--- a/net/url_request/url_request_quic_perftest.cc
+++ b/net/url_request/url_request_quic_perftest.cc
@@ -93,7 +93,7 @@
     base::trace_event::InitializeMemoryDumpManagerForInProcessTesting(
         /*is_coordinator_process=*/false);
     memory_dump_manager_->set_dumper_registrations_ignored_for_testing(false);
-    context_ = base::MakeUnique<TestURLRequestContext>(true);
+    context_ = std::make_unique<TestURLRequestContext>(true);
     memory_dump_manager_->set_dumper_registrations_ignored_for_testing(true);
     StartTcpServer();
     StartQuicServer();
@@ -160,7 +160,7 @@
   }
 
   void StartTcpServer() {
-    tcp_server_ = base::MakeUnique<EmbeddedTestServer>(
+    tcp_server_ = std::make_unique<EmbeddedTestServer>(
         net::EmbeddedTestServer::TYPE_HTTPS);
     tcp_server_->RegisterRequestHandler(base::Bind(&HandleRequest));
     ASSERT_TRUE(tcp_server_->Start()) << "HTTP/1.1 server fails to start";
diff --git a/net/url_request/url_request_simple_job_unittest.cc b/net/url_request/url_request_simple_job_unittest.cc
index 81e9588..137497d 100644
--- a/net/url_request/url_request_simple_job_unittest.cc
+++ b/net/url_request/url_request_simple_job_unittest.cc
@@ -112,7 +112,7 @@
  public:
   URLRequestSimpleJobTest() : context_(true) {
     job_factory_.SetProtocolHandler(
-        "data", base::MakeUnique<SimpleJobProtocolHandler>());
+        "data", std::make_unique<SimpleJobProtocolHandler>());
     context_.set_job_factory(&job_factory_);
     context_.Init();
 
diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc
index a3512f9..8e37d8f 100644
--- a/net/url_request/url_request_test_job.cc
+++ b/net/url_request/url_request_test_job.cc
@@ -138,7 +138,7 @@
 // static
 std::unique_ptr<URLRequestJobFactory::ProtocolHandler>
 URLRequestTestJob::CreateProtocolHandler() {
-  return base::MakeUnique<TestJobProtocolHandler>();
+  return std::make_unique<TestJobProtocolHandler>();
 }
 
 URLRequestTestJob::URLRequestTestJob(URLRequest* request,
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 110105c..218fea5 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -79,11 +79,11 @@
     context_storage_.set_cert_verifier(CertVerifier::CreateDefault());
   if (!transport_security_state()) {
     context_storage_.set_transport_security_state(
-        base::MakeUnique<TransportSecurityState>());
+        std::make_unique<TransportSecurityState>());
   }
   if (!cert_transparency_verifier()) {
     context_storage_.set_cert_transparency_verifier(
-        base::MakeUnique<MultiLogCTVerifier>());
+        std::make_unique<MultiLogCTVerifier>());
   }
   if (!ct_policy_enforcer()) {
     context_storage_.set_ct_policy_enforcer(
@@ -102,13 +102,13 @@
   // In-memory cookie store.
   if (!cookie_store()) {
     context_storage_.set_cookie_store(
-        base::MakeUnique<CookieMonster>(nullptr, nullptr));
+        std::make_unique<CookieMonster>(nullptr, nullptr));
   }
   // In-memory Channel ID service.  Must be created before the
   // HttpNetworkSession.
   if (!channel_id_service()) {
     context_storage_.set_channel_id_service(
-        base::MakeUnique<ChannelIDService>(new DefaultChannelIDStore(nullptr)));
+        std::make_unique<ChannelIDService>(new DefaultChannelIDStore(nullptr)));
   }
   if (http_transaction_factory()) {
     // Make sure we haven't been passed an object we're not going to use.
@@ -135,19 +135,19 @@
     session_context.net_log = net_log();
     session_context.channel_id_service = channel_id_service();
     context_storage_.set_http_network_session(
-        base::MakeUnique<HttpNetworkSession>(session_params, session_context));
-    context_storage_.set_http_transaction_factory(base::MakeUnique<HttpCache>(
+        std::make_unique<HttpNetworkSession>(session_params, session_context));
+    context_storage_.set_http_transaction_factory(std::make_unique<HttpCache>(
         context_storage_.http_network_session(),
         HttpCache::DefaultBackend::InMemory(0), true /* is_main_cache */));
   }
   if (!http_user_agent_settings()) {
     context_storage_.set_http_user_agent_settings(
-        base::MakeUnique<StaticHttpUserAgentSettings>("en-us,fr",
+        std::make_unique<StaticHttpUserAgentSettings>("en-us,fr",
                                                       std::string()));
   }
   if (!job_factory()) {
     context_storage_.set_job_factory(
-        base::MakeUnique<URLRequestJobFactoryImpl>());
+        std::make_unique<URLRequestJobFactoryImpl>());
   }
 }
 
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 3cde0b3..ed590d6d 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -813,7 +813,7 @@
         "data", base::WrapUnique(new DataProtocolHandler));
 #if !BUILDFLAG(DISABLE_FILE_SUPPORT)
     job_factory_impl_->SetProtocolHandler(
-        "file", base::MakeUnique<FileProtocolHandler>(
+        "file", std::make_unique<FileProtocolHandler>(
                     base::ThreadTaskRunnerHandle::Get()));
 #endif
   }
@@ -6093,7 +6093,7 @@
     PathService::Get(base::DIR_SOURCE_ROOT, &path);
     path = path.Append(kTestFilePath);
     path = path.Append(FILE_PATH_LITERAL("with-headers.html"));
-    element_readers.push_back(base::MakeUnique<UploadFileElementReader>(
+    element_readers.push_back(std::make_unique<UploadFileElementReader>(
         base::ThreadTaskRunnerHandle::Get().get(), path, 0,
         std::numeric_limits<uint64_t>::max(), base::Time()));
     r->set_upload(base::WrapUnique<UploadDataStream>(
@@ -6134,7 +6134,7 @@
 
     std::vector<std::unique_ptr<UploadElementReader>> element_readers;
 
-    element_readers.push_back(base::MakeUnique<UploadFileElementReader>(
+    element_readers.push_back(std::make_unique<UploadFileElementReader>(
         base::ThreadTaskRunnerHandle::Get().get(),
         base::FilePath(FILE_PATH_LITERAL(
             "c:\\path\\to\\non\\existant\\file.randomness.12345")),
@@ -10243,7 +10243,7 @@
 
   void SetUp() override {
     context_.SetCTPolicyEnforcer(
-        base::MakeUnique<AllowAnyCertCTPolicyEnforcer>());
+        std::make_unique<AllowAnyCertCTPolicyEnforcer>());
     SetupContext();
     context_.Init();
 
diff --git a/net/url_request/view_cache_helper_unittest.cc b/net/url_request/view_cache_helper_unittest.cc
index 2946b18b..1da2823 100644
--- a/net/url_request/view_cache_helper_unittest.cc
+++ b/net/url_request/view_cache_helper_unittest.cc
@@ -36,7 +36,7 @@
 };
 
 TestURLRequestContext::TestURLRequestContext()
-    : cache_(base::MakeUnique<MockNetworkLayer>(),
+    : cache_(std::make_unique<MockNetworkLayer>(),
              HttpCache::DefaultBackend::InMemory(0),
              false /* is_main_cache */) {
   set_http_transaction_factory(&cache_);
diff --git a/net/websockets/websocket_channel_test.cc b/net/websockets/websocket_channel_test.cc
index 6c64eaf..a6d7def 100644
--- a/net/websockets/websocket_channel_test.cc
+++ b/net/websockets/websocket_channel_test.cc
@@ -485,7 +485,7 @@
                          int error,
                          const InitFrame (&frames)[N]) {
     responses_.push_back(
-        base::MakeUnique<Response>(async, error, CreateFrameVector(frames)));
+        std::make_unique<Response>(async, error, CreateFrameVector(frames)));
   }
 
   // An alternate version of PrepareReadFrames for when we need to construct
@@ -495,12 +495,12 @@
       int error,
       std::vector<std::unique_ptr<WebSocketFrame>> frames) {
     responses_.push_back(
-        base::MakeUnique<Response>(async, error, std::move(frames)));
+        std::make_unique<Response>(async, error, std::move(frames)));
   }
 
   // Prepares a fake error response (ie. there is no data).
   void PrepareReadFramesError(IsSync async, int error) {
-    responses_.push_back(base::MakeUnique<Response>(
+    responses_.push_back(std::make_unique<Response>(
         async, error, std::vector<std::unique_ptr<WebSocketFrame>>()));
   }
 
@@ -947,7 +947,7 @@
 
 std::unique_ptr<WebSocketEventInterface>
 WebSocketChannelDeletingTest::CreateEventInterface() {
-  return base::MakeUnique<ChannelDeletingFakeWebSocketEventInterface>(this);
+  return std::make_unique<ChannelDeletingFakeWebSocketEventInterface>(this);
 }
 
 // Base class for tests which verify that EventInterface methods are called
@@ -1215,7 +1215,7 @@
   scoped_refptr<HttpResponseHeaders> response_headers(
       new HttpResponseHeaders(""));
   channel_->OnFinishOpeningHandshake(
-      base::MakeUnique<WebSocketHandshakeResponseInfo>(
+      std::make_unique<WebSocketHandshakeResponseInfo>(
           GURL("http://www.example.com/"), 200, "OK", response_headers,
           base::Time()));
   base::RunLoop().RunUntilIdle();
@@ -1386,7 +1386,7 @@
   CreateChannelAndConnect();
 
   connect_data_.argument_saver.connect_delegate->OnSuccess(
-      base::MakeUnique<FakeWebSocketStream>("Bob", ""));
+      std::make_unique<FakeWebSocketStream>("Bob", ""));
 }
 
 TEST_F(WebSocketChannelEventInterfaceTest, ExtensionsPassed) {
@@ -1397,7 +1397,7 @@
   CreateChannelAndConnect();
 
   connect_data_.argument_saver.connect_delegate->OnSuccess(
-      base::MakeUnique<FakeWebSocketStream>("", "extension1, extension2"));
+      std::make_unique<FakeWebSocketStream>("", "extension1, extension2"));
 }
 
 // The first frames from the server can arrive together with the handshake, in
diff --git a/net/websockets/websocket_deflate_predictor_impl_test.cc b/net/websockets/websocket_deflate_predictor_impl_test.cc
index 2d1ce00..6ad6ec7 100644
--- a/net/websockets/websocket_deflate_predictor_impl_test.cc
+++ b/net/websockets/websocket_deflate_predictor_impl_test.cc
@@ -20,7 +20,7 @@
   WebSocketDeflatePredictorImpl predictor;
   std::vector<std::unique_ptr<WebSocketFrame>> frames;
   frames.push_back(
-      base::MakeUnique<WebSocketFrame>(WebSocketFrameHeader::kOpCodeText));
+      std::make_unique<WebSocketFrame>(WebSocketFrameHeader::kOpCodeText));
   Result result = predictor.Predict(frames, 0);
 
   EXPECT_EQ(WebSocketDeflatePredictor::DEFLATE, result);
diff --git a/net/websockets/websocket_deflate_stream_fuzzer.cc b/net/websockets/websocket_deflate_stream_fuzzer.cc
index 605b434..72cfbc7 100644
--- a/net/websockets/websocket_deflate_stream_fuzzer.cc
+++ b/net/websockets/websocket_deflate_stream_fuzzer.cc
@@ -72,7 +72,7 @@
         fuzzed_data_provider_->ConsumeUint32InRange(
             WebSocketFrameHeader::kOpCodeContinuation,
             WebSocketFrameHeader::kOpCodeControlUnused);
-    auto frame = base::MakeUnique<WebSocketFrame>(opcode);
+    auto frame = std::make_unique<WebSocketFrame>(opcode);
     // Bad news: ConsumeBool actually consumes a whole byte per call, so do
     // something hacky to conserve precious bits.
     uint8_t flags = fuzzed_data_provider_->ConsumeUint8();
@@ -115,8 +115,8 @@
   WebSocketDeflateParameters parameters;
   DCHECK(parameters.Initialize(params, &failure_message)) << failure_message;
   WebSocketDeflateStream deflate_stream(
-      base::MakeUnique<WebSocketFuzzedStream>(&fuzzed_data_provider),
-      parameters, base::MakeUnique<WebSocketDeflatePredictorImpl>());
+      std::make_unique<WebSocketFuzzedStream>(&fuzzed_data_provider),
+      parameters, std::make_unique<WebSocketDeflatePredictorImpl>());
   std::vector<std::unique_ptr<net::WebSocketFrame>> frames;
   deflate_stream.ReadFrames(&frames, CompletionCallback());
 }
diff --git a/net/websockets/websocket_handshake_stream_create_helper.cc b/net/websockets/websocket_handshake_stream_create_helper.cc
index be821f5..eff9b2f 100644
--- a/net/websockets/websocket_handshake_stream_create_helper.cc
+++ b/net/websockets/websocket_handshake_stream_create_helper.cc
@@ -36,7 +36,7 @@
   // method.
   std::vector<std::string> extensions(
       1, "permessage-deflate; client_max_window_bits");
-  auto stream = base::MakeUnique<WebSocketBasicHandshakeStream>(
+  auto stream = std::make_unique<WebSocketBasicHandshakeStream>(
       std::move(connection), connect_delegate_, using_proxy,
       requested_subprotocols_, extensions, request_);
   OnBasicStreamCreated(stream.get());
diff --git a/net/websockets/websocket_stream.cc b/net/websockets/websocket_stream.cc
index 9812bfaf7..e0ee0a0a 100644
--- a/net/websockets/websocket_stream.cc
+++ b/net/websockets/websocket_stream.cc
@@ -441,7 +441,7 @@
   DCHECK(connect_delegate);
   if (headers.get()) {
     connect_delegate->OnFinishOpeningHandshake(
-        base::MakeUnique<WebSocketHandshakeResponseInfo>(
+        std::make_unique<WebSocketHandshakeResponseInfo>(
             url, headers->response_code(), headers->GetStatusText(), headers,
             response_time));
   }
diff --git a/net/websockets/websocket_stream_cookie_test.cc b/net/websockets/websocket_stream_cookie_test.cc
index b013119..4784171 100644
--- a/net/websockets/websocket_stream_cookie_test.cc
+++ b/net/websockets/websocket_stream_cookie_test.cc
@@ -122,7 +122,7 @@
 
 TEST_P(WebSocketStreamClientUseCookieTest, ClientUseCookie) {
   // For wss tests.
-  ssl_data_.push_back(base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK));
+  ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>(ASYNC, OK));
 
   CookieStore* store =
       url_request_context_host_.GetURLRequestContext()->cookie_store();
@@ -157,7 +157,7 @@
 
 TEST_P(WebSocketStreamServerSetCookieTest, ServerSetCookie) {
   // For wss tests.
-  ssl_data_.push_back(base::MakeUnique<SSLSocketDataProvider>(ASYNC, OK));
+  ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>(ASYNC, OK));
 
   const GURL url(GetParam().url);
   const GURL cookie_url(GetParam().cookie_url);
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc
index 14a64d2..0cd60ba 100644
--- a/net/websockets/websocket_stream_test.cc
+++ b/net/websockets/websocket_stream_test.cc
@@ -1052,7 +1052,7 @@
 }
 
 TEST_F(WebSocketStreamCreateTest, SelfSignedCertificateFailure) {
-  ssl_data_.push_back(base::MakeUnique<SSLSocketDataProvider>(
+  ssl_data_.push_back(std::make_unique<SSLSocketDataProvider>(
       ASYNC, ERR_CERT_AUTHORITY_INVALID));
   ssl_data_[0]->cert =
       ImportCertFromFile(GetTestCertsDirectory(), "unittest.selfsigned.der");
diff --git a/pdf/draw_utils.cc b/pdf/draw_utils.cc
index ac96f47..9144bb5 100644
--- a/pdf/draw_utils.cc
+++ b/pdf/draw_utils.cc
@@ -49,8 +49,8 @@
 }
 
 ShadowMatrix::ShadowMatrix(uint32_t depth, double factor, uint32_t background)
-    : depth_(depth), factor_(factor), background_(background) {
-  DCHECK(depth_ > 0);
+    : depth_(depth) {
+  DCHECK_GT(depth_, 0U);
   matrix_.resize(depth_ * depth_);
 
   // pv - is a rounding power factor for smoothing corners.
@@ -104,6 +104,8 @@
 
 ShadowMatrix::~ShadowMatrix() {}
 
+namespace {
+
 void PaintShadow(pp::ImageData* image,
                  const pp::Rect& clip_rc,
                  const pp::Rect& shadow_rc,
@@ -136,6 +138,8 @@
   }
 }
 
+}  // namespace
+
 void DrawShadow(pp::ImageData* image,
                 const pp::Rect& shadow_rc,
                 const pp::Rect& object_rc,
diff --git a/pdf/draw_utils.h b/pdf/draw_utils.h
index 618664e..93c769ee 100644
--- a/pdf/draw_utils.h
+++ b/pdf/draw_utils.h
@@ -36,13 +36,9 @@
   }
 
   uint32_t depth() const { return depth_; }
-  double factor() const { return factor_; }
-  uint32_t background() const { return background_; }
 
  private:
-  uint32_t depth_;
-  double factor_;
-  uint32_t background_;
+  const uint32_t depth_;
   std::vector<uint32_t> matrix_;
 };
 
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index c121c06d..af6cc0d4 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -186,8 +186,7 @@
 void Transform(PP_Instance instance, PP_PrivatePageTransformType type) {
   void* object = pp::Instance::GetPerInstanceObject(instance, kPPPPdfInterface);
   if (object) {
-    OutOfProcessInstance* obj_instance =
-        static_cast<OutOfProcessInstance*>(object);
+    auto* obj_instance = static_cast<OutOfProcessInstance*>(object);
     switch (type) {
       case PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CW:
         obj_instance->RotateClockwise();
@@ -204,8 +203,7 @@
     PP_PdfPrintPresetOptions_Dev* options) {
   void* object = pp::Instance::GetPerInstanceObject(instance, kPPPPdfInterface);
   if (object) {
-    OutOfProcessInstance* obj_instance =
-        static_cast<OutOfProcessInstance*>(object);
+    auto* obj_instance = static_cast<OutOfProcessInstance*>(object);
     obj_instance->GetPrintPresetOptionsFromDocument(options);
   }
   return PP_TRUE;
@@ -214,18 +212,16 @@
 void EnableAccessibility(PP_Instance instance) {
   void* object = pp::Instance::GetPerInstanceObject(instance, kPPPPdfInterface);
   if (object) {
-    OutOfProcessInstance* obj_instance =
-        static_cast<OutOfProcessInstance*>(object);
-    return obj_instance->EnableAccessibility();
+    auto* obj_instance = static_cast<OutOfProcessInstance*>(object);
+    obj_instance->EnableAccessibility();
   }
 }
 
 void SetCaretPosition(PP_Instance instance, const PP_FloatPoint* position) {
   void* object = pp::Instance::GetPerInstanceObject(instance, kPPPPdfInterface);
   if (object) {
-    OutOfProcessInstance* obj_instance =
-        static_cast<OutOfProcessInstance*>(object);
-    return obj_instance->SetCaretPosition(pp::FloatPoint(*position));
+    auto* obj_instance = static_cast<OutOfProcessInstance*>(object);
+    obj_instance->SetCaretPosition(*position);
   }
 }
 
@@ -233,9 +229,8 @@
                               const PP_FloatPoint* extent) {
   void* object = pp::Instance::GetPerInstanceObject(instance, kPPPPdfInterface);
   if (object) {
-    OutOfProcessInstance* obj_instance =
-        static_cast<OutOfProcessInstance*>(object);
-    return obj_instance->MoveRangeSelectionExtent(pp::FloatPoint(*extent));
+    auto* obj_instance = static_cast<OutOfProcessInstance*>(object);
+    obj_instance->MoveRangeSelectionExtent(*extent);
   }
 }
 
@@ -244,10 +239,8 @@
                         const PP_FloatPoint* extent) {
   void* object = pp::Instance::GetPerInstanceObject(instance, kPPPPdfInterface);
   if (object) {
-    OutOfProcessInstance* obj_instance =
-        static_cast<OutOfProcessInstance*>(object);
-    return obj_instance->SetSelectionBounds(pp::FloatPoint(*base),
-                                            pp::FloatPoint(*extent));
+    auto* obj_instance = static_cast<OutOfProcessInstance*>(object);
+    obj_instance->SetSelectionBounds(*base, *extent);
   }
 }
 
@@ -256,19 +249,16 @@
   if (!object)
     return PP_FALSE;
 
-  OutOfProcessInstance* obj_instance =
-      static_cast<OutOfProcessInstance*>(object);
+  auto* obj_instance = static_cast<OutOfProcessInstance*>(object);
   return PP_FromBool(obj_instance->CanEditText());
 }
 
 void ReplaceSelection(PP_Instance instance, const char* text) {
   void* object = pp::Instance::GetPerInstanceObject(instance, kPPPPdfInterface);
-  if (!object)
-    return;
-
-  OutOfProcessInstance* obj_instance =
-      static_cast<OutOfProcessInstance*>(object);
-  obj_instance->ReplaceSelection(text);
+  if (object) {
+    auto* obj_instance = static_cast<OutOfProcessInstance*>(object);
+    obj_instance->ReplaceSelection(text);
+  }
 }
 
 const PPP_Pdf ppp_private = {
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 51ad9fa..53e0c1d 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -518,6 +518,7 @@
 #endif
 }
 
+// Returns true if |cur| is a character to break on.
 // For double clicks, look for work breaks.
 // For triple clicks, look for line breaks.
 // The actual algorithm used in Blink is much more complicated, so do a simple
@@ -526,10 +527,18 @@
   if (!is_double_click)
     return cur == '\n';
 
+  // Deal with ASCII characters.
   if (base::IsAsciiAlpha(cur) || base::IsAsciiDigit(cur) || cur == '_')
     return false;
-  return cur < 128;
-};
+  if (cur < 128)
+    return true;
+
+  static constexpr base::char16 kZeroWidthSpace = 0x200B;
+  if (cur == kZeroWidthSpace)
+    return true;
+
+  return false;
+}
 
 // Returns a VarDictionary (representing a bookmark), which in turn contains
 // child VarDictionaries (representing the child bookmarks).
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index dc699e8..b57fb7a 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -2431,12 +2431,7 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true,
-          "dimension_sets": [
-            {
-              "integrity": "high"
-            }
-          ]
+          "can_use_on_swarming_builders": true
         },
         "test": "install_static_unittests"
       },
@@ -5252,12 +5247,7 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true,
-          "dimension_sets": [
-            {
-              "integrity": "high"
-            }
-          ]
+          "can_use_on_swarming_builders": true
         },
         "test": "install_static_unittests"
       },
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json
index a7acd2143..b708ca22 100644
--- a/testing/buildbot/chromium.memory.json
+++ b/testing/buildbot/chromium.memory.json
@@ -746,6 +746,16 @@
         "test": "base_unittests"
       },
       {
+        "args": [
+          "--test-launcher-filter-file=../../testing/buildbot/filters/browser_tests_cros_asan.filter"
+        ],
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 10
+        },
+        "test": "browser_tests"
+      },
+      {
         "swarming": {
           "can_use_on_swarming_builders": true
         },
@@ -1000,6 +1010,15 @@
         "test": "ui_touch_selection_unittests"
       },
       {
+        "args": [
+          "--test-launcher-filter-file=../../testing/buildbot/filters/unit_tests_cros_asan.filter"
+        ],
+        "swarming": {
+          "can_use_on_swarming_builders": true
+        },
+        "test": "unit_tests"
+      },
+      {
         "swarming": {
           "can_use_on_swarming_builders": true
         },
diff --git a/testing/buildbot/chromium.win.json b/testing/buildbot/chromium.win.json
index 7f44f8e..3667e81 100644
--- a/testing/buildbot/chromium.win.json
+++ b/testing/buildbot/chromium.win.json
@@ -224,12 +224,7 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true,
-          "dimension_sets": [
-            {
-              "integrity": "high"
-            }
-          ]
+          "can_use_on_swarming_builders": true
         },
         "test": "install_static_unittests"
       },
@@ -803,12 +798,7 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true,
-          "dimension_sets": [
-            {
-              "integrity": "high"
-            }
-          ]
+          "can_use_on_swarming_builders": true
         },
         "test": "install_static_unittests"
       },
@@ -1356,12 +1346,7 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true,
-          "dimension_sets": [
-            {
-              "integrity": "high"
-            }
-          ]
+          "can_use_on_swarming_builders": true
         },
         "test": "install_static_unittests"
       },
@@ -1874,12 +1859,7 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true,
-          "dimension_sets": [
-            {
-              "integrity": "high"
-            }
-          ]
+          "can_use_on_swarming_builders": true
         },
         "test": "install_static_unittests"
       },
diff --git a/testing/buildbot/filters/BUILD.gn b/testing/buildbot/filters/BUILD.gn
index 1d84d89..48b1546 100644
--- a/testing/buildbot/filters/BUILD.gn
+++ b/testing/buildbot/filters/BUILD.gn
@@ -16,6 +16,15 @@
 # $ for i in $(ls -1 testing/buildbot/filters/*.browser_tests.*filter ); \
 #   do echo "    \"//$i\","; done | sort
 
+source_set("ash_unittests_filters") {
+  testonly = true
+
+  data = [
+    "//testing/buildbot/filters/ash_unittests_mash.filter",
+    "//testing/buildbot/filters/ash_unittests_mus.filter",
+  ]
+}
+
 source_set("browser_tests_filters") {
   testonly = true
 
@@ -28,6 +37,7 @@
     "//testing/buildbot/filters/mojo.fyi.network_browser_tests.filter",
     "//testing/buildbot/filters/mus.browser_tests.filter",
     "//testing/buildbot/filters/single.mash.browser_tests.filter",
+    "//testing/buildbot/filters/browser_tests_cros_asan.filter",
     "//testing/buildbot/filters/site-per-process.browser_tests.filter",
   ]
 }
@@ -51,11 +61,10 @@
   ]
 }
 
-source_set("ash_unittests_filters") {
+source_set("unit_tests_filters") {
   testonly = true
 
   data = [
-    "//testing/buildbot/filters/ash_unittests_mash.filter",
-    "//testing/buildbot/filters/ash_unittests_mus.filter",
+    "//testing/buildbot/filters/unit_tests_cros_asan.filter",
   ]
 }
diff --git a/testing/buildbot/filters/browser_tests_cros_asan.filter b/testing/buildbot/filters/browser_tests_cros_asan.filter
new file mode 100644
index 0000000..94c0b93
--- /dev/null
+++ b/testing/buildbot/filters/browser_tests_cros_asan.filter
@@ -0,0 +1,2 @@
+# TODO(crbug.com/759291): Test is flakey with ASan.
+-SamlTest.ScrapedMultiple
diff --git a/testing/buildbot/filters/unit_tests_cros_asan.filter b/testing/buildbot/filters/unit_tests_cros_asan.filter
new file mode 100644
index 0000000..a0bb500d
--- /dev/null
+++ b/testing/buildbot/filters/unit_tests_cros_asan.filter
@@ -0,0 +1,2 @@
+# TODO(crbug.com/756844): Fix memory leaks.
+-SafeBrowsingBlockingQuietPageTests.*
diff --git a/testing/libfuzzer/fuzzers/BUILD.gn b/testing/libfuzzer/fuzzers/BUILD.gn
index 4c39576..3410c72 100644
--- a/testing/libfuzzer/fuzzers/BUILD.gn
+++ b/testing/libfuzzer/fuzzers/BUILD.gn
@@ -154,7 +154,7 @@
   deps = [
     "//third_party/libsrtp",
   ]
-  libfuzzer_options = [ "max_len=1000" ]
+  libfuzzer_options = [ "max_len=1500" ]
 }
 
 fuzzer_test("base_json_reader_fuzzer") {
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 72a6893..0b2efd2 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -597,6 +597,7 @@
 
 ### virtual/mojo-loading/http/tests/devtools
 crbug.com/667560 virtual/mojo-loading/http/tests/devtools/console/console-search.js [ Skip ]
+crbug.com/667560 virtual/mojo-loading/http/tests/devtools/elements/styles-3/styles-change-node-while-editing.html [ Pass Failure ]
 
 # ====== DevTools test migration failures until here ======
 
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
index aac492e..7ef66dc 100644
--- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
+++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -142730,6 +142730,16 @@
      {}
     ]
    ],
+   "fetch/api/cors/cors-preflight-cache.any.js": [
+    [
+     "/fetch/api/cors/cors-preflight-cache.any.html",
+     {}
+    ],
+    [
+     "/fetch/api/cors/cors-preflight-cache.any.worker.html",
+     {}
+    ]
+   ],
    "fetch/api/cors/cors-preflight-redirect.any.js": [
     [
      "/fetch/api/cors/cors-preflight-redirect.any.html",
@@ -147160,6 +147170,18 @@
      {}
     ]
    ],
+   "html/semantics/document-metadata/the-style-element/style_media_change.html": [
+    [
+     "/html/semantics/document-metadata/the-style-element/style_media_change.html",
+     {}
+    ]
+   ],
+   "html/semantics/document-metadata/the-style-element/style_non_matching_media.html": [
+    [
+     "/html/semantics/document-metadata/the-style-element/style_non_matching_media.html",
+     {}
+    ]
+   ],
    "html/semantics/document-metadata/the-title-element/title.text-01.html": [
     [
      "/html/semantics/document-metadata/the-title-element/title.text-01.html",
@@ -246847,6 +246869,10 @@
    "7e1bcbd453f80a91f1d61d9a0330854cb2b8a572",
    "testharness"
   ],
+  "fetch/api/cors/cors-preflight-cache.any.js": [
+   "734ea38e3bc892c8639033a434ef8de4f4987875",
+   "testharness"
+  ],
   "fetch/api/cors/cors-preflight-redirect.any-expected.txt": [
    "39f0dcb975cfe373ad38ba28f8fddaa9510e30d4",
    "support"
@@ -247380,7 +247406,7 @@
    "support"
   ],
   "fetch/api/resources/preflight.py": [
-   "80ac2baa426c8760e4f6eb3cda3121e044988113",
+   "de99c8990074a9f248989cebe7cf1adb0f4ec84b",
    "support"
   ],
   "fetch/api/resources/redirect.py": [
@@ -258091,6 +258117,14 @@
    "3d608438361d8bec5726feb468a3c2fbd5b7cb7d",
    "testharness"
   ],
+  "html/semantics/document-metadata/the-style-element/style_media_change.html": [
+   "fdf89bd030658cfa5f46325f0c61adca74784127",
+   "testharness"
+  ],
+  "html/semantics/document-metadata/the-style-element/style_non_matching_media.html": [
+   "cdcd861169c580a2ddae38b61cbbcd6efe1c5064",
+   "testharness"
+  ],
   "html/semantics/document-metadata/the-title-element/.gitkeep": [
    "da39a3ee5e6b4b0d3255bfef95601890afd80709",
    "support"
diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-boundary-behavior.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-boundary-behavior.html
index dac81ab..8b65424 100644
--- a/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-boundary-behavior.html
+++ b/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-boundary-behavior.html
@@ -5,21 +5,29 @@
 .outer {
   height: 400px;
   width: 1000px;
-  overflow: scroll;
 }
-#content {
+.content {
   height: 1000px;
   width: 1200px;
 }
+#container {
+  overflow: scroll;
+}
+#non_scrollable {
+  overflow: none;
+}
 </style>
 
-<div id='space' class='outer'></div>
+<div id='non_scrollable' class='outer'>
+  <div class='content'></div>
+</div>
 <div id='container' class='outer'>
-  <div id='content'></div>
+  <div class='content'></div>
 </div>
 
 <script>
 const container = document.getElementById('container');
+const non_scrollable = document.getElementById('non_scrollable');
 
 function setUpForWindow() {
   window.scrollTo(100, 100);
@@ -116,6 +124,22 @@
   });
 }
 
+function test_boundary_on_nonscrollable_allows_propagation(source_type) {
+  non_scrollable.style.scrollBoundaryBehaviorX = 'none';
+  non_scrollable.style.scrollBoundaryBehaviorY = 'none';
+  window.scrollTo(0, 0);
+  return smoothScroll(200, 200, 300, source_type, 'right', 4000)
+  .then(waitForAnimationEnd)
+  .then(() => {
+    assert_greater_than(window.scrollX, 100);})
+  .then(
+    smoothScroll.bind(this, 200, 200, 300, source_type, 'down', 4000))
+  .then(waitForAnimationEnd)
+  .then(() => {
+    assert_greater_than(window.scrollY, 100);
+  });
+}
+
 const TOUCH_SOURCE_TYPE = 1; // TOUCH_INPUT from synthetic_gesture_params.h
 const WHEEL_SOURCE_TYPE = 2; // TOUCH_INPUT from synthetic_gesture_params.h
 promise_test(t => {
@@ -127,6 +151,9 @@
 promise_test(t => {
     return test_boundary_allows_inner(WHEEL_SOURCE_TYPE);
   }, 'scroll-boundary-behavior should not affect scrolling inside the applied container with: wheel.');
+promise_test(t => {
+    return test_boundary_on_nonscrollable_allows_propagation(WHEEL_SOURCE_TYPE);
+  }, 'scroll-boundary-behavior on non-scrollable area should not affect scroll propagation with: wheel.');
 
 const IS_MAC = navigator.platform.indexOf('Mac') == 0;
 if (!IS_MAC) {
@@ -137,7 +164,7 @@
       return test_boundary_prevents_x(TOUCH_SOURCE_TYPE);
     }, 'scroll-boundary-behavior-x: none should only prevent scroll propagation on x axis with: touch.');
   promise_test(t => {
-      return test_boundary_allows_inner(TOUCH_SOURCE_TYPE);
-    }, 'scroll-boundary-behavior should not affect scrolling inside the applied container with: touch.');
+      return test_boundary_on_nonscrollable_allows_propagation(TOUCH_SOURCE_TYPE);
+    }, 'scroll-boundary-behavior on non-scrollable area should not affect scroll propagation with: touch.');
 }
 </script>
diff --git a/third_party/WebKit/Source/core/BUILD.gn b/third_party/WebKit/Source/core/BUILD.gn
index f97b9063..75e38db20e 100644
--- a/third_party/WebKit/Source/core/BUILD.gn
+++ b/third_party/WebKit/Source/core/BUILD.gn
@@ -1542,6 +1542,7 @@
     "layout/ng/ng_block_child_iterator_test.cc",
     "layout/ng/ng_block_layout_algorithm_test.cc",
     "layout/ng/ng_block_node_test.cc",
+    "layout/ng/ng_column_layout_algorithm_test.cc",
     "layout/ng/ng_constraint_space_builder_test.cc",
     "layout/ng/ng_constraint_space_test.cc",
     "layout/ng/ng_length_utils_test.cc",
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index a499cb2..56622cc 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4895,9 +4895,11 @@
   DCHECK(GetFrame() && GetFrame()->Owner());
   FrameOwner* owner = GetFrame()->Owner();
 
-  if (documentElement()) {
-    if (is_display_none != owner->IsDisplayNone())
-      documentElement()->LazyReattachIfAttached();
+  if (RuntimeEnabledFeatures::DisplayNoneIFrameCreatesNoLayoutObjectEnabled()) {
+    if (documentElement()) {
+      if (is_display_none != owner->IsDisplayNone())
+        documentElement()->LazyReattachIfAttached();
+    }
   }
 
   if (!body())
diff --git a/third_party/WebKit/Source/core/exported/WebFrameTest.cpp b/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
index ed0120c..8686685b 100644
--- a/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/core/exported/WebFrameTest.cpp
@@ -10348,6 +10348,30 @@
   Mock::VerifyAndClearExpectations(&client);
 }
 
+TEST_P(WebFrameOverscrollTest,
+       ScrollBoundaryBehaviorOnBodyDoesNotPreventOverscroll) {
+  OverscrollWebViewClient client;
+  RegisterMockedHttpURLLoad("overscroll/overscroll.html");
+  FrameTestHelpers::WebViewHelper web_view_helper;
+  web_view_helper.InitializeAndLoad(base_url_ + "overscroll/overscroll.html",
+                                    nullptr, &client, nullptr,
+                                    ConfigureAndroid);
+  web_view_helper.Resize(WebSize(200, 200));
+
+  WebLocalFrame* mainFrame =
+      web_view_helper.WebView()->MainFrame()->ToWebLocalFrame();
+  mainFrame->ExecuteScript(
+      WebScriptSource(WebString("document.body.style="
+                                "'scroll-boundary-behavior: contain;'")));
+
+  ScrollBegin(&web_view_helper, 100, 100);
+  EXPECT_CALL(client,
+              DidOverscroll(WebFloatSize(-100, -100), WebFloatSize(-100, -100),
+                            WebFloatPoint(100, 100), WebFloatSize()));
+  ScrollUpdate(&web_view_helper, 100, 100);
+  Mock::VerifyAndClearExpectations(&client);
+}
+
 TEST_P(ParameterizedWebFrameTest, OrientationFrameDetach) {
   RuntimeEnabledFeatures::SetOrientationEventEnabled(true);
   RegisterMockedHttpURLLoad("orientation-frame-detach.html");
diff --git a/third_party/WebKit/Source/core/frame/BrowserControlsTest.cpp b/third_party/WebKit/Source/core/frame/BrowserControlsTest.cpp
index 04c0027..971405c 100644
--- a/third_party/WebKit/Source/core/frame/BrowserControlsTest.cpp
+++ b/third_party/WebKit/Source/core/frame/BrowserControlsTest.cpp
@@ -1168,4 +1168,26 @@
                   web_view->GetBrowserControls().UnreportedSizeAdjustment());
 }
 
+TEST_F(BrowserControlsTest, MAYBE(GrowingHeightKeepsTopControlsHidden)) {
+  WebViewImpl* web_view = Initialize();
+  float bottom_height = web_view->GetBrowserControls().BottomHeight();
+  web_view->ResizeWithBrowserControls(web_view->Size(), 1.f, bottom_height,
+                                      false);
+
+  web_view->GetBrowserControls().UpdateConstraintsAndState(
+      kWebBrowserControlsHidden, kWebBrowserControlsHidden, false);
+
+  // As we expand the top controls height while hidden, the content offset
+  // shouln't change.
+  EXPECT_EQ(0.f, web_view->GetBrowserControls().ContentOffset());
+
+  web_view->ResizeWithBrowserControls(web_view->Size(), 50.f, bottom_height,
+                                      false);
+  EXPECT_EQ(0.f, web_view->GetBrowserControls().ContentOffset());
+
+  web_view->ResizeWithBrowserControls(web_view->Size(), 100.f, bottom_height,
+                                      false);
+  EXPECT_EQ(0.f, web_view->GetBrowserControls().ContentOffset());
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/frame/PerformanceMonitor.h b/third_party/WebKit/Source/core/frame/PerformanceMonitor.h
index 6ed1112..dd62b1d0 100644
--- a/third_party/WebKit/Source/core/frame/PerformanceMonitor.h
+++ b/third_party/WebKit/Source/core/frame/PerformanceMonitor.h
@@ -140,7 +140,6 @@
   // scheduler::TaskTimeObserver implementation
   void WillProcessTask(double start_time) override;
   void DidProcessTask(double start_time, double end_time) override;
-  void OnBeginNestedRunLoop() override {}
 
   void WillExecuteScript(ExecutionContext*);
   void DidExecuteScript();
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index 39ab2329a..60eb8da 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -1236,7 +1236,8 @@
 void HTMLCanvasElement::WillDrawImageTo2DContext(CanvasImageSource* source) {
   if (CanvasHeuristicParameters::kEnableAccelerationToAvoidReadbacks &&
       SharedGpuContext::AllowSoftwareToAcceleratedCanvasUpgrade() &&
-      source->IsAccelerated() && !GetOrCreateImageBuffer()->IsAccelerated() &&
+      source->IsAccelerated() && GetOrCreateImageBuffer() &&
+      !GetImageBuffer()->IsAccelerated() &&
       ShouldAccelerate(kIgnoreResourceLimitCriteria)) {
     OpacityMode opacity_mode =
         context_->CreationAttributes().alpha() ? kNonOpaque : kOpaque;
diff --git a/third_party/WebKit/Source/core/input/ScrollManager.cpp b/third_party/WebKit/Source/core/input/ScrollManager.cpp
index 2ec9de2..9a9accc 100644
--- a/third_party/WebKit/Source/core/input/ScrollManager.cpp
+++ b/third_party/WebKit/Source/core/input/ScrollManager.cpp
@@ -87,6 +87,9 @@
 
 static bool CanPropagate(const ScrollState& scroll_state,
                          const Element& element) {
+  if (!element.GetLayoutBox()->GetScrollableArea())
+    return true;
+
   return (scroll_state.deltaXHint() == 0 ||
           element.GetComputedStyle()->ScrollBoundaryBehaviorX() ==
               EScrollBoundaryBehavior::kAuto) &&
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPerformanceAgent.h b/third_party/WebKit/Source/core/inspector/InspectorPerformanceAgent.h
index 7826f8d..427a6fa 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPerformanceAgent.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorPerformanceAgent.h
@@ -57,7 +57,6 @@
   // scheduler::TaskTimeObserver
   void WillProcessTask(double start_time) override;
   void DidProcessTask(double start_time, double end_time) override;
-  void OnBeginNestedRunLoop() override {}
 
  private:
   InspectorPerformanceAgent(InspectedFrames*);
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.cc
index baa7c63..b60d359a 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.cc
@@ -4,9 +4,12 @@
 
 #include "core/layout/ng/ng_base_layout_algorithm_test.h"
 
+#include "core/dom/Element.h"
 #include "core/layout/ng/layout_ng_block_flow.h"
 #include "core/layout/ng/ng_block_layout_algorithm.h"
+#include "core/layout/ng/ng_constraint_space_builder.h"
 #include "core/layout/ng/ng_layout_result.h"
+#include "core/layout/ng/ng_physical_box_fragment.h"
 #include "core/layout/ng/ng_physical_fragment.h"
 
 namespace blink {
@@ -38,4 +41,43 @@
       std::move(space));
 }
 
+const NGPhysicalBoxFragment* FragmentChildIterator::NextChild() {
+  if (!parent_)
+    return nullptr;
+  if (index_ >= parent_->Children().size())
+    return nullptr;
+  while (parent_->Children()[index_]->Type() !=
+         NGPhysicalFragment::kFragmentBox) {
+    ++index_;
+    if (index_ >= parent_->Children().size())
+      return nullptr;
+  }
+  return ToNGPhysicalBoxFragment(parent_->Children()[index_++].Get());
+}
+
+RefPtr<NGConstraintSpace> ConstructBlockLayoutTestConstraintSpace(
+    NGWritingMode writing_mode,
+    TextDirection direction,
+    NGLogicalSize size,
+    bool shrink_to_fit,
+    bool is_new_formatting_context,
+    LayoutUnit fragmentainer_space_available) {
+  NGFragmentationType block_fragmentation =
+      fragmentainer_space_available != LayoutUnit()
+          ? NGFragmentationType::kFragmentColumn
+          : NGFragmentationType::kFragmentNone;
+
+  return NGConstraintSpaceBuilder(
+             writing_mode,
+             /* icb_size */ size.ConvertToPhysical(writing_mode))
+      .SetAvailableSize(size)
+      .SetPercentageResolutionSize(size)
+      .SetTextDirection(direction)
+      .SetIsShrinkToFit(shrink_to_fit)
+      .SetIsNewFormattingContext(is_new_formatting_context)
+      .SetFragmentainerSpaceAvailable(fragmentainer_space_available)
+      .SetFragmentationType(block_fragmentation)
+      .ToConstraintSpace(writing_mode);
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.h b/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.h
index e56f692..4ec66799 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.h
+++ b/third_party/WebKit/Source/core/layout/ng/ng_base_layout_algorithm_test.h
@@ -7,13 +7,18 @@
 
 #include "core/layout/LayoutTestHelper.h"
 
-#include "core/dom/Element.h"
+#include "core/layout/ng/geometry/ng_logical_size.h"
 #include "core/layout/ng/ng_constraint_space.h"
 #include "core/layout/ng/ng_physical_box_fragment.h"
+#include "core/layout/ng/ng_writing_mode.h"
+#include "platform/text/TextDirection.h"
+#include "platform/wtf/Allocator.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace blink {
 
+class Element;
+
 // Base class for all LayoutNG Algorithms unit test classes.
 typedef bool TestParamLayoutNG;
 class NGBaseLayoutAlgorithmTest
@@ -30,6 +35,33 @@
   RunBlockLayoutAlgorithmForElement(Element* element);
 };
 
+class FragmentChildIterator {
+  STACK_ALLOCATED();
+
+ public:
+  explicit FragmentChildIterator(const NGPhysicalBoxFragment* parent) {
+    SetParent(parent);
+  }
+  void SetParent(const NGPhysicalBoxFragment* parent) {
+    parent_ = parent;
+    index_ = 0;
+  }
+
+  const NGPhysicalBoxFragment* NextChild();
+
+ private:
+  const NGPhysicalBoxFragment* parent_;
+  unsigned index_;
+};
+
+RefPtr<NGConstraintSpace> ConstructBlockLayoutTestConstraintSpace(
+    NGWritingMode writing_mode,
+    TextDirection direction,
+    NGLogicalSize size,
+    bool shrink_to_fit = false,
+    bool is_new_formatting_context = false,
+    LayoutUnit fragmentainer_space_available = LayoutUnit());
+
 }  // namespace blink
 
 #endif  // NG_BASE_LAYOUT_ALGORITHM_TEST_H_
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
index 2c5d8ab..bac371b 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
@@ -27,31 +27,6 @@
 using ::testing::ElementsAre;
 using ::testing::Pointee;
 
-RefPtr<NGConstraintSpace> ConstructBlockLayoutTestConstraintSpace(
-    NGWritingMode writing_mode,
-    TextDirection direction,
-    NGLogicalSize size,
-    bool shrink_to_fit = false,
-    bool is_new_formatting_context = false,
-    LayoutUnit fragmentainer_space_available = LayoutUnit()) {
-  NGFragmentationType block_fragmentation =
-      fragmentainer_space_available != LayoutUnit()
-          ? NGFragmentationType::kFragmentColumn
-          : NGFragmentationType::kFragmentNone;
-
-  return NGConstraintSpaceBuilder(
-             writing_mode,
-             /* icb_size */ size.ConvertToPhysical(writing_mode))
-      .SetAvailableSize(size)
-      .SetPercentageResolutionSize(size)
-      .SetTextDirection(direction)
-      .SetIsShrinkToFit(shrink_to_fit)
-      .SetIsNewFormattingContext(is_new_formatting_context)
-      .SetFragmentainerSpaceAvailable(fragmentainer_space_available)
-      .SetFragmentationType(block_fragmentation)
-      .ToConstraintSpace(writing_mode);
-}
-
 class NGBlockLayoutAlgorithmTest : public NGBaseLayoutAlgorithmTest {
  protected:
   void SetUp() override {
@@ -86,37 +61,6 @@
   RefPtr<ComputedStyle> style_;
 };
 
-class FragmentChildIterator {
-  STACK_ALLOCATED();
-
- public:
-  explicit FragmentChildIterator(const NGPhysicalBoxFragment* parent) {
-    SetParent(parent);
-  }
-  void SetParent(const NGPhysicalBoxFragment* parent) {
-    parent_ = parent;
-    index_ = 0;
-  }
-
-  const NGPhysicalBoxFragment* NextChild() {
-    if (!parent_)
-      return nullptr;
-    if (index_ >= parent_->Children().size())
-      return nullptr;
-    while (parent_->Children()[index_]->Type() !=
-           NGPhysicalFragment::kFragmentBox) {
-      ++index_;
-      if (index_ >= parent_->Children().size())
-        return nullptr;
-    }
-    return ToNGPhysicalBoxFragment(parent_->Children()[index_++].Get());
-  }
-
- private:
-  const NGPhysicalBoxFragment* parent_;
-  unsigned index_;
-};
-
 TEST_F(NGBlockLayoutAlgorithmTest, FixedSize) {
   SetBodyInnerHTML(R"HTML(
     <div id="box" style="width:30px; height:40px"></div>
@@ -1406,686 +1350,6 @@
   EXPECT_EQ(LayoutUnit(kWidthChild2), frag->Size().width);
 }
 
-TEST_F(NGBlockLayoutAlgorithmTest, EmptyMulticol) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 2;
-        column-fill: auto;
-        column-gap: 10px;
-        height: 100px;
-        width: 210px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(210), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // There should be nothing inside the multicol container.
-  // TODO(mstensho): Get rid of this column fragment. It shouldn't be here.
-  fragment = FragmentChildIterator(fragment).NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit()), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  EXPECT_FALSE(FragmentChildIterator(fragment).NextChild());
-}
-
-TEST_F(NGBlockLayoutAlgorithmTest, EmptyBlock) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        columns: 2;
-        column-fill: auto;
-        column-gap: 10px;
-        height: 100px;
-        width: 210px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child">
-        </div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(210), LayoutUnit(100)), fragment->Size());
-  ASSERT_TRUE(fragment);
-  EXPECT_FALSE(iterator.NextChild());
-  iterator.SetParent(fragment);
-
-  // first column fragment
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit()), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // #child fragment in first column
-  iterator.SetParent(fragment);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit()), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
-TEST_F(NGBlockLayoutAlgorithmTest, BlockInOneColumn) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 2;
-        column-fill: auto;
-        column-gap: 10px;
-        height: 100px;
-        width: 310px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child" style="width: 60%; height: 100%">
-        </div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(310), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-  iterator.SetParent(fragment);
-
-  // first column fragment
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(150), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // #child fragment in first column
-  iterator.SetParent(fragment);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(90), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
-TEST_F(NGBlockLayoutAlgorithmTest, BlockInTwoColumns) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 2;
-        column-fill: auto;
-        column-gap: 10px;
-        height: 100px;
-        width: 210px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child" style="width: 75%; height: 150px"></div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(210), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  iterator.SetParent(fragment);
-
-  // first column fragment
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)), fragment->Size());
-
-  // second column fragment
-  const auto* column2 = iterator.NextChild();
-  ASSERT_TRUE(column2);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()), column2->Offset());
-  // TODO(mstensho): Make this work.
-  // EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)),
-  // column2->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // #child fragment in first column
-  iterator.SetParent(fragment);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-
-  // #child fragment in second column
-  iterator.SetParent(column2);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(50)), fragment->Size());
-  EXPECT_EQ(0U, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
-TEST_F(NGBlockLayoutAlgorithmTest, BlockInThreeColumns) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 3;
-        column-fill: auto;
-        column-gap: 10px;
-        height: 100px;
-        width: 320px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child" style="width: 75%; height: 250px;">
-        </div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // first column fragment
-  iterator.SetParent(fragment);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)), fragment->Size());
-
-  // second column fragment
-  const auto* column2 = iterator.NextChild();
-  ASSERT_TRUE(column2);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()), column2->Offset());
-  // TODO(mstensho): Make this work.
-  // EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)),
-  // column2->Size());
-
-  // third column fragment
-  const auto* column3 = iterator.NextChild();
-  ASSERT_TRUE(column3);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(220), LayoutUnit()), column3->Offset());
-  // TODO(mstensho): Make this work.
-  // EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)),
-  // column3->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // #child fragment in first column
-  iterator.SetParent(fragment);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // #child fragment in second column
-  iterator.SetParent(column2);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0U, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // #child fragment in third column
-  iterator.SetParent(column3);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(50)), fragment->Size());
-  EXPECT_EQ(0U, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
-TEST_F(NGBlockLayoutAlgorithmTest, ActualColumnCountGreaterThanSpecified) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 2;
-        column-fill: auto;
-        column-gap: 10px;
-        height: 100px;
-        width: 210px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child" style="width: 1px; height: 250px;">
-        </div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(210), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  iterator.SetParent(fragment);
-
-  // first column fragment
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-
-  // second column fragment
-  const auto* column2 = iterator.NextChild();
-  ASSERT_TRUE(column2);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()), column2->Offset());
-
-  // third column fragment
-  const auto* column3 = iterator.NextChild();
-  ASSERT_TRUE(column3);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(220), LayoutUnit()), column3->Offset());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // #child fragment in first column
-  iterator.SetParent(fragment);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(1), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-
-  // #child fragment in second column
-  iterator.SetParent(column2);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(1), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0U, fragment->Children().size());
-
-  // #child fragment in third column
-  iterator.SetParent(column3);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(1), LayoutUnit(50)), fragment->Size());
-  EXPECT_EQ(0U, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
-TEST_F(NGBlockLayoutAlgorithmTest, TwoBlocksInTwoColumns) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 3;
-        column-fill: auto;
-        column-gap: 10px;
-        height: 100px;
-        width: 320px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child1" style="width: 75%; height: 60px;">
-        </div>
-        <div id="child2" style="width: 85%; height: 60px;">
-        </div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  iterator.SetParent(fragment);
-
-  // first column fragment
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-
-  // second column fragment
-  const auto* column2 = iterator.NextChild();
-  ASSERT_TRUE(column2);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()), column2->Offset());
-  EXPECT_FALSE(iterator.NextChild());
-
-  // #child1 fragment in first column
-  iterator.SetParent(fragment);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(60)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  // #child2 fragment in first column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit(60)), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(85), LayoutUnit(40)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-
-  // #child2 fragment in second column
-  iterator.SetParent(column2);
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(85), LayoutUnit(20)), fragment->Size());
-  EXPECT_EQ(0U, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
-// TODO(glebl): reenable multicol after new margin collapsing/floats algorithm
-// is checked in.
-TEST_F(NGBlockLayoutAlgorithmTest, DISABLED_OverflowedBlock) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 2;
-        column-fill: auto;
-        column-gap: 10px;
-        height: 100px;
-        width: 320px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child1" style="width: 75%; height: 60px;">
-          <div id="grandchild1" style="width: 50px; height: 120px;">
-          </div>
-          <div id="grandchild2" style="width: 40px; height: 20px;">
-          </div>
-        </div>
-        <div id="child2" style="width: 85%; height: 10px;"></div>
-        </div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  iterator.SetParent(fragment);
-  // #child1 fragment in first column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(60)), fragment->Size());
-  FragmentChildIterator grandchild_iterator(fragment);
-  // #grandchild1 fragment in first column
-  fragment = grandchild_iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(50), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(grandchild_iterator.NextChild());
-  // #child2 fragment in first column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit(60)), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(85), LayoutUnit(10)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-
-  // #child1 fragment in second column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()),
-            fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit()), fragment->Size());
-  grandchild_iterator.SetParent(fragment);
-  // #grandchild1 fragment in second column
-  fragment = grandchild_iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(50), LayoutUnit(20)), fragment->Size());
-  // #grandchild2 fragment in second column
-  fragment = grandchild_iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit(20)), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(40), LayoutUnit(20)), fragment->Size());
-  EXPECT_FALSE(grandchild_iterator.NextChild());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
-// TODO(glebl): reenable multicol after new margin collapsing/floats algorithm
-// is checked in.
-TEST_F(NGBlockLayoutAlgorithmTest, DISABLED_FloatInOneColumn) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 3;
-        column-fill: auto;
-        column-gap: 10px;
-        height: 100px;
-        width: 320px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child" style="float: left; width: 75%; height: 100px;">
-        </div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  iterator.SetParent(fragment);
-  // #child fragment in first column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
-// TODO(glebl): reenable multicol after new margin collapsing/floats algorithm
-// is checked in.
-TEST_F(NGBlockLayoutAlgorithmTest, DISABLED_TwoFloatsInOneColumn) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 3;
-        column-fill: auto;
-        column-gap: 10px;
-        width: 320px;
-        height: 100px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child1" style="float: left; width: 15%; height: 100px;">
-        </div>
-        <div id="child2" style="float: right; width: 16%; height: 100px;">
-        </div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  iterator.SetParent(fragment);
-  // #child1 fragment in first column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(15), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  // #child2 fragment in first column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(84), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(16), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
-// TODO(glebl): reenable multicol after new margin collapsing/floats algorithm
-// is checked in.
-TEST_F(NGBlockLayoutAlgorithmTest, DISABLED_TwoFloatsInTwoColumns) {
-  SetBodyInnerHTML(R"HTML(
-    <style>
-      #parent {
-        column-count: 3;
-        column-fill: auto;
-        column-gap: 10px;
-        width: 320px;
-        height: 100px;
-      }
-    </style>
-    <div id="container">
-      <div id="parent">
-        <div id="child1" style="float: left; width: 15%; height: 150px;">
-        </div>
-        <div id="child2" style="float: right; width: 16%; height: 150px;">
-        </div>
-      </div>
-    </div>
-  )HTML");
-
-  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
-  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
-      kHorizontalTopBottom, TextDirection::kLtr,
-      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
-  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
-      RunBlockLayoutAlgorithm(*space, container);
-
-  FragmentChildIterator iterator(parent_fragment.Get());
-  const auto* fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
-  EXPECT_FALSE(iterator.NextChild());
-
-  iterator.SetParent(fragment);
-  // #child1 fragment in first column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(15), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  // #child2 fragment in first column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(84), LayoutUnit()), fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(16), LayoutUnit(100)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-
-  // #child1 fragment in second column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()),
-            fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(15), LayoutUnit(50)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  // #child2 fragment in second column
-  fragment = iterator.NextChild();
-  ASSERT_TRUE(fragment);
-  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(194), LayoutUnit()),
-            fragment->Offset());
-  EXPECT_EQ(NGPhysicalSize(LayoutUnit(16), LayoutUnit(50)), fragment->Size());
-  EXPECT_EQ(0UL, fragment->Children().size());
-  EXPECT_FALSE(iterator.NextChild());
-}
-
 // Verifies that we position empty blocks and floats correctly inside of the
 // block that establishes new BFC.
 TEST_F(NGBlockLayoutAlgorithmTest, PositionEmptyBlocksInNewBfc) {
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm_test.cc
new file mode 100644
index 0000000..7ae0542
--- /dev/null
+++ b/third_party/WebKit/Source/core/layout/ng/ng_column_layout_algorithm_test.cc
@@ -0,0 +1,693 @@
+// 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 "core/layout/ng/ng_column_layout_algorithm.h"
+
+#include "core/layout/ng/ng_base_layout_algorithm_test.h"
+#include "core/layout/ng/ng_block_layout_algorithm.h"
+
+namespace blink {
+namespace {
+
+class NGColumnLayoutAlgorithmTest : public NGBaseLayoutAlgorithmTest {
+ protected:
+  void SetUp() override {
+    // Make sure to reset this, except for the one test that needs it.
+    RuntimeEnabledFeatures::SetLayoutNGFragmentCachingEnabled(false);
+
+    NGBaseLayoutAlgorithmTest::SetUp();
+    style_ = ComputedStyle::Create();
+  }
+
+  RefPtr<NGPhysicalBoxFragment> RunBlockLayoutAlgorithm(
+      const NGConstraintSpace& space,
+      NGBlockNode node) {
+    RefPtr<NGLayoutResult> result =
+        NGBlockLayoutAlgorithm(node, space).Layout();
+
+    return ToNGPhysicalBoxFragment(result->PhysicalFragment().Get());
+  }
+
+  RefPtr<ComputedStyle> style_;
+};
+
+TEST_F(NGColumnLayoutAlgorithmTest, EmptyMulticol) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 2;
+        column-fill: auto;
+        column-gap: 10px;
+        height: 100px;
+        width: 210px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent"></div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(210), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // There should be nothing inside the multicol container.
+  // TODO(mstensho): Get rid of this column fragment. It shouldn't be here.
+  fragment = FragmentChildIterator(fragment).NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit()), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  EXPECT_FALSE(FragmentChildIterator(fragment).NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, EmptyBlock) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 2;
+        column-fill: auto;
+        column-gap: 10px;
+        height: 100px;
+        width: 210px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(210), LayoutUnit(100)), fragment->Size());
+  ASSERT_TRUE(fragment);
+  EXPECT_FALSE(iterator.NextChild());
+  iterator.SetParent(fragment);
+
+  // first column fragment
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit()), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // #child fragment in first column
+  iterator.SetParent(fragment);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit()), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, BlockInOneColumn) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 2;
+        column-fill: auto;
+        column-gap: 10px;
+        height: 100px;
+        width: 310px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child" style="width:60%; height:100%"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(310), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+  iterator.SetParent(fragment);
+
+  // first column fragment
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(150), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // #child fragment in first column
+  iterator.SetParent(fragment);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(90), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, BlockInTwoColumns) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 2;
+        column-fill: auto;
+        column-gap: 10px;
+        height: 100px;
+        width: 210px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child" style="width:75%; height:150px"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(210), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  iterator.SetParent(fragment);
+
+  // first column fragment
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)), fragment->Size());
+
+  // second column fragment
+  const auto* column2 = iterator.NextChild();
+  ASSERT_TRUE(column2);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()), column2->Offset());
+  // TODO(mstensho): Make this work.
+  // EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)),
+  // column2->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // #child fragment in first column
+  iterator.SetParent(fragment);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+
+  // #child fragment in second column
+  iterator.SetParent(column2);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(50)), fragment->Size());
+  EXPECT_EQ(0U, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, BlockInThreeColumns) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 3;
+        column-fill: auto;
+        column-gap: 10px;
+        height: 100px;
+        width: 320px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child" style="width:75%; height:250px;"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // first column fragment
+  iterator.SetParent(fragment);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)), fragment->Size());
+
+  // second column fragment
+  const auto* column2 = iterator.NextChild();
+  ASSERT_TRUE(column2);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()), column2->Offset());
+  // TODO(mstensho): Make this work.
+  // EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)),
+  // column2->Size());
+
+  // third column fragment
+  const auto* column3 = iterator.NextChild();
+  ASSERT_TRUE(column3);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(220), LayoutUnit()), column3->Offset());
+  // TODO(mstensho): Make this work.
+  // EXPECT_EQ(NGPhysicalSize(LayoutUnit(100), LayoutUnit(100)),
+  // column3->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // #child fragment in first column
+  iterator.SetParent(fragment);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // #child fragment in second column
+  iterator.SetParent(column2);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0U, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // #child fragment in third column
+  iterator.SetParent(column3);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(50)), fragment->Size());
+  EXPECT_EQ(0U, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, ActualColumnCountGreaterThanSpecified) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 2;
+        column-fill: auto;
+        column-gap: 10px;
+        height: 100px;
+        width: 210px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child" style="width:1px; height:250px;"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(210), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  iterator.SetParent(fragment);
+
+  // first column fragment
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+
+  // second column fragment
+  const auto* column2 = iterator.NextChild();
+  ASSERT_TRUE(column2);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()), column2->Offset());
+
+  // third column fragment
+  const auto* column3 = iterator.NextChild();
+  ASSERT_TRUE(column3);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(220), LayoutUnit()), column3->Offset());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // #child fragment in first column
+  iterator.SetParent(fragment);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(1), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+
+  // #child fragment in second column
+  iterator.SetParent(column2);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(1), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0U, fragment->Children().size());
+
+  // #child fragment in third column
+  iterator.SetParent(column3);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(1), LayoutUnit(50)), fragment->Size());
+  EXPECT_EQ(0U, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, TwoBlocksInTwoColumns) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 3;
+        column-fill: auto;
+        column-gap: 10px;
+        height: 100px;
+        width: 320px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child1" style="width:75%; height:60px;"></div>
+        <div id="child2" style="width:85%; height:60px;"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  iterator.SetParent(fragment);
+
+  // first column fragment
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+
+  // second column fragment
+  const auto* column2 = iterator.NextChild();
+  ASSERT_TRUE(column2);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()), column2->Offset());
+  EXPECT_FALSE(iterator.NextChild());
+
+  // #child1 fragment in first column
+  iterator.SetParent(fragment);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(60)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  // #child2 fragment in first column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit(60)), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(85), LayoutUnit(40)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+
+  // #child2 fragment in second column
+  iterator.SetParent(column2);
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(85), LayoutUnit(20)), fragment->Size());
+  EXPECT_EQ(0U, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, DISABLED_OverflowedBlock) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 2;
+        column-fill: auto;
+        column-gap: 10px;
+        height: 100px;
+        width: 320px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child1" style="width:75%; height:60px;">
+          <div id="grandchild1" style="width:50px; height:120px;"></div>
+          <div id="grandchild2" style="width:40px; height:20px;"></div>
+        </div>
+        <div id="child2" style="width:85%; height:10px;"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  iterator.SetParent(fragment);
+  // #child1 fragment in first column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(60)), fragment->Size());
+  FragmentChildIterator grandchild_iterator(fragment);
+  // #grandchild1 fragment in first column
+  fragment = grandchild_iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(50), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(grandchild_iterator.NextChild());
+  // #child2 fragment in first column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit(60)), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(85), LayoutUnit(10)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+
+  // #child1 fragment in second column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()),
+            fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit()), fragment->Size());
+  grandchild_iterator.SetParent(fragment);
+  // #grandchild1 fragment in second column
+  fragment = grandchild_iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(50), LayoutUnit(20)), fragment->Size());
+  // #grandchild2 fragment in second column
+  fragment = grandchild_iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit(20)), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(40), LayoutUnit(20)), fragment->Size());
+  EXPECT_FALSE(grandchild_iterator.NextChild());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, DISABLED_FloatInOneColumn) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 3;
+        column-fill: auto;
+        column-gap: 10px;
+        height: 100px;
+        width: 320px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child" style="float:left; width:75%; height:100px;"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  iterator.SetParent(fragment);
+  // #child fragment in first column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(75), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, DISABLED_TwoFloatsInOneColumn) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 3;
+        column-fill: auto;
+        column-gap: 10px;
+        width: 320px;
+        height: 100px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child1" style="float:left; width:15%; height:100px;"></div>
+        <div id="child2" style="float:right; width:16%; height:100px;"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  iterator.SetParent(fragment);
+  // #child1 fragment in first column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(15), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  // #child2 fragment in first column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(84), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(16), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+TEST_F(NGColumnLayoutAlgorithmTest, DISABLED_TwoFloatsInTwoColumns) {
+  SetBodyInnerHTML(R"HTML(
+    <style>
+      #parent {
+        columns: 3;
+        column-fill: auto;
+        column-gap: 10px;
+        width: 320px;
+        height: 100px;
+      }
+    </style>
+    <div id="container">
+      <div id="parent">
+        <div id="child1" style="float:left; width:15%; height:150px;"></div>
+        <div id="child2" style="float:right; width:16%; height:150px;"></div>
+      </div>
+    </div>
+  )HTML");
+
+  NGBlockNode container(ToLayoutBox(GetLayoutObjectByElementId("container")));
+  RefPtr<NGConstraintSpace> space = ConstructBlockLayoutTestConstraintSpace(
+      kHorizontalTopBottom, TextDirection::kLtr,
+      NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite));
+  RefPtr<const NGPhysicalBoxFragment> parent_fragment =
+      RunBlockLayoutAlgorithm(*space, container);
+
+  FragmentChildIterator iterator(parent_fragment.Get());
+  const auto* fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(320), LayoutUnit(100)), fragment->Size());
+  EXPECT_FALSE(iterator.NextChild());
+
+  iterator.SetParent(fragment);
+  // #child1 fragment in first column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(15), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  // #child2 fragment in first column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(84), LayoutUnit()), fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(16), LayoutUnit(100)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+
+  // #child1 fragment in second column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(110), LayoutUnit()),
+            fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(15), LayoutUnit(50)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  // #child2 fragment in second column
+  fragment = iterator.NextChild();
+  ASSERT_TRUE(fragment);
+  EXPECT_EQ(NGPhysicalOffset(LayoutUnit(194), LayoutUnit()),
+            fragment->Offset());
+  EXPECT_EQ(NGPhysicalSize(LayoutUnit(16), LayoutUnit(50)), fragment->Size());
+  EXPECT_EQ(0UL, fragment->Children().size());
+  EXPECT_FALSE(iterator.NextChild());
+}
+
+}  // anonymous namespace
+}  // namespace blink
diff --git a/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp b/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
index 2a62854..129cb7f 100644
--- a/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/core/page/ChromeClientImpl.cpp
@@ -267,8 +267,6 @@
 
   if (!frame->GetPage() || frame->GetPage()->Paused())
     return nullptr;
-  DCHECK(frame->GetDocument());
-  Fullscreen::FullyExitFullscreen(*frame->GetDocument());
 
   const AtomicString& frame_name =
       !EqualIgnoringASCIICase(r.FrameName(), "_blank") ? r.FrameName()
diff --git a/third_party/WebKit/Source/core/page/ContextMenuClient.cpp b/third_party/WebKit/Source/core/page/ContextMenuClient.cpp
index f2f92c7a9..b237640 100644
--- a/third_party/WebKit/Source/core/page/ContextMenuClient.cpp
+++ b/third_party/WebKit/Source/core/page/ContextMenuClient.cpp
@@ -296,13 +296,21 @@
       PluginView* plugin_view = ToLayoutEmbeddedContent(object)->Plugin();
       if (plugin_view && plugin_view->IsPluginContainer()) {
         data.media_type = WebContextMenuData::kMediaTypePlugin;
-        WebPluginContainerImpl* plugin = ToWebPluginContainerImpl(plugin_view);
-        WebString text = plugin->Plugin()->SelectionAsText();
+
+        WebPlugin* plugin = ToWebPluginContainerImpl(plugin_view)->Plugin();
+        data.link_url = plugin->LinkAtPosition(data.mouse_position);
+
+        HTMLPlugInElement* plugin_element = ToHTMLPlugInElement(r.InnerNode());
+        data.src_url =
+            plugin_element->GetDocument().CompleteURL(plugin_element->Url());
+
+        // Figure out the text selection and text edit flags.
+        WebString text = plugin->SelectionAsText();
         if (!text.IsEmpty()) {
           data.selected_text = text;
           data.edit_flags |= WebContextMenuData::kCanCopy;
         }
-        bool plugin_can_edit_text = plugin->Plugin()->CanEditText();
+        bool plugin_can_edit_text = plugin->CanEditText();
         if (plugin_can_edit_text) {
           data.is_editable = true;
           if (!!(data.edit_flags & WebContextMenuData::kCanCopy))
@@ -312,20 +320,18 @@
           // focus is within an editable text area.
           data.edit_flags &= ~WebContextMenuData::kCanSelectAll;
         }
+        // Disable translation for plugins.
         data.edit_flags &= ~WebContextMenuData::kCanTranslate;
-        data.link_url = plugin->Plugin()->LinkAtPosition(data.mouse_position);
-        if (plugin->Plugin()->SupportsPaginatedPrint())
-          data.media_flags |= WebContextMenuData::kMediaCanPrint;
 
-        HTMLPlugInElement* plugin_element = ToHTMLPlugInElement(r.InnerNode());
-        data.src_url =
-            plugin_element->GetDocument().CompleteURL(plugin_element->Url());
+        // Figure out the media flags.
         data.media_flags |= WebContextMenuData::kMediaCanSave;
+        if (plugin->SupportsPaginatedPrint())
+          data.media_flags |= WebContextMenuData::kMediaCanPrint;
 
         // Add context menu commands that are supported by the plugin.
         // Only show rotate view options if focus is not in an editable text
         // area.
-        if (!plugin_can_edit_text && plugin->Plugin()->CanRotateView())
+        if (!plugin_can_edit_text && plugin->CanRotateView())
           data.media_flags |= WebContextMenuData::kMediaCanRotate;
       }
     }
diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.h b/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.h
index 979a3a9b..ef1e0a4 100644
--- a/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.h
+++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.h
@@ -5,9 +5,7 @@
 #ifndef ThreadedWorkletObjectProxy_h
 #define ThreadedWorkletObjectProxy_h
 
-#include "bindings/core/v8/SourceLocation.h"
 #include "core/CoreExport.h"
-#include "core/dom/MessagePort.h"
 #include "core/workers/ThreadedObjectProxyBase.h"
 #include "core/workers/WorkerReportingProxy.h"
 
@@ -18,6 +16,9 @@
 
 // A proxy to talk to the parent worker object. See class comments on
 // ThreadedObjectProxyBase.h for lifetime of this class etc.
+// TODO(nhiroki): Consider merging this class into ThreadedObjectProxyBase
+// after EvaluateScript() for classic script loading is removed in favor of
+// module script loading.
 class CORE_EXPORT ThreadedWorkletObjectProxy : public ThreadedObjectProxyBase {
   USING_FAST_MALLOC(ThreadedWorkletObjectProxy);
   WTF_MAKE_NONCOPYABLE(ThreadedWorkletObjectProxy);
@@ -28,16 +29,9 @@
       ParentFrameTaskRunners*);
   ~ThreadedWorkletObjectProxy() override;
 
-  virtual void EvaluateScript(const String& source,
-                              const KURL& script_url,
-                              WorkerThread*);
-
-  // ThreadedObjectProxyBase overrides.
-  void ReportException(const String& error_message,
-                       std::unique_ptr<SourceLocation>,
-                       int exception_id) final {}
-  void DidEvaluateWorkerScript(bool success) final {}
-  void WillDestroyWorkerGlobalScope() final {}
+  void EvaluateScript(const String& source,
+                      const KURL& script_url,
+                      WorkerThread*);
 
  protected:
   ThreadedWorkletObjectProxy(ThreadedWorkletMessagingProxy*,
diff --git a/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h b/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h
index 8c4e9fb..54240ec 100644
--- a/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h
+++ b/third_party/WebKit/Source/core/workers/WorkerReportingProxy.h
@@ -44,7 +44,10 @@
 
 class WorkerOrWorkletGlobalScope;
 
-// APIs used by workers to report console and worker activity.
+// APIs used by workers to report console and worker activity. Some functions
+// are called only for classic scripts and some of others are called only for
+// module scripts. They're annotated with [classic script only] or [module
+// script only].
 class CORE_EXPORT WorkerReportingProxy {
  public:
   virtual ~WorkerReportingProxy() {}
@@ -81,20 +84,28 @@
       const ContentSecurityPolicyResponseHeaders&,
       const String& referrer_policy_on_worker_thread) {}
 
+  // [classic script only]
   // Invoked when the worker script is about to be evaluated on
   // WorkerThread::InitializeOnWorkerThread.
   virtual void WillEvaluateWorkerScript(size_t script_size,
                                         size_t cached_metadata_size) {}
 
+  // [classic script only]
   // Invoked when an imported script is about to be evaluated.
   virtual void WillEvaluateImportedScript(size_t script_size,
                                           size_t cached_metadata_size) {}
 
+  // [classic script only]
   // Invoked when the worker script is evaluated on
   // WorkerThread::InitializeOnWorkerThread. |success| is true if the evaluation
   // completed with no uncaught exception.
   virtual void DidEvaluateWorkerScript(bool success) {}
 
+  // [module script only]
+  // Invoked when the module script is evaluated. |success| is true if the
+  // evaluation completed with no uncaught exception.
+  virtual void DidEvaluateModuleScript(bool success) {}
+
   // Invoked when close() is invoked on the worker context.
   virtual void DidCloseWorkerGlobalScope() {}
 
diff --git a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp
index fa954aa..35dc152 100644
--- a/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkletGlobalScope.cpp
@@ -13,6 +13,7 @@
 #include "core/inspector/MainThreadDebugger.h"
 #include "core/loader/modulescript/ModuleScriptFetchRequest.h"
 #include "core/probe/CoreProbes.h"
+#include "core/workers/WorkerReportingProxy.h"
 #include "core/workers/WorkletModuleResponsesMap.h"
 #include "core/workers/WorkletModuleTreeClient.h"
 #include "core/workers/WorkletPendingTasks.h"
@@ -34,6 +35,8 @@
 
 WorkletGlobalScope::~WorkletGlobalScope() = default;
 
+// TODO(nhiroki): Remove this function after module loading for threaded
+// worklets is enabled.
 void WorkletGlobalScope::EvaluateClassicScript(
     const KURL& script_url,
     String source_code,
@@ -42,18 +45,15 @@
   if (source_code.IsNull()) {
     // |source_code| is null when this is called during worker thread startup.
     // Worklet will evaluate the script later via Worklet.addModule().
-    // TODO(nhiroki): Add NOTREACHED() once threaded worklet supports module
-    // loading.
     return;
   }
   DCHECK(!cached_meta_data);
   // TODO(nhiroki): Call WorkerReportingProxy::WillEvaluateWorkerScript() or
   // something like that (e.g., WillEvaluateModuleScript()).
-  ScriptController()->Evaluate(ScriptSourceCode(source_code, script_url),
-                               nullptr /* error_event */,
-                               nullptr /* cache_handler */, v8_cache_options);
-  // TODO(nhiroki): Call WorkerReportingProxy::DidEvaluateWorkerScript() or
-  // something like that (e.g., DidEvaluateModuleScript()).
+  bool success = ScriptController()->Evaluate(
+      ScriptSourceCode(source_code, script_url), nullptr /* error_event */,
+      nullptr /* cache_handler */, v8_cache_options);
+  ReportingProxy().DidEvaluateModuleScript(success);
 }
 
 v8::Local<v8::Object> WorkletGlobalScope::Wrap(
diff --git a/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.cpp b/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.cpp
index 2762fde..c01fb6d 100644
--- a/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.cpp
@@ -6,6 +6,8 @@
 
 #include "core/dom/ModuleScript.h"
 #include "core/dom/TaskRunnerHelper.h"
+#include "core/workers/WorkerReportingProxy.h"
+#include "core/workers/WorkletGlobalScope.h"
 #include "platform/CrossThreadFunctional.h"
 
 namespace blink {
@@ -38,8 +40,10 @@
   // something like that (e.g., WillEvaluateModuleScript()).
   // Step 4: "Run a module script given script."
   modulator_->ExecuteModule(module_script);
-  // TODO(nhiroki): Call WorkerReportingProxy::DidEvaluateWorkerScript() or
-  // something like that (e.g., DidEvaluateModuleScript()).
+  WorkletGlobalScope* global_scope = ToWorkletGlobalScope(
+      ExecutionContext::From(modulator_->GetScriptState()));
+  global_scope->ReportingProxy().DidEvaluateModuleScript(
+      !module_script->IsErrored());
 
   // Step 5: "Queue a task on outsideSettings's responsible event loop to run
   // these steps:"
diff --git a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
index df9ec0e..1340ed5 100644
--- a/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/BaseRenderingContext2D.cpp
@@ -1229,9 +1229,10 @@
   FloatSize default_object_size(Width(), Height());
   SourceImageStatus source_image_status = kInvalidSourceImageStatus;
   if (!image_source->IsVideoElement()) {
-    AccelerationHint hint = GetImageBuffer()->IsAccelerated()
-                                ? kPreferAcceleration
-                                : kPreferNoAcceleration;
+    AccelerationHint hint =
+        (GetImageBuffer() && GetImageBuffer()->IsAccelerated())
+            ? kPreferAcceleration
+            : kPreferNoAcceleration;
     image = image_source->GetSourceImageForCanvas(&source_image_status, hint,
                                                   kSnapshotReasonDrawImage,
                                                   default_object_size);
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.cpp
index 247b290..5829a1e 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.cpp
@@ -4,13 +4,10 @@
 
 #include "modules/webaudio/AudioWorkletObjectProxy.h"
 
-#include "bindings/core/v8/ScriptSourceCode.h"
-#include "bindings/core/v8/WorkerOrWorkletScriptController.h"
 #include "core/workers/ThreadedWorkletMessagingProxy.h"
 #include "core/workers/WorkerThread.h"
 #include "modules/webaudio/AudioWorkletGlobalScope.h"
 #include "modules/webaudio/AudioWorkletMessagingProxy.h"
-
 #include "platform/CrossThreadFunctional.h"
 
 namespace blink {
@@ -22,14 +19,13 @@
           static_cast<ThreadedWorkletMessagingProxy*>(messaging_proxy_weak_ptr),
           parent_frame_task_runners) {}
 
-void AudioWorkletObjectProxy::EvaluateScript(const String& source,
-                                             const KURL& script_url,
-                                             WorkerThread* worker_thread) {
-  AudioWorkletGlobalScope* global_scope =
-      ToAudioWorkletGlobalScope(worker_thread->GlobalScope());
-  global_scope->ScriptController()->Evaluate(
-      ScriptSourceCode(source, script_url));
+void AudioWorkletObjectProxy::DidCreateWorkerGlobalScope(
+    WorkerOrWorkletGlobalScope* global_scope) {
+  global_scope_ = ToAudioWorkletGlobalScope(global_scope);
+}
 
+void AudioWorkletObjectProxy::DidEvaluateModuleScript(bool success) {
+  DCHECK(global_scope_);
   // TODO(crbug.com/755566): Extract/build the information for synchronization
   // and send it to the associated AudioWorkletMessagingProxy. Currently this
   // is an empty cross-thread call for the future implementation.
@@ -41,6 +37,10 @@
                 GetAudioWorkletMessagingProxyWeakPtr()));
 }
 
+void AudioWorkletObjectProxy::WillDestroyWorkerGlobalScope() {
+  global_scope_ = nullptr;
+}
+
 CrossThreadWeakPersistent<AudioWorkletMessagingProxy>
 AudioWorkletObjectProxy::GetAudioWorkletMessagingProxyWeakPtr() {
   return static_cast<AudioWorkletMessagingProxy*>(
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.h b/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.h
index 6286710..d98c501 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletObjectProxy.h
@@ -10,6 +10,7 @@
 
 namespace blink {
 
+class AudioWorkletGlobalScope;
 class AudioWorkletMessagingProxy;
 
 class MODULES_EXPORT AudioWorkletObjectProxy final
@@ -18,13 +19,16 @@
   AudioWorkletObjectProxy(AudioWorkletMessagingProxy*,
                           ParentFrameTaskRunners*);
 
-  void EvaluateScript(const String& source,
-                      const KURL& script_url,
-                      WorkerThread*) final;
+  // Implements WorkerReportingProxy.
+  void DidCreateWorkerGlobalScope(WorkerOrWorkletGlobalScope*) override;
+  void DidEvaluateModuleScript(bool success) override;
+  void WillDestroyWorkerGlobalScope() override;
 
  private:
   CrossThreadWeakPersistent<AudioWorkletMessagingProxy>
       GetAudioWorkletMessagingProxyWeakPtr();
+
+  CrossThreadPersistent<AudioWorkletGlobalScope> global_scope_;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/platform/LongTaskDetector.h b/third_party/WebKit/Source/platform/LongTaskDetector.h
index 6ac5377..4f072cf 100644
--- a/third_party/WebKit/Source/platform/LongTaskDetector.h
+++ b/third_party/WebKit/Source/platform/LongTaskDetector.h
@@ -46,7 +46,6 @@
   // scheduler::TaskTimeObserver implementation
   void WillProcessTask(double start_time) override {}
   void DidProcessTask(double start_time, double end_time) override;
-  void OnBeginNestedRunLoop() override {}
 
   HeapHashSet<WeakMember<LongTaskObserver>> observers_;
 };
diff --git a/third_party/WebKit/Source/platform/instrumentation/tracing/web_memory_allocator_dump.cc b/third_party/WebKit/Source/platform/instrumentation/tracing/web_memory_allocator_dump.cc
index 7219fe5..b1cdf169 100644
--- a/third_party/WebKit/Source/platform/instrumentation/tracing/web_memory_allocator_dump.cc
+++ b/third_party/WebKit/Source/platform/instrumentation/tracing/web_memory_allocator_dump.cc
@@ -22,12 +22,6 @@
   memory_allocator_dump_->AddScalar(name, units, value);
 }
 
-void WebMemoryAllocatorDump::AddScalarF(const char* name,
-                                        const char* units,
-                                        double value) {
-  memory_allocator_dump_->AddScalarF(name, units, value);
-}
-
 void WebMemoryAllocatorDump::AddString(const char* name,
                                        const char* units,
                                        const String& value) {
diff --git a/third_party/WebKit/Source/platform/instrumentation/tracing/web_memory_allocator_dump.h b/third_party/WebKit/Source/platform/instrumentation/tracing/web_memory_allocator_dump.h
index d752558..990a0ae 100644
--- a/third_party/WebKit/Source/platform/instrumentation/tracing/web_memory_allocator_dump.h
+++ b/third_party/WebKit/Source/platform/instrumentation/tracing/web_memory_allocator_dump.h
@@ -38,7 +38,6 @@
   //       Currently supported values are "bytes" and "objects".
   //   value: the value of the attribute.
   void AddScalar(const char* name, const char* units, uint64_t value);
-  void AddScalarF(const char* name, const char* units, double value);
   void AddString(const char* name, const char* units, const String& value);
 
   // |guid| is an optional global dump identifier, unique across all processes
diff --git a/third_party/WebKit/Source/platform/instrumentation/tracing/web_process_memory_dump_test.cc b/third_party/WebKit/Source/platform/instrumentation/tracing/web_process_memory_dump_test.cc
index a3e3353..f3e9d8c 100644
--- a/third_party/WebKit/Source/platform/instrumentation/tracing/web_process_memory_dump_test.cc
+++ b/third_party/WebKit/Source/platform/instrumentation/tracing/web_process_memory_dump_test.cc
@@ -44,7 +44,6 @@
   // Make sure that wpmd2 is still usable after it has been emptied.
   auto wmad = wpmd2->CreateMemoryAllocatorDump("2/new");
   wmad->AddScalar("attr_name", "bytes", 42);
-  wmad->AddScalarF("attr_name_2", "rate", 42.0f);
   ASSERT_EQ(1u, wpmd2->process_memory_dump()->allocator_dumps().size());
   auto mad = wpmd2->process_memory_dump()->GetAllocatorDump("2/new");
   ASSERT_NE(static_cast<base::trace_event::MemoryAllocatorDump*>(nullptr), mad);
@@ -62,13 +61,6 @@
   ASSERT_TRUE(attr->GetString("units", &attr_value));
   ASSERT_EQ("bytes", attr_value);
 
-  ASSERT_TRUE(attrs->GetDictionary("attr_name_2", &attr));
-  ASSERT_TRUE(attr->GetString("type", &attr_value));
-  ASSERT_EQ(base::trace_event::MemoryAllocatorDump::kTypeScalar, attr_value);
-  ASSERT_TRUE(attr->GetString("units", &attr_value));
-  ASSERT_EQ("rate", attr_value);
-  ASSERT_TRUE(attr->HasKey("value"));
-
   // Check that AsValueInto() doesn't cause a crash.
   wpmd2->process_memory_dump()->AsValueInto(traced_value.get());
 
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
index fa06b9b..e8bf674 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
@@ -906,6 +906,17 @@
   return !immediate_incoming_queue().empty();
 }
 
+void TaskQueueImpl::SetOnTaskStartedHandler(
+    TaskQueueImpl::OnTaskStartedHandler handler) {
+  main_thread_only().on_task_started_handler = std::move(handler);
+}
+
+void TaskQueueImpl::OnTaskStarted(const TaskQueue::Task& task,
+                                  base::TimeTicks start) {
+  if (!main_thread_only().on_task_started_handler.is_null())
+    main_thread_only().on_task_started_handler.Run(task, start);
+}
+
 void TaskQueueImpl::SetOnTaskCompletedHandler(
     TaskQueueImpl::OnTaskCompletedHandler handler) {
   main_thread_only().on_task_completed_handler = std::move(handler);
@@ -918,6 +929,11 @@
     main_thread_only().on_task_completed_handler.Run(task, start, end);
 }
 
+bool TaskQueueImpl::RequiresTaskTiming() const {
+  return !main_thread_only().on_task_started_handler.is_null() ||
+         !main_thread_only().on_task_completed_handler.is_null();
+}
+
 void TaskQueueImpl::SetQueueEnabledForTest(bool enabled) {
   main_thread_only().is_enabled_for_test = enabled;
   EnableOrDisableWithSelector(IsQueueEnabled());
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
index d1baab9..cdb81fe3 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
@@ -135,6 +135,8 @@
   };
 
   using OnNextWakeUpChangedCallback = base::Callback<void(base::TimeTicks)>;
+  using OnTaskStartedHandler =
+      base::Callback<void(const TaskQueue::Task&, base::TimeTicks)>;
   using OnTaskCompletedHandler = base::Callback<
       void(const TaskQueue::Task&, base::TimeTicks, base::TimeTicks)>;
 
@@ -261,11 +263,14 @@
   void SweepCanceledDelayedTasks(base::TimeTicks now);
 
   // Allows wrapping TaskQueue to set a handler to subscribe for notifications
-  // about completed tasks.
+  // about started and completed tasks.
+  void SetOnTaskStartedHandler(OnTaskStartedHandler handler);
+  void OnTaskStarted(const TaskQueue::Task& task, base::TimeTicks start);
   void SetOnTaskCompletedHandler(OnTaskCompletedHandler handler);
   void OnTaskCompleted(const TaskQueue::Task& task,
                        base::TimeTicks start,
                        base::TimeTicks end);
+  bool RequiresTaskTiming() const;
 
   // Disables queue for testing purposes, when a QueueEnabledVoter can't be
   // constructed due to not having TaskQueue.
@@ -318,6 +323,7 @@
     base::trace_event::BlameContext* blame_context;  // Not owned.
     EnqueueOrder current_fence;
     base::Optional<base::TimeTicks> scheduled_time_domain_wake_up;
+    OnTaskStartedHandler on_task_started_handler;
     OnTaskCompletedHandler on_task_completed_handler;
     // If false, queue will be disabled. Used only for tests.
     bool is_enabled_for_test;
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
index 77626df..9e62623 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
@@ -181,11 +181,8 @@
     any_thread().immediate_do_work_posted_count++;
     any_thread().is_nested = true;
   }
-
-  // When a nested run loop starts, task time observers may want to ignore
-  // the current task.
-  for (auto& observer : task_time_observers_)
-    observer.OnBeginNestedRunLoop();
+  if (observer_)
+    observer_->OnBeginNestedRunLoop();
 
   delegate_->PostTask(FROM_HERE, immediate_do_work_closure_);
 }
@@ -504,7 +501,8 @@
   if (record_task_delay_histograms_)
     MaybeRecordTaskDelayHistograms(pending_task, queue);
 
-  double task_start_time = 0;
+  double task_start_time_sec = 0;
+  base::TimeTicks task_start_time;
   TRACE_TASK_EXECUTION("TaskQueueManager::ProcessTaskFromWorkQueue",
                        pending_task);
   if (queue->GetShouldNotifyObservers()) {
@@ -512,12 +510,15 @@
       observer.WillProcessTask(pending_task);
     queue->NotifyWillProcessTask(pending_task);
 
-    bool notify_time_observers =
-        !delegate_->IsNested() && task_time_observers_.might_have_observers();
+    bool notify_time_observers = !delegate_->IsNested() &&
+                                 (task_time_observers_.might_have_observers() ||
+                                  queue->RequiresTaskTiming());
     if (notify_time_observers) {
-      task_start_time = MonotonicTimeInSeconds(time_before_task.Now());
+      task_start_time = time_before_task.Now();
+      task_start_time_sec = MonotonicTimeInSeconds(task_start_time);
       for (auto& observer : task_time_observers_)
-        observer.WillProcessTask(task_start_time);
+        observer.WillProcessTask(task_start_time_sec);
+      queue->OnTaskStarted(pending_task, task_start_time);
     }
   }
 
@@ -537,14 +538,14 @@
 
   currently_executing_task_queue_ = prev_executing_task_queue;
 
-  double task_end_time = 0;
+  double task_end_time_sec = 0;
   if (queue->GetShouldNotifyObservers()) {
-    if (task_start_time) {
+    if (task_start_time_sec) {
       *time_after_task = real_time_domain()->Now();
-      task_end_time = MonotonicTimeInSeconds(*time_after_task);
+      task_end_time_sec = MonotonicTimeInSeconds(*time_after_task);
 
       for (auto& observer : task_time_observers_)
-        observer.DidProcessTask(task_start_time, task_end_time);
+        observer.DidProcessTask(task_start_time_sec, task_end_time_sec);
     }
 
     for (auto& observer : task_observers_)
@@ -552,17 +553,13 @@
     queue->NotifyDidProcessTask(pending_task);
   }
 
-  if (task_start_time && task_end_time) {
-    queue->OnTaskCompleted(
-        pending_task,
-        base::TimeTicks() + base::TimeDelta::FromSecondsD(task_start_time),
-        base::TimeTicks() + base::TimeDelta::FromSecondsD(task_end_time));
-  }
+  if (task_start_time_sec && task_end_time_sec)
+    queue->OnTaskCompleted(pending_task, task_start_time, *time_after_task);
 
-  if (task_start_time && task_end_time &&
-      task_end_time - task_start_time > kLongTaskTraceEventThreshold) {
+  if (task_start_time_sec && task_end_time_sec &&
+      task_end_time_sec - task_start_time_sec > kLongTaskTraceEventThreshold) {
     TRACE_EVENT_INSTANT1("blink", "LongTask", TRACE_EVENT_SCOPE_THREAD,
-                         "duration", task_end_time - task_start_time);
+                         "duration", task_end_time_sec - task_start_time_sec);
   }
 
   return ProcessTaskResult::EXECUTED;
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
index 5e86eda7..2bbf7095 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.h
@@ -115,6 +115,8 @@
     virtual ~Observer() {}
 
     virtual void OnTriedToExecuteBlockedTask() = 0;
+
+    virtual void OnBeginNestedRunLoop() = 0;
   };
 
   // Called once to set the Observer. This function is called on the main
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc
index 91a5963..a77fe1a 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager_unittest.cc
@@ -1417,6 +1417,7 @@
 class MockObserver : public TaskQueueManager::Observer {
  public:
   MOCK_METHOD0(OnTriedToExecuteBlockedTask, void());
+  MOCK_METHOD0(OnBeginNestedRunLoop, void());
 };
 
 }  // namespace
@@ -2915,5 +2916,99 @@
   manager_->UnregisterTimeDomain(domain.get());
 }
 
+namespace {
+void SetOnTaskHandlers(scoped_refptr<TestTaskQueue> task_queue,
+                       int* start_counter,
+                       int* complete_counter) {
+  task_queue->GetTaskQueueImpl()->SetOnTaskStartedHandler(
+      base::Bind([](int* counter, const TaskQueue::Task& task,
+                    base::TimeTicks start) { ++(*counter); },
+                 start_counter));
+  task_queue->GetTaskQueueImpl()->SetOnTaskCompletedHandler(base::Bind(
+      [](int* counter, const TaskQueue::Task& task, base::TimeTicks start,
+         base::TimeTicks end) { ++(*counter); },
+      complete_counter));
+}
+
+void UnsetOnTaskHandlers(scoped_refptr<TestTaskQueue> task_queue) {
+  task_queue->GetTaskQueueImpl()->SetOnTaskStartedHandler(
+      base::Callback<void(const TaskQueue::Task& task,
+                          base::TimeTicks start)>());
+  task_queue->GetTaskQueueImpl()->SetOnTaskCompletedHandler(
+      base::Callback<void(const TaskQueue::Task& task, base::TimeTicks start,
+                          base::TimeTicks end)>());
+}
+}  // namespace
+
+TEST_F(TaskQueueManagerTest, ProcessTasksWithoutTaskTimeObservers) {
+  Initialize(1u);
+  int start_counter = 0;
+  int complete_counter = 0;
+  std::vector<EnqueueOrder> run_order;
+  SetOnTaskHandlers(runners_[0], &start_counter, &complete_counter);
+  EXPECT_TRUE(runners_[0]->GetTaskQueueImpl()->RequiresTaskTiming());
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 1, &run_order));
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 2, &run_order));
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 3, &run_order));
+  test_task_runner_->RunUntilIdle();
+  EXPECT_EQ(start_counter, 3);
+  EXPECT_EQ(complete_counter, 3);
+  EXPECT_THAT(run_order, ElementsAre(1, 2, 3));
+
+  UnsetOnTaskHandlers(runners_[0]);
+  EXPECT_FALSE(runners_[0]->GetTaskQueueImpl()->RequiresTaskTiming());
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 4, &run_order));
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 5, &run_order));
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 6, &run_order));
+  test_task_runner_->RunUntilIdle();
+  EXPECT_EQ(start_counter, 3);
+  EXPECT_EQ(complete_counter, 3);
+  EXPECT_THAT(run_order, ElementsAre(1, 2, 3, 4, 5, 6));
+}
+
+TEST_F(TaskQueueManagerTest, ProcessTasksWithTaskTimeObservers) {
+  Initialize(1u);
+  int start_counter = 0;
+  int complete_counter = 0;
+
+  manager_->AddTaskTimeObserver(&test_task_time_observer_);
+  SetOnTaskHandlers(runners_[0], &start_counter, &complete_counter);
+  EXPECT_TRUE(runners_[0]->GetTaskQueueImpl()->RequiresTaskTiming());
+  std::vector<EnqueueOrder> run_order;
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 1, &run_order));
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 2, &run_order));
+  test_task_runner_->RunUntilIdle();
+  EXPECT_EQ(start_counter, 2);
+  EXPECT_EQ(complete_counter, 2);
+  EXPECT_THAT(run_order, ElementsAre(1, 2));
+
+  UnsetOnTaskHandlers(runners_[0]);
+  EXPECT_FALSE(runners_[0]->GetTaskQueueImpl()->RequiresTaskTiming());
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 3, &run_order));
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 4, &run_order));
+  test_task_runner_->RunUntilIdle();
+  EXPECT_EQ(start_counter, 2);
+  EXPECT_EQ(complete_counter, 2);
+  EXPECT_THAT(run_order, ElementsAre(1, 2, 3, 4));
+
+  manager_->RemoveTaskTimeObserver(&test_task_time_observer_);
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 5, &run_order));
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 6, &run_order));
+  test_task_runner_->RunUntilIdle();
+  EXPECT_EQ(start_counter, 2);
+  EXPECT_EQ(complete_counter, 2);
+  EXPECT_FALSE(runners_[0]->GetTaskQueueImpl()->RequiresTaskTiming());
+  EXPECT_THAT(run_order, ElementsAre(1, 2, 3, 4, 5, 6));
+
+  SetOnTaskHandlers(runners_[0], &start_counter, &complete_counter);
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 7, &run_order));
+  runners_[0]->PostTask(FROM_HERE, base::Bind(&TestTask, 8, &run_order));
+  test_task_runner_->RunUntilIdle();
+  EXPECT_EQ(start_counter, 4);
+  EXPECT_EQ(complete_counter, 4);
+  EXPECT_TRUE(runners_[0]->GetTaskQueueImpl()->RequiresTaskTiming());
+  EXPECT_THAT(run_order, ElementsAre(1, 2, 3, 4, 5, 6, 7, 8));
+}
+
 }  // namespace scheduler
 }  // namespace blink
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_time_observer.h b/third_party/WebKit/Source/platform/scheduler/base/task_time_observer.h
index 85b0ad9..38124e5 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_time_observer.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_time_observer.h
@@ -26,9 +26,6 @@
   // |end_time| - time in seconds when task was completed.
   virtual void DidProcessTask(double start_time, double end_time) = 0;
 
-  // Callback to be called when we enter a nested run loop.
-  virtual void OnBeginNestedRunLoop() = 0;
-
  private:
   DISALLOW_COPY_AND_ASSIGN(TaskTimeObserver);
 };
diff --git a/third_party/WebKit/Source/platform/scheduler/base/test_task_time_observer.h b/third_party/WebKit/Source/platform/scheduler/base/test_task_time_observer.h
index 794a6617..db5d2f1 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/test_task_time_observer.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/test_task_time_observer.h
@@ -15,7 +15,6 @@
  public:
   void WillProcessTask(double start_time) override {}
   void DidProcessTask(double start_time, double end_time) override {}
-  void OnBeginNestedRunLoop() override {}
 };
 
 }  // namespace scheduler
diff --git a/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper.cc b/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper.cc
index 2fa8cd8d..e134a23 100644
--- a/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper.cc
+++ b/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper.cc
@@ -139,5 +139,10 @@
     observer_->OnTriedToExecuteBlockedTask();
 }
 
+void SchedulerHelper::OnBeginNestedRunLoop() {
+  if (observer_)
+    observer_->OnBeginNestedRunLoop();
+}
+
 }  // namespace scheduler
 }  // namespace blink
diff --git a/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper.h b/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper.h
index ce645c81..9a38772 100644
--- a/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper.h
+++ b/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper.h
@@ -31,6 +31,7 @@
 
   // TaskQueueManager::Observer implementation:
   void OnTriedToExecuteBlockedTask() override;
+  void OnBeginNestedRunLoop() override;
 
   // Returns the default task queue.
   virtual scoped_refptr<TaskQueue> DefaultTaskQueue() = 0;
@@ -68,6 +69,9 @@
     // Called when the scheduler tried to execute a task from a disabled
     // queue. See TaskQueue::Spec::SetShouldReportWhenExecutionBlocked.
     virtual void OnTriedToExecuteBlockedTask() = 0;
+
+    // Called when scheduler executes task with nested run loop.
+    virtual void OnBeginNestedRunLoop() = 0;
   };
 
   // Called once to set the Observer. This function is called on the main
diff --git a/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper_unittest.cc b/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper_unittest.cc
index 07ba9f9..c210ed7 100644
--- a/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/child/scheduler_helper_unittest.cc
@@ -188,6 +188,7 @@
 class MockObserver : public SchedulerHelper::Observer {
  public:
   MOCK_METHOD0(OnTriedToExecuteBlockedTask, void());
+  MOCK_METHOD0(OnBeginNestedRunLoop, void());
 };
 
 }  // namespace
diff --git a/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_impl.cc
index b9d6648..d9b4f8e 100644
--- a/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_impl.cc
@@ -148,7 +148,5 @@
   load_tracker_.RecordTaskTime(start_time_ticks, end_time_ticks);
 }
 
-void WorkerSchedulerImpl::OnBeginNestedRunLoop() {}
-
 }  // namespace scheduler
 }  // namespace blink
diff --git a/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_impl.h b/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_impl.h
index 0fdc4f2..1c425fe 100644
--- a/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/child/worker_scheduler_impl.h
@@ -42,7 +42,6 @@
   // TaskTimeObserver implementation:
   void WillProcessTask(double start_time) override;
   void DidProcessTask(double start_time, double end_time) override;
-  void OnBeginNestedRunLoop() override;
 
   SchedulerHelper* GetSchedulerHelperForTesting();
   base::TimeTicks CurrentIdleTaskDeadlineForTesting() const;
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/main_thread_task_queue.cc b/third_party/WebKit/Source/platform/scheduler/renderer/main_thread_task_queue.cc
index 9d38c9d..ac3c659a 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/main_thread_task_queue.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/main_thread_task_queue.cc
@@ -88,16 +88,25 @@
       can_be_stopped_(params.can_be_stopped),
       used_for_control_tasks_(params.used_for_control_tasks),
       renderer_scheduler_(renderer_scheduler) {
+  GetTaskQueueImpl()->SetOnTaskStartedHandler(
+      base::Bind(&MainThreadTaskQueue::OnTaskStarted, base::Unretained(this)));
   GetTaskQueueImpl()->SetOnTaskCompletedHandler(base::Bind(
       &MainThreadTaskQueue::OnTaskCompleted, base::Unretained(this)));
 }
 
 MainThreadTaskQueue::~MainThreadTaskQueue() {}
 
+void MainThreadTaskQueue::OnTaskStarted(const TaskQueue::Task& task,
+                                        base::TimeTicks start) {
+  if (renderer_scheduler_)
+    renderer_scheduler_->OnTaskStarted(this, task, start);
+}
+
 void MainThreadTaskQueue::OnTaskCompleted(const TaskQueue::Task& task,
                                           base::TimeTicks start,
                                           base::TimeTicks end) {
-  renderer_scheduler_->OnTaskCompleted(this, task, start, end);
+  if (renderer_scheduler_)
+    renderer_scheduler_->OnTaskCompleted(this, task, start, end);
 }
 
 void MainThreadTaskQueue::UnregisterTaskQueue() {
@@ -108,5 +117,13 @@
   TaskQueue::UnregisterTaskQueue();
 }
 
+WebFrameScheduler* MainThreadTaskQueue::GetFrameScheduler() const {
+  return web_frame_scheduler_;
+}
+
+void MainThreadTaskQueue::SetFrameScheduler(WebFrameScheduler* frame) {
+  web_frame_scheduler_ = frame;
+}
+
 }  // namespace scheduler
 }  // namespace blink
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/main_thread_task_queue.h b/third_party/WebKit/Source/platform/scheduler/renderer/main_thread_task_queue.h
index cedc7c5..b014ee9e 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/main_thread_task_queue.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/main_thread_task_queue.h
@@ -8,6 +8,9 @@
 #include "platform/scheduler/base/task_queue.h"
 
 namespace blink {
+
+class WebFrameScheduler;
+
 namespace scheduler {
 
 class RendererSchedulerImpl;
@@ -109,6 +112,7 @@
 
     QueueType queue_type;
     TaskQueue::Spec spec;
+    WebFrameScheduler* frame_;
     bool can_be_blocked;
     bool can_be_throttled;
     bool can_be_paused;
@@ -132,6 +136,8 @@
 
   bool UsedForControlTasks() const { return used_for_control_tasks_; }
 
+  void OnTaskStarted(const TaskQueue::Task& task, base::TimeTicks start);
+
   void OnTaskCompleted(const TaskQueue::Task& task,
                        base::TimeTicks start,
                        base::TimeTicks end);
@@ -139,6 +145,9 @@
   // Override base method to notify RendererScheduler about unregistered queue.
   void UnregisterTaskQueue() override;
 
+  WebFrameScheduler* GetFrameScheduler() const;
+  void SetFrameScheduler(WebFrameScheduler* frame);
+
  private:
   MainThreadTaskQueue(std::unique_ptr<internal::TaskQueueImpl> impl,
                       const QueueCreationParams& params,
@@ -157,6 +166,8 @@
   // Needed to notify renderer scheduler about completed tasks.
   RendererSchedulerImpl* renderer_scheduler_;  // NOT OWNED
 
+  WebFrameScheduler* web_frame_scheduler_;  // NOT OWNED
+
   DISALLOW_COPY_AND_ASSIGN(MainThreadTaskQueue);
 };
 
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
index 7dbb6aa..74dbd2d 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
@@ -111,7 +111,6 @@
       this);
 
   helper_.SetObserver(this);
-  helper_.AddTaskTimeObserver(this);
 
   // Register a tracing state observer unless we're running in a test without a
   // task runner. Note that it's safe to remove a non-existent observer.
@@ -146,8 +145,6 @@
   if (virtual_time_domain_)
     UnregisterTimeDomain(virtual_time_domain_.get());
 
-  helper_.RemoveTaskTimeObserver(this);
-
   base::trace_event::TraceLog::GetInstance()->RemoveAsyncEnabledStateObserver(
       this);
 
@@ -1879,24 +1876,12 @@
   }
 }
 
-void RendererSchedulerImpl::WillProcessTask(double start_time) {
-  base::TimeTicks start_time_ticks =
-      MonotonicTimeInSecondsToTimeTicks(start_time);
-  main_thread_only().current_task_start_time = start_time_ticks;
-
+void RendererSchedulerImpl::OnTaskStarted(MainThreadTaskQueue* queue,
+                                          const TaskQueue::Task& task,
+                                          base::TimeTicks start) {
+  main_thread_only().current_task_start_time = start;
   seqlock_queueing_time_estimator_.seqlock.WriteBegin();
-  seqlock_queueing_time_estimator_.data.OnTopLevelTaskStarted(start_time_ticks);
-  seqlock_queueing_time_estimator_.seqlock.WriteEnd();
-}
-
-void RendererSchedulerImpl::DidProcessTask(double start_time, double end_time) {
-  DCHECK_LE(start_time, end_time);
-  // TODO(scheduler-dev): Remove conversions when Blink starts using
-  // base::TimeTicks instead of doubles for time.
-  base::TimeTicks end_time_ticks = MonotonicTimeInSecondsToTimeTicks(end_time);
-
-  seqlock_queueing_time_estimator_.seqlock.WriteBegin();
-  seqlock_queueing_time_estimator_.data.OnTopLevelTaskCompleted(end_time_ticks);
+  seqlock_queueing_time_estimator_.data.OnTopLevelTaskStarted(start);
   seqlock_queueing_time_estimator_.seqlock.WriteEnd();
 }
 
@@ -1904,6 +1889,11 @@
                                             const TaskQueue::Task& task,
                                             base::TimeTicks start,
                                             base::TimeTicks end) {
+  DCHECK_LE(start, end);
+  seqlock_queueing_time_estimator_.seqlock.WriteBegin();
+  seqlock_queueing_time_estimator_.data.OnTopLevelTaskCompleted(end);
+  seqlock_queueing_time_estimator_.seqlock.WriteEnd();
+
   task_queue_throttler()->OnTaskRunTimeReported(queue, start, end);
 
   // TODO(altimin): Per-page metrics should also be considered.
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h
index eb11315..95c9ed6 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h
@@ -49,7 +49,6 @@
       public IdleHelper::Delegate,
       public MainThreadSchedulerHelper::Observer,
       public RenderWidgetSignals::Observer,
-      public TaskTimeObserver,
       public QueueingTimeEstimator::Client,
       public base::trace_event::TraceLog::AsyncEnabledStateObserver {
  public:
@@ -136,10 +135,6 @@
 
   // SchedulerHelper::Observer implementation:
   void OnTriedToExecuteBlockedTask() override;
-
-  // TaskTimeObserver implementation:
-  void WillProcessTask(double start_time) override;
-  void DidProcessTask(double start_time, double end_time) override;
   void OnBeginNestedRunLoop() override;
 
   // QueueingTimeEstimator::Client implementation:
@@ -235,6 +230,10 @@
 
   void OnUnregisterTaskQueue(const scoped_refptr<MainThreadTaskQueue>& queue);
 
+  void OnTaskStarted(MainThreadTaskQueue* queue,
+                     const TaskQueue::Task& task,
+                     base::TimeTicks start);
+
   void OnTaskCompleted(MainThreadTaskQueue* queue,
                        const TaskQueue::Task& task,
                        base::TimeTicks start,
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
index 36f5954..eb6f4fc 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc
@@ -260,12 +260,16 @@
  public:
   using UseCase = RendererSchedulerImpl::UseCase;
 
-  RendererSchedulerImplTest() : clock_(new base::SimpleTestTickClock()) {
+  RendererSchedulerImplTest()
+      : clock_(new base::SimpleTestTickClock()),
+        fake_task_(FROM_HERE, base::Bind([] {}), base::TimeTicks(), true) {
     clock_->Advance(base::TimeDelta::FromMicroseconds(5000));
   }
 
   RendererSchedulerImplTest(base::MessageLoop* message_loop)
-      : clock_(new base::SimpleTestTickClock()), message_loop_(message_loop) {
+      : clock_(new base::SimpleTestTickClock()),
+        fake_task_(FROM_HERE, base::Bind([] {}), base::TimeTicks(), true),
+        message_loop_(message_loop) {
     clock_->Advance(base::TimeDelta::FromMicroseconds(5000));
   }
 
@@ -294,6 +298,8 @@
         MainThreadTaskQueue::QueueType::FRAME_LOADING_CONTROL);
     idle_task_runner_ = scheduler_->IdleTaskRunner();
     timer_task_runner_ = scheduler_->TimerTaskQueue();
+    fake_queue_ = scheduler_->NewLoadingTaskQueue(
+        MainThreadTaskQueue::QueueType::FRAME_LOADING);
   }
 
   void TearDown() override {
@@ -562,11 +568,11 @@
   }
 
   void AdvanceTimeWithTask(double duration) {
-    double start = (clock_->NowTicks() - base::TimeTicks()).InSecondsF();
+    base::TimeTicks start = clock_->NowTicks();
+    scheduler_->OnTaskStarted(fake_queue_.get(), fake_task_, start);
     clock_->Advance(base::TimeDelta::FromSecondsD(duration));
-    double end = (clock_->NowTicks() - base::TimeTicks()).InSecondsF();
-    scheduler_->WillProcessTask(start);
-    scheduler_->DidProcessTask(start, end);
+    base::TimeTicks end = clock_->NowTicks();
+    scheduler_->OnTaskCompleted(fake_queue_.get(), fake_task_, start, end);
   }
 
   void GetQueueingTimeEstimatorLock() {
@@ -688,6 +694,8 @@
   }
 
   std::unique_ptr<base::SimpleTestTickClock> clock_;
+  TaskQueue::Task fake_task_;
+  scoped_refptr<MainThreadTaskQueue> fake_queue_;
   // Only one of mock_task_runner_ or message_loop_ will be set.
   scoped_refptr<cc::OrderedSimpleTaskRunner> mock_task_runner_;
   std::unique_ptr<base::MessageLoop> message_loop_;
@@ -3957,8 +3965,7 @@
   EXPECT_FALSE(
       scheduler_->MainThreadSeemsUnresponsive(responsiveness_threshold()));
   clock_->Advance(base::TimeDelta::FromSecondsD(2));
-  scheduler_->WillProcessTask(
-      (clock_->NowTicks() - base::TimeTicks()).InSecondsF());
+  scheduler_->OnTaskStarted(fake_queue_.get(), fake_task_, clock_->NowTicks());
   EXPECT_FALSE(
       scheduler_->MainThreadSeemsUnresponsive(responsiveness_threshold()));
 }
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc
index a9e1b9b..d56d3dec 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.cc
@@ -51,32 +51,38 @@
 
   if (loading_task_queue_) {
     loading_task_queue_->UnregisterTaskQueue();
+    loading_task_queue_->SetFrameScheduler(nullptr);
     loading_task_queue_->SetBlameContext(nullptr);
   }
 
   if (loading_control_task_queue_) {
     loading_control_task_queue_->UnregisterTaskQueue();
+    loading_control_task_queue_->SetFrameScheduler(nullptr);
     loading_control_task_queue_->SetBlameContext(nullptr);
   }
 
   if (timer_task_queue_) {
     RemoveTimerQueueFromBackgroundCPUTimeBudgetPool();
     timer_task_queue_->UnregisterTaskQueue();
+    timer_task_queue_->SetFrameScheduler(nullptr);
     timer_task_queue_->SetBlameContext(nullptr);
   }
 
   if (unthrottled_task_queue_) {
     unthrottled_task_queue_->UnregisterTaskQueue();
+    unthrottled_task_queue_->SetFrameScheduler(nullptr);
     unthrottled_task_queue_->SetBlameContext(nullptr);
   }
 
   if (suspendable_task_queue_) {
     suspendable_task_queue_->UnregisterTaskQueue();
+    suspendable_task_queue_->SetFrameScheduler(nullptr);
     suspendable_task_queue_->SetBlameContext(nullptr);
   }
 
   if (unthrottled_but_blockable_task_queue_) {
     unthrottled_but_blockable_task_queue_->UnregisterTaskQueue();
+    unthrottled_but_blockable_task_queue_->SetFrameScheduler(nullptr);
     unthrottled_but_blockable_task_queue_->SetBlameContext(nullptr);
   }
 
@@ -153,6 +159,7 @@
   if (!loading_web_task_runner_) {
     loading_task_queue_ = renderer_scheduler_->NewLoadingTaskQueue(
         MainThreadTaskQueue::QueueType::FRAME_LOADING);
+    loading_task_queue_->SetFrameScheduler(this);
     loading_task_queue_->SetBlameContext(blame_context_);
     loading_queue_enabled_voter_ =
         loading_task_queue_->CreateQueueEnabledVoter();
@@ -167,6 +174,7 @@
   if (!loading_control_web_task_runner_) {
     loading_control_task_queue_ = renderer_scheduler_->NewLoadingTaskQueue(
         MainThreadTaskQueue::QueueType::FRAME_LOADING_CONTROL);
+    loading_control_task_queue_->SetFrameScheduler(this);
     loading_control_task_queue_->SetBlameContext(blame_context_);
     loading_control_queue_enabled_voter_ =
         loading_control_task_queue_->CreateQueueEnabledVoter();
@@ -182,6 +190,7 @@
   if (!timer_web_task_runner_) {
     timer_task_queue_ = renderer_scheduler_->NewTimerTaskQueue(
         MainThreadTaskQueue::QueueType::FRAME_TIMER);
+    timer_task_queue_->SetFrameScheduler(this);
     timer_task_queue_->SetBlameContext(blame_context_);
     timer_queue_enabled_voter_ = timer_task_queue_->CreateQueueEnabledVoter();
     timer_queue_enabled_voter_->SetQueueEnabled(!frame_paused_);
@@ -212,6 +221,7 @@
             MainThreadTaskQueue::QueueType::FRAME_UNTHROTTLED)
             .SetCanBeBlocked(true)
             .SetCanBePaused(true));
+    suspendable_task_queue_->SetFrameScheduler(this);
     suspendable_task_queue_->SetBlameContext(blame_context_);
     suspendable_web_task_runner_ =
         WebTaskRunnerImpl::Create(suspendable_task_queue_);
@@ -228,6 +238,7 @@
     unthrottled_task_queue_ = renderer_scheduler_->NewTaskQueue(
         MainThreadTaskQueue::QueueCreationParams(
             MainThreadTaskQueue::QueueType::FRAME_UNTHROTTLED));
+    unthrottled_task_queue_->SetFrameScheduler(this);
     unthrottled_task_queue_->SetBlameContext(blame_context_);
     unthrottled_web_task_runner_ =
         WebTaskRunnerImpl::Create(unthrottled_task_queue_);
@@ -243,6 +254,7 @@
         MainThreadTaskQueue::QueueCreationParams(
             MainThreadTaskQueue::QueueType::FRAME_UNTHROTTLED)
             .SetCanBeBlocked(true));
+    unthrottled_but_blockable_task_queue_->SetFrameScheduler(this);
     unthrottled_but_blockable_task_queue_->SetBlameContext(blame_context_);
     unthrottled_but_blockable_web_task_runner_ =
         WebTaskRunnerImpl::Create(unthrottled_but_blockable_task_queue_);
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
index 294c5ab..b42f137 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/web_frame_scheduler_impl.h
@@ -27,6 +27,7 @@
 namespace scheduler {
 
 class RendererSchedulerImpl;
+class MainThreadTaskQueue;
 class TaskQueue;
 class WebTaskRunnerImpl;
 class WebViewSchedulerImpl;
@@ -93,12 +94,12 @@
 
   base::WeakPtr<WebFrameSchedulerImpl> AsWeakPtr();
 
-  scoped_refptr<TaskQueue> loading_task_queue_;
-  scoped_refptr<TaskQueue> loading_control_task_queue_;
-  scoped_refptr<TaskQueue> timer_task_queue_;
-  scoped_refptr<TaskQueue> unthrottled_task_queue_;
-  scoped_refptr<TaskQueue> suspendable_task_queue_;
-  scoped_refptr<TaskQueue> unthrottled_but_blockable_task_queue_;
+  scoped_refptr<MainThreadTaskQueue> loading_task_queue_;
+  scoped_refptr<MainThreadTaskQueue> loading_control_task_queue_;
+  scoped_refptr<MainThreadTaskQueue> timer_task_queue_;
+  scoped_refptr<MainThreadTaskQueue> unthrottled_task_queue_;
+  scoped_refptr<MainThreadTaskQueue> suspendable_task_queue_;
+  scoped_refptr<MainThreadTaskQueue> unthrottled_but_blockable_task_queue_;
   std::unique_ptr<TaskQueue::QueueEnabledVoter> loading_queue_enabled_voter_;
   std::unique_ptr<TaskQueue::QueueEnabledVoter>
       loading_control_queue_enabled_voter_;
diff --git a/third_party/robolectric/OWNERS b/third_party/robolectric/OWNERS
index 64c090f..2cfd26c3 100644
--- a/third_party/robolectric/OWNERS
+++ b/third_party/robolectric/OWNERS
@@ -1,2 +1,3 @@
 jbudorick@chromium.org
 mikecase@chromium.org
+yolandyan@chromium.org
diff --git a/tools/battor_agent/battor_agent.cc b/tools/battor_agent/battor_agent.cc
index 2a623892..81dd0d3 100644
--- a/tools/battor_agent/battor_agent.cc
+++ b/tools/battor_agent/battor_agent.cc
@@ -30,7 +30,7 @@
 const uint8_t kBattOrControlMessageTimeoutSeconds = 2;
 
 // The number of seconds allowed for connection to open before timing out.
-const uint8_t kBattOrConnectionTimeoutSeconds = 4;
+const uint8_t kBattOrConnectionTimeoutSeconds = 10;
 
 // Returns true if the specified vector of bytes decodes to a message that is an
 // ack for the specified control message type.
@@ -386,11 +386,6 @@
   }
 }
 
-void BattOrAgent::OnFlushComplete(bool success) {
-  // TODO(charliea): Wire up the BattOrAgent so that it calls Flush() when a
-  // read fails and before retrying the command.
-}
-
 void BattOrAgent::PerformAction(Action action) {
   DCHECK(thread_checker_.CalledOnValidThread());
 
diff --git a/tools/battor_agent/battor_agent.h b/tools/battor_agent/battor_agent.h
index c8c66cc..fa39fee 100644
--- a/tools/battor_agent/battor_agent.h
+++ b/tools/battor_agent/battor_agent.h
@@ -69,7 +69,6 @@
   void OnMessageRead(bool success,
                      BattOrMessageType type,
                      std::unique_ptr<std::vector<char>> bytes) override;
-  void OnFlushComplete(bool success) override;
 
  protected:
   // The connection that knows how to communicate with the BattOr in terms of
diff --git a/tools/battor_agent/battor_connection.h b/tools/battor_agent/battor_connection.h
index 23b9b6e..7583693 100644
--- a/tools/battor_agent/battor_connection.h
+++ b/tools/battor_agent/battor_connection.h
@@ -37,16 +37,19 @@
     virtual void OnMessageRead(bool success,
                                BattOrMessageType type,
                                std::unique_ptr<std::vector<char>> bytes) = 0;
-    virtual void OnFlushComplete(bool success) = 0;
   };
 
   BattOrConnection(Listener* listener);
   virtual ~BattOrConnection() = 0;
 
-  // Initializes the serial connection and calls the listener's
-  // OnConnectionOpened() when complete. This function must be called before
-  // using the BattOrConnection. If the connection is already open, calling this
-  // method immediately calls the listener's OnConnectionOpened method.
+  // Opens and initializes the serial connection to the BattOr and calls the
+  // listener's OnConnectionOpened() when complete. As part of this
+  // initialization, the serial connection is flushed by reading and throwing
+  // away bytes until the serial connection remains quiet for a sufficiently
+  // long time. This function must be called before using the
+  // BattOrConnection. If the connection is already open, calling this method
+  // reflushes the connection and then calls the listener's OnConnectionOpened
+  // method.
   virtual void Open() = 0;
   // Closes the serial connection and releases any handles being held.
   virtual void Close() = 0;
@@ -67,12 +70,6 @@
   // Cancels the current message read operation.
   virtual void CancelReadMessage() = 0;
 
-  // Flushes the serial connection to the BattOr, reading and throwing away
-  // bytes from the serial connection until the connection is quiet for a
-  // sufficiently long time. This also discards any trailing bytes from past
-  // successful reads.
-  virtual void Flush() = 0;
-
  protected:
   // The listener receiving the results of the commands being executed.
   Listener* listener_;
diff --git a/tools/battor_agent/battor_connection_impl.cc b/tools/battor_agent/battor_connection_impl.cc
index 01b177e..f1ced22 100644
--- a/tools/battor_agent/battor_connection_impl.cc
+++ b/tools/battor_agent/battor_connection_impl.cc
@@ -111,12 +111,15 @@
   LogSerial(StringPrintf("Serial connection open finished with success: %d.",
                          success));
 
-  if (!success)
+  if (!success) {
     Close();
+    base::ThreadTaskRunnerHandle::Get()->PostTask(
+        FROM_HERE, base::Bind(&Listener::OnConnectionOpened,
+                              base::Unretained(listener_), false));
+    return;
+  }
 
-  base::ThreadTaskRunnerHandle::Get()->PostTask(
-      FROM_HERE, base::Bind(&Listener::OnConnectionOpened,
-                            base::Unretained(listener_), success));
+  Flush();
 }
 
 void BattOrConnectionImpl::Close() {
@@ -194,12 +197,6 @@
   io_handler_->CancelRead(device::mojom::SerialReceiveError::TIMEOUT);
 }
 
-void BattOrConnectionImpl::Flush() {
-  already_read_buffer_.clear();
-  flush_quiet_period_start_ = tick_clock_->NowTicks();
-  BeginReadBytesForFlush();
-}
-
 scoped_refptr<device::SerialIoHandler> BattOrConnectionImpl::CreateIoHandler() {
   return device::SerialIoHandler::Create(ui_thread_task_runner_);
 }
@@ -299,6 +296,12 @@
                  type, base::Passed(std::move(bytes))));
 }
 
+void BattOrConnectionImpl::Flush() {
+  already_read_buffer_.clear();
+  flush_quiet_period_start_ = tick_clock_->NowTicks();
+  BeginReadBytesForFlush();
+}
+
 void BattOrConnectionImpl::BeginReadBytesForFlush() {
   base::TimeDelta quiet_period_duration =
       tick_clock_->NowTicks() - flush_quiet_period_start_;
@@ -336,7 +339,7 @@
         static_cast<int>(error)));
     pending_read_buffer_ = nullptr;
     base::ThreadTaskRunnerHandle::Get()->PostTask(
-        FROM_HERE, base::Bind(&Listener::OnFlushComplete,
+        FROM_HERE, base::Bind(&Listener::OnConnectionOpened,
                               base::Unretained(listener_), false));
     return;
   }
@@ -352,7 +355,7 @@
       LogSerial("(flush) Quiet period has finished.");
       pending_read_buffer_ = nullptr;
       base::ThreadTaskRunnerHandle::Get()->PostTask(
-          FROM_HERE, base::Bind(&Listener::OnFlushComplete,
+          FROM_HERE, base::Bind(&Listener::OnConnectionOpened,
                                 base::Unretained(listener_), true));
       return;
     }
diff --git a/tools/battor_agent/battor_connection_impl.h b/tools/battor_agent/battor_connection_impl.h
index 4d98eaf..46a132fa 100644
--- a/tools/battor_agent/battor_connection_impl.h
+++ b/tools/battor_agent/battor_connection_impl.h
@@ -48,7 +48,6 @@
                  size_t bytes_to_send) override;
   void ReadMessage(BattOrMessageType type) override;
   void CancelReadMessage() override;
-  void Flush() override;
 
  protected:
   // Overridden by the test to use a fake serial connection.
@@ -75,6 +74,12 @@
                               BattOrMessageType type,
                               std::unique_ptr<std::vector<char>> data);
 
+  // Flushes the serial connection to the BattOr, reading and throwing away
+  // bytes from the serial connection until the connection is quiet for a
+  // sufficiently long time. This also discards any trailing bytes from past
+  // successful reads.
+  void Flush();
+
   void BeginReadBytesForFlush();
   void OnBytesReadForFlush(int bytes_read,
                            device::mojom::SerialReceiveError error);
diff --git a/tools/battor_agent/battor_connection_impl_unittest.cc b/tools/battor_agent/battor_connection_impl_unittest.cc
index 5909ee4..4b37d77a 100644
--- a/tools/battor_agent/battor_connection_impl_unittest.cc
+++ b/tools/battor_agent/battor_connection_impl_unittest.cc
@@ -53,7 +53,10 @@
       : task_runner_(new base::TestMockTimeTaskRunner()),
         thread_task_runner_handle_(task_runner_) {}
 
-  void OnConnectionOpened(bool success) override { open_success_ = success; };
+  void OnConnectionOpened(bool success) override {
+    is_open_complete_ = true;
+    open_success_ = success;
+  };
   void OnBytesSent(bool success) override { send_success_ = success; }
   void OnMessageRead(bool success,
                      BattOrMessageType type,
@@ -63,10 +66,6 @@
     read_type_ = type;
     read_bytes_ = std::move(bytes);
   }
-  void OnFlushComplete(bool success) override {
-    is_slow_flush_complete_ = true;
-    slow_flush_success_ = success;
-  }
 
  protected:
   void SetUp() override {
@@ -76,6 +75,7 @@
   }
 
   void OpenConnection() {
+    is_open_complete_ = false;
     connection_->Open();
     task_runner_->RunUntilIdle();
   }
@@ -86,12 +86,6 @@
     task_runner_->RunUntilIdle();
   }
 
-  void Flush() {
-    is_slow_flush_complete_ = false;
-    connection_->Flush();
-    task_runner_->RunUntilIdle();
-  }
-
   // Reads the specified number of bytes directly from the serial connection.
   scoped_refptr<net::IOBuffer> ReadMessageRaw(int bytes_to_read) {
     scoped_refptr<net::IOBuffer> buffer(
@@ -131,13 +125,12 @@
   }
 
   bool GetOpenSuccess() { return open_success_; }
+  bool IsOpenComplete() { return is_open_complete_; }
   bool GetSendSuccess() { return send_success_; }
   bool IsReadComplete() { return is_read_complete_; }
   bool GetReadSuccess() { return read_success_; }
   BattOrMessageType GetReadType() { return read_type_; }
   std::vector<char>* GetReadMessage() { return read_bytes_.get(); }
-  bool IsFlushComplete() { return is_slow_flush_complete_; }
-  bool GetFlushSuccess() { return slow_flush_success_; }
 
  private:
   std::unique_ptr<TestableBattOrConnection> connection_;
@@ -147,6 +140,7 @@
 
   // Result from the last connect command.
   bool open_success_;
+  bool is_open_complete_;
   // Result from the last send command.
   bool send_success_;
   // Results from the last read command.
@@ -154,14 +148,154 @@
   bool read_success_;
   BattOrMessageType read_type_;
   std::unique_ptr<std::vector<char>> read_bytes_;
-  // Results from the last slow flush command.
-  bool is_slow_flush_complete_;
-  bool slow_flush_success_;
 };
 
+TEST_F(BattOrConnectionImplTest, OpenConnectionSucceedsAfterTimeout) {
+  OpenConnection();
+  ASSERT_FALSE(IsOpenComplete());
+
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  ASSERT_TRUE(IsOpenComplete());
+  ASSERT_TRUE(GetOpenSuccess());
+}
+
+TEST_F(BattOrConnectionImplTest, OpenConnectionFlushesIfAlreadyOpen) {
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_RESET, 4, 7);
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  ReadMessage(BATTOR_MESSAGE_TYPE_CONTROL);
+
+  // Opening the connection the second time should have cleared all bytes that
+  // were already on the wire, including the reset control message. This read
+  // will hang until more bytes are sent.
+  ASSERT_FALSE(IsReadComplete());
+}
+
+TEST_F(BattOrConnectionImplTest, OpenConnectionFlushesAlreadyReadBuffer) {
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  // Send two data frames and only read one of them. When reading data frames,
+  // we try to read a large chunk from the wire due to the large potential size
+  // of a data frame (~100kB). By sending two tiny data frames on the wire and
+  // reading back one of them, we know that we read past the end of the first
+  // message and all of the second message because the data frames were so
+  // small. These extra bytes that were unnecesssary for the first message were
+  // storied internally by BattOrConnectionImpl, and we want to ensure that
+  // Flush() clears this internal data.
+  const char data[] = {
+      BATTOR_CONTROL_BYTE_START,
+      BATTOR_MESSAGE_TYPE_SAMPLES,
+      0x02,
+      0x00,
+      0x02,
+      0x00,
+      0x02,
+      0x00,
+      BATTOR_CONTROL_BYTE_END,
+  };
+  SendBytesRaw(data, 9);
+  SendBytesRaw(data, 9);
+  ReadMessage(BATTOR_MESSAGE_TYPE_SAMPLES);
+
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  ASSERT_TRUE(IsOpenComplete());
+  ASSERT_TRUE(GetOpenSuccess());
+
+  ReadMessage(BATTOR_MESSAGE_TYPE_SAMPLES);
+
+  // The read should be incomplete due to no data being on the wire - the second
+  // control message was cleared by the slow flush.
+  ASSERT_FALSE(IsReadComplete());
+}
+
+TEST_F(BattOrConnectionImplTest, OpenConnectionNewBytesRestartQuietPeriod) {
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(49));
+  SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_RESET, 4, 7);
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(49));
+
+  // The connection should not yet be opened because we received new bytes at
+  // t=49ms, and at t=98ms the new 50ms quiet period hasn't yet elapsed.
+  ASSERT_FALSE(IsOpenComplete());
+
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(1));
+
+  ASSERT_TRUE(IsOpenComplete());
+}
+
+TEST_F(BattOrConnectionImplTest,
+       OpenConnectionFlushesBytesReceivedInQuietPeriod) {
+  OpenConnection();
+  SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_RESET, 4, 7);
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(5));
+  SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_RESET, 4, 7);
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  ASSERT_TRUE(IsOpenComplete());
+  ASSERT_TRUE(GetOpenSuccess());
+
+  ReadMessage(BATTOR_MESSAGE_TYPE_CONTROL);
+
+  // The read should hang because the control message that arrived mid quiet
+  // period was thrown out.
+  ASSERT_FALSE(IsReadComplete());
+}
+
+TEST_F(BattOrConnectionImplTest, OpenConnectionFlushesMultipleReadsOfData) {
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  // Send 10 full flush buffers worth of data.
+  char data[50000];
+  for (size_t i = 0; i < 50000; i++)
+    data[i] = '0';
+  for (int i = 0; i < 10; i++)
+    SendBytesRaw(data, 50000);
+
+  OpenConnection();
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
+
+  ASSERT_TRUE(IsOpenComplete());
+  ASSERT_TRUE(GetOpenSuccess());
+
+  SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_RESET, 4, 7);
+  ReadMessage(BATTOR_MESSAGE_TYPE_CONTROL);
+
+  // Even though 500kB of garbage data was sent before the valid control
+  // message on the serial connection, the slow flush should have cleared it
+  // all, resulting in a successful read.
+  ASSERT_TRUE(IsReadComplete());
+  ASSERT_TRUE(GetReadSuccess());
+}
+
+TEST_F(BattOrConnectionImplTest, OpenConnectionIncompleteBeforeTimeout) {
+  OpenConnection();
+
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(49));
+
+  ASSERT_FALSE(IsOpenComplete());
+}
+
+TEST_F(BattOrConnectionImplTest, FlushFailsWithNonTimeoutError) {
+  OpenConnection();
+
+  ForceReceiveError(device::mojom::SerialReceiveError::DISCONNECTED);
+
+  ASSERT_TRUE(IsOpenComplete());
+  ASSERT_FALSE(GetOpenSuccess());
+}
+
 TEST_F(BattOrConnectionImplTest, InitSendsCorrectBytes) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_INIT, 0, 0);
 
@@ -181,7 +315,7 @@
 
 TEST_F(BattOrConnectionImplTest, ResetSendsCorrectBytes) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_RESET, 0, 0);
 
@@ -201,7 +335,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadMessageControlMessage) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   const char data[] = {
       BATTOR_CONTROL_BYTE_START,
@@ -228,7 +362,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadMessageInvalidType) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   const char data[] = {
       BATTOR_CONTROL_BYTE_START,
@@ -250,7 +384,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadMessageEndsMidMessage) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   const char data[] = {
       BATTOR_CONTROL_BYTE_START,
@@ -274,7 +408,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadMessageMissingEndByte) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   const char data[] = {
       BATTOR_CONTROL_BYTE_START,
@@ -301,7 +435,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadMessageWithEscapeCharacters) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   const char data[] = {
       BATTOR_CONTROL_BYTE_START,
@@ -328,7 +462,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadControlMessage) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_RESET, 4, 7);
   ReadMessage(BATTOR_MESSAGE_TYPE_CONTROL);
@@ -347,7 +481,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadMessageExtraBytesStoredBetweenReads) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   // Send a samples frame with length and sequence number of zero.
   const char data[] = {
@@ -391,7 +525,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadMessageFailsWithControlButExpectingAck) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   const char data[] = {
       BATTOR_CONTROL_BYTE_START,
@@ -410,7 +544,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadMessageFailsWithAckButExpectingControl) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   const char data[] = {
       BATTOR_CONTROL_BYTE_START,         BATTOR_MESSAGE_TYPE_CONTROL_ACK,
@@ -426,7 +560,7 @@
 
 TEST_F(BattOrConnectionImplTest, ReadMessageControlTypePrintFails) {
   OpenConnection();
-  ASSERT_TRUE(GetOpenSuccess());
+  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
 
   const char data[] = {
       BATTOR_CONTROL_BYTE_START, BATTOR_MESSAGE_TYPE_PRINT,
@@ -439,98 +573,4 @@
   ASSERT_FALSE(GetReadSuccess());
 }
 
-TEST_F(BattOrConnectionImplTest, FlushSucceedsAfterTimeout) {
-  OpenConnection();
-
-  Flush();
-  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
-
-  ASSERT_TRUE(IsFlushComplete());
-  ASSERT_TRUE(GetFlushSuccess());
-}
-
-TEST_F(BattOrConnectionImplTest, FlushClearsOverreadBuffer) {
-  OpenConnection();
-
-  // Send two data frames and only read one of them. When reading data frames,
-  // we try to read a large chunk from the wire due to the large potential size
-  // of a data frame (~100kB). By sending two tiny data frames on the wire and
-  // reading back one of them, we know that we read past the end of the first
-  // message and all of the second message because the data frames were so
-  // small. These extra bytes that were unnecesssary for the first message were
-  // storied internally by BattOrConnectionImpl, and we want to ensure that
-  // Flush() clears this internal data.
-  const char data[] = {
-      BATTOR_CONTROL_BYTE_START,
-      BATTOR_MESSAGE_TYPE_SAMPLES,
-      0x02,
-      0x00,
-      0x02,
-      0x00,
-      0x02,
-      0x00,
-      BATTOR_CONTROL_BYTE_END,
-  };
-  SendBytesRaw(data, 9);
-  SendBytesRaw(data, 9);
-  ReadMessage(BATTOR_MESSAGE_TYPE_SAMPLES);
-  Flush();
-
-  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
-
-  ASSERT_TRUE(IsFlushComplete());
-  ASSERT_TRUE(GetFlushSuccess());
-
-  ReadMessage(BATTOR_MESSAGE_TYPE_SAMPLES);
-
-  // The read should be incomplete due to no data being on the wire - the second
-  // control message was cleared by the slow flush.
-  ASSERT_FALSE(IsReadComplete());
-}
-
-TEST_F(BattOrConnectionImplTest, FlushClearsMultipleReadsOfData) {
-  OpenConnection();
-
-  // Send 10 full flush buffers worth of data.
-  char data[50000];
-  for (size_t i = 0; i < 50000; i++)
-    data[i] = '0';
-  for (int i = 0; i < 10; i++)
-    SendBytesRaw(data, 50000);
-
-  Flush();
-  AdvanceTickClock(base::TimeDelta::FromMilliseconds(50));
-
-  ASSERT_TRUE(IsFlushComplete());
-  ASSERT_TRUE(GetFlushSuccess());
-
-  SendControlMessage(BATTOR_CONTROL_MESSAGE_TYPE_RESET, 4, 7);
-  ReadMessage(BATTOR_MESSAGE_TYPE_CONTROL);
-
-  // Even though 500kB of garbage data was sent before the valid control
-  // message on the serial connection, the slow flush should have cleared it
-  // all, resulting in a successful read.
-  ASSERT_TRUE(IsReadComplete());
-  ASSERT_TRUE(GetReadSuccess());
-}
-
-TEST_F(BattOrConnectionImplTest, FlushIncompleteBeforeTimeout) {
-  OpenConnection();
-
-  Flush();
-  AdvanceTickClock(base::TimeDelta::FromMilliseconds(49));
-
-  ASSERT_FALSE(IsFlushComplete());
-}
-
-TEST_F(BattOrConnectionImplTest, FlushFailsWithNonTimeoutError) {
-  OpenConnection();
-
-  Flush();
-  ForceReceiveError(device::mojom::SerialReceiveError::DISCONNECTED);
-
-  ASSERT_TRUE(IsFlushComplete());
-  ASSERT_FALSE(GetFlushSuccess());
-}
-
 }  // namespace battor
diff --git a/tools/chrome_proxy/webdriver/lite_page.py b/tools/chrome_proxy/webdriver/lite_page.py
index 449878d..00b03f6 100644
--- a/tools/chrome_proxy/webdriver/lite_page.py
+++ b/tools/chrome_proxy/webdriver/lite_page.py
@@ -59,6 +59,8 @@
 
   # Checks that a Lite Page is served and the force_lite_page experiment
   # directive is provided when always-on.
+  # Note: this test is only on M-60+ which supports exp=force_lite_page
+  @ChromeVersionEqualOrAfterM(60)
   def testLitePageForcedExperiment(self):
     # If it was attempted to run with another experiment, skip this test.
     if common.ParseFlags().browser_args and ('--data-reduction-proxy-experiment'
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 0c54cea..3224108 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -5938,6 +5938,7 @@
   <int value="3" label="https"/>
   <int value="4" label="file"/>
   <int value="5" label="chrome-extension"/>
+  <int value="6" label="chrome-search"/>
 </enum>
 
 <enum name="ContentSuggestionsCategory">
@@ -7194,6 +7195,13 @@
   <int value="2" label="Has enough SCTs"/>
 </enum>
 
+<enum name="CustomTabsConnection">
+  <int value="0" label="Disconnected from service w/o KeepAlive connection"/>
+  <int value="1" label="Disconnected from service with KeepAlive connection"/>
+  <int value="2" label="Connected to service w/o KeepAlive connection"/>
+  <int value="3" label="Connected to service with KeepAlive connection"/>
+</enum>
+
 <enum name="CustomTabsSpeculationStatusOnStart">
   <int value="0"
       label="Speculation allowed. If started, the kind will also be recorded"/>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index aac11b071..e0622b2f7 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -650,6 +650,10 @@
 
 <histogram name="Android.ChildProcessLauncher.OnServiceConnectedTime"
     units="ms">
+  <obsolete>
+    Deprecated 08/2017. Made decision in issue 736066 with already acquired
+    data. So this is no longer needed.
+  </obsolete>
   <owner>boliu@chromium.org</owner>
   <summary>
     Measure time from bindService call to onServiceConnected. This is part of
@@ -660,6 +664,10 @@
 
 <histogram name="Android.ChildProcessLauncher.OnServiceConnectedTimedOut"
     enum="BooleanTimedOut">
+  <obsolete>
+    Deprecated 08/2017. Made decision in issue 736066 with already acquired
+    data. So this is no longer needed.
+  </obsolete>
   <owner>boliu@chromium.org</owner>
   <summary>
     Boolean histogram that records whether bindServiced timed out. Timeout is
@@ -8430,9 +8438,9 @@
   </obsolete>
   <owner>lizeb@chromium.org</owner>
   <summary>
-    Time between the intent arrival in a Chrome generated CCT and the first
-    navigation commit, if the navigation is successful. Similar in principle to
-    Startup.FirstCommitNavigationTime.
+    Time between the intent arrival in a Chrome generated custom tab and the
+    first navigation commit, if the navigation is successful. Similar in
+    principle to Startup.FirstCommitNavigationTime.
   </summary>
 </histogram>
 
@@ -8441,7 +8449,7 @@
   <owner>lizeb@chromium.org</owner>
   <summary>
     In &quot;Herb&quot; mode shows the time between the intent arrival in a
-    Chrome generated CCT and the first navigation start (note: not the
+    Chrome generated custom tab and the first navigation start (note: not the
     navigation commit, as the name suggests). Recorded when the page has
     finished loading.
   </summary>
@@ -8451,8 +8459,8 @@
   <owner>lizeb@chromium.org</owner>
   <summary>
     In &quot;Herb&quot; mode shows time between the intent arrival in a Chrome
-    generated CCT and the first &quot;page loaded&quot; event, if the navigation
-    is successful.
+    generated custom tab and the first &quot;page loaded&quot; event, if the
+    navigation is successful.
   </summary>
 </histogram>
 
@@ -11177,6 +11185,28 @@
   </summary>
 </histogram>
 
+<histogram name="CustomTabs.ConnectionStatusOnReturn.GSA"
+    enum="CustomTabsConnection">
+  <owner>mariakhomenko@chromium.org</owner>
+  <summary>
+    Android: Recorded whenever user closes the custom tab by hitting the close
+    button or back to return to the caller app. Keeps track of the connection
+    status and whether the app was using a KeepAlive connection. Recorded only
+    for AGSA.
+  </summary>
+</histogram>
+
+<histogram name="CustomTabs.ConnectionStatusOnReturn.NonGSA"
+    enum="CustomTabsConnection">
+  <owner>mariakhomenko@chromium.org</owner>
+  <summary>
+    Android: Recorded whenever user closes the custom tab by hitting the close
+    button or back to return to the caller app. Keeps track of the connection
+    status and whether the app was using a KeepAlive connection. Recorded for
+    all apps other than AGSA.
+  </summary>
+</histogram>
+
 <histogram name="CustomTabs.IntentToFirstCommitNavigationTime" units="ms">
   <obsolete>
     Deprecated 10/2016 in favor of .IntentToFirstCommitNavigationTime2.*.
@@ -11202,7 +11232,8 @@
   <owner>lizeb@chromium.org</owner>
   <summary>
     Time between the intent arrival to a Custom Tab and the first navigation
-    commit. Recorded for every CCT intent when the page has finished loading.
+    commit. Recorded for every custom tabs intent when the page has finished
+    loading.
   </summary>
 </histogram>
 
@@ -49158,6 +49189,9 @@
 </histogram>
 
 <histogram name="NQE.FastestRTT" units="ms">
+  <obsolete>
+    Obsoleted in August 2017
+  </obsolete>
   <owner>bengr@chromium.org</owner>
   <owner>tbansal@chromium.org</owner>
   <summary>
@@ -49245,6 +49279,9 @@
 </histogram>
 
 <histogram name="NQE.PeakKbps" units="Kbps">
+  <obsolete>
+    Obsoleted in August 2017
+  </obsolete>
   <owner>bengr@chromium.org</owner>
   <owner>tbansal@chromium.org</owner>
   <summary>
@@ -97889,10 +97926,26 @@
   <suffix name="None" label="With no detected network"/>
   <suffix name="Bluetooth" label="On Bluetooth network"/>
   <affected-histogram name="NQE.FastestRTT"/>
-  <affected-histogram name="NQE.MainFrame.EffectiveConnectionType"/>
-  <affected-histogram name="NQE.MainFrame.Kbps.Percentile50"/>
-  <affected-histogram name="NQE.MainFrame.RTT.Percentile50"/>
-  <affected-histogram name="NQE.MainFrame.TransportRTT.Percentile50"/>
+  <affected-histogram name="NQE.MainFrame.EffectiveConnectionType">
+    <obsolete>
+      Deprecated 08/2017.
+    </obsolete>
+  </affected-histogram>
+  <affected-histogram name="NQE.MainFrame.Kbps.Percentile50">
+    <obsolete>
+      Deprecated 08/2017.
+    </obsolete>
+  </affected-histogram>
+  <affected-histogram name="NQE.MainFrame.RTT.Percentile50">
+    <obsolete>
+      Deprecated 08/2017.
+    </obsolete>
+  </affected-histogram>
+  <affected-histogram name="NQE.MainFrame.TransportRTT.Percentile50">
+    <obsolete>
+      Deprecated 08/2017.
+    </obsolete>
+  </affected-histogram>
   <affected-histogram name="NQE.PeakKbps"/>
   <affected-histogram name="NQE.RTT.Percentile0"/>
   <affected-histogram name="NQE.RTT.Percentile10"/>
@@ -102014,36 +102067,6 @@
   <suffix name="ExperimentGroup1"/>
   <suffix name="ExperimentGroup2"/>
   <suffix name="ExperimentGroup3"/>
-  <affected-histogram name="WebRTC.Video.Decoded.Vp8.Qp"/>
-  <affected-histogram name="WebRTC.Video.EndToEndDelayInMs"/>
-  <affected-histogram name="WebRTC.Video.EndToEndDelayMaxInMs"/>
-  <affected-histogram name="WebRTC.Video.InterframeDelayInMs"/>
-  <affected-histogram name="WebRTC.Video.InterframeDelayMaxInMs"/>
-  <affected-histogram name="WebRTC.Video.KeyFramesReceivedInPermille"/>
-  <affected-histogram name="WebRTC.Video.MediaBitrateReceivedInKbps"/>
-  <affected-histogram name="WebRTC.Video.ReceivedHeightInPixels"/>
-  <affected-histogram name="WebRTC.Video.ReceivedPacketsLostInPercent"/>
-  <affected-histogram name="WebRTC.Video.ReceivedWidthInPixels"/>
-  <affected-histogram name="WebRTC.Video.ReceiveStreamLifetimeInSeconds"/>
-  <affected-histogram name="WebRTC.Video.Screenshare.Decoded.Vp8.Qp"/>
-  <affected-histogram name="WebRTC.Video.Screenshare.EndToEndDelayInMs"/>
-  <affected-histogram name="WebRTC.Video.Screenshare.EndToEndDelayMaxInMs"/>
-  <affected-histogram name="WebRTC.Video.Screenshare.InterframeDelayInMs"/>
-  <affected-histogram name="WebRTC.Video.Screenshare.InterframeDelayMaxInMs"/>
-  <affected-histogram
-      name="WebRTC.Video.Screenshare.KeyFramesReceivedInPermille"/>
-  <affected-histogram
-      name="WebRTC.Video.Screenshare.MediaBitrateReceivedInKbps"/>
-  <affected-histogram name="WebRTC.Video.Screenshare.ReceivedHeightInPixels"/>
-  <affected-histogram
-      name="WebRTC.Video.Screenshare.ReceivedPacketsLostInPercent"/>
-  <affected-histogram name="WebRTC.Video.Screenshare.ReceivedWidthInPixels"/>
-  <affected-histogram
-      name="WebRTC.Video.Screenshare.ReceiveStreamLifetimeInSeconds"/>
-</histogram_suffixes>
-
-<histogram_suffixes name="WebRTCVideoSimulcastId" separator=".">
-  <owner>ilnik@chromium.org</owner>
   <suffix name="S0"/>
   <suffix name="S1"/>
   <suffix name="S2"/>
@@ -102052,6 +102075,7 @@
   <affected-histogram name="WebRTC.Video.EndToEndDelayMaxInMs"/>
   <affected-histogram name="WebRTC.Video.InterframeDelayInMs"/>
   <affected-histogram name="WebRTC.Video.InterframeDelayMaxInMs"/>
+  <affected-histogram name="WebRTC.Video.KeyFramesReceivedInPermille"/>
   <affected-histogram name="WebRTC.Video.MediaBitrateReceivedInKbps"/>
   <affected-histogram name="WebRTC.Video.ReceivedHeightInPixels"/>
   <affected-histogram name="WebRTC.Video.ReceivedWidthInPixels"/>
@@ -102061,6 +102085,8 @@
   <affected-histogram name="WebRTC.Video.Screenshare.InterframeDelayInMs"/>
   <affected-histogram name="WebRTC.Video.Screenshare.InterframeDelayMaxInMs"/>
   <affected-histogram
+      name="WebRTC.Video.Screenshare.KeyFramesReceivedInPermille"/>
+  <affected-histogram
       name="WebRTC.Video.Screenshare.MediaBitrateReceivedInKbps"/>
   <affected-histogram name="WebRTC.Video.Screenshare.ReceivedHeightInPixels"/>
   <affected-histogram name="WebRTC.Video.Screenshare.ReceivedWidthInPixels"/>
diff --git a/tools/perf/fetch_benchmark_deps_unittest.py b/tools/perf/fetch_benchmark_deps_unittest.py
index 96ccfe9..605885c 100644
--- a/tools/perf/fetch_benchmark_deps_unittest.py
+++ b/tools/perf/fetch_benchmark_deps_unittest.py
@@ -61,7 +61,7 @@
 
   def testFetchOctane(self):
     octane_wpr_path = os.path.join(
-        os.path.dirname(__file__), 'page_sets', 'data', 'octane_002.wpr')
+        os.path.dirname(__file__), 'page_sets', 'data', 'octane_002.wprgo')
     expected = os.path.relpath(octane_wpr_path,
                                path_util.GetChromiumSrcDir())
     self._RunFetchBenchmarkDepsTest('octane', NormPaths(expected))
diff --git a/tools/perf/page_sets/data/octane.json b/tools/perf/page_sets/data/octane.json
index 4e5d6ab..382d879 100644
--- a/tools/perf/page_sets/data/octane.json
+++ b/tools/perf/page_sets/data/octane.json
@@ -1,7 +1,7 @@
 {
     "archives": {
         "http://chromium.github.io/octane/index.html?auto=1": {
-            "DEFAULT": "octane_002.wpr"
+            "DEFAULT": "octane_002.wprgo"
         }
     },
     "description": "Describes the Web Page Replay archives for a story set. Don't edit by hand! Use record_wpr for updating.",
diff --git a/tools/perf/page_sets/data/octane_002.wpr.sha1 b/tools/perf/page_sets/data/octane_002.wpr.sha1
deleted file mode 100644
index 92d99fb4..0000000
--- a/tools/perf/page_sets/data/octane_002.wpr.sha1
+++ /dev/null
@@ -1 +0,0 @@
-be500a76f06992f058eb19a53a4dfdf6e3840730
\ No newline at end of file
diff --git a/tools/perf/page_sets/data/octane_002.wprgo.sha1 b/tools/perf/page_sets/data/octane_002.wprgo.sha1
new file mode 100644
index 0000000..f4b58df
--- /dev/null
+++ b/tools/perf/page_sets/data/octane_002.wprgo.sha1
@@ -0,0 +1 @@
+1436ebbbea2c2be8a022ab7fa9d947a136c9dff4
\ No newline at end of file
diff --git a/ui/app_list/views/app_list_item_view.cc b/ui/app_list/views/app_list_item_view.cc
index f874f04..0fc0ed1c 100644
--- a/ui/app_list/views/app_list_item_view.cc
+++ b/ui/app_list/views/app_list_item_view.cc
@@ -486,8 +486,10 @@
       break;
     case ui::ET_GESTURE_TAP:
     case ui::ET_GESTURE_TAP_CANCEL:
-      if (state() != STATE_DISABLED)
+      if (state() != STATE_DISABLED) {
+        touch_drag_timer_.Stop();
         SetState(STATE_NORMAL);
+      }
       break;
     case ui::ET_GESTURE_LONG_TAP:
     case ui::ET_GESTURE_END:
@@ -495,6 +497,14 @@
       SetTouchDragging(false);
       apps_grid_view_->EndDrag(false);
       break;
+    case ui::ET_GESTURE_TWO_FINGER_TAP:
+      if (touch_dragging_) {
+        SetTouchDragging(false);
+        apps_grid_view_->EndDrag(false);
+      } else {
+        touch_drag_timer_.Stop();
+      }
+      break;
     default:
       break;
   }
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index bf826d3..5a4ab22 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -1047,6 +1047,9 @@
       pagination_controller_->OnGestureEvent(*event, GetContentsBounds())) {
     event->SetHandled();
   } else {
+    event->ConvertLocationToTarget(
+        static_cast<View*>(this),
+        static_cast<View*>(contents_view_->app_list_view()));
     contents_view_->app_list_view()->OnGestureEvent(event);
   }
 }
diff --git a/ui/aura/mus/hit_test_data_provider_aura.cc b/ui/aura/mus/hit_test_data_provider_aura.cc
index 5150b98e..d715f7e 100644
--- a/ui/aura/mus/hit_test_data_provider_aura.cc
+++ b/ui/aura/mus/hit_test_data_provider_aura.cc
@@ -19,7 +19,8 @@
   DCHECK(layer);
 
   auto hit_test_region = viz::mojom::HitTestRegion::New();
-  hit_test_region->frame_sink_id = window_port->frame_sink_id();
+  DCHECK(window_port->GetFrameSinkId().is_valid());
+  hit_test_region->frame_sink_id = window_port->GetFrameSinkId();
   if (layer->GetPrimarySurfaceInfo())
     hit_test_region->surface_id = layer->GetPrimarySurfaceInfo()->id();
   hit_test_region->flags = flags;
@@ -114,4 +115,4 @@
   }
 }
 
-}  // namespace aura
\ No newline at end of file
+}  // namespace aura
diff --git a/ui/aura/mus/hit_test_data_provider_aura_unittest.cc b/ui/aura/mus/hit_test_data_provider_aura_unittest.cc
index df2d74e5..8b6368e 100644
--- a/ui/aura/mus/hit_test_data_provider_aura_unittest.cc
+++ b/ui/aura/mus/hit_test_data_provider_aura_unittest.cc
@@ -142,12 +142,10 @@
     EXPECT_EQ(region->flags, viz::mojom::kHitTestMine |
                                  viz::mojom::kHitTestMouse |
                                  viz::mojom::kHitTestTouch);
-    viz::SurfaceId surface_id(
-        WindowPortMus::Get(expected_order_1[i])->frame_sink_id(),
-        WindowMus::Get(expected_order_1[i])->GetLocalSurfaceId());
-    EXPECT_EQ(region->surface_id, surface_id);
     EXPECT_EQ(region->frame_sink_id,
-              WindowPortMus::Get(expected_order_1[i])->frame_sink_id());
+              WindowPortMus::Get(expected_order_1[i])->GetFrameSinkId());
+    EXPECT_EQ(region->surface_id.local_surface_id(),
+              WindowMus::Get(expected_order_1[i])->GetLocalSurfaceId());
     EXPECT_EQ(region->rect.ToString(),
               expected_order_1[i]->bounds().ToString());
     i++;
@@ -163,12 +161,10 @@
     EXPECT_EQ(region->flags, viz::mojom::kHitTestMine |
                                  viz::mojom::kHitTestMouse |
                                  viz::mojom::kHitTestTouch);
-    viz::SurfaceId surface_id(
-        WindowPortMus::Get(expected_order_2[i])->frame_sink_id(),
-        WindowMus::Get(expected_order_2[i])->GetLocalSurfaceId());
-    EXPECT_EQ(region->surface_id, surface_id);
     EXPECT_EQ(region->frame_sink_id,
-              WindowPortMus::Get(expected_order_2[i])->frame_sink_id());
+              WindowPortMus::Get(expected_order_2[i])->GetFrameSinkId());
+    EXPECT_EQ(region->surface_id.local_surface_id(),
+              WindowMus::Get(expected_order_2[i])->GetLocalSurfaceId());
     EXPECT_EQ(region->rect.ToString(),
               expected_order_2[i]->bounds().ToString());
     i++;
@@ -197,12 +193,10 @@
   ASSERT_EQ(hit_test_data->regions.size(), arraysize(expected_insets));
   int i = 0;
   for (const auto& region : hit_test_data->regions) {
-    viz::SurfaceId surface_id(
-        WindowPortMus::Get(expected_windows[i])->frame_sink_id(),
-        WindowMus::Get(expected_windows[i])->GetLocalSurfaceId());
-    EXPECT_EQ(region->surface_id, surface_id);
     EXPECT_EQ(region->frame_sink_id,
-              WindowPortMus::Get(expected_windows[i])->frame_sink_id());
+              WindowPortMus::Get(expected_windows[i])->GetFrameSinkId());
+    EXPECT_EQ(region->surface_id.local_surface_id(),
+              WindowMus::Get(expected_windows[i])->GetLocalSurfaceId());
     EXPECT_EQ(region->flags, expected_flags[i]);
     gfx::Rect expected_bounds = expected_windows[i]->bounds();
     expected_bounds.Inset(gfx::Insets(expected_insets[i]));
@@ -239,12 +233,10 @@
   ASSERT_EQ(hit_test_data->regions.size(), expected_bounds.size());
   int i = 0;
   for (const auto& region : hit_test_data->regions) {
-    viz::SurfaceId surface_id(
-        WindowPortMus::Get(expected_windows[i])->frame_sink_id(),
-        WindowMus::Get(expected_windows[i])->GetLocalSurfaceId());
-    EXPECT_EQ(region->surface_id, surface_id);
     EXPECT_EQ(region->frame_sink_id,
-              WindowPortMus::Get(expected_windows[i])->frame_sink_id());
+              WindowPortMus::Get(expected_windows[i])->GetFrameSinkId());
+    EXPECT_EQ(region->surface_id.local_surface_id(),
+              WindowMus::Get(expected_windows[i])->GetLocalSurfaceId());
     EXPECT_EQ(region->flags, expected_flags);
     EXPECT_EQ(region->rect.ToString(), expected_bounds[i].ToString());
     i++;
diff --git a/ui/aura/mus/window_port_mus.cc b/ui/aura/mus/window_port_mus.cc
index cdf055e..485e792 100644
--- a/ui/aura/mus/window_port_mus.cc
+++ b/ui/aura/mus/window_port_mus.cc
@@ -64,6 +64,12 @@
   return static_cast<WindowPortMus*>(WindowPort::Get(window));
 }
 
+viz::FrameSinkId WindowPortMus::GetFrameSinkId() const {
+  if (embed_frame_sink_id_.is_valid())
+    return embed_frame_sink_id_;
+  return viz::FrameSinkId(0, server_id());
+}
+
 void WindowPortMus::SetTextInputState(mojo::TextInputStatePtr state) {
   window_tree_client_->SetWindowTextInputState(this, std::move(state));
 }
@@ -295,7 +301,7 @@
     const viz::FrameSinkId& frame_sink_id) {
   DCHECK(window_mus_type() == WindowMusType::TOP_LEVEL_IN_WM ||
          window_mus_type() == WindowMusType::EMBED_IN_OWNER);
-  frame_sink_id_ = frame_sink_id;
+  embed_frame_sink_id_ = frame_sink_id;
   UpdatePrimarySurfaceInfo();
 }
 
@@ -313,7 +319,7 @@
   // The newly generated frame by the embedder will block in the display
   // compositor until the child submits a corresponding CompositorFrame or a
   // deadline hits.
-  if (frame_sink_id_.is_valid())
+  if (embed_frame_sink_id_.is_valid())
     UpdatePrimarySurfaceInfo();
 
   if (local_layer_tree_frame_sink_)
@@ -324,16 +330,16 @@
 
 void WindowPortMus::SetFallbackSurfaceInfo(
     const viz::SurfaceInfo& surface_info) {
-  if (!frame_sink_id_.is_valid()) {
+  if (!embed_frame_sink_id_.is_valid()) {
     // |primary_surface_info_| shold not be valid, since we didn't know the
-    // |frame_sink_id_|.
+    // |embed_frame_sink_id_|.
     DCHECK(!primary_surface_info_.is_valid());
-    frame_sink_id_ = surface_info.id().frame_sink_id();
+    embed_frame_sink_id_ = surface_info.id().frame_sink_id();
     UpdatePrimarySurfaceInfo();
   }
 
   // The frame sink id should never be changed.
-  DCHECK_EQ(surface_info.id().frame_sink_id(), frame_sink_id_);
+  DCHECK_EQ(surface_info.id().frame_sink_id(), embed_frame_sink_id_);
 
   fallback_surface_info_ = surface_info;
   UpdateClientSurfaceEmbedder();
@@ -567,7 +573,7 @@
 }
 
 viz::SurfaceId WindowPortMus::GetSurfaceId() const {
-  return viz::SurfaceId(frame_sink_id_, local_surface_id_);
+  return viz::SurfaceId(embed_frame_sink_id_, local_surface_id_);
 }
 
 void WindowPortMus::OnWindowAddedToRootWindow() {}
@@ -586,11 +592,11 @@
     return;
   }
 
-  if (!frame_sink_id_.is_valid() || !local_surface_id_.is_valid())
+  if (!embed_frame_sink_id_.is_valid() || !local_surface_id_.is_valid())
     return;
 
   primary_surface_info_ = viz::SurfaceInfo(
-      viz::SurfaceId(frame_sink_id_, local_surface_id_),
+      viz::SurfaceId(embed_frame_sink_id_, local_surface_id_),
       ScaleFactorForDisplay(window_), last_surface_size_in_pixels_);
   UpdateClientSurfaceEmbedder();
 }
diff --git a/ui/aura/mus/window_port_mus.h b/ui/aura/mus/window_port_mus.h
index cb312eac..47cc985 100644
--- a/ui/aura/mus/window_port_mus.h
+++ b/ui/aura/mus/window_port_mus.h
@@ -58,8 +58,6 @@
   Window* window() { return window_; }
   const Window* window() const { return window_; }
 
-  viz::FrameSinkId frame_sink_id() const { return frame_sink_id_; }
-
   ClientSurfaceEmbedder* client_surface_embedder() const {
     return client_surface_embedder_.get();
   }
@@ -68,6 +66,10 @@
     return primary_surface_info_;
   }
 
+  // Returns either the FrameSinkId set by window server or its server_id with
+  // the client id part 0.
+  viz::FrameSinkId GetFrameSinkId() const;
+
   void SetTextInputState(mojo::TextInputStatePtr state);
   void SetImeVisibility(bool visible, mojo::TextInputStatePtr state);
 
@@ -292,7 +294,8 @@
   ServerChangeIdType next_server_change_id_ = 0;
   ServerChanges server_changes_;
 
-  viz::FrameSinkId frame_sink_id_;
+  // Only set when it is embedding another client inside.
+  viz::FrameSinkId embed_frame_sink_id_;
 
   viz::SurfaceInfo primary_surface_info_;
   viz::SurfaceInfo fallback_surface_info_;