diff --git a/DEPS b/DEPS
index efc39fbc..76e567b 100644
--- a/DEPS
+++ b/DEPS
@@ -96,11 +96,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': '8363be1a00b154082e6be178f37de4b8fa78dde0',
+  'skia_revision': '264182c3f7d282e57a4b1d46fde3ef702b81c5c3',
   # 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': '8030067c74da4dc677cab3984b5443c5f6bfbd9b',
+  'v8_revision': 'f45cf834ecaf74c4c83b888d2c8a78d4855d76d3',
   # 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.
@@ -108,7 +108,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling ANGLE
   # and whatever else without interference from each other.
-  'angle_revision': '316c60650214130de83be8fde553c7bd0c2f8f00',
+  'angle_revision': '0ed2aa23ab6d11e516c004bc11aa80961423572a',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling build tools
   # and whatever else without interference from each other.
@@ -120,7 +120,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': 'ac8357b3ec7e1fe4000ebcae5ce65a38bfeb5cb1',
+  'pdfium_revision': '16ccc8b65747c265255a487e3e748ac9e2c1a701',
   # 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.
@@ -156,7 +156,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': '46ef7c475a9293a54d77b76a29fa7f2f2be95bcb',
+  'catapult_revision': '517100ca073f7deaf4818786104daf7e7c744b8d',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -498,7 +498,7 @@
 
   # Build tools for Chrome OS. Note: This depends on third_party/pyelftools.
   'src/third_party/chromite': {
-      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '0bdff2baa748c99e6306c707eb673fc292ec9833',
+      'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'a05ffccfb494de4c72d52b13b3bc53bdcf81a562',
       'condition': 'checkout_linux',
   },
 
@@ -523,7 +523,7 @@
   },
 
   'src/third_party/depot_tools':
-    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'f16fdf3165b8b86d10386d18a6b6075169c10e15',
+    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'cf4aced37e993525b9e21856c0d1acec682edab1',
 
   'src/third_party/devtools-node-modules':
     Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'),
@@ -990,7 +990,7 @@
     Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '198d637dd3e21d837fac6b3186cc6bc72e2f7219',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + '9a89a491f801afb2a4fb0d90be397a4b2e553a95',
+    Var('webrtc_git') + '/src.git' + '@' + '183f4d90bd4f9c3fe5462f78138e657e43954bf5',
 
   'src/third_party/xdg-utils': {
       'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
diff --git a/ash/BUILD.gn b/ash/BUILD.gn
index 1ab01c6..42a3890 100644
--- a/ash/BUILD.gn
+++ b/ash/BUILD.gn
@@ -588,6 +588,8 @@
     "system/cast/cast_notification_controller.h",
     "system/cast/tray_cast.cc",
     "system/cast/tray_cast.h",
+    "system/cast/unified_cast_detailed_view_controller.cc",
+    "system/cast/unified_cast_detailed_view_controller.h",
     "system/date/clock_observer.h",
     "system/date/date_view.cc",
     "system/date/date_view.h",
diff --git a/ash/cast_config_controller.h b/ash/cast_config_controller.h
index c408c143..905dca1db 100644
--- a/ash/cast_config_controller.h
+++ b/ash/cast_config_controller.h
@@ -61,6 +61,10 @@
   void CastToSink(mojom::CastSinkPtr sink);
   void StopCasting(mojom::CastRoutePtr route);
 
+  const std::vector<mojom::SinkAndRoutePtr>& sinks_and_routes() const {
+    return sinks_and_routes_;
+  }
+
  private:
   // Bindings for the CastConfig interface.
   mojo::BindingSet<mojom::CastConfig> bindings_;
diff --git a/ash/login/ui/login_keyboard_test_base.cc b/ash/login/ui/login_keyboard_test_base.cc
index 6520bde..8a62b18 100644
--- a/ash/login/ui/login_keyboard_test_base.cc
+++ b/ash/login/ui/login_keyboard_test_base.cc
@@ -54,6 +54,7 @@
     keyboard_controller_->ui()->GetContentsWindow()->SetBounds(
         keyboard::KeyboardBoundsFromRootBounds(
             Shell::GetPrimaryRootWindow()->bounds(), height));
+    keyboard_controller_->NotifyContentsLoaded();
   }
   ASSERT_TRUE(keyboard_controller_->keyboard_visible());
 }
diff --git a/ash/system/cast/tray_cast.cc b/ash/system/cast/tray_cast.cc
index 5b2bf6a..78adf768 100644
--- a/ash/system/cast/tray_cast.cc
+++ b/ash/system/cast/tray_cast.cc
@@ -332,39 +332,6 @@
 
 CastTrayView::~CastTrayView() = default;
 
-// This view displays a list of cast receivers that can be clicked on and casted
-// to. It is activated by clicking on the chevron inside of
-// |CastSelectDefaultView|.
-class CastDetailedView : public TrayDetailedView {
- public:
-  CastDetailedView(DetailedViewDelegate* delegate,
-                   const std::vector<mojom::SinkAndRoutePtr>& sinks_and_routes);
-  ~CastDetailedView() override;
-
-  // Makes the detail view think the view associated with the given receiver_id
-  // was clicked. This will start a cast.
-  void SimulateViewClickedForTest(const std::string& receiver_id);
-
-  // Updates the list of available receivers.
-  void UpdateReceiverList(
-      const std::vector<mojom::SinkAndRoutePtr>& sinks_routes);
-
- private:
-  void CreateItems();
-
-  void UpdateReceiverListFromCachedData();
-
-  // TrayDetailedView:
-  void HandleViewClicked(views::View* view) override;
-
-  // A mapping from the receiver id to the receiver/activity data.
-  std::map<std::string, ash::mojom::SinkAndRoutePtr> sinks_and_routes_;
-  // A mapping from the view pointer to the associated activity id.
-  std::map<views::View*, ash::mojom::CastSinkPtr> view_to_sink_map_;
-
-  DISALLOW_COPY_AND_ASSIGN(CastDetailedView);
-};
-
 CastDetailedView::CastDetailedView(
     DetailedViewDelegate* delegate,
     const std::vector<mojom::SinkAndRoutePtr>& sinks_routes)
diff --git a/ash/system/cast/tray_cast.h b/ash/system/cast/tray_cast.h
index 83916957..b628099 100644
--- a/ash/system/cast/tray_cast.h
+++ b/ash/system/cast/tray_cast.h
@@ -11,13 +11,47 @@
 #include "ash/cast_config_controller.h"
 #include "ash/shell_observer.h"
 #include "ash/system/tray/system_tray_item.h"
+#include "ash/system/tray/tray_detailed_view.h"
 #include "base/macros.h"
 
 namespace ash {
 namespace tray {
 class CastTrayView;
-class CastDetailedView;
 class CastDuplexView;
+
+// This view displays a list of cast receivers that can be clicked on and casted
+// to. It is activated by clicking on the chevron inside of
+// |CastSelectDefaultView|.
+class CastDetailedView : public TrayDetailedView {
+ public:
+  CastDetailedView(DetailedViewDelegate* delegate,
+                   const std::vector<mojom::SinkAndRoutePtr>& sinks_and_routes);
+  ~CastDetailedView() override;
+
+  // Makes the detail view think the view associated with the given receiver_id
+  // was clicked. This will start a cast.
+  void SimulateViewClickedForTest(const std::string& receiver_id);
+
+  // Updates the list of available receivers.
+  void UpdateReceiverList(
+      const std::vector<mojom::SinkAndRoutePtr>& sinks_routes);
+
+ private:
+  void CreateItems();
+
+  void UpdateReceiverListFromCachedData();
+
+  // TrayDetailedView:
+  void HandleViewClicked(views::View* view) override;
+
+  // A mapping from the receiver id to the receiver/activity data.
+  std::map<std::string, ash::mojom::SinkAndRoutePtr> sinks_and_routes_;
+  // A mapping from the view pointer to the associated activity id.
+  std::map<views::View*, ash::mojom::CastSinkPtr> view_to_sink_map_;
+
+  DISALLOW_COPY_AND_ASSIGN(CastDetailedView);
+};
+
 }  // namespace tray
 
 class DetailedViewDelegate;
diff --git a/ash/system/cast/unified_cast_detailed_view_controller.cc b/ash/system/cast/unified_cast_detailed_view_controller.cc
new file mode 100644
index 0000000..6192ffd
--- /dev/null
+++ b/ash/system/cast/unified_cast_detailed_view_controller.cc
@@ -0,0 +1,34 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ash/system/cast/unified_cast_detailed_view_controller.h"
+
+#include "ash/shell.h"
+#include "ash/system/cast/tray_cast.h"
+#include "ash/system/unified/unified_detailed_view_delegate.h"
+
+namespace ash {
+
+UnifiedCastDetailedViewController::UnifiedCastDetailedViewController(
+    UnifiedSystemTrayController* tray_controller)
+    : detailed_view_delegate_(
+          std::make_unique<UnifiedDetailedViewDelegate>(tray_controller)) {}
+
+UnifiedCastDetailedViewController::~UnifiedCastDetailedViewController() =
+    default;
+
+views::View* UnifiedCastDetailedViewController::CreateView() {
+  DCHECK(!view_);
+  view_ = new tray::CastDetailedView(
+      detailed_view_delegate_.get(),
+      Shell::Get()->cast_config()->sinks_and_routes());
+  return view_;
+}
+
+void UnifiedCastDetailedViewController::OnDevicesUpdated(
+    std::vector<mojom::SinkAndRoutePtr> devices) {
+  view_->UpdateReceiverList(std::move(devices));
+}
+
+}  // namespace ash
diff --git a/ash/system/cast/unified_cast_detailed_view_controller.h b/ash/system/cast/unified_cast_detailed_view_controller.h
new file mode 100644
index 0000000..f8fac22
--- /dev/null
+++ b/ash/system/cast/unified_cast_detailed_view_controller.h
@@ -0,0 +1,43 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_CAST_UNIFIED_CAST_DETAILED_VIEW_CONTROLLER_H_
+#define ASH_SYSTEM_CAST_UNIFIED_CAST_DETAILED_VIEW_CONTROLLER_H_
+
+#include "ash/cast_config_controller.h"
+#include "ash/system/unified/detailed_view_controller.h"
+
+namespace ash {
+namespace tray {
+class CastDetailedView;
+}  // namespace tray
+
+class DetailedViewDelegate;
+class UnifiedSystemTrayController;
+
+// Controller of Cast detailed view in UnifiedSystemTray.
+class UnifiedCastDetailedViewController : public DetailedViewController,
+                                          public CastConfigControllerObserver {
+ public:
+  explicit UnifiedCastDetailedViewController(
+      UnifiedSystemTrayController* tray_controller);
+  ~UnifiedCastDetailedViewController() override;
+
+  // DetailedViewControllerBase:
+  views::View* CreateView() override;
+
+  // CastConfigControllerObserver:
+  void OnDevicesUpdated(std::vector<mojom::SinkAndRoutePtr> devices) override;
+
+ private:
+  const std::unique_ptr<DetailedViewDelegate> detailed_view_delegate_;
+
+  tray::CastDetailedView* view_ = nullptr;
+
+  DISALLOW_COPY_AND_ASSIGN(UnifiedCastDetailedViewController);
+};
+
+}  // namespace ash
+
+#endif  // ASH_SYSTEM_CAST_UNIFIED_CAST_DETAILED_VIEW_CONTROLLER_H_
diff --git a/ash/system/unified/unified_system_tray_controller.cc b/ash/system/unified/unified_system_tray_controller.cc
index 46701261..d98192a 100644
--- a/ash/system/unified/unified_system_tray_controller.cc
+++ b/ash/system/unified/unified_system_tray_controller.cc
@@ -15,6 +15,7 @@
 #include "ash/system/brightness/unified_brightness_slider_controller.h"
 #include "ash/system/cast/cast_feature_pod_controller.h"
 #include "ash/system/cast/tray_cast.h"
+#include "ash/system/cast/unified_cast_detailed_view_controller.h"
 #include "ash/system/ime/ime_feature_pod_controller.h"
 #include "ash/system/ime/tray_ime_chromeos.h"
 #include "ash/system/ime/unified_ime_detailed_view_controller.h"
@@ -232,8 +233,7 @@
 }
 
 void UnifiedSystemTrayController::ShowCastDetailedView() {
-  // TODO(tetsui): Implement Cast's own DetailedViewController.
-  ShowSystemTrayItemDetailedView(system_tray_->GetTrayCast());
+  ShowDetailedView(std::make_unique<UnifiedCastDetailedViewController>(this));
 }
 
 void UnifiedSystemTrayController::ShowAccessibilityDetailedView() {
diff --git a/ash/wm/lock_action_handler_layout_manager_unittest.cc b/ash/wm/lock_action_handler_layout_manager_unittest.cc
index a89362e..fda6fa83 100644
--- a/ash/wm/lock_action_handler_layout_manager_unittest.cc
+++ b/ash/wm/lock_action_handler_layout_manager_unittest.cc
@@ -134,6 +134,7 @@
       keyboard->ui()->GetContentsWindow()->SetBounds(
           keyboard::KeyboardBoundsFromRootBounds(
               Shell::GetPrimaryRootWindow()->bounds(), kVirtualKeyboardHeight));
+      keyboard->NotifyContentsLoaded();
     } else {
       keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL);
     }
diff --git a/ash/wm/lock_layout_manager_unittest.cc b/ash/wm/lock_layout_manager_unittest.cc
index e4e6d1a1..eedc77e 100644
--- a/ash/wm/lock_layout_manager_unittest.cc
+++ b/ash/wm/lock_layout_manager_unittest.cc
@@ -97,6 +97,7 @@
             keyboard::KeyboardBoundsFromRootBounds(
                 Shell::GetPrimaryRootWindow()->bounds(),
                 kVirtualKeyboardHeight));
+        keyboard->NotifyContentsLoaded();
       }
     } else {
       keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL);
diff --git a/ash/wm/system_modal_container_layout_manager_unittest.cc b/ash/wm/system_modal_container_layout_manager_unittest.cc
index d5cfb83..1beaa2eb 100644
--- a/ash/wm/system_modal_container_layout_manager_unittest.cc
+++ b/ash/wm/system_modal_container_layout_manager_unittest.cc
@@ -189,6 +189,7 @@
         keyboard->ui()->GetContentsWindow()->SetBounds(
             keyboard::KeyboardBoundsFromRootBounds(
                 Shell::GetPrimaryRootWindow()->bounds(), 100));
+        keyboard->NotifyContentsLoaded();
       }
     } else {
       keyboard->HideKeyboard(keyboard::KeyboardController::HIDE_REASON_MANUAL);
diff --git a/ash/wm/workspace/workspace_layout_manager_unittest.cc b/ash/wm/workspace/workspace_layout_manager_unittest.cc
index eca21ab5..5d4dbb5 100644
--- a/ash/wm/workspace/workspace_layout_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_layout_manager_unittest.cc
@@ -1827,6 +1827,7 @@
 
   // Open keyboard in sticky mode.
   kb_controller->ShowKeyboard(true);
+  kb_controller->NotifyContentsLoaded();
 
   int shift =
       work_area.height() - kb_controller->GetContainerWindow()->bounds().y();
diff --git a/cc/test/test_image_factory.cc b/cc/test/test_image_factory.cc
index 7cbfd4f..6ac3058 100644
--- a/cc/test/test_image_factory.cc
+++ b/cc/test/test_image_factory.cc
@@ -33,4 +33,14 @@
   return image;
 }
 
+scoped_refptr<gl::GLImage> TestImageFactory::CreateAnonymousImage(
+    const gfx::Size& size,
+    gfx::BufferFormat format,
+    gfx::BufferUsage usage,
+    unsigned internalformat,
+    bool* is_cleared) {
+  NOTREACHED();
+  return nullptr;
+}
+
 }  // namespace cc
diff --git a/cc/test/test_image_factory.h b/cc/test/test_image_factory.h
index d896d3a..e6e0117 100644
--- a/cc/test/test_image_factory.h
+++ b/cc/test/test_image_factory.h
@@ -23,6 +23,11 @@
       unsigned internalformat,
       int client_id,
       gpu::SurfaceHandle surface_handle) override;
+  scoped_refptr<gl::GLImage> CreateAnonymousImage(const gfx::Size& size,
+                                                  gfx::BufferFormat format,
+                                                  gfx::BufferUsage usage,
+                                                  unsigned internalformat,
+                                                  bool* is_cleared) override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(TestImageFactory);
diff --git a/chrome/VERSION b/chrome/VERSION
index 5ffa3b7..fa2d9743 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=69
 MINOR=0
-BUILD=3445
+BUILD=3446
 PATCH=0
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
index f0be4e8..5b65b3e 100644
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -217,6 +217,7 @@
     "//components/download/internal/background_service:internal_java",
     "//components/download/public/background_service:public_java",
     "//components/download/public/common:public_java",
+    "//components/embedder_support/android:media_java",
     "//components/feature_engagement:feature_engagement_java",
     "//components/gcm_driver/android:gcm_driver_java",
     "//components/gcm_driver/instance_id/android:instance_id_driver_java",
diff --git a/chrome/android/java/DEPS b/chrome/android/java/DEPS
index 55e5a8ef..369c9a1 100644
--- a/chrome/android/java/DEPS
+++ b/chrome/android/java/DEPS
@@ -1,4 +1,5 @@
 include_rules = [
+  "+components/embedder_support/android",
   "+components/autofill/android/java/src/org/chromium/components/autofill",
   "+components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler",
   "+components/bookmarks/common/android/java/src/org/chromium/components/bookmarks",
@@ -19,7 +20,6 @@
 
   "-content/public/android",
   "+content/public/android/java/src/org/chromium/content_public",
-  "!content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewEmbedder.java",
   "!content/public/android/java/src/org/chromium/content/browser/ChildProcessCreationParams.java",
   "!content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelper.java",
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java
index 7d4822fb..b61210a 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java
@@ -482,6 +482,9 @@
         } else {
             setBasePageTextControlsVisibility(false);
         }
+        if (mContent != null) {
+            mContent.setPanelTopOffset((int) ((mViewportHeight - getHeight()) / mPxToDp));
+        }
     }
 
     @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
index 89a81036..933f827 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java
@@ -8,6 +8,7 @@
 import android.view.View;
 import android.view.View.MeasureSpec;
 import android.view.ViewGroup;
+import android.view.ViewGroup.MarginLayoutParams;
 
 import org.chromium.base.VisibleForTesting;
 import org.chromium.base.annotations.CalledByNative;
@@ -104,7 +105,26 @@
     private boolean mSubtractBarHeight;
 
     /** The height of the bar at the top of the OverlayPanel in pixels. */
-    private int mBarHeightPx;
+    private final int mBarHeightPx;
+
+    /** Sets the top offset of the overlay panel in pixel. 0 when fully expanded. */
+    private int mPanelTopOffsetPx;
+
+    private class OverlayViewDelegate extends ViewAndroidDelegate {
+        public OverlayViewDelegate(ViewGroup v) {
+            super(v);
+        }
+
+        @Override
+        public void setViewPosition(View view, float x, float y, float width, float height,
+                int leftMargin, int topMargin) {
+            super.setViewPosition(view, x, y, width, height, leftMargin, topMargin);
+
+            // Applies top offset depending on the overlay panel state.
+            MarginLayoutParams lp = (MarginLayoutParams) view.getLayoutParams();
+            lp.topMargin += mPanelTopOffsetPx + mBarHeightPx;
+        }
+    }
 
     // ============================================================================================
     // InterceptNavigationDelegateImpl
@@ -264,6 +284,14 @@
     }
 
     /**
+     * Sets the top offset of the overlay panel that varies as the panel state changes.
+     * @param offset Top offset in pixel.
+     */
+    public void setPanelTopOffset(int offset) {
+        mPanelTopOffsetPx = offset;
+    }
+
+    /**
      * Create a new ContentViewCore that will be managed by this panel.
      */
     private void createNewContentView() {
@@ -287,23 +315,7 @@
             cv.setDesiredMeasureSpec(width, height);
         }
 
-        // Dummny ViewAndroidDelegate since the container view for overlay panel is
-        // never added to the view hierarchy.
-        ViewAndroidDelegate delegate =
-                new ViewAndroidDelegate(cv) {
-                    @Override
-                    public View acquireView() {
-                        return null;
-                    }
-
-                    @Override
-                    public void setViewPosition(View anchorView, float x, float y, float width,
-                            float height, int leftMargin, int topMargin) {}
-
-                    @Override
-                    public void removeView(View anchorView) { }
-
-                };
+        OverlayViewDelegate delegate = new OverlayViewDelegate(cv);
         mContentViewCore = ContentViewCore.create(mActivity, ChromeVersionInfo.getProductVersion(),
                 mWebContents, delegate, cv, mActivity.getWindowAndroid());
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListCoordinator.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListCoordinator.java
index 76d4d7e..37f902ad 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListCoordinator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListCoordinator.java
@@ -8,6 +8,7 @@
 import android.view.View;
 
 import org.chromium.chrome.browser.download.home.filter.FilterCoordinator;
+import org.chromium.chrome.browser.download.home.list.ListItem.ViewListItem;
 import org.chromium.components.offline_items_collection.OfflineContentProvider;
 
 /**
@@ -17,7 +18,8 @@
 public class DateOrderedListCoordinator {
     private final FilterCoordinator mFilterCoordinator;
 
-    private final DateOrderedListModel mModel;
+    private final ListItemModel mModel;
+    private final DecoratedListItemModel mDecoratedModel;
     private final DateOrderedListMediator mMediator;
     private final DateOrderedListView mView;
 
@@ -27,13 +29,15 @@
      * @param provider The {@link OfflineContentProvider} to visually represent.
      */
     public DateOrderedListCoordinator(Context context, OfflineContentProvider provider) {
-        mModel = new DateOrderedListModel();
+        mModel = new ListItemModel();
+        mDecoratedModel = new DecoratedListItemModel(mModel);
         mMediator = new DateOrderedListMediator(provider, mModel);
-        mView = new DateOrderedListView(context, mModel);
+        mView = new DateOrderedListView(context, mDecoratedModel);
 
         // Hook up the FilterCoordinator with our mediator.
         mFilterCoordinator = new FilterCoordinator(context, mMediator.getFilterSource());
         mFilterCoordinator.addObserver(filter -> mMediator.onFilterTypeSelected(filter));
+        mDecoratedModel.setHeader(new ViewListItem(Long.MAX_VALUE, mFilterCoordinator.getView()));
     }
 
     /** Tears down this coordinator. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMediator.java
index f153a6f6..9c41138 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMediator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMediator.java
@@ -18,7 +18,7 @@
  */
 class DateOrderedListMediator {
     private final OfflineContentProvider mProvider;
-    private final DateOrderedListModel mModel;
+    private final ListItemModel mModel;
 
     private final OfflineItemSource mSource;
     private final DateOrderedListMutator mListMutator;
@@ -31,9 +31,9 @@
      * Creates an instance of a DateOrderedListMediator that will push {@code provider} into
      * {@code model}.
      * @param provider The {@link OfflineContentProvider} to visually represent.
-     * @param model    The {@link DateOrderedListModel} to push {@code provider} into.
+     * @param model    The {@link ListItemModel} to push {@code provider} into.
      */
-    public DateOrderedListMediator(OfflineContentProvider provider, DateOrderedListModel model) {
+    public DateOrderedListMediator(OfflineContentProvider provider, ListItemModel model) {
         // Build a chain from the data source to the model.  The chain will look like:
         // [OfflineContentProvider] ->
         //     [OfflineItemSource] ->
@@ -41,7 +41,7 @@
         //             [TypeOfflineItemFilter] ->
         //                 [SearchOfflineItemFitler] ->
         //                     [DateOrderedListMutator] ->
-        //                         [DateOrderedListModel]
+        //                         [ListItemModel]
 
         mProvider = provider;
         mModel = model;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListModel.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListModel.java
deleted file mode 100644
index c9043d1..0000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListModel.java
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.download.home.list;
-
-import org.chromium.base.VisibleForTesting;
-import org.chromium.chrome.browser.modelutil.ListObservable;
-import org.chromium.components.offline_items_collection.OfflineItem;
-
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
-/**
- * A simple {@link ListObservable} that acts as a backing store for the output of
- * {@link DateOrderedListMutator}.  This will be updated in the near future to support large batch
- * updates to minimize the hit on {@link ListObserver}s.
- */
-class DateOrderedListModel extends BatchListObservable {
-    /**
-     * Represents an item meant to be shown in the UI.  If {@code ListItem#item} is {@code null},
-     * this item represents a date separate for a new day's worth of items.  Otherwise it represents
-     * an item itself.
-     */
-    public static class ListItem {
-        /** If not {@code null}, the {@link OfflineItem} to show in the UI. */
-        public final OfflineItem item;
-
-        /** The date that reflects the {@link ListItem}. */
-        public final Date date;
-
-        /** A stable (non-changing) id that represents this {@link ListItem}. */
-        public final long stableId;
-
-        /** Builds a {@link ListItem} representing {@code item}.  This will set the {@code date}. */
-        ListItem(OfflineItem item) {
-            this.stableId = generateStableId(item);
-            this.item = item;
-            this.date = new Date(item.creationTimeMs);
-        }
-
-        /** Builds a {@link ListItem} representing {@code date}.  This will not set {@code item}. */
-        ListItem(Calendar calendar) {
-            this.stableId = generateStableIdForDayOfYear(calendar);
-            this.item = null;
-            this.date = calendar.getTime();
-        }
-
-        @VisibleForTesting
-        static long generateStableId(OfflineItem item) {
-            return (((long) item.id.hashCode()) << 32) + (item.creationTimeMs & 0x0FFFFFFFF);
-        }
-
-        @VisibleForTesting
-        static long generateStableIdForDayOfYear(Calendar calendar) {
-            return (calendar.get(Calendar.YEAR) << 16) + calendar.get(Calendar.DAY_OF_YEAR);
-        }
-    }
-
-    private final List<ListItem> mItems = new ArrayList<>();
-
-    /** Adds {@code item} to this list at {@code index}. */
-    public void addItem(int index, ListItem item) {
-        mItems.add(index, item);
-        notifyItemRangeInserted(index, 1);
-    }
-
-    /** Removes the {@link ListItem} at {@code index}. */
-    public void removeItem(int index) {
-        mItems.remove(index);
-        notifyItemRangeRemoved(index, 1);
-    }
-
-    /** Sets the {@link ListItem} at {@code index} to {@code item}. */
-    public void setItem(int index, ListItem item) {
-        mItems.set(index, item);
-        notifyItemRangeChanged(index, 1, null);
-    }
-
-    /** @return The {@link ListItem} at {@code index}. */
-    public ListItem getItemAt(int index) {
-        return mItems.get(index);
-    }
-
-    // ListObservable implementation.
-    @Override
-    public int getItemCount() {
-        return mItems.size();
-    }
-}
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutator.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutator.java
index 21e08fe..7369745 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutator.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutator.java
@@ -32,14 +32,14 @@
 class DateOrderedListMutator implements OfflineItemFilterObserver {
     private static final int INVALID_INDEX = -1;
 
-    private final DateOrderedListModel mModel;
+    private final ListItemModel mModel;
 
     /**
      * Creates an DateOrderedList instance that will reflect {@code source}.
      * @param source The source of data for this list.
      * @param model  The model that will be the storage for the updated list.
      */
-    public DateOrderedListMutator(OfflineItemFilterSource source, DateOrderedListModel model) {
+    public DateOrderedListMutator(OfflineItemFilterSource source, ListItemModel model) {
         mModel = model;
         source.addObserver(this);
         onItemsAdded(source.getItems());
@@ -58,16 +58,16 @@
 
         for (OfflineItem item : sorted) {
             int index = getBestIndexFor(item);
-            mModel.addItem(index, new DateOrderedListModel.ListItem(item));
+            mModel.addItem(index, new ListItem.OfflineItemListItem(item));
 
             boolean isFirst = index == 0;
             boolean isPrevSameDay = !isFirst
                     && CalendarUtils.isSameDay(
-                               mModel.getItemAt(index - 1).date.getTime(), item.creationTimeMs);
+                               getItemAt(index - 1).date.getTime(), item.creationTimeMs);
 
             if (isFirst || !isPrevSameDay) {
                 Calendar startOfDay = CalendarUtils.getStartOfDay(item.creationTimeMs);
-                mModel.addItem(index, new DateOrderedListModel.ListItem(startOfDay));
+                mModel.addItem(index, new ListItem.DateListItem(startOfDay));
             }
         }
 
@@ -77,13 +77,12 @@
     @Override
     public void onItemsRemoved(Collection<OfflineItem> items) {
         for (int i = mModel.getItemCount() - 1; i >= 0; i--) {
-            DateOrderedListModel.ListItem item = mModel.getItemAt(i);
-            boolean isHeader = item.item == null;
+            ListItem.DateListItem item = getItemAt(i);
+            boolean isHeader = isHeader(item);
             boolean isLast = i == mModel.getItemCount() - 1;
-            boolean isNextHeader = isLast ? false : mModel.getItemAt(i + 1).item == null;
-
+            boolean isNextHeader = isLast ? false : isHeader(getItemAt(i + 1));
             boolean removeHeader = isHeader && (isLast || isNextHeader);
-            boolean removeItem = !isHeader && items.contains(item.item);
+            boolean removeItem = !isHeader && items.contains(getOfflineItemFrom(item));
 
             if (removeHeader || removeItem) mModel.removeItem(i);
         }
@@ -103,7 +102,7 @@
             onItemsRemoved(CollectionUtil.newArrayList(oldItem));
             onItemsAdded(CollectionUtil.newArrayList(item));
         } else {
-            mModel.setItem(i, new DateOrderedListModel.ListItem(item));
+            mModel.setItem(i, new ListItem.OfflineItemListItem(item));
         }
 
         mModel.dispatchLastEvent();
@@ -111,8 +110,9 @@
 
     private int indexOfItem(ContentId id) {
         for (int i = 0; i < mModel.getItemCount(); i++) {
-            OfflineItem item = mModel.getItemAt(i).item;
-            if (item != null && item.id.equals(id)) return i;
+            ListItem.DateListItem listItem = getItemAt(i);
+            if (isHeader(listItem)) continue;
+            if (getOfflineItemFrom(listItem).id.equals(id)) return i;
         }
 
         return INVALID_INDEX;
@@ -120,13 +120,12 @@
 
     private int getBestIndexFor(OfflineItem item) {
         for (int i = 0; i < mModel.getItemCount(); i++) {
-            DateOrderedListModel.ListItem listItem = mModel.getItemAt(i);
+            ListItem.DateListItem listItem = getItemAt(i);
 
             // We need to compare different things depending on whether or not the ListItem is a
             // header.  If it is a header we want to compare the day, otherwise we want to compare
             // the exact time.
-            boolean isHeader = listItem.item == null;
-            long itemTimestamp = isHeader
+            long itemTimestamp = isHeader(listItem)
                     ? CalendarUtils.getStartOfDay(item.creationTimeMs).getTimeInMillis()
                     : item.creationTimeMs;
 
@@ -135,4 +134,17 @@
 
         return mModel.getItemCount();
     }
+
+    private ListItem.DateListItem getItemAt(int index) {
+        return (ListItem.DateListItem) mModel.getItemAt(index);
+    }
+
+    private boolean isHeader(ListItem.DateListItem item) {
+        return !(item instanceof ListItem.OfflineItemListItem);
+    }
+
+    private OfflineItem getOfflineItemFrom(ListItem.DateListItem item) {
+        if (isHeader(item)) return null;
+        return ((ListItem.OfflineItemListItem) item).item;
+    }
 }
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java
index a0a138b..95544c7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java
@@ -7,7 +7,6 @@
 import android.content.Context;
 import android.support.v7.widget.LinearLayoutManager;
 import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.RecyclerView.ViewHolder;
 import android.view.View;
 
 import org.chromium.chrome.browser.modelutil.RecyclerViewModelChangeProcessor;
@@ -17,17 +16,17 @@
  * glue to display it on the screen.
  */
 class DateOrderedListView {
-    private final DateOrderedListModel mModel;
+    private final DecoratedListItemModel mModel;
     private final RecyclerView mView;
 
     /** Creates an instance of a {@link DateOrderedListView} representing {@code model}. */
-    public DateOrderedListView(Context context, DateOrderedListModel model) {
+    public DateOrderedListView(Context context, DecoratedListItemModel model) {
         mModel = model;
 
         DateOrderedListViewBinder viewBinder = new DateOrderedListViewBinder();
         DateOrderedListViewAdapter adapter = new DateOrderedListViewAdapter(mModel, viewBinder);
-        RecyclerViewModelChangeProcessor<DateOrderedListModel, ViewHolder> modelChangeProcessor =
-                new RecyclerViewModelChangeProcessor<>(adapter);
+        RecyclerViewModelChangeProcessor<DecoratedListItemModel, ListItemViewHolder>
+                modelChangeProcessor = new RecyclerViewModelChangeProcessor<>(adapter);
 
         mModel.addObserver(modelChangeProcessor);
 
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewAdapter.java
index 8bf27211..85ddfe8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewAdapter.java
@@ -5,22 +5,24 @@
 package org.chromium.chrome.browser.download.home.list;
 
 import android.support.v7.widget.RecyclerView;
-import android.support.v7.widget.RecyclerView.ViewHolder;
 
-import org.chromium.chrome.browser.download.home.list.DateOrderedListModel.ListItem;
 import org.chromium.chrome.browser.download.home.list.DateOrderedListViewBinder.ViewType;
+import org.chromium.chrome.browser.download.home.list.ListItem.DateListItem;
+import org.chromium.chrome.browser.download.home.list.ListItem.OfflineItemListItem;
+import org.chromium.chrome.browser.download.home.list.ListItem.ViewListItem;
 import org.chromium.chrome.browser.modelutil.RecyclerViewAdapter;
 import org.chromium.components.offline_items_collection.OfflineItemFilter;
 import org.chromium.components.offline_items_collection.OfflineItemState;
 
 /**
- * A helper {@link RecyclerView.Adapter} implementation meant to glue a {@link DateOrderedListModel}
+ * A helper {@link RecyclerView.Adapter} implementation meant to glue a {@link ListItemModel}
  * to the right {@link ViewHolder} and {@link ViewBinder}.
  */
-class DateOrderedListViewAdapter extends RecyclerViewAdapter<DateOrderedListModel, ViewHolder> {
+class DateOrderedListViewAdapter
+        extends RecyclerViewAdapter<DecoratedListItemModel, ListItemViewHolder> {
     /** Creates an instance of a {@link DateOrderedListViewAdapter}. */
-    public DateOrderedListViewAdapter(
-            DateOrderedListModel model, ViewBinder<DateOrderedListModel, ViewHolder> viewBinder) {
+    public DateOrderedListViewAdapter(DecoratedListItemModel model,
+            ViewBinder<DecoratedListItemModel, ListItemViewHolder> viewBinder) {
         super(model, viewBinder);
         setHasStableIds(true);
     }
@@ -35,24 +37,34 @@
     public @ViewType int getItemViewType(int position) {
         ListItem item = mModel.getItemAt(position);
 
-        if (item.item == null) return DateOrderedListViewBinder.DATE;
+        if (item instanceof ViewListItem) return DateOrderedListViewBinder.CUSTOM_VIEW;
+        if (item instanceof DateListItem) {
+            if (item instanceof OfflineItemListItem) {
+                OfflineItemListItem offlineItem = (OfflineItemListItem) item;
 
-        if (item.item.state == OfflineItemState.IN_PROGRESS) {
-            return DateOrderedListViewBinder.IN_PROGRESS;
+                if (offlineItem.item.state == OfflineItemState.IN_PROGRESS) {
+                    return DateOrderedListViewBinder.IN_PROGRESS;
+                }
+
+                switch (offlineItem.item.filter) {
+                    case OfflineItemFilter.FILTER_VIDEO:
+                        return DateOrderedListViewBinder.VIDEO;
+                    case OfflineItemFilter.FILTER_IMAGE:
+                        return DateOrderedListViewBinder.IMAGE;
+                    case OfflineItemFilter.FILTER_ALL:
+                    case OfflineItemFilter.FILTER_PAGE:
+                    case OfflineItemFilter.FILTER_AUDIO:
+                    case OfflineItemFilter.FILTER_OTHER:
+                    case OfflineItemFilter.FILTER_DOCUMENT:
+                    default:
+                        return DateOrderedListViewBinder.GENERIC;
+                }
+            } else {
+                return DateOrderedListViewBinder.DATE;
+            }
         }
 
-        switch (item.item.filter) {
-            case OfflineItemFilter.FILTER_VIDEO:
-                return DateOrderedListViewBinder.VIDEO;
-            case OfflineItemFilter.FILTER_IMAGE:
-                return DateOrderedListViewBinder.IMAGE;
-            case OfflineItemFilter.FILTER_ALL:
-            case OfflineItemFilter.FILTER_PAGE:
-            case OfflineItemFilter.FILTER_AUDIO:
-            case OfflineItemFilter.FILTER_OTHER:
-            case OfflineItemFilter.FILTER_DOCUMENT:
-            default:
-                return DateOrderedListViewBinder.GENERIC;
-        }
+        assert false;
+        return DateOrderedListViewBinder.GENERIC;
     }
 }
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewBinder.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewBinder.java
index 2b91e87..239650c7 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewBinder.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewBinder.java
@@ -5,7 +5,6 @@
 package org.chromium.chrome.browser.download.home.list;
 
 import android.support.annotation.IntDef;
-import android.support.v7.widget.RecyclerView.ViewHolder;
 import android.view.ViewGroup;
 
 import org.chromium.chrome.browser.modelutil.RecyclerViewAdapter.ViewBinder;
@@ -17,31 +16,34 @@
  * A {@link ViewBinder} responsible for connecting a {@link DateOrderedListModel} with a underlying
  * {@link ViewHolder}.
  */
-class DateOrderedListViewBinder implements ViewBinder<DateOrderedListModel, ViewHolder> {
+class DateOrderedListViewBinder implements ViewBinder<DecoratedListItemModel, ListItemViewHolder> {
     /** The potential types of list items that could be displayed. */
     @Retention(RetentionPolicy.SOURCE)
-    @IntDef({DATE, IN_PROGRESS, GENERIC, VIDEO, IMAGE})
+    @IntDef({DATE, IN_PROGRESS, GENERIC, VIDEO, IMAGE, CUSTOM_VIEW})
     public @interface ViewType {}
     public static final int DATE = 0;
     public static final int IN_PROGRESS = 1;
     public static final int GENERIC = 2;
     public static final int VIDEO = 3;
     public static final int IMAGE = 4;
+    public static final int CUSTOM_VIEW = 5;
 
     // ViewBinder implementation.
     @Override
-    public ViewHolder onCreateViewHolder(ViewGroup parent, @ViewType int viewType) {
+    public ListItemViewHolder onCreateViewHolder(ViewGroup parent, @ViewType int viewType) {
         switch (viewType) {
             case DATE:
-                return new DateOrderedListViewHolder.DateViewHolder(parent);
+                return new ListItemViewHolder.DateViewHolder(parent);
             case IN_PROGRESS:
-                return new DateOrderedListViewHolder.InProgressViewHolder(parent);
+                return new ListItemViewHolder.InProgressViewHolder(parent);
             case GENERIC:
-                return new DateOrderedListViewHolder.GenericViewHolder(parent);
+                return new ListItemViewHolder.GenericViewHolder(parent);
             case VIDEO:
-                return new DateOrderedListViewHolder.VideoViewHolder(parent);
+                return new ListItemViewHolder.VideoViewHolder(parent);
             case IMAGE:
-                return new DateOrderedListViewHolder.ImageViewHolder(parent);
+                return new ListItemViewHolder.ImageViewHolder(parent);
+            case CUSTOM_VIEW:
+                return new ListItemViewHolder.CustomViewHolder(parent);
         }
 
         assert false;
@@ -49,9 +51,8 @@
     }
 
     @Override
-    public void onBindViewHolder(DateOrderedListModel model, ViewHolder holder, int position) {
-        if (holder instanceof DateOrderedListViewHolder) {
-            ((DateOrderedListViewHolder) holder).bind(model.getItemAt(position));
-        }
+    public void onBindViewHolder(
+            DecoratedListItemModel model, ListItemViewHolder holder, int position) {
+        holder.bind(model.getItemAt(position));
     }
 }
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewHolder.java
deleted file mode 100644
index 1861d75..0000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewHolder.java
+++ /dev/null
@@ -1,95 +0,0 @@
-// Copyright 2018 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.download.home.list;
-
-import android.support.v7.widget.AppCompatTextView;
-import android.support.v7.widget.RecyclerView.ViewHolder;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-import org.chromium.chrome.browser.download.home.list.DateOrderedListModel.ListItem;
-
-/**
- * A {@link ViewHolder} responsible for building and setting properties on the underlying Android
- * {@link View}s for the Download Manager list.
- */
-abstract class DateOrderedListViewHolder extends ViewHolder {
-    /** Creates an instance of a {@link DateOrderedListViewHolder}. */
-    public DateOrderedListViewHolder(View itemView) {
-        super(itemView);
-    }
-
-    /**
-     * Binds the currently held {@link View} to {@code item}.
-     * @param item The {@link ListItem} to visually represent in this {@link ViewHolder}.
-     */
-    public abstract void bind(ListItem item);
-
-    /** A {@link ViewHolder} specifically meant to display a date header. */
-    public static class DateViewHolder extends DateOrderedListViewHolder {
-        public DateViewHolder(ViewGroup parent) {
-            super(new AppCompatTextView(parent.getContext()));
-        }
-
-        // DateOrderedListViewHolder implementation.
-        @Override
-        public void bind(ListItem item) {
-            ((TextView) itemView).setText(UiUtils.dateToHeaderString(item.date));
-        }
-    }
-
-    /** A {@link ViewHolder} specifically meant to display an in-progress {@code OfflineItem}. */
-    public static class InProgressViewHolder extends DateOrderedListViewHolder {
-        public InProgressViewHolder(ViewGroup parent) {
-            super(new AppCompatTextView(parent.getContext()));
-        }
-
-        // DateOrderedListViewHolder implementation.
-        @Override
-        public void bind(ListItem item) {
-            ((TextView) itemView).setText(item.item.title);
-        }
-    }
-
-    /** A {@link ViewHolder} specifically meant to display a generic {@code OfflineItem}. */
-    public static class GenericViewHolder extends DateOrderedListViewHolder {
-        public GenericViewHolder(ViewGroup parent) {
-            super(new AppCompatTextView(parent.getContext()));
-        }
-
-        // DateOrderedListViewHolder implementation.
-        @Override
-        public void bind(ListItem item) {
-            ((TextView) itemView).setText(item.item.title);
-        }
-    }
-
-    /** A {@link ViewHolder} specifically meant to display a video {@code OfflineItem}. */
-    public static class VideoViewHolder extends DateOrderedListViewHolder {
-        public VideoViewHolder(ViewGroup parent) {
-            super(new AppCompatTextView(parent.getContext()));
-        }
-
-        // DateOrderedListViewHolder implementation.
-        @Override
-        public void bind(ListItem item) {
-            ((TextView) itemView).setText(item.item.title);
-        }
-    }
-
-    /** A {@link ViewHolder} specifically meant to display an image {@code OfflineItem}. */
-    public static class ImageViewHolder extends DateOrderedListViewHolder {
-        public ImageViewHolder(ViewGroup parent) {
-            super(new AppCompatTextView(parent.getContext()));
-        }
-
-        // DateOrderedListViewHolder implementation.
-        @Override
-        public void bind(ListItem item) {
-            ((TextView) itemView).setText(item.item.title);
-        }
-    }
-}
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DecoratedListItemModel.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DecoratedListItemModel.java
new file mode 100644
index 0000000..758f134
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DecoratedListItemModel.java
@@ -0,0 +1,80 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.download.home.list;
+
+import org.chromium.chrome.browser.download.home.list.ListItem.ViewListItem;
+import org.chromium.chrome.browser.modelutil.ListObservable;
+import org.chromium.chrome.browser.modelutil.ListObservable.ListObserver;
+
+class DecoratedListItemModel extends ListObservable implements ListObserver {
+    private final ListItemModel mModel;
+
+    private ViewListItem mHeaderItem;
+
+    /** */
+    public DecoratedListItemModel(ListItemModel model) {
+        mModel = model;
+        mModel.addObserver(this);
+    }
+
+    /**
+     *
+     * @param item
+     */
+    public void setHeader(ViewListItem item) {
+        if (mHeaderItem == item) return;
+
+        ViewListItem oldHeaderItem = mHeaderItem;
+        mHeaderItem = item;
+
+        if (oldHeaderItem != null && item == null) {
+            notifyItemRangeRemoved(0, 1);
+        } else if (oldHeaderItem == null && item != null) {
+            notifyItemRangeInserted(0, 1);
+        } else {
+            notifyItemRangeChanged(0, 1, null);
+        }
+    }
+
+    /**
+     *
+     * @param index
+     * @return
+     */
+    public ListItem getItemAt(int index) {
+        if (index == 0 && mHeaderItem != null) return mHeaderItem;
+        return mModel.getItemAt(convertIndexForSource(index));
+    }
+
+    // ListObserver implementation.
+    @Override
+    public void onItemRangeInserted(ListObservable source, int index, int count) {
+        notifyItemRangeInserted(convertIndexFromSource(index), count);
+    }
+
+    @Override
+    public void onItemRangeRemoved(ListObservable source, int index, int count) {
+        notifyItemRangeRemoved(convertIndexFromSource(index), count);
+    }
+
+    @Override
+    public void onItemRangeChanged(ListObservable source, int index, int count, Object payload) {
+        notifyItemRangeChanged(convertIndexFromSource(index), count, payload);
+    }
+
+    // ListObservable implementation.
+    @Override
+    public int getItemCount() {
+        return mModel.getItemCount() + (mHeaderItem == null ? 0 : 1);
+    }
+
+    private int convertIndexForSource(int index) {
+        return mHeaderItem == null ? index : index - 1;
+    }
+
+    private int convertIndexFromSource(int index) {
+        return mHeaderItem == null ? index : index + 1;
+    }
+}
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/ListItem.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/ListItem.java
new file mode 100644
index 0000000..08d94f0
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/ListItem.java
@@ -0,0 +1,78 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.download.home.list;
+
+import android.view.View;
+
+import org.chromium.base.VisibleForTesting;
+import org.chromium.components.offline_items_collection.OfflineItem;
+
+import java.util.Calendar;
+import java.util.Date;
+
+/** An abstract class that represents a variety of possible list items to show in downloads home. */
+abstract class ListItem {
+    public final long stableId;
+
+    /** Creates a {@link ListItem} instance. */
+    ListItem(long stableId) {
+        this.stableId = stableId;
+    }
+
+    /** A {@link ListItem} that exposes a custom {@link View} to show. */
+    public static class ViewListItem extends ListItem {
+        public final View customView;
+
+        /** Creates a {@link ViewListItem} instance. */
+        public ViewListItem(long stableId, View customView) {
+            super(stableId);
+            this.customView = customView;
+        }
+    }
+
+    /** A {@link ListItem} that involves a {@link Date}. */
+    public static class DateListItem extends ListItem {
+        public final Date date;
+
+        /**
+         * Creates a {@link DateListItem} instance. with a predefined {@code stableId} and
+         * {@code date}.
+         */
+        public DateListItem(long stableId, Date date) {
+            super(stableId);
+            this.date = date;
+        }
+
+        /**
+         * Creates a {@link DateListItem} instance around a particular calendar day.  This will
+         * automatically generate the {@link ListItem#stableId} from {@code calendar}.
+         * @param calendar
+         */
+        public DateListItem(Calendar calendar) {
+            this(generateStableIdForDayOfYear(calendar), calendar.getTime());
+        }
+
+        @VisibleForTesting
+        static long generateStableIdForDayOfYear(Calendar calendar) {
+            return (calendar.get(Calendar.YEAR) << 16) + calendar.get(Calendar.DAY_OF_YEAR);
+        }
+    }
+
+    /** A {@link ListItem} that involves a {@link OfflineItem}. */
+    public static class OfflineItemListItem extends DateListItem {
+        public final OfflineItem item;
+
+        /** Creates an {@link OfflineItemListItem} wrapping {@code item}. */
+        public OfflineItemListItem(OfflineItem item) {
+            super(generateStableId(item), new Date(item.creationTimeMs));
+            this.item = item;
+        }
+
+        @VisibleForTesting
+        static long generateStableId(OfflineItem item) {
+            return (((long) item.id.hashCode()) << 32) + (item.creationTimeMs & 0x0FFFFFFFF);
+        }
+    }
+}
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/ListItemModel.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/ListItemModel.java
new file mode 100644
index 0000000..bc00ea60
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/ListItemModel.java
@@ -0,0 +1,48 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.download.home.list;
+
+import org.chromium.chrome.browser.modelutil.ListObservable;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * A simple {@link ListObservable} that acts as a backing store for the output of
+ * {@link DateOrderedListMutator}.  This will be updated in the near future to support large batch
+ * updates to minimize the hit on {@link ListObserver}s.
+ */
+class ListItemModel extends BatchListObservable {
+    private final List<ListItem> mItems = new ArrayList<>();
+
+    /** Adds {@code item} to this list at {@code index}. */
+    public void addItem(int index, ListItem item) {
+        mItems.add(index, item);
+        notifyItemRangeInserted(index, 1);
+    }
+
+    /** Removes the {@link ListItem} at {@code index}. */
+    public void removeItem(int index) {
+        mItems.remove(index);
+        notifyItemRangeRemoved(index, 1);
+    }
+
+    /** Sets the {@link ListItem} at {@code index} to {@code item}. */
+    public void setItem(int index, ListItem item) {
+        mItems.set(index, item);
+        notifyItemRangeChanged(index, 1, null);
+    }
+
+    /** @return The {@link ListItem} at {@code index}. */
+    public ListItem getItemAt(int index) {
+        return mItems.get(index);
+    }
+
+    // ListObservable implementation.
+    @Override
+    public int getItemCount() {
+        return mItems.size();
+    }
+}
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/ListItemViewHolder.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/ListItemViewHolder.java
new file mode 100644
index 0000000..70703fd
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/ListItemViewHolder.java
@@ -0,0 +1,127 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.download.home.list;
+
+import android.support.v7.widget.AppCompatTextView;
+import android.support.v7.widget.RecyclerView.ViewHolder;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewGroup.LayoutParams;
+import android.widget.FrameLayout;
+import android.widget.TextView;
+
+import org.chromium.chrome.browser.download.home.list.ListItem.DateListItem;
+import org.chromium.chrome.browser.download.home.list.ListItem.OfflineItemListItem;
+import org.chromium.chrome.browser.download.home.list.ListItem.ViewListItem;
+
+/**
+ * A {@link ViewHolder} responsible for building and setting properties on the underlying Android
+ * {@link View}s for the Download Manager list.
+ */
+abstract class ListItemViewHolder extends ViewHolder {
+    /** Creates an instance of a {@link ListItemViewHolder}. */
+    public ListItemViewHolder(View itemView) {
+        super(itemView);
+    }
+
+    /**
+     * Binds the currently held {@link View} to {@code item}.
+     * @param item The {@link ListItem} to visually represent in this {@link ViewHolder}.
+     */
+    public abstract void bind(ListItem item);
+
+    public static class CustomViewHolder extends ListItemViewHolder {
+        public CustomViewHolder(ViewGroup parent) {
+            super(new FrameLayout(parent.getContext()));
+            itemView.setLayoutParams(
+                    new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
+        }
+
+        // DateOrderedViewListHolder implemenation.
+        @Override
+        public void bind(ListItem item) {
+            ViewListItem viewItem = (ViewListItem) item;
+            ViewGroup viewGroup = (ViewGroup) itemView;
+
+            if (viewGroup.getChildCount() > 0 && viewGroup.getChildAt(0) == viewItem.customView) {
+                return;
+            }
+
+            viewGroup.removeAllViews();
+            viewGroup.addView(viewItem.customView,
+                    new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
+        }
+    }
+
+    /** A {@link ViewHolder} specifically meant to display a date header. */
+    public static class DateViewHolder extends ListItemViewHolder {
+        public DateViewHolder(ViewGroup parent) {
+            super(new AppCompatTextView(parent.getContext()));
+        }
+
+        // DateOrderedListViewHolder implementation.
+        @Override
+        public void bind(ListItem item) {
+            DateListItem dateItem = (DateListItem) item;
+            ((TextView) itemView).setText(UiUtils.dateToHeaderString(dateItem.date));
+        }
+    }
+
+    /** A {@link ViewHolder} specifically meant to display an in-progress {@code OfflineItem}. */
+    public static class InProgressViewHolder extends ListItemViewHolder {
+        public InProgressViewHolder(ViewGroup parent) {
+            super(new AppCompatTextView(parent.getContext()));
+        }
+
+        // DateOrderedListViewHolder implementation.
+        @Override
+        public void bind(ListItem item) {
+            OfflineItemListItem offlineItem = (OfflineItemListItem) item;
+            ((TextView) itemView).setText(offlineItem.item.title);
+        }
+    }
+
+    /** A {@link ViewHolder} specifically meant to display a generic {@code OfflineItem}. */
+    public static class GenericViewHolder extends ListItemViewHolder {
+        public GenericViewHolder(ViewGroup parent) {
+            super(new AppCompatTextView(parent.getContext()));
+        }
+
+        // DateOrderedListViewHolder implementation.
+        @Override
+        public void bind(ListItem item) {
+            OfflineItemListItem offlineItem = (OfflineItemListItem) item;
+            ((TextView) itemView).setText(offlineItem.item.title);
+        }
+    }
+
+    /** A {@link ViewHolder} specifically meant to display a video {@code OfflineItem}. */
+    public static class VideoViewHolder extends ListItemViewHolder {
+        public VideoViewHolder(ViewGroup parent) {
+            super(new AppCompatTextView(parent.getContext()));
+        }
+
+        // DateOrderedListViewHolder implementation.
+        @Override
+        public void bind(ListItem item) {
+            OfflineItemListItem offlineItem = (OfflineItemListItem) item;
+            ((TextView) itemView).setText(offlineItem.item.title);
+        }
+    }
+
+    /** A {@link ViewHolder} specifically meant to display an image {@code OfflineItem}. */
+    public static class ImageViewHolder extends ListItemViewHolder {
+        public ImageViewHolder(ViewGroup parent) {
+            super(new AppCompatTextView(parent.getContext()));
+        }
+
+        // DateOrderedListViewHolder implementation.
+        @Override
+        public void bind(ListItem item) {
+            OfflineItemListItem offlineItem = (OfflineItemListItem) item;
+            ((TextView) itemView).setText(offlineItem.item.title);
+        }
+    }
+}
\ No newline at end of file
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
index afdbb9d..d89c8a0 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java
@@ -76,7 +76,6 @@
 import org.chromium.components.signin.AccountsChangeObserver;
 import org.chromium.content.browser.ChildProcessLauncherHelper;
 import org.chromium.content_public.common.ContentSwitches;
-import org.chromium.device.geolocation.LocationProviderFactory;
 import org.chromium.printing.PrintDocumentAdapterWrapper;
 import org.chromium.printing.PrintingControllerImpl;
 import org.chromium.ui.PhotoPickerListener;
@@ -182,9 +181,6 @@
         UniqueIdentificationGeneratorFactory.registerGenerator(SyncController.GENERATOR_ID,
                 new UuidBasedUniqueIdentificationGenerator(
                         application, SESSIONS_UUID_PREF_KEY), false);
-
-        // Indicate that we can use the GMS location provider.
-        LocationProviderFactory.useGmsCoreLocationProvider();
     }
 
     /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java
index a2206e4..0bab7de5 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabWebContentsDelegateAndroid.java
@@ -43,8 +43,8 @@
 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
 import org.chromium.chrome.browser.tabmodel.TabModelUtils;
 import org.chromium.chrome.browser.tabmodel.TabWindowManager;
+import org.chromium.components.embedder_support.media.ActivityContentVideoViewEmbedder;
 import org.chromium.components.web_contents_delegate_android.WebContentsDelegateAndroid;
-import org.chromium.content.browser.ActivityContentVideoViewEmbedder;
 import org.chromium.content_public.browser.ContentVideoViewEmbedder;
 import org.chromium.content_public.browser.GestureListenerManager;
 import org.chromium.content_public.browser.InvalidateTypes;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
index 5643b9e..ef22863 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java
@@ -2054,6 +2054,12 @@
     }
 
     @Override
+    protected void onAccessibilityStatusChanged(boolean enabled) {
+        super.onAccessibilityStatusChanged(enabled);
+        mNewTabButton.onAccessibilityStatusChanged();
+    }
+
+    @Override
     public boolean shouldIgnoreSwipeGesture() {
         return super.shouldIgnoreSwipeGesture() || mUrlExpansionPercent > 0f
                 || mNtpSearchBoxTranslation.y < 0f;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/newtab/NewTabButton.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/newtab/NewTabButton.java
index 73e0f979..feff74c4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/newtab/NewTabButton.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/newtab/NewTabButton.java
@@ -124,12 +124,7 @@
         mModernDrawable = VectorDrawableCompat.create(
                 getContext().getResources(), R.drawable.new_tab_icon, getContext().getTheme());
         mModernDrawable.setState(getDrawableState());
-        final boolean shouldUseLightMode =
-                (DeviceClassManager.enableAccessibilityLayout()
-                        || ChromeFeatureList.isEnabled(
-                                   ChromeFeatureList.HORIZONTAL_TAB_SWITCHER_ANDROID))
-                && mIsIncognito;
-        mModernDrawable.setTintList(shouldUseLightMode ? mLightModeTint : mDarkModeTint);
+        updateDrawableTint();
         mModernDrawable.setBounds(
                 0, 0, mModernDrawable.getIntrinsicWidth(), mModernDrawable.getIntrinsicHeight());
         mModernDrawable.setCallback(this);
@@ -147,12 +142,7 @@
         mIsIncognito = incognito;
 
         if (mModernDrawable != null) {
-            final boolean shouldUseLightMode =
-                    (DeviceClassManager.enableAccessibilityLayout()
-                            || ChromeFeatureList.isEnabled(
-                                       ChromeFeatureList.HORIZONTAL_TAB_SWITCHER_ANDROID))
-                    && mIsIncognito;
-            mModernDrawable.setTintList(shouldUseLightMode ? mLightModeTint : mDarkModeTint);
+            updateDrawableTint();
             invalidateDrawable(mModernDrawable);
             return;
         }
@@ -188,6 +178,11 @@
         mTransitionAnimation.start();
     }
 
+    /** Called when accessibility status is changed. */
+    public void onAccessibilityStatusChanged() {
+        if (mModernDrawable != null) updateDrawableTint();
+    }
+
     @Override
     protected void drawableStateChanged() {
         super.drawableStateChanged();
@@ -199,4 +194,14 @@
             mIncognitoDrawable.setState(getDrawableState());
         }
     }
+
+    /** Update the tint for the icon drawable for Chrome Modern. */
+    private void updateDrawableTint() {
+        final boolean shouldUseLightMode =
+                (DeviceClassManager.enableAccessibilityLayout()
+                        || ChromeFeatureList.isEnabled(
+                                   ChromeFeatureList.HORIZONTAL_TAB_SWITCHER_ANDROID))
+                && mIsIncognito;
+        mModernDrawable.setTintList(shouldUseLightMode ? mLightModeTint : mDarkModeTint);
+    }
 }
diff --git a/chrome/android/java/strings/translations/android_chrome_strings_sk.xtb b/chrome/android/java/strings/translations/android_chrome_strings_sk.xtb
index 2e6eb620..ea07987 100644
--- a/chrome/android/java/strings/translations/android_chrome_strings_sk.xtb
+++ b/chrome/android/java/strings/translations/android_chrome_strings_sk.xtb
@@ -189,7 +189,7 @@
 <translation id="2647434099613338025">Pridať jazyk</translation>
 <translation id="2650751991977523696">Stiahnuť súbor znova?</translation>
 <translation id="2653659639078652383">Odoslať</translation>
-<translation id="2677748264148917807">Opustiť</translation>
+<translation id="2677748264148917807">Odísť</translation>
 <translation id="2704606927547763573">Skopírované</translation>
 <translation id="2707726405694321444">Obnoviť stránku</translation>
 <translation id="2709516037105925701">Automatické dopĺňanie</translation>
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
index 9e60410..81849da 100644
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
@@ -448,12 +448,14 @@
   "java/src/org/chromium/chrome/browser/download/home/list/BatchListObservable.java",
   "java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListCoordinator.java",
   "java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMediator.java",
-  "java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListModel.java",
   "java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutator.java",
   "java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java",
   "java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewAdapter.java",
   "java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewBinder.java",
-  "java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListViewHolder.java",
+  "java/src/org/chromium/chrome/browser/download/home/list/DecoratedListItemModel.java",
+  "java/src/org/chromium/chrome/browser/download/home/list/ListItem.java",
+  "java/src/org/chromium/chrome/browser/download/home/list/ListItemModel.java",
+  "java/src/org/chromium/chrome/browser/download/home/list/ListItemViewHolder.java",
   "java/src/org/chromium/chrome/browser/download/home/list/UiUtils.java",
   "java/src/org/chromium/chrome/browser/download/items/OfflineContentAggregatorFactory.java",
   "java/src/org/chromium/chrome/browser/download/items/OfflineContentAggregatorNotificationBridgeUi.java",
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutatorTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutatorTest.java
index 32493fcd..da7e86f 100644
--- a/chrome/android/junit/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutatorTest.java
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/download/home/list/DateOrderedListMutatorTest.java
@@ -22,6 +22,8 @@
 import org.chromium.base.CollectionUtil;
 import org.chromium.base.test.BaseRobolectricTestRunner;
 import org.chromium.chrome.browser.download.home.filter.OfflineItemFilterSource;
+import org.chromium.chrome.browser.download.home.list.ListItem.DateListItem;
+import org.chromium.chrome.browser.download.home.list.ListItem.OfflineItemListItem;
 import org.chromium.chrome.browser.modelutil.ListObservable.ListObserver;
 import org.chromium.components.offline_items_collection.OfflineItem;
 
@@ -38,14 +40,14 @@
     @Mock
     ListObserver mObserver;
 
-    DateOrderedListModel mModel;
+    ListItemModel mModel;
 
     @Rule
     public MockitoRule mMockitoRule = MockitoJUnit.rule();
 
     @Before
     public void setUp() {
-        mModel = new DateOrderedListModel();
+        mModel = new ListItemModel();
     }
 
     @After
@@ -575,20 +577,20 @@
     }
 
     private static void assertListItemEquals(
-            DateOrderedListModel.ListItem item, Calendar calendar, OfflineItem offlineItem) {
+            ListItem item, Calendar calendar, OfflineItem offlineItem) {
+        Assert.assertTrue(item instanceof DateListItem);
+
         if (offlineItem == null) {
-            Assert.assertEquals(
-                    DateOrderedListModel.ListItem.generateStableIdForDayOfYear(calendar),
-                    item.stableId);
+            Assert.assertFalse(item instanceof OfflineItemListItem);
+            Assert.assertEquals(DateListItem.generateStableIdForDayOfYear(calendar), item.stableId);
         } else {
-            Assert.assertEquals(
-                    DateOrderedListModel.ListItem.generateStableId(offlineItem), item.stableId);
+            Assert.assertTrue(item instanceof OfflineItemListItem);
+            Assert.assertEquals(OfflineItemListItem.generateStableId(offlineItem), item.stableId);
+            Assert.assertEquals(offlineItem, ((OfflineItemListItem) item).item);
         }
 
-        Assert.assertEquals(offlineItem, item.item);
         Calendar calendar2 = CalendarFactory.get();
-        calendar2.setTime(item.date);
+        calendar2.setTime(((DateListItem) item).date);
         Assert.assertEquals(calendar.getTimeInMillis(), calendar2.getTimeInMillis());
-        Assert.assertEquals(calendar.getTimeInMillis(), item.date.getTime());
     }
 }
\ No newline at end of file
diff --git a/chrome/app/resources/generated_resources_es.xtb b/chrome/app/resources/generated_resources_es.xtb
index cce88cc..b773d85 100644
--- a/chrome/app/resources/generated_resources_es.xtb
+++ b/chrome/app/resources/generated_resources_es.xtb
@@ -1861,7 +1861,7 @@
 <translation id="3831486154586836914">Se ha introducido el modo de vista general de pestañas</translation>
 <translation id="383161972796689579">El propietario de este dispositivo ha desactivado la opción de añadir nuevos usuarios</translation>
 <translation id="3834775135533257713">No se ha podido añadir la aplicación <ph name="TO_INSTALL_APP_NAME" /> porque existe un conflicto con <ph name="INSTALLED_APP_NAME" />.</translation>
-<translation id="3835522725882634757">¡Oh, no! Este servidor está enviando datos que <ph name="PRODUCT_NAME" /> no comprende. <ph name="BEGIN_LINK" />Comunica un error<ph name="END_LINK" /> e incluye la <ph name="BEGIN2_LINK" />lista sin procesar<ph name="END2_LINK" />.</translation>
+<translation id="3835522725882634757">¡Vaya! Este servidor está enviando datos que <ph name="PRODUCT_NAME" /> no comprende. <ph name="BEGIN_LINK" />Comunica un error<ph name="END_LINK" /> e incluye la <ph name="BEGIN2_LINK" />lista sin procesar<ph name="END2_LINK" />.</translation>
 <translation id="3838085852053358637">No se ha podido cargar la extensión</translation>
 <translation id="3838486795898716504">Más <ph name="PAGE_TITLE" /></translation>
 <translation id="3838543471119263078">Cookies y otros datos de sitios y complementos</translation>
diff --git a/chrome/app/resources/generated_resources_fa.xtb b/chrome/app/resources/generated_resources_fa.xtb
index ec7d105..3419d6e8 100644
--- a/chrome/app/resources/generated_resources_fa.xtb
+++ b/chrome/app/resources/generated_resources_fa.xtb
@@ -3486,7 +3486,7 @@
 <translation id="6388429472088318283">زبان‌های جستجو</translation>
 <translation id="6388771388956873507">حسگر اثر انگشت را در دستگاهتان پیدا کنید و آن را با انگشتتان لمس کنید</translation>
 <translation id="6390799748543157332">صفحاتی که در این پنجره مشاهده می‌کنید در سابقه مرورگر نشان داده نمی‌شوند و بعد از بسته شدن همه پنجره‌های مهمان باز، هیچ رد دیگری (مانند کوکی) در رایانه از خود به جای نمی‌گذارند. با این وجود، فایل‌هایی که بارگیری می‌کنید، حفظ می‌شوند.</translation>
-<translation id="6390994422085833176">مرور ویژگی‌های همگام‌سازی و شخصی‌سازی بعد از تنظیم</translation>
+<translation id="6390994422085833176">مرور ویژگی‌های همگام‌سازی و شخصی‌سازی بعد از راه‌اندازی</translation>
 <translation id="6395423953133416962">ارسال <ph name="BEGIN_LINK1" />اطلاعات سیستم<ph name="END_LINK1" /> و <ph name="BEGIN_LINK2" />معیارها<ph name="END_LINK2" /></translation>
 <translation id="6397094776139756010">گزینه‌های همگام‌سازی و شخصی‌سازی</translation>
 <translation id="6397592254427394018">باز کردن همه نشانک‌ها در پنجره &amp;ناشناس</translation>
diff --git a/chrome/app/resources/generated_resources_ja.xtb b/chrome/app/resources/generated_resources_ja.xtb
index 0499f92..7668011a 100644
--- a/chrome/app/resources/generated_resources_ja.xtb
+++ b/chrome/app/resources/generated_resources_ja.xtb
@@ -3566,7 +3566,7 @@
 <translation id="6491376743066338510">認証できませんでした</translation>
 <translation id="6492313032770352219">ディスク上のサイズ:</translation>
 <translation id="6494445798847293442">認証局ではありません</translation>
-<translation id="649454645705377674">閉じる</translation>
+<translation id="649454645705377674">近い</translation>
 <translation id="6498249116389603658">選択したすべての言語(&amp;A)</translation>
 <translation id="6499143127267478107">プロキシ スクリプト内のホストを解決しています...</translation>
 <translation id="6499681088828539489">共有ネットワークのプロキシを許可しない</translation>
diff --git a/chrome/app/resources/generated_resources_sk.xtb b/chrome/app/resources/generated_resources_sk.xtb
index cd06617..b2610ca 100644
--- a/chrome/app/resources/generated_resources_sk.xtb
+++ b/chrome/app/resources/generated_resources_sk.xtb
@@ -1105,7 +1105,7 @@
 <translation id="2673135533890720193">Čítať históriu prehliadania</translation>
 <translation id="2673589024369449924">Vytvoriť pre tohto používateľa odkaz na pracovnej ploche</translation>
 <translation id="2676946222714718093">Prehráva sa na zariadení</translation>
-<translation id="2677748264148917807">Opustiť</translation>
+<translation id="2677748264148917807">Odísť</translation>
 <translation id="2678063897982469759">Znova povoliť</translation>
 <translation id="2679385451463308372">Tlačiť prostredníctvom dialógového okna systému...</translation>
 <translation id="268053382412112343">Hi&amp;stória</translation>
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 1d2a112b..abde683 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -3049,6 +3049,8 @@
         "conflicts/module_blacklist_cache_util_win.h",
         "conflicts/module_list_filter_win.cc",
         "conflicts/module_list_filter_win.h",
+        "conflicts/module_load_attempt_log_listener_win.cc",
+        "conflicts/module_load_attempt_log_listener_win.h",
         "conflicts/msi_util_win.cc",
         "conflicts/msi_util_win.h",
         "conflicts/registry_key_watcher_win.cc",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 78987929..59699b9 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2914,6 +2914,10 @@
      flag_descriptions::kShowAndroidFilesInFilesAppName,
      flag_descriptions::kShowAndroidFilesInFilesAppDescription, kOsCrOS,
      SINGLE_VALUE_TYPE(chromeos::switches::kShowAndroidFilesInFilesApp)},
+    {"new-files-app-navigation",
+     flag_descriptions::kFilesAppNewStyleNavigationName,
+     flag_descriptions::kFilesAppNewStyleNavigationDescription, kOsCrOS,
+     SINGLE_VALUE_TYPE(chromeos::switches::kFilesAppNewStyleNavigation)},
 #endif  // OS_CHROMEOS
 
 #if defined(OS_WIN)
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index ec54b365..d86bc2d 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2450,6 +2450,13 @@
   return google_apis::GetAPIKey();
 }
 
+#if defined(OS_ANDROID)
+bool ChromeContentBrowserClient::ShouldUseGmsCoreGeolocationProvider() {
+  // Indicate that Chrome uses the GMS core location provider.
+  return true;
+}
+#endif
+
 QuotaPermissionContext*
 ChromeContentBrowserClient::CreateQuotaPermissionContext() {
   return new ChromeQuotaPermissionContext();
diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h
index d392303..fa9fcb5 100644
--- a/chrome/browser/chrome_content_browser_client.h
+++ b/chrome/browser/chrome_content_browser_client.h
@@ -220,6 +220,11 @@
       base::OnceCallback<void(scoped_refptr<net::URLRequestContextGetter>)>
           callback) override;
   std::string GetGeolocationApiKey() override;
+
+#if defined(OS_ANDROID)
+  bool ShouldUseGmsCoreGeolocationProvider() override;
+#endif
+
   content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
   void GetQuotaSettings(
       content::BrowserContext* context,
diff --git a/chrome/browser/chromeos/arc/arc_support_host.cc b/chrome/browser/chromeos/arc/arc_support_host.cc
index e1ccd15..5a168c84 100644
--- a/chrome/browser/chromeos/arc/arc_support_host.cc
+++ b/chrome/browser/chromeos/arc/arc_support_host.cc
@@ -668,15 +668,18 @@
     DCHECK(signin_manager->IsAuthenticated());
     std::string account_id = signin_manager->GetAuthenticatedAccountId();
 
-    // Record acceptance of ToS if it was shown to the user.
-    if (tos_shown) {
-      ConsentAuditorFactory::GetForProfile(profile_)->RecordGaiaConsent(
-          account_id, consent_auditor::Feature::PLAY_STORE,
-          ComputePlayToSConsentIds(tos_content),
-          IDS_ARC_OPT_IN_DIALOG_BUTTON_AGREE,
-          accepted ? consent_auditor::ConsentStatus::GIVEN
-                   : consent_auditor::ConsentStatus::NOT_GIVEN);
-    }
+    // Record acceptance of ToS if it was shown to the user, otherwise simply
+    // record acceptance of an empty ToS.
+    // TODO(jhorwich): Replace this approach when passing |is_managed| boolean
+    // is supported by the underlying consent protos.
+    if (!tos_shown)
+      tos_content.clear();
+    ConsentAuditorFactory::GetForProfile(profile_)->RecordGaiaConsent(
+        account_id, consent_auditor::Feature::PLAY_STORE,
+        ComputePlayToSConsentIds(tos_content),
+        IDS_ARC_OPT_IN_DIALOG_BUTTON_AGREE,
+        accepted ? consent_auditor::ConsentStatus::GIVEN
+                 : consent_auditor::ConsentStatus::NOT_GIVEN);
 
     // If the user - not policy - controls Backup and Restore setting, record
     // whether consent was given.
diff --git a/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc
index 97ba7b9..18a5b5eb 100644
--- a/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc
+++ b/chrome/browser/chromeos/arc/optin/arc_terms_of_service_default_negotiator_unittest.cc
@@ -274,7 +274,7 @@
 }
 
 TEST_F(ArcTermsOfServiceDefaultNegotiatorTest, AcceptWithManagedToS) {
-  // Verifies that we don't record ToS consent if the ToS is not shown due to
+  // Verifies that we record an empty ToS consent if the ToS is not shown due to
   // a managed user scenario.
   // Also verifies that a managed setting for Backup and Restore is not recorded
   // while an unmanaged setting for Location Services still is recorded.
@@ -307,12 +307,17 @@
       profile()->GetPrefs()->GetBoolean(prefs::kArcLocationServiceEnabled));
 
   // Make sure consent auditing records expected consents.
+  std::vector<int> tos_consent = ArcSupportHost::ComputePlayToSConsentIds("");
+  tos_consent.push_back(IDS_ARC_OPT_IN_DIALOG_BUTTON_AGREE);
   const std::vector<int> location_consent = {
       IDS_ARC_OPT_IN_LOCATION_SETTING, IDS_ARC_OPT_IN_DIALOG_BUTTON_AGREE};
-  const std::vector<std::vector<int>> consent_ids = {location_consent};
+  const std::vector<std::vector<int>> consent_ids = {tos_consent,
+                                                     location_consent};
   const std::vector<consent_auditor::Feature> features = {
+      consent_auditor::Feature::PLAY_STORE,
       consent_auditor::Feature::GOOGLE_LOCATION_SERVICE};
   const std::vector<consent_auditor::ConsentStatus> statuses = {
+      consent_auditor::ConsentStatus::GIVEN,
       consent_auditor::ConsentStatus::GIVEN};
 
   EXPECT_EQ(consent_auditor()->account_id(), GetAuthenticatedAccountId());
diff --git a/chrome/browser/chromeos/chrome_content_browser_client_chromeos_part.cc b/chrome/browser/chromeos/chrome_content_browser_client_chromeos_part.cc
index 51eefd7..528dc8e 100644
--- a/chrome/browser/chromeos/chrome_content_browser_client_chromeos_part.cc
+++ b/chrome/browser/chromeos/chrome_content_browser_client_chromeos_part.cc
@@ -14,6 +14,8 @@
 #include "content/public/browser/navigation_controller.h"
 #include "content/public/browser/navigation_entry.h"
 #include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host.h"
+#include "content/public/browser/render_widget_host_view.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/common/web_preferences.h"
 
@@ -68,6 +70,8 @@
   if (ShouldExcludePage(contents))
     return;
 
+  web_prefs->double_tap_to_zoom_enabled = true;
+  web_prefs->text_autosizing_enabled = true;
   web_prefs->viewport_enabled = true;
   web_prefs->viewport_meta_enabled = true;
   web_prefs->shrinks_viewport_contents_to_fit = true;
diff --git a/chrome/browser/chromeos/crostini/crostini_registry_service.cc b/chrome/browser/chromeos/crostini/crostini_registry_service.cc
index 20c658ac..7d359312 100644
--- a/chrome/browser/chromeos/crostini/crostini_registry_service.cc
+++ b/chrome/browser/chromeos/crostini/crostini_registry_service.cc
@@ -11,7 +11,6 @@
 #include "base/time/clock.h"
 #include "base/time/default_clock.h"
 #include "base/time/time.h"
-#include "base/values.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chromeos/crostini/crostini_util.h"
 #include "chrome/browser/profiles/profile.h"
@@ -64,14 +63,6 @@
                                        container_name + "/" + desktop_file_id);
 }
 
-std::map<std::string, std::string> DictionaryToStringMap(
-    const base::Value* value) {
-  std::map<std::string, std::string> result;
-  for (const auto& item : value->DictItems())
-    result[item.first] = item.second.GetString();
-  return result;
-}
-
 base::Value ProtoToDictionary(const App::LocaleString& locale_string) {
   base::Value result(base::Value::Type::DICTIONARY);
   for (const App::LocaleString::Entry& entry : locale_string.values()) {
@@ -90,6 +81,8 @@
 
 std::vector<std::string> ListToStringVector(const base::Value* list) {
   std::vector<std::string> result;
+  if (!list)
+    return result;
   for (const base::Value& value : list->GetList())
     result.emplace_back(value.GetString());
   return result;
@@ -103,6 +96,19 @@
   return result;
 }
 
+// This is the companion to CrostiniRegistryService::SetCurrentTime().
+base::Time GetTime(const base::Value& pref, const char* key) {
+  if (!pref.is_dict())
+    return base::Time();
+
+  const base::Value* value = pref.FindKeyOfType(key, base::Value::Type::STRING);
+  int64_t time;
+  if (!value || !base::StringToInt64(value->GetString(), &time))
+    return base::Time();
+  return base::Time::FromDeltaSinceWindowsEpoch(
+      base::TimeDelta::FromMicroseconds(time));
+}
+
 enum class FindAppIdResult { NoMatch, UniqueMatch, NonUniqueMatch };
 // Looks for an app where prefs_key is set to search_value. Returns the apps id
 // if there was only one app matching, otherwise returns an empty string.
@@ -203,44 +209,99 @@
 
 }  // namespace
 
-CrostiniRegistryService::Registration::Registration(
-    const std::string& desktop_file_id,
-    const std::string& vm_name,
-    const std::string& container_name,
-    const LocaleString& name,
-    const LocaleString& comment,
-    const std::vector<std::string>& mime_types,
-    bool no_display,
-    base::Time install_time,
-    base::Time last_launch_time)
-    : desktop_file_id(desktop_file_id),
-      vm_name(vm_name),
-      container_name(container_name),
-      name(name),
-      comment(comment),
-      mime_types(mime_types),
-      no_display(no_display),
-      install_time(install_time),
-      last_launch_time(last_launch_time) {
-  DCHECK(name.find(std::string()) != name.end());
+CrostiniRegistryService::Registration::Registration(const base::Value* pref,
+                                                    bool is_terminal_app)
+    : is_terminal_app_(is_terminal_app) {
+  DCHECK(pref || is_terminal_app);
+  if (pref)
+    pref_ = pref->Clone();
 }
 
 CrostiniRegistryService::Registration::~Registration() = default;
 
-// static
-const std::string& CrostiniRegistryService::Registration::Localize(
-    const LocaleString& locale_string) {
+std::string CrostiniRegistryService::Registration::DesktopFileId() const {
+  if (is_terminal_app_)
+    return std::string();
+  return pref_.FindKeyOfType(kAppDesktopFileIdKey, base::Value::Type::STRING)
+      ->GetString();
+}
+
+std::string CrostiniRegistryService::Registration::VmName() const {
+  if (is_terminal_app_)
+    return kCrostiniDefaultVmName;
+  return pref_.FindKeyOfType(kAppVmNameKey, base::Value::Type::STRING)
+      ->GetString();
+}
+
+std::string CrostiniRegistryService::Registration::ContainerName() const {
+  if (is_terminal_app_)
+    return kCrostiniDefaultContainerName;
+  return pref_.FindKeyOfType(kAppContainerNameKey, base::Value::Type::STRING)
+      ->GetString();
+}
+
+std::string CrostiniRegistryService::Registration::Name() const {
+  if (is_terminal_app_)
+    return kCrostiniTerminalAppName;
+  return LocalizedString(kAppNameKey);
+}
+
+std::string CrostiniRegistryService::Registration::Comment() const {
+  return LocalizedString(kAppCommentKey);
+}
+
+std::vector<std::string> CrostiniRegistryService::Registration::MimeTypes()
+    const {
+  if (pref_.is_none())
+    return {};
+  return ListToStringVector(
+      pref_.FindKeyOfType(kAppMimeTypesKey, base::Value::Type::LIST));
+}
+
+bool CrostiniRegistryService::Registration::NoDisplay() const {
+  if (pref_.is_none())
+    return false;
+  const base::Value* no_display =
+      pref_.FindKeyOfType(kAppNoDisplayKey, base::Value::Type::BOOLEAN);
+  if (no_display)
+    return no_display->GetBool();
+  return false;
+}
+
+base::Time CrostiniRegistryService::Registration::InstallTime() const {
+  return GetTime(pref_, kAppInstallTimeKey);
+}
+
+base::Time CrostiniRegistryService::Registration::LastLaunchTime() const {
+  return GetTime(pref_, kAppLastLaunchTimeKey);
+}
+
+// We store in prefs all the localized values for given fields (formatted with
+// undescores, e.g. 'fr' or 'en_US'), but users of the registry don't need to
+// deal with this.
+std::string CrostiniRegistryService::Registration::LocalizedString(
+    base::StringPiece key) const {
+  if (pref_.is_none())
+    return std::string();
+  const base::Value* dict =
+      pref_.FindKeyOfType(key, base::Value::Type::DICTIONARY);
+  if (!dict)
+    return std::string();
+
   std::string current_locale =
       l10n_util::NormalizeLocale(g_browser_process->GetApplicationLocale());
   std::vector<std::string> locales;
   l10n_util::GetParentLocales(current_locale, &locales);
+  // We use an empty locale as fallback.
+  locales.push_back(std::string());
 
   for (const std::string& locale : locales) {
-    LocaleString::const_iterator it = locale_string.find(locale);
-    if (it != locale_string.end())
-      return it->second;
+    const base::Value* value =
+        dict->FindKeyOfType(locale, base::Value::Type::STRING);
+    if (value)
+      return value->GetString();
   }
-  return locale_string.at(std::string());
+  return std::string();
 }
 
 CrostiniRegistryService::CrostiniRegistryService(Profile* profile)
@@ -348,50 +409,19 @@
   return result;
 }
 
-std::unique_ptr<CrostiniRegistryService::Registration>
+base::Optional<CrostiniRegistryService::Registration>
 CrostiniRegistryService::GetRegistration(const std::string& app_id) const {
   const base::DictionaryValue* apps =
       prefs_->GetDictionary(kCrostiniRegistryPref);
   const base::Value* pref_registration =
       apps->FindKeyOfType(app_id, base::Value::Type::DICTIONARY);
 
-  if (app_id == kCrostiniTerminalId) {
-    std::map<std::string, std::string> name = {
-        {std::string(), kCrostiniTerminalAppName}};
-    return std::make_unique<Registration>(
-        "", kCrostiniDefaultVmName, kCrostiniDefaultContainerName, name,
-        Registration::LocaleString(), std::vector<std::string>(), false,
-        base::Time(),
-        pref_registration ? GetTime(*pref_registration, kAppLastLaunchTimeKey)
-                          : base::Time());
-  }
+  if (app_id == kCrostiniTerminalId)
+    return base::make_optional<Registration>(pref_registration, true);
 
   if (!pref_registration)
-    return nullptr;
-
-  const base::Value* desktop_file_id = pref_registration->FindKeyOfType(
-      kAppDesktopFileIdKey, base::Value::Type::STRING);
-  const base::Value* vm_name = pref_registration->FindKeyOfType(
-      kAppVmNameKey, base::Value::Type::STRING);
-  const base::Value* container_name = pref_registration->FindKeyOfType(
-      kAppContainerNameKey, base::Value::Type::STRING);
-
-  const base::Value* name = pref_registration->FindKeyOfType(
-      kAppNameKey, base::Value::Type::DICTIONARY);
-  const base::Value* comment = pref_registration->FindKeyOfType(
-      kAppCommentKey, base::Value::Type::DICTIONARY);
-  const base::Value* mime_types = pref_registration->FindKeyOfType(
-      kAppMimeTypesKey, base::Value::Type::LIST);
-  const base::Value* no_display = pref_registration->FindKeyOfType(
-      kAppNoDisplayKey, base::Value::Type::BOOLEAN);
-
-  return std::make_unique<Registration>(
-      desktop_file_id->GetString(), vm_name->GetString(),
-      container_name->GetString(), DictionaryToStringMap(name),
-      DictionaryToStringMap(comment), ListToStringVector(mime_types),
-      no_display->GetBool(),
-      GetTime(*pref_registration, kAppInstallTimeKey),
-      GetTime(*pref_registration, kAppLastLaunchTimeKey));
+    return base::nullopt;
+  return base::make_optional<Registration>(pref_registration, false);
 }
 
 base::FilePath CrostiniRegistryService::GetAppPath(
@@ -643,17 +673,6 @@
   dictionary->SetKey(key, base::Value(base::Int64ToString(time)));
 }
 
-base::Time CrostiniRegistryService::GetTime(const base::Value& dictionary,
-                                            const char* key) const {
-  const base::Value* value =
-      dictionary.FindKeyOfType(key, base::Value::Type::STRING);
-  int64_t time;
-  if (!value || !base::StringToInt64(value->GetString(), &time))
-    return base::Time();
-  return base::Time::FromDeltaSinceWindowsEpoch(
-      base::TimeDelta::FromMicroseconds(time));
-}
-
 // static
 void CrostiniRegistryService::RegisterProfilePrefs(
     PrefRegistrySimple* registry) {
@@ -663,7 +682,7 @@
 void CrostiniRegistryService::RequestIcon(const std::string& app_id,
                                           ui::ScaleFactor scale_factor) {
   // Ignore requests for app_id that isn't registered.
-  std::unique_ptr<CrostiniRegistryService::Registration> registration =
+  base::Optional<CrostiniRegistryService::Registration> registration =
       GetRegistration(app_id);
   if (!registration) {
     VLOG(2) << "Request to load icon for non-registered app: " << app_id;
@@ -675,7 +694,7 @@
   active_icon_requests_[app_id] |= (1 << scale_factor);
 
   // Now make the call to request the actual icon.
-  std::vector<std::string> desktop_file_ids{registration->desktop_file_id};
+  std::vector<std::string> desktop_file_ids{registration->DesktopFileId()};
   // We can only send integer scale factors to Crostini, so if we have a
   // non-integral scale factor we need round the scale factor. We do not expect
   // Crostini to give us back exactly what we ask for and we deal with that in
@@ -696,7 +715,7 @@
   }
 
   crostini::CrostiniManager::GetInstance()->GetContainerAppIcons(
-      profile_, registration->vm_name, registration->container_name,
+      profile_, registration->VmName(), registration->ContainerName(),
       desktop_file_ids, app_list::kTileIconSize, icon_scale,
       base::BindOnce(&CrostiniRegistryService::OnContainerAppIcon,
                      weak_ptr_factory_.GetWeakPtr(), app_id, scale_factor));
diff --git a/chrome/browser/chromeos/crostini/crostini_registry_service.h b/chrome/browser/chromeos/crostini/crostini_registry_service.h
index f1fb56d..8631ee7f 100644
--- a/chrome/browser/chromeos/crostini/crostini_registry_service.h
+++ b/chrome/browser/chromeos/crostini/crostini_registry_service.h
@@ -6,7 +6,6 @@
 #define CHROME_BROWSER_CHROMEOS_CROSTINI_CROSTINI_REGISTRY_SERVICE_H_
 
 #include <map>
-#include <memory>
 #include <string>
 #include <vector>
 
@@ -14,6 +13,7 @@
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
+#include "base/values.h"
 #include "chrome/browser/chromeos/crostini/crostini_manager.h"
 #include "components/keyed_service/core/keyed_service.h"
 #include "ui/base/resource/scale_factor.h"
@@ -66,36 +66,33 @@
 // so some care is required.
 class CrostiniRegistryService : public KeyedService {
  public:
-  struct Registration {
-    // Maps from locale to localized string, where the default string is always
-    // present with an empty string key. Locales strings are formatted with
-    // underscores and not hyphens (e.g. 'fr', 'en_US').
-    using LocaleString = std::map<std::string, std::string>;
-
-    Registration(const std::string& desktop_file_id,
-                 const std::string& vm_name,
-                 const std::string& container_name,
-                 const LocaleString& name,
-                 const LocaleString& comment,
-                 const std::vector<std::string>& mime_types,
-                 bool no_display,
-                 base::Time install_time,
-                 base::Time last_launch_time);
+  class Registration {
+   public:
+    Registration(const base::Value* pref, bool is_terminal_app);
+    Registration(Registration&& registration) = default;
+    Registration& operator=(Registration&& registration) = default;
     ~Registration();
 
-    static const std::string& Localize(const LocaleString& locale_string);
+    std::string DesktopFileId() const;
+    std::string VmName() const;
+    std::string ContainerName() const;
 
-    std::string desktop_file_id;
-    std::string vm_name;
-    std::string container_name;
+    std::string Name() const;
+    std::string Comment() const;
+    std::vector<std::string> MimeTypes() const;
+    bool NoDisplay() const;
 
-    LocaleString name;
-    LocaleString comment;
-    std::vector<std::string> mime_types;
-    bool no_display;
+    base::Time InstallTime() const;
+    base::Time LastLaunchTime() const;
 
-    base::Time install_time;
-    base::Time last_launch_time;
+   private:
+    std::string LocalizedString(base::StringPiece key) const;
+
+    // The pref can only be null when the registration is for the Terminal app.
+    // If we do have a pref for the Terminal app, it contains only the last
+    // launch time.
+    base::Value pref_;
+    bool is_terminal_app_;
 
     DISALLOW_COPY_AND_ASSIGN(Registration);
   };
@@ -141,7 +138,7 @@
   std::vector<std::string> GetRegisteredAppIds() const;
 
   // Return null if |app_id| is not found in the registry.
-  std::unique_ptr<CrostiniRegistryService::Registration> GetRegistration(
+  base::Optional<CrostiniRegistryService::Registration> GetRegistration(
       const std::string& app_id) const;
 
   // Constructs path to app icon for specific scale factor.
@@ -167,8 +164,7 @@
 
   // Serializes the current time and stores it in |dictionary|.
   void SetCurrentTime(base::Value* dictionary, const char* key) const;
-  // Deserializes a time from |dictionary|.
-  base::Time GetTime(const base::Value& dictionary, const char* key) const;
+
   void SetClockForTesting(base::Clock* clock) { clock_ = clock; }
 
   static void RegisterProfilePrefs(PrefRegistrySimple* registry);
diff --git a/chrome/browser/chromeos/crostini/crostini_registry_service_unittest.cc b/chrome/browser/chromeos/crostini/crostini_registry_service_unittest.cc
index 195d0ce..125df402 100644
--- a/chrome/browser/chromeos/crostini/crostini_registry_service_unittest.cc
+++ b/chrome/browser/chromeos/crostini/crostini_registry_service_unittest.cc
@@ -93,15 +93,12 @@
   std::string vm_name = "awesomevm";
   std::string container_name = "awesomecontainer";
   std::map<std::string, std::string> name = {{"", "Vim"}};
-  std::map<std::string, std::string> comment = {
-      {"", "Edit text files"},
-      {"en_GB", "Modify files containing textual content"},
-  };
+  std::map<std::string, std::string> comment = {{"", "Edit text files"}};
   std::vector<std::string> mime_types = {"text/plain", "text/x-python"};
   bool no_display = true;
 
   std::string app_id = GenerateAppId(desktop_file_id, vm_name, container_name);
-  EXPECT_EQ(nullptr, service()->GetRegistration(app_id));
+  EXPECT_FALSE(service()->GetRegistration(app_id).has_value());
 
   ApplicationList app_list;
   app_list.set_vm_name(vm_name);
@@ -127,15 +124,16 @@
     app->add_mime_types(mime_type);
 
   service()->UpdateApplicationList(app_list);
-  auto result = service()->GetRegistration(app_id);
-  ASSERT_NE(nullptr, result);
-  EXPECT_EQ(result->desktop_file_id, desktop_file_id);
-  EXPECT_EQ(result->vm_name, vm_name);
-  EXPECT_EQ(result->container_name, container_name);
-  EXPECT_EQ(result->name, name);
-  EXPECT_EQ(result->comment, comment);
-  EXPECT_EQ(result->mime_types, mime_types);
-  EXPECT_EQ(result->no_display, no_display);
+  base::Optional<CrostiniRegistryService::Registration> result =
+      service()->GetRegistration(app_id);
+  ASSERT_TRUE(result.has_value());
+  EXPECT_EQ(result->DesktopFileId(), desktop_file_id);
+  EXPECT_EQ(result->VmName(), vm_name);
+  EXPECT_EQ(result->ContainerName(), container_name);
+  EXPECT_EQ(result->Name(), name[""]);
+  EXPECT_EQ(result->Comment(), comment[""]);
+  EXPECT_EQ(result->MimeTypes(), mime_types);
+  EXPECT_EQ(result->NoDisplay(), no_display);
 }
 
 TEST_F(CrostiniRegistryServiceTest, Observer) {
@@ -179,10 +177,11 @@
                                           testing::ElementsAre(app_id)));
   service()->UpdateApplicationList(app_list);
 
-  auto result = service()->GetRegistration(app_id);
+  base::Optional<CrostiniRegistryService::Registration> result =
+      service()->GetRegistration(app_id);
   base::Time install_time = test_clock_.Now();
-  EXPECT_EQ(result->install_time, install_time);
-  EXPECT_EQ(result->last_launch_time, base::Time());
+  EXPECT_EQ(result->InstallTime(), install_time);
+  EXPECT_EQ(result->LastLaunchTime(), base::Time());
 
   // UpdateApplicationList with nothing changed. Times shouldn't be updated and
   // the observer shouldn't fire.
@@ -190,15 +189,15 @@
   EXPECT_CALL(observer, OnRegistryUpdated(_, _, _, _)).Times(0);
   service()->UpdateApplicationList(app_list);
   result = service()->GetRegistration(app_id);
-  EXPECT_EQ(result->install_time, install_time);
-  EXPECT_EQ(result->last_launch_time, base::Time());
+  EXPECT_EQ(result->InstallTime(), install_time);
+  EXPECT_EQ(result->LastLaunchTime(), base::Time());
 
   // Launch the app
   test_clock_.Advance(base::TimeDelta::FromHours(1));
   service()->AppLaunched(app_id);
   result = service()->GetRegistration(app_id);
-  EXPECT_EQ(result->install_time, install_time);
-  EXPECT_EQ(result->last_launch_time,
+  EXPECT_EQ(result->InstallTime(), install_time);
+  EXPECT_EQ(result->LastLaunchTime(),
             base::Time() + base::TimeDelta::FromHours(3));
 
   // The install time shouldn't change if fields change.
@@ -209,8 +208,8 @@
                                 testing::IsEmpty(), testing::IsEmpty()));
   service()->UpdateApplicationList(app_list);
   result = service()->GetRegistration(app_id);
-  EXPECT_EQ(result->install_time, install_time);
-  EXPECT_EQ(result->last_launch_time,
+  EXPECT_EQ(result->InstallTime(), install_time);
+  EXPECT_EQ(result->LastLaunchTime(),
             base::Time() + base::TimeDelta::FromHours(3));
 }
 
diff --git a/chrome/browser/chromeos/crostini/crostini_util.cc b/chrome/browser/chromeos/crostini/crostini_util.cc
index 495e49e..f006816 100644
--- a/chrome/browser/chromeos/crostini/crostini_util.cc
+++ b/chrome/browser/chromeos/crostini/crostini_util.cc
@@ -52,15 +52,14 @@
 
 void MaybeLaunchContainerApplication(
     Profile* profile,
-    std::unique_ptr<crostini::CrostiniRegistryService::Registration>
-        registration,
+    crostini::CrostiniRegistryService::Registration registration,
     crostini::ConciergeClientResult result) {
   if (result == crostini::ConciergeClientResult::SUCCESS) {
     // TODO(timloh): Do something if launching failed, as otherwise the app
     // launcher remains open and there's no feedback.
     crostini::CrostiniManager::GetInstance()->LaunchContainerApplication(
-        profile, registration->vm_name, registration->container_name,
-        registration->desktop_file_id, base::DoNothing());
+        profile, registration.VmName(), registration.ContainerName(),
+        registration.DesktopFileId(), base::DoNothing());
   }
 }
 
@@ -95,7 +94,7 @@
 
     if (!crostini_manager->IsCrosTerminaInstalled() ||
         !IsCrostiniEnabled(profile)) {
-      ShowCrostiniInstallerView(profile);
+      ShowCrostiniInstallerView(profile, CrostiniUISurface::kAppList);
     } else {
       crostini_manager->RestartCrostini(
           profile, kCrostiniDefaultVmName, kCrostiniDefaultContainerName,
@@ -105,8 +104,8 @@
     return;
   }
 
-  std::unique_ptr<crostini::CrostiniRegistryService::Registration>
-      registration = registry_service->GetRegistration(app_id);
+  base::Optional<crostini::CrostiniRegistryService::Registration> registration =
+      registry_service->GetRegistration(app_id);
   if (!registration) {
     RecordAppLaunchHistogram(CrostiniAppLaunchAppType::kUnknownApp);
     LOG(ERROR) << "LaunchCrostiniApp called with an unknown app_id: " << app_id;
@@ -115,9 +114,9 @@
 
   RecordAppLaunchHistogram(CrostiniAppLaunchAppType::kRegisteredApp);
   crostini_manager->RestartCrostini(
-      profile, registration->vm_name, registration->container_name,
+      profile, registration->VmName(), registration->ContainerName(),
       base::BindOnce(&MaybeLaunchContainerApplication, profile,
-                     std::move(registration)));
+                     std::move(*registration)));
   registry_service->AppLaunched(app_id);
 }
 
diff --git a/chrome/browser/chromeos/crostini/crostini_util.h b/chrome/browser/chromeos/crostini/crostini_util.h
index 97ea416..97007fbb 100644
--- a/chrome/browser/chromeos/crostini/crostini_util.h
+++ b/chrome/browser/chromeos/crostini/crostini_util.h
@@ -42,8 +42,13 @@
 base::Optional<std::string> CrostiniAppIdFromAppName(
     const std::string& app_name);
 
-void ShowCrostiniInstallerView(Profile* profile);
-void ShowCrostiniUninstallerView(Profile* profile);
+// These values are persisted to logs. Entries should not be renumbered and
+// numeric values should never be reused.
+enum class CrostiniUISurface { kSettings = 0, kAppList = 1, kCount };
+
+void ShowCrostiniInstallerView(Profile* profile, CrostiniUISurface ui_surface);
+void ShowCrostiniUninstallerView(Profile* profile,
+                                 CrostiniUISurface ui_surface);
 
 constexpr char kCrostiniTerminalAppName[] = "Terminal";
 // We can use any arbitrary well-formed extension id for the Terminal app, this
diff --git a/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc b/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc
index 733fe24..c617bf9d 100644
--- a/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc
+++ b/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.cc
@@ -513,14 +513,26 @@
   }
 
   if (state_ == policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT) {
-    StartRemoveFirmwareManagementParameters();
+    // Cryptohome D-Bus service may not be available yet. See
+    // https://crbug.com/841627.
+    DBusThreadManager::Get()
+        ->GetCryptohomeClient()
+        ->WaitForServiceToBeAvailable(base::BindOnce(
+            &AutoEnrollmentController::StartRemoveFirmwareManagementParameters,
+            weak_ptr_factory_.GetWeakPtr()));
   } else {
     progress_callbacks_.Notify(state_);
   }
 }
 
-void AutoEnrollmentController::StartRemoveFirmwareManagementParameters() {
+void AutoEnrollmentController::StartRemoveFirmwareManagementParameters(
+    bool service_is_ready) {
   DCHECK_EQ(policy::AUTO_ENROLLMENT_STATE_NO_ENROLLMENT, state_);
+  if (!service_is_ready) {
+    LOG(ERROR) << "Failed waiting for cryptohome D-Bus service availability.";
+    progress_callbacks_.Notify(state_);
+    return;
+  }
 
   cryptohome::RemoveFirmwareManagementParametersRequest request;
   DBusThreadManager::Get()
@@ -534,10 +546,8 @@
 
 void AutoEnrollmentController::OnFirmwareManagementParametersRemoved(
     base::Optional<cryptohome::BaseReply> reply) {
-  if (!reply.has_value()) {
-    LOG(ERROR) << "Failed to remove firmware management parameters, error: "
-               << reply->error();
-  }
+  if (!reply.has_value())
+    LOG(ERROR) << "Failed to remove firmware management parameters.";
 
   progress_callbacks_.Notify(state_);
 }
diff --git a/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h b/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h
index 5dfd7f2..e412e9ce 100644
--- a/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h
+++ b/chrome/browser/chromeos/login/enrollment/auto_enrollment_controller.h
@@ -166,8 +166,9 @@
   // the user might try to switch to devmode. In this case, if block_devmode is
   // in FWMP and the clear operation didn't finish, the switch would be denied.
   // Also the safeguard timer has to be active until the FWMP is cleared to
-  // avoid the risk of blocked flow.
-  void StartRemoveFirmwareManagementParameters();
+  // avoid the risk of blocked flow. |service_is_ready| indicates if cryptohome
+  // D-Bus service is ready.
+  void StartRemoveFirmwareManagementParameters(bool service_is_ready);
 
   // Callback for RemoveFirmwareManagementParameters(). If an error is received
   // here, it is logged only, without changing the flow after that, because
diff --git a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
index fdeb90a..7057649 100644
--- a/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
+++ b/chrome/browser/chromeos/policy/enrollment_handler_chromeos.cc
@@ -507,11 +507,8 @@
 void EnrollmentHandlerChromeOS::OnFirmwareManagementParametersDataSet(
     base::Optional<cryptohome::BaseReply> reply) {
   DCHECK_EQ(STEP_SET_FWMP_DATA, enrollment_step_);
-  if (!reply.has_value()) {
-    LOG(ERROR)
-        << "Failed to update firmware management parameters in TPM, error: "
-        << reply->error();
-  }
+  if (!reply.has_value())
+    LOG(ERROR) << "Failed to update firmware management parameters in TPM.";
 
   SetStep(STEP_LOCK_DEVICE);
   StartLockDevice();
diff --git a/chrome/browser/conflicts/DEPS b/chrome/browser/conflicts/DEPS
index 83e9cba..acd5f432 100644
--- a/chrome/browser/conflicts/DEPS
+++ b/chrome/browser/conflicts/DEPS
@@ -1,3 +1,4 @@
 include_rules = [
+  "+chrome_elf/sha1/sha1.h",
   "+chrome_elf/third_party_dlls",
 ]
diff --git a/chrome/browser/conflicts/module_blacklist_cache_util_win.cc b/chrome/browser/conflicts/module_blacklist_cache_util_win.cc
index d188f66..4cbc7bd 100644
--- a/chrome/browser/conflicts/module_blacklist_cache_util_win.cc
+++ b/chrome/browser/conflicts/module_blacklist_cache_util_win.cc
@@ -17,6 +17,7 @@
 #include "base/logging.h"
 #include "base/md5.h"
 #include "base/stl_util.h"
+#include "base/time/time.h"
 #include "chrome/browser/conflicts/module_list_filter_win.h"
 #include "chrome_elf/third_party_dlls/packed_list_format.h"
 
@@ -69,6 +70,11 @@
 
 }  // namespace
 
+uint32_t CalculateTimeDateStamp(base::Time time) {
+  const auto delta = time.ToDeltaSinceWindowsEpoch();
+  return delta < base::TimeDelta() ? 0 : static_cast<uint32_t>(delta.InHours());
+}
+
 bool ReadModuleBlacklistCache(
     const base::FilePath& module_blacklist_cache_path,
     third_party_dlls::PackedListMetadata* metadata,
diff --git a/chrome/browser/conflicts/module_blacklist_cache_util_win.h b/chrome/browser/conflicts/module_blacklist_cache_util_win.h
index 07bc340a..9523fcd 100644
--- a/chrome/browser/conflicts/module_blacklist_cache_util_win.h
+++ b/chrome/browser/conflicts/module_blacklist_cache_util_win.h
@@ -12,6 +12,7 @@
 
 namespace base {
 class FilePath;
+class Time;
 struct MD5Digest;
 }  // namespace base
 
@@ -22,6 +23,11 @@
 
 class ModuleListFilter;
 
+// Returns the time date stamp to be used in the module blacklist cache.
+// Represents the number of hours between |time| and the Windows epoch
+// (1601-01-01 00:00:00 UTC).
+uint32_t CalculateTimeDateStamp(base::Time time);
+
 // Reads an existing module blacklist cache at |module_blacklist_cache_path|
 // into |metadata| and |blacklisted_modules|. Returns false on failure or if
 // the md5 digest doesn't match. Failures also does not modify the out
diff --git a/chrome/browser/conflicts/module_blacklist_cache_util_win_unittest.cc b/chrome/browser/conflicts/module_blacklist_cache_util_win_unittest.cc
index 6c5d0bd..82a589f 100644
--- a/chrome/browser/conflicts/module_blacklist_cache_util_win_unittest.cc
+++ b/chrome/browser/conflicts/module_blacklist_cache_util_win_unittest.cc
@@ -16,6 +16,7 @@
 #include "base/macros.h"
 #include "base/md5.h"
 #include "base/stl_util.h"
+#include "base/time/time.h"
 #include "chrome/browser/conflicts/module_list_filter_win.h"
 #include "chrome_elf/third_party_dlls/packed_list_format.h"
 #include "testing/gtest/include/gtest/gtest.h"
@@ -96,6 +97,22 @@
   DISALLOW_COPY_AND_ASSIGN(ModuleBlacklistCacheUtilTest);
 };
 
+TEST_F(ModuleBlacklistCacheUtilTest, CalculateTimeDateStamp) {
+  base::Time::Exploded chrome_birthday = {};
+  chrome_birthday.year = 2008;
+  chrome_birthday.month = 9;        // September.
+  chrome_birthday.day_of_week = 2;  // Tuesday.
+  chrome_birthday.day_of_month = 2;
+
+  base::Time time;
+  ASSERT_TRUE(chrome_birthday.HasValidValues());
+  ASSERT_TRUE(base::Time::FromUTCExploded(chrome_birthday, &time));
+
+  // Ensure that CalculateTimeDateStamp() will always return the number of
+  // hours between |time| and the Windows epoch.
+  EXPECT_EQ(3573552u, CalculateTimeDateStamp(time));
+}
+
 TEST_F(ModuleBlacklistCacheUtilTest, WriteEmptyCache) {
   third_party_dlls::PackedListMetadata metadata = {
       third_party_dlls::PackedListVersion::kCurrent, 0};
diff --git a/chrome/browser/conflicts/module_load_attempt_log_listener_win.cc b/chrome/browser/conflicts/module_load_attempt_log_listener_win.cc
new file mode 100644
index 0000000..84a9072
--- /dev/null
+++ b/chrome/browser/conflicts/module_load_attempt_log_listener_win.cc
@@ -0,0 +1,98 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/conflicts/module_load_attempt_log_listener_win.h"
+
+#include <algorithm>
+#include <memory>
+#include <utility>
+#include <vector>
+
+#include "chrome/browser/conflicts/module_blacklist_cache_util_win.h"
+#include "chrome_elf/third_party_dlls/logging_api.h"
+
+namespace {
+
+std::vector<third_party_dlls::PackedListModule> DrainLogOnBackgroundTask() {
+  // Query the number of bytes needed.
+  uint32_t bytes_needed = 0;
+  DrainLog(nullptr, 0, &bytes_needed);
+
+  // Drain the log.
+  auto buffer = std::make_unique<uint8_t[]>(bytes_needed);
+  uint32_t bytes_written = DrainLog(buffer.get(), bytes_needed, nullptr);
+  DCHECK_EQ(bytes_needed, bytes_written);
+
+  auto now_time_date_stamp = CalculateTimeDateStamp(base::Time::Now());
+
+  // Parse the data using the recommanded pattern for iterating over the log.
+  std::vector<third_party_dlls::PackedListModule> blocked_modules;
+  uint8_t* tracker = buffer.get();
+  uint8_t* buffer_end = buffer.get() + bytes_written;
+  while (tracker < buffer_end) {
+    third_party_dlls::LogEntry* entry =
+        reinterpret_cast<third_party_dlls::LogEntry*>(tracker);
+    DCHECK_LE(tracker + third_party_dlls::GetLogEntrySize(entry->path_len),
+              buffer_end);
+
+    // Only consider blocked modules.
+    // TODO(pmonette): Wire-up loaded modules to ModuleDatabase::OnModuleLoad to
+    // get better visibility into all modules that loads into the browser
+    // process.
+    if (entry->type == third_party_dlls::LogType::kBlocked) {
+      blocked_modules.emplace_back();
+      third_party_dlls::PackedListModule& module = blocked_modules.back();
+      std::copy(std::begin(entry->basename_hash),
+                std::end(entry->basename_hash),
+                std::begin(module.basename_hash));
+      std::copy(std::begin(entry->code_id_hash), std::end(entry->code_id_hash),
+                std::begin(module.code_id_hash));
+      module.time_date_stamp = now_time_date_stamp;
+    }
+
+    tracker += third_party_dlls::GetLogEntrySize(entry->path_len);
+  }
+
+  return blocked_modules;
+}
+
+}  // namespace
+
+ModuleLoadAttemptLogListener::ModuleLoadAttemptLogListener(
+    OnNewModulesBlockedCallback on_new_modules_blocked_callback)
+    : on_new_modules_blocked_callback_(
+          std::move(on_new_modules_blocked_callback)),
+      background_task_runner_(base::CreateSequencedTaskRunnerWithTraits(
+          {base::TaskPriority::BACKGROUND,
+           base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN,
+           base::MayBlock()})),
+      // The event starts signaled so that the logs are drained once when the
+      // |object_watcher_| starts waiting on the newly registered event.
+      waitable_event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
+                      base::WaitableEvent::InitialState::SIGNALED),
+      weak_ptr_factory_(this) {
+  if (!RegisterLogNotification(waitable_event_.handle()))
+    return;
+
+  object_watcher_.StartWatchingMultipleTimes(waitable_event_.handle(), this);
+}
+
+ModuleLoadAttemptLogListener::~ModuleLoadAttemptLogListener() = default;
+
+void ModuleLoadAttemptLogListener::OnObjectSignaled(HANDLE object) {
+  StartDrainingLogs();
+}
+
+void ModuleLoadAttemptLogListener::StartDrainingLogs() {
+  base::PostTaskAndReplyWithResult(
+      background_task_runner_.get(), FROM_HERE,
+      base::BindOnce(&DrainLogOnBackgroundTask),
+      base::BindOnce(&ModuleLoadAttemptLogListener::OnLogDrained,
+                     weak_ptr_factory_.GetWeakPtr()));
+}
+
+void ModuleLoadAttemptLogListener::OnLogDrained(
+    std::vector<third_party_dlls::PackedListModule>&& blocked_modules) {
+  on_new_modules_blocked_callback_.Run(std::move(blocked_modules));
+}
diff --git a/chrome/browser/conflicts/module_load_attempt_log_listener_win.h b/chrome/browser/conflicts/module_load_attempt_log_listener_win.h
new file mode 100644
index 0000000..b92359a
--- /dev/null
+++ b/chrome/browser/conflicts/module_load_attempt_log_listener_win.h
@@ -0,0 +1,58 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CONFLICTS_MODULE_LOAD_ATTEMPT_LOG_LISTENER_WIN_H_
+#define CHROME_BROWSER_CONFLICTS_MODULE_LOAD_ATTEMPT_LOG_LISTENER_WIN_H_
+
+#include <vector>
+
+#include "base/callback.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
+#include "base/synchronization/waitable_event.h"
+#include "base/win/object_watcher.h"
+#include "chrome_elf/third_party_dlls/packed_list_format.h"
+
+namespace base {
+class SequencedTaskRunner;
+}
+
+// This class drains the log of module load attempt from Chrome ELF, and
+// notifies its delegate for all modules that were blocked.
+class ModuleLoadAttemptLogListener : public base::win::ObjectWatcher::Delegate {
+ public:
+  using OnNewModulesBlockedCallback = base::RepeatingCallback<void(
+      std::vector<third_party_dlls::PackedListModule>&& blocked_modules)>;
+
+  explicit ModuleLoadAttemptLogListener(
+      OnNewModulesBlockedCallback on_new_modules_blocked_callback);
+  ~ModuleLoadAttemptLogListener() override;
+
+  // base::win::ObjectWatcher::Delegate:
+  void OnObjectSignaled(HANDLE object) override;
+
+ private:
+  void StartDrainingLogs();
+
+  void OnLogDrained(
+      std::vector<third_party_dlls::PackedListModule>&& blocked_modules);
+
+  // Invoked everytime the log is drained with the new blocked entries.
+  OnNewModulesBlockedCallback on_new_modules_blocked_callback_;
+
+  // The sequence in which the log is drained.
+  scoped_refptr<base::SequencedTaskRunner> background_task_runner_;
+
+  // Must be before |object_watcher_|.
+  base::WaitableEvent waitable_event_;
+
+  // Watches |waitable_event_|.
+  base::win::ObjectWatcher object_watcher_;
+
+  base::WeakPtrFactory<ModuleLoadAttemptLogListener> weak_ptr_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(ModuleLoadAttemptLogListener);
+};
+
+#endif  // CHROME_BROWSER_CONFLICTS_MODULE_LOAD_ATTEMPT_LOG_LISTENER_WIN_H_
diff --git a/chrome/browser/conflicts/module_load_attempt_log_listener_win_unittest.cc b/chrome/browser/conflicts/module_load_attempt_log_listener_win_unittest.cc
new file mode 100644
index 0000000..40337cd
--- /dev/null
+++ b/chrome/browser/conflicts/module_load_attempt_log_listener_win_unittest.cc
@@ -0,0 +1,76 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/conflicts/module_load_attempt_log_listener_win.h"
+
+#include <memory>
+#include <utility>
+
+#include "base/bind.h"
+#include "base/macros.h"
+#include "base/run_loop.h"
+#include "base/test/scoped_task_environment.h"
+#include "chrome_elf/sha1/sha1.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace {
+
+class ModuleLoadAttemptLogListenerTest : public testing::Test {
+ protected:
+  ModuleLoadAttemptLogListenerTest() = default;
+  ~ModuleLoadAttemptLogListenerTest() override = default;
+
+  std::unique_ptr<ModuleLoadAttemptLogListener>
+  CreateModuleLoadAttemptLogListener() {
+    return std::make_unique<ModuleLoadAttemptLogListener>(base::BindRepeating(
+        &ModuleLoadAttemptLogListenerTest::OnNewModulesBlocked,
+        base::Unretained(this)));
+  }
+
+  // ModuleLoadAttemptLogListener::Delegate:
+  void OnNewModulesBlocked(
+      std::vector<third_party_dlls::PackedListModule>&& blocked_modules) {
+    blocked_modules_ = std::move(blocked_modules);
+
+    notified_ = true;
+
+    if (quit_closure_)
+      std::move(quit_closure_).Run();
+  }
+
+  void WaitForNotification() {
+    if (notified_)
+      return;
+
+    base::RunLoop run_loop;
+    quit_closure_ = run_loop.QuitClosure();
+    run_loop.Run();
+  }
+
+  const std::vector<third_party_dlls::PackedListModule>& blocked_modules() {
+    return blocked_modules_;
+  }
+
+ private:
+  base::test::ScopedTaskEnvironment scoped_task_environment_;
+
+  bool notified_ = false;
+
+  base::Closure quit_closure_;
+
+  std::vector<third_party_dlls::PackedListModule> blocked_modules_;
+
+  DISALLOW_COPY_AND_ASSIGN(ModuleLoadAttemptLogListenerTest);
+};
+
+}  // namespace
+
+TEST_F(ModuleLoadAttemptLogListenerTest, DrainLog) {
+  auto module_load_attempt_log_listener = CreateModuleLoadAttemptLogListener();
+
+  WaitForNotification();
+
+  // Only the blocked entry is returned.
+  ASSERT_EQ(1u, blocked_modules().size());
+}
diff --git a/chrome/browser/extensions/api/management/management_apitest.cc b/chrome/browser/extensions/api/management/management_apitest.cc
index 2e470f69..836fac0 100644
--- a/chrome/browser/extensions/api/management/management_apitest.cc
+++ b/chrome/browser/extensions/api/management/management_apitest.cc
@@ -157,8 +157,9 @@
   LoadExtensions();
   extensions::ScopedTestDialogAutoConfirm auto_confirm(
       extensions::ScopedTestDialogAutoConfirm::ACCEPT);
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   EXPECT_TRUE(service->GetExtensionById(extension_ids_["enabled_extension"],
                                         false));
 
@@ -183,8 +184,9 @@
 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest,
                        MAYBE_ManagementPolicyProhibited) {
   LoadExtensions();
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   EXPECT_TRUE(service->GetExtensionById(extension_ids_["enabled_extension"],
                                         false));
 
@@ -200,8 +202,9 @@
 }
 
 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, LaunchPanelApp) {
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
 
   // Load an extension that calls launchApp() on any app that gets
   // installed.
@@ -257,8 +260,9 @@
 #define MAYBE_LaunchTabApp LaunchTabApp
 #endif
 IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, MAYBE_LaunchTabApp) {
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
 
   // Load an extension that calls launchApp() on any app that gets
   // installed.
diff --git a/chrome/browser/extensions/api/management/management_browsertest.cc b/chrome/browser/extensions/api/management/management_browsertest.cc
index adba1640..6dbc40a 100644
--- a/chrome/browser/extensions/api/management/management_browsertest.cc
+++ b/chrome/browser/extensions/api/management/management_browsertest.cc
@@ -206,8 +206,9 @@
 IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, MAYBE_InstallRequiresConfirm) {
   // Installing the extension without an auto confirming UI should result in
   // it being disabled, since good.crx has permissions that require approval.
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   std::string id = "ldnnhddmnhbkjipkidpdiheffobcpfmf";
   ASSERT_FALSE(InstallExtension(test_data_dir_.AppendASCII("good.crx"), 0));
   ASSERT_TRUE(service->GetExtensionById(id, true));
@@ -357,8 +358,9 @@
 
   // Install version 1 of the extension.
   ExtensionTestMessageListener listener1("v1 installed", false);
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   ExtensionRegistry* registry = ExtensionRegistry::Get(browser()->profile());
   const size_t size_before = registry->enabled_extensions().size();
   ASSERT_TRUE(registry->disabled_extensions().is_empty());
@@ -460,8 +462,9 @@
 
   // Install version 1 of the extension.
   ExtensionTestMessageListener listener1("v1 installed", false);
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   ExtensionRegistry* registry = ExtensionRegistry::Get(browser()->profile());
   const size_t enabled_size_before = registry->enabled_extensions().size();
   const size_t disabled_size_before = registry->disabled_extensions().size();
@@ -505,8 +508,9 @@
 }
 
 IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, ExternalUrlUpdate) {
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   const char kExtensionId[] = "ogjcoiohnmldgjemafoockdghcjciccf";
 
   base::ScopedAllowBlockingForTesting allow_blocking;
@@ -540,9 +544,10 @@
       service->pending_extension_manager();
 
   // The code that reads external_extensions.json uses this method to inform
-  // the ExtensionService of an extension to download.  Using the real code
-  // is race-prone, because instantating the ExtensionService starts a read
-  // of external_extensions.json before this test function starts.
+  // the extensions::ExtensionService of an extension to download.  Using the
+  // real code is race-prone, because instantating the
+  // extensions::ExtensionService starts a read of external_extensions.json
+  // before this test function starts.
 
   EXPECT_TRUE(pending_extension_manager->AddFromExternalUpdateUrl(
       kExtensionId,
@@ -610,8 +615,9 @@
 
 // See http://crbug.com/57378 for flakiness details.
 IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, ExternalPolicyRefresh) {
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   const char kExtensionId[] = "ogjcoiohnmldgjemafoockdghcjciccf";
 
   base::ScopedAllowBlockingForTesting allow_blocking;
@@ -698,8 +704,9 @@
 
 IN_PROC_BROWSER_TEST_F(ExtensionManagementTest,
                        MAYBE_PolicyOverridesUserInstall) {
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   ExtensionRegistry* registry = ExtensionRegistry::Get(browser()->profile());
   const char kExtensionId[] = "ogjcoiohnmldgjemafoockdghcjciccf";
   const size_t size_before = registry->enabled_extensions().size();
diff --git a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
index b30736ca..f5cbef0e 100644
--- a/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
+++ b/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
@@ -190,7 +190,7 @@
                            reload_info.second);
   reload_info.first = now;
 
-  ExtensionService* service =
+  extensions::ExtensionService* service =
       ExtensionSystem::Get(browser_context_)->extension_service();
   if (reload_info.second >= kFastReloadCount) {
     // Unloading an extension clears all warnings, so first terminate the
@@ -199,8 +199,9 @@
     // asynchronously. Fortunately PostTask guarentees FIFO order so just
     // post both tasks.
     base::ThreadTaskRunnerHandle::Get()->PostTask(
-        FROM_HERE, base::BindOnce(&ExtensionService::TerminateExtension,
-                                  service->AsWeakPtr(), extension_id));
+        FROM_HERE,
+        base::BindOnce(&extensions::ExtensionService::TerminateExtension,
+                       service->AsWeakPtr(), extension_id));
     extensions::WarningSet warnings;
     warnings.insert(
         extensions::Warning::CreateReloadTooFrequentWarning(
@@ -214,8 +215,9 @@
     // it tries to decrease the reference count for the extension, which fails
     // if the extension has already been reloaded; so instead we post a task.
     base::ThreadTaskRunnerHandle::Get()->PostTask(
-        FROM_HERE, base::BindOnce(&ExtensionService::ReloadExtension,
-                                  service->AsWeakPtr(), extension_id));
+        FROM_HERE,
+        base::BindOnce(&extensions::ExtensionService::ReloadExtension,
+                       service->AsWeakPtr(), extension_id));
   }
 }
 
@@ -223,7 +225,7 @@
     const std::string& extension_id,
     const UpdateCheckCallback& callback) {
   ExtensionSystem* system = ExtensionSystem::Get(browser_context_);
-  ExtensionService* service = system->extension_service();
+  extensions::ExtensionService* service = system->extension_service();
   ExtensionUpdater* updater = service->updater();
   if (!updater) {
     return false;
@@ -360,7 +362,7 @@
 void ChromeRuntimeAPIDelegate::UpdateCheckComplete(
     const std::string& extension_id) {
   ExtensionSystem* system = ExtensionSystem::Get(browser_context_);
-  ExtensionService* service = system->extension_service();
+  extensions::ExtensionService* service = system->extension_service();
   const Extension* update = service->GetPendingExtensionUpdate(extension_id);
   UpdateCheckInfo& info = update_check_info_[extension_id];
 
diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc b/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc
index 1c8beeb..5685c04c 100644
--- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc
+++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_browsertest.cc
@@ -77,7 +77,7 @@
         SyncFileSystemServiceFactory::GetInstance();
 
     content::BrowserContext* context = browser()->profile();
-    ExtensionServiceInterface* extension_service =
+    extensions::ExtensionServiceInterface* extension_service =
         extensions::ExtensionSystem::Get(context)->extension_service();
 
     std::unique_ptr<drive_backend::SyncEngine::DriveServiceFactory>
diff --git a/chrome/browser/extensions/api/vpn_provider/vpn_provider_apitest.cc b/chrome/browser/extensions/api/vpn_provider/vpn_provider_apitest.cc
index 000c2d5..2dee80d 100644
--- a/chrome/browser/extensions/api/vpn_provider/vpn_provider_apitest.cc
+++ b/chrome/browser/extensions/api/vpn_provider/vpn_provider_apitest.cc
@@ -445,7 +445,7 @@
                   ->GetTestInterface()
                   ->GetService(service_path, &profile_path, &properties));
 
-  ExtensionService* extension_service =
+  extensions::ExtensionService* extension_service =
       extensions::ExtensionSystem::Get(profile())->extension_service();
   extension_service->DisableExtension(
       extension_id_, extensions::disable_reason::DISABLE_USER_ACTION);
@@ -471,7 +471,7 @@
                   ->GetTestInterface()
                   ->GetService(service_path, &profile_path, &properties));
 
-  ExtensionService* extension_service =
+  extensions::ExtensionService* extension_service =
       extensions::ExtensionSystem::Get(profile())->extension_service();
   extension_service->BlacklistExtensionForTest(extension_id_);
   content::RunAllPendingInMessageLoop();
diff --git a/chrome/browser/extensions/api/webstore_widget_private/OWNERS b/chrome/browser/extensions/api/webstore_widget_private/OWNERS
index 655a976..df9b2c5d 100644
--- a/chrome/browser/extensions/api/webstore_widget_private/OWNERS
+++ b/chrome/browser/extensions/api/webstore_widget_private/OWNERS
@@ -1,6 +1,2 @@
+file://ui/file_manager/OWNERS
 tbarzic@chromium.org
-
-# chrome/browser/chromeos/file_manager/OWNERS
-hirono@chromium.org
-kinaba@chromium.org
-yoshiki@chromium.org
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index 790b275c..0e08d7dd 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -313,8 +313,9 @@
 #define MAYBE_BookmarkAppGetsNormalProcess BookmarkAppGetsNormalProcess
 #endif
 IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_BookmarkAppGetsNormalProcess) {
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   extensions::ProcessMap* process_map =
       extensions::ProcessMap::Get(browser()->profile());
 
diff --git a/chrome/browser/extensions/bookmark_app_helper.cc b/chrome/browser/extensions/bookmark_app_helper.cc
index 7d1edb9..12a803e 100644
--- a/chrome/browser/extensions/bookmark_app_helper.cc
+++ b/chrome/browser/extensions/bookmark_app_helper.cc
@@ -92,9 +92,9 @@
 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
 #endif
 
-namespace {
+namespace extensions {
 
-using extensions::BookmarkAppHelper;
+namespace {
 
 // Overlays a shortcut icon over the bottom left corner of a given image.
 class GeneratedIconImageSource : public gfx::CanvasImageSource {
@@ -189,8 +189,8 @@
     generated_icon_color = SK_ColorDKGRAY;
 
   for (int size : generate_sizes) {
-    extensions::BookmarkAppHelper::GenerateIcon(
-        bitmap_map, size, generated_icon_color, icon_letter);
+    BookmarkAppHelper::GenerateIcon(bitmap_map, size, generated_icon_color,
+                                    icon_letter);
   }
 }
 
@@ -218,8 +218,7 @@
  public:
   BookmarkAppInstaller(ExtensionService* service,
                        const WebApplicationInfo& web_app_info)
-      : service_(service),
-        web_app_info_(web_app_info) {}
+      : service_(service), web_app_info_(web_app_info) {}
 
   void Run() {
     for (const auto& icon : web_app_info_.icons) {
@@ -317,8 +316,7 @@
             downloaded_bitmaps_, sizes_to_generate, &web_app_info_);
     BookmarkAppHelper::UpdateWebAppIconsWithoutChangingLinks(size_map,
                                                              &web_app_info_);
-    scoped_refptr<extensions::CrxInstaller> installer(
-        extensions::CrxInstaller::CreateSilent(service_));
+    scoped_refptr<CrxInstaller> installer(CrxInstaller::CreateSilent(service_));
     installer->set_error_on_unsupported_requirements(true);
     installer->InstallWebApp(web_app_info_);
   }
@@ -334,8 +332,6 @@
 
 }  // namespace
 
-namespace extensions {
-
 // static
 void BookmarkAppHelper::UpdateWebAppInfoFromManifest(
     const blink::Manifest& manifest,
@@ -538,7 +534,7 @@
     : profile_(profile),
       contents_(contents),
       web_app_info_(web_app_info),
-      crx_installer_(extensions::CrxInstaller::CreateSilent(
+      crx_installer_(CrxInstaller::CreateSilent(
           ExtensionSystem::Get(profile)->extension_service())),
       install_source_(install_source),
       weak_factory_(this) {
@@ -550,8 +546,7 @@
   if (!base::FeatureList::IsEnabled(features::kDesktopPWAWindowing)) {
     web_app_info_.open_as_window =
         profile_->GetPrefs()->GetInteger(
-            extensions::pref_names::kBookmarkAppCreationLaunchType) ==
-        extensions::LAUNCH_TYPE_WINDOW;
+            pref_names::kBookmarkAppCreationLaunchType) == LAUNCH_TYPE_WINDOW;
   }
 
   // The default app title is the page title, which can be quite long. Limit the
@@ -562,12 +557,10 @@
                           base::UTF8ToUTF16("...");
   }
 
-  registrar_.Add(this,
-                 extensions::NOTIFICATION_CRX_INSTALLER_DONE,
+  registrar_.Add(this, NOTIFICATION_CRX_INSTALLER_DONE,
                  content::Source<CrxInstaller>(crx_installer_.get()));
 
-  registrar_.Add(this,
-                 extensions::NOTIFICATION_EXTENSION_INSTALL_ERROR,
+  registrar_.Add(this, NOTIFICATION_EXTENSION_INSTALL_ERROR,
                  content::Source<CrxInstaller>(crx_installer_.get()));
 
   crx_installer_->set_error_on_unsupported_requirements(true);
@@ -579,8 +572,7 @@
   callback_ = callback;
 
   // Do not fetch the manifest for extension URLs.
-  if (contents_ &&
-      !contents_->GetVisibleURL().SchemeIs(extensions::kExtensionScheme)) {
+  if (contents_ && !contents_->GetVisibleURL().SchemeIs(kExtensionScheme)) {
     // Null in tests. OnDidPerformInstallableCheck is called via a testing API.
     // TODO(crbug.com/829232) ensure this is consistent with other calls to
     // GetData.
@@ -745,21 +737,20 @@
 void BookmarkAppHelper::FinishInstallation(const Extension* extension) {
   // Set the default 'open as' preference for use next time the dialog is
   // shown.
-  extensions::LaunchType launch_type = web_app_info_.open_as_window
-                                           ? extensions::LAUNCH_TYPE_WINDOW
-                                           : extensions::LAUNCH_TYPE_REGULAR;
+  LaunchType launch_type =
+      web_app_info_.open_as_window ? LAUNCH_TYPE_WINDOW : LAUNCH_TYPE_REGULAR;
 
   if (base::FeatureList::IsEnabled(features::kDesktopPWAWindowing)) {
     DCHECK_NE(ForInstallableSite::kUnknown, for_installable_site_);
     launch_type = for_installable_site_ == ForInstallableSite::kYes
-                      ? extensions::LAUNCH_TYPE_WINDOW
-                      : extensions::LAUNCH_TYPE_REGULAR;
+                      ? LAUNCH_TYPE_WINDOW
+                      : LAUNCH_TYPE_REGULAR;
   }
-  profile_->GetPrefs()->SetInteger(
-      extensions::pref_names::kBookmarkAppCreationLaunchType, launch_type);
+  profile_->GetPrefs()->SetInteger(pref_names::kBookmarkAppCreationLaunchType,
+                                   launch_type);
 
   // Set the launcher type for the app.
-  extensions::SetLaunchType(profile_, extension->id(), launch_type);
+  SetLaunchType(profile_, extension->id(), launch_type);
 
   if (!contents_) {
     // The web contents can be null in tests.
@@ -814,8 +805,7 @@
 
   // Reparent the tab into an app window immediately when opening as a window.
   if (base::FeatureList::IsEnabled(features::kDesktopPWAWindowing) &&
-      launch_type == extensions::LAUNCH_TYPE_WINDOW &&
-      !profile_->IsOffTheRecord()) {
+      launch_type == LAUNCH_TYPE_WINDOW && !profile_->IsOffTheRecord()) {
     ReparentWebContentsIntoAppBrowser(contents_, extension);
   }
 #endif  // !defined(OS_MACOSX)
@@ -837,7 +827,7 @@
   // created (e.g. due to management policies). Add to shelf visibility should
   // be gated on whether extensions can be created - see crbug.com/545541.
   switch (type) {
-    case extensions::NOTIFICATION_CRX_INSTALLER_DONE: {
+    case NOTIFICATION_CRX_INSTALLER_DONE: {
       const Extension* extension =
           content::Details<const Extension>(details).ptr();
       if (extension) {
@@ -849,7 +839,7 @@
       }
       break;
     }
-    case extensions::NOTIFICATION_EXTENSION_INSTALL_ERROR:
+    case NOTIFICATION_EXTENSION_INSTALL_ERROR:
       callback_.Run(nullptr, web_app_info_);
       break;
     default:
diff --git a/chrome/browser/extensions/chrome_app_api_browsertest.cc b/chrome/browser/extensions/chrome_app_api_browsertest.cc
index fc02b55..db24543b 100644
--- a/chrome/browser/extensions/chrome_app_api_browsertest.cc
+++ b/chrome/browser/extensions/chrome_app_api_browsertest.cc
@@ -199,8 +199,9 @@
   EXPECT_TRUE(IsAppInstalledInMainFrame());
 
   // Disable the extension and verify the state.
-  ExtensionService* service = extensions::ExtensionSystem::Get(
-      browser()->profile())->extension_service();
+  extensions::ExtensionService* service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   service->DisableExtension(
       extension->id(),
       extensions::disable_reason::DISABLE_PERMISSIONS_INCREASE);
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
index 9f286ce..6e2d32d 100644
--- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
+++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
@@ -47,7 +47,7 @@
         std::make_unique<NotificationDisplayServiceTester>(profile());
   }
 
-  ExtensionService* GetExtensionService() {
+  extensions::ExtensionService* GetExtensionService() {
     return extensions::ExtensionSystem::Get(browser()->profile())->
         extension_service();
   }
diff --git a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
index 4b6422b..e8350b4 100644
--- a/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
+++ b/chrome/browser/extensions/extension_disabled_ui_browsertest.cc
@@ -119,7 +119,7 @@
     return extension;
   }
 
-  ExtensionService* service_;
+  extensions::ExtensionService* service_;
   ExtensionRegistry* registry_;
   base::ScopedTempDir scoped_temp_dir_;
   base::FilePath path_v1_;
diff --git a/chrome/browser/extensions/extension_startup_browsertest.cc b/chrome/browser/extensions/extension_startup_browsertest.cc
index 347c7a25..5932e48 100644
--- a/chrome/browser/extensions/extension_startup_browsertest.cc
+++ b/chrome/browser/extensions/extension_startup_browsertest.cc
@@ -144,7 +144,7 @@
     ASSERT_EQ(num_expected_extensions,
               GetNonComponentEnabledExtensionCount(browser()->profile()));
 
-    ExtensionService* service =
+    extensions::ExtensionService* service =
         extensions::ExtensionSystem::Get(browser()->profile())
             ->extension_service();
     ASSERT_EQ(expect_extensions_enabled, service->extensions_enabled());
diff --git a/chrome/browser/extensions/extension_sync_service.cc b/chrome/browser/extensions/extension_sync_service.cc
index 57c43bb..c5f150e 100644
--- a/chrome/browser/extensions/extension_sync_service.cc
+++ b/chrome/browser/extensions/extension_sync_service.cc
@@ -569,7 +569,7 @@
       theme.id(), CreateSyncData(theme).GetSyncData());
 }
 
-ExtensionService* ExtensionSyncService::extension_service() const {
+extensions::ExtensionService* ExtensionSyncService::extension_service() const {
   return ExtensionSystem::Get(profile_)->extension_service();
 }
 
diff --git a/chrome/browser/extensions/service_worker_apitest.cc b/chrome/browser/extensions/service_worker_apitest.cc
index b2d2c25..5532323d 100644
--- a/chrome/browser/extensions/service_worker_apitest.cc
+++ b/chrome/browser/extensions/service_worker_apitest.cc
@@ -503,8 +503,7 @@
   EXPECT_TRUE(listener.WaitUntilSatisfied());
 }
 
-IN_PROC_BROWSER_TEST_P(ServiceWorkerTest,
-                       LoadingBackgroundPageBypassesServiceWorker) {
+IN_PROC_BROWSER_TEST_P(ServiceWorkerTest, SWServedBackgroundPage) {
   const Extension* extension =
       StartTestFromBackgroundPage("fetch.js", kExpectSuccess);
 
@@ -526,23 +525,12 @@
   process_manager()->WakeEventPage(extension->id(), base::DoNothing());
   BackgroundPageWatcher(process_manager(), extension).WaitForOpen();
 
-  // Content should not have been affected by the fetch, which would otherwise
-  // be "Caught fetch for...".
+  // The service worker should get a fetch event for the background page.
   background_page =
       process_manager()->GetBackgroundHostForExtension(extension->id());
   ASSERT_TRUE(background_page);
   content::WaitForLoadStop(background_page->host_contents());
 
-  // TODO(kalman): Everything you've read has been a LIE! It should be:
-  //
-  // EXPECT_EQ(kExpectedInnerText,
-  //           ExtractInnerText(background_page->host_contents()));
-  //
-  // but there is a bug, and we're actually *not* bypassing the service worker
-  // for background page loads! For now, let it pass (assert wrong behavior)
-  // because it's not a regression, but this must be fixed eventually.
-  //
-  // Tracked in crbug.com/532720.
   EXPECT_EQ("Caught a fetch for /background.html",
             ExtractInnerText(background_page->host_contents()));
 }
diff --git a/chrome/browser/extensions/shared_worker_apitest.cc b/chrome/browser/extensions/shared_worker_apitest.cc
new file mode 100644
index 0000000..40b8eb16
--- /dev/null
+++ b/chrome/browser/extensions/shared_worker_apitest.cc
@@ -0,0 +1,52 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/files/file_path.h"
+#include "chrome/browser/extensions/extension_apitest.h"
+#include "extensions/browser/extension_host.h"
+#include "extensions/browser/process_manager.h"
+#include "extensions/test/background_page_watcher.h"
+#include "extensions/test/extension_test_message_listener.h"
+
+namespace extensions {
+
+// This tests an extension that starts a shared worker.
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest, SharedWorker) {
+  EXPECT_TRUE(RunExtensionTest("shared_worker/basic")) << message_;
+}
+
+// This tests an extension that is controlled by a service worker and starts a
+// shared worker. The requests for the shared worker scripts and the requests
+// initiated by the shared worker should be seen by the service worker.
+IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
+                       SharedWorker_ControlledByServiceWorker) {
+  // Load the extension. It will register a service worker.
+  ExtensionTestMessageListener listener("READY", false);
+  listener.set_failure_message("FAIL");
+  const Extension* extension = LoadExtension(
+      test_data_dir_.AppendASCII("shared_worker/service_worker_controlled"));
+  EXPECT_TRUE(listener.WaitUntilSatisfied());
+  EXPECT_TRUE(extension);
+  ProcessManager* process_manager = ProcessManager::Get(profile());
+  ExtensionHost* background_page =
+      process_manager->GetBackgroundHostForExtension(extension->id());
+
+  // Close the background page and start it again, so it is controlled
+  // by the service worker.
+  ExtensionTestMessageListener listener2("CONTROLLED", false);
+  listener2.set_failure_message("FAIL");
+  background_page->Close();
+  BackgroundPageWatcher(process_manager, extension).WaitForClose();
+  background_page = nullptr;
+  process_manager->WakeEventPage(extension->id(), base::DoNothing());
+  BackgroundPageWatcher(process_manager, extension).WaitForOpen();
+  EXPECT_TRUE(listener2.WaitUntilSatisfied());
+
+  // The background page should conduct the tests.
+  ExtensionTestMessageListener listener3("PASS", false);
+  listener3.set_failure_message("FAIL");
+  EXPECT_TRUE(listener3.WaitUntilSatisfied());
+}
+
+}  // namespace extensions
diff --git a/chrome/browser/extensions/signin/gaia_auth_extension_loader.cc b/chrome/browser/extensions/signin/gaia_auth_extension_loader.cc
index 7e641eb..e6bd988 100644
--- a/chrome/browser/extensions/signin/gaia_auth_extension_loader.cc
+++ b/chrome/browser/extensions/signin/gaia_auth_extension_loader.cc
@@ -30,11 +30,12 @@
 using content::BrowserContext;
 using content::BrowserThread;
 
+namespace extensions {
+
 namespace {
 
-extensions::ComponentLoader* GetComponentLoader(BrowserContext* context) {
-  extensions::ExtensionSystem* extension_system =
-      extensions::ExtensionSystem::Get(context);
+ComponentLoader* GetComponentLoader(BrowserContext* context) {
+  ExtensionSystem* extension_system = ExtensionSystem::Get(context);
   ExtensionService* extension_service = extension_system->extension_service();
   return extension_service->component_loader();
 }
@@ -42,7 +43,7 @@
 void LoadGaiaAuthExtension(BrowserContext* context) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
-  extensions::ComponentLoader* component_loader = GetComponentLoader(context);
+  ComponentLoader* component_loader = GetComponentLoader(context);
   const base::CommandLine* command_line =
       base::CommandLine::ForCurrentProcess();
   if (command_line->HasSwitch(switches::kAuthExtensionPath)) {
@@ -58,13 +59,11 @@
 
 void UnloadGaiaAuthExtension(BrowserContext* context) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  GetComponentLoader(context)->Remove(extensions::kGaiaAuthExtensionId);
+  GetComponentLoader(context)->Remove(kGaiaAuthExtensionId);
 }
 
 }  // namespace
 
-namespace extensions {
-
 GaiaAuthExtensionLoader::GaiaAuthExtensionLoader(BrowserContext* context)
     : browser_context_(context),
       load_count_(0),
diff --git a/chrome/browser/extensions/theme_installed_infobar_delegate.cc b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
index 4938865..c6206623 100644
--- a/chrome/browser/extensions/theme_installed_infobar_delegate.cc
+++ b/chrome/browser/extensions/theme_installed_infobar_delegate.cc
@@ -25,13 +25,14 @@
 #include "ui/base/l10n/l10n_util.h"
 
 // static
-void ThemeInstalledInfoBarDelegate::Create(InfoBarService* infobar_service,
-                                           ExtensionService* extension_service,
-                                           ThemeService* theme_service,
-                                           const std::string& theme_name,
-                                           const std::string& theme_id,
-                                           const std::string& previous_theme_id,
-                                           bool previous_using_system_theme) {
+void ThemeInstalledInfoBarDelegate::Create(
+    InfoBarService* infobar_service,
+    extensions::ExtensionService* extension_service,
+    ThemeService* theme_service,
+    const std::string& theme_name,
+    const std::string& theme_id,
+    const std::string& previous_theme_id,
+    bool previous_using_system_theme) {
   // Create the new infobar.
   std::unique_ptr<infobars::InfoBar> new_infobar(
       infobar_service->CreateConfirmInfoBar(
@@ -64,7 +65,7 @@
 }
 
 ThemeInstalledInfoBarDelegate::ThemeInstalledInfoBarDelegate(
-    ExtensionService* extension_service,
+    extensions::ExtensionService* extension_service,
     ThemeService* theme_service,
     const std::string& theme_name,
     const std::string& theme_id,
diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc
index a1e8c35..55d75e5 100644
--- a/chrome/browser/extensions/updater/extension_updater.cc
+++ b/chrome/browser/extensions/updater/extension_updater.cc
@@ -260,7 +260,7 @@
 
   // If the user has overridden the update frequency, don't bother reporting
   // this.
-  if (frequency_seconds_ == extensions::kDefaultUpdateFrequencySeconds) {
+  if (frequency_seconds_ == kDefaultUpdateFrequencySeconds) {
     Time last = Time::FromInternalValue(prefs_->GetInt64(
         pref_names::kLastUpdateCheck));
     if (last.ToInternalValue() != 0) {
@@ -600,8 +600,7 @@
 
       // Source parameter ensures that we only see the completion event for the
       // the installer we started.
-      registrar_.Add(this,
-                     extensions::NOTIFICATION_CRX_INSTALLER_DONE,
+      registrar_.Add(this, NOTIFICATION_CRX_INSTALLER_DONE,
                      content::Source<CrxInstaller>(installer));
     } else {
       for (const int request_id : crx_file.request_ids) {
@@ -621,9 +620,9 @@
 void ExtensionUpdater::Observe(int type,
                                const content::NotificationSource& source,
                                const content::NotificationDetails& details) {
-  DCHECK_EQ(extensions::NOTIFICATION_CRX_INSTALLER_DONE, type);
+  DCHECK_EQ(NOTIFICATION_CRX_INSTALLER_DONE, type);
 
-  registrar_.Remove(this, extensions::NOTIFICATION_CRX_INSTALLER_DONE, source);
+  registrar_.Remove(this, NOTIFICATION_CRX_INSTALLER_DONE, source);
   crx_install_is_running_ = false;
 
   // If installing this file didn't succeed, we may need to re-download it.
@@ -635,8 +634,7 @@
                 : ExtensionUpdaterUpdateResult::UPDATE_INSTALL_ERROR,
       ExtensionUpdaterUpdateResult::UPDATE_RESULT_COUNT);
 
-  extensions::CrxInstaller* installer =
-      content::Source<extensions::CrxInstaller>(source).ptr();
+  CrxInstaller* installer = content::Source<CrxInstaller>(source).ptr();
   const FetchedCRXFile& crx_file = current_crx_file_;
   if (!extension && installer->hash_check_failed() &&
       !crx_file.callback.is_null()) {
@@ -663,7 +661,7 @@
 
 void ExtensionUpdater::NotifyStarted() {
   content::NotificationService::current()->Notify(
-      extensions::NOTIFICATION_EXTENSION_UPDATING_STARTED,
+      NOTIFICATION_EXTENSION_UPDATING_STARTED,
       content::Source<Profile>(profile_),
       content::NotificationService::NoDetails());
 }
diff --git a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
index 2c902f6..2682fff 100644
--- a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
+++ b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
@@ -158,9 +158,9 @@
           .Build();
   ASSERT_TRUE(hosted_app.get());
 
-  ExtensionService* extension_service =
-      extensions::ExtensionSystem::Get(browser()->profile())->
-          extension_service();
+  extensions::ExtensionService* extension_service =
+      extensions::ExtensionSystem::Get(browser()->profile())
+          ->extension_service();
   extensions::ExtensionRegistry* registry =
       extensions::ExtensionRegistry::Get(browser()->profile());
 
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 56aeb19a..73a69bb 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -851,7 +851,8 @@
 
 const char kViewsCastDialogName[] = "Views Cast dialog";
 const char kViewsCastDialogDescription[] =
-    "Replace the WebUI Cast dialog with a Views toolkit dialog.";
+    "Replace the WebUI Cast dialog with a Views toolkit dialog. This requires "
+    "#views-browser-windows on Mac.";
 
 const char kHideActiveAppsFromShelfName[] =
     "Hide running apps (that are not pinned) from the shelf";
@@ -1455,6 +1456,12 @@
 const char kShowAndroidFilesInFilesAppDescription[] =
     "Show Android files in Files app if Android is enabled on the device.";
 
+const char kFilesAppNewStyleNavigationName[] =
+    "Use new-style navigation in the Files app";
+const char kFilesAppNewStyleNavigationDescription[] =
+    "Enables the new-style navigation in the Files app, which displays a "
+    R"("My Files" root for Downloads, Linux and Play files)";
+
 const char kShowAutofillSignaturesName[] = "Show autofill signatures.";
 const char kShowAutofillSignaturesDescription[] =
     "Annotates web forms with Autofill signatures as HTML attributes. Also "
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index f5bb185..58b2121 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -890,6 +890,9 @@
 extern const char kShowAndroidFilesInFilesAppName[];
 extern const char kShowAndroidFilesInFilesAppDescription[];
 
+extern const char kFilesAppNewStyleNavigationName[];
+extern const char kFilesAppNewStyleNavigationDescription[];
+
 extern const char kShowAutofillSignaturesName[];
 extern const char kShowAutofillSignaturesDescription[];
 
diff --git a/chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc b/chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc
index e70c565..784359c 100644
--- a/chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc
+++ b/chrome/browser/metrics/oom/out_of_memory_reporter_unittest.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/metrics/oom/out_of_memory_reporter.h"
 
 #include <memory>
+#include <set>
 #include <utility>
 
 #include "base/at_exit.h"
@@ -23,7 +24,10 @@
 #include "components/ukm/content/source_url_recorder.h"
 #include "components/ukm/test_ukm_recorder.h"
 #include "components/ukm/ukm_source.h"
+#include "content/public/browser/navigation_handle.h"
+#include "content/public/browser/render_view_host.h"
 #include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_observer.h"
 #include "content/public/test/mock_render_process_host.h"
 #include "content/public/test/navigation_simulator.h"
 #include "content/public/test/test_renderer_host.h"
@@ -75,6 +79,44 @@
 };
 #endif  // defined(OS_ANDROID)
 
+// This class ensures we always have an empty minidump file associated with the
+// process a navigation finishes in.
+class DumpCreator : public content::WebContentsObserver {
+ public:
+  explicit DumpCreator(content::WebContents* contents)
+      : content::WebContentsObserver(contents) {
+    CreateDump(contents->GetRenderViewHost()->GetProcess()->GetID());
+  }
+  ~DumpCreator() override = default;
+
+ private:
+  void CreateDump(int render_process_id) {
+    if (!render_process_ids_.insert(render_process_id).second)
+      return;
+#if defined(OS_ANDROID)
+    // Simulate a call to ChildStart and create an empty crash dump.
+    base::RunLoop run_loop;
+    base::PostTaskWithTraitsAndReply(
+        FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
+        base::BindOnce(
+            base::IgnoreResult(
+                &breakpad::CrashDumpManager::CreateMinidumpFileForChild),
+            base::Unretained(breakpad::CrashDumpManager::GetInstance()),
+            render_process_id),
+        run_loop.QuitClosure());
+    run_loop.Run();
+#endif
+  }
+
+  // content::WebContentsObserver:
+  void DidFinishNavigation(content::NavigationHandle* handle) override {
+    CreateDump(
+        handle->GetWebContents()->GetRenderViewHost()->GetProcess()->GetID());
+  }
+
+  std::set<int> render_process_ids_;
+};
+
 class OutOfMemoryReporterTest : public ChromeRenderViewHostTestHarness,
                                 public OutOfMemoryReporter::Observer {
  public:
@@ -91,15 +133,10 @@
     breakpad::CrashDumpObserver::GetInstance()->RegisterClient(
         std::make_unique<breakpad::ChildProcessCrashObserver>(
             base::FilePath(), kAndroidMinidumpDescriptor));
-
-    // Simulate a call to ChildStart and create an empty crash dump.
-    base::PostTaskWithTraits(
-        FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
-        base::Bind(base::IgnoreResult(
-                       &breakpad::CrashDumpManager::CreateMinidumpFileForChild),
-                   base::Unretained(breakpad::CrashDumpManager::GetInstance()),
-                   process()->GetID()));
 #endif
+
+    dump_creator_ = std::make_unique<DumpCreator>(web_contents());
+
     OutOfMemoryReporter::CreateForWebContents(web_contents());
     OutOfMemoryReporter* reporter =
         OutOfMemoryReporter::FromWebContents(web_contents());
@@ -144,7 +181,7 @@
         crash_waiter.Wait();
     EXPECT_EQ(expect_oom, breakpad::CrashDumpManager::IsForegroundOom(details))
         << "process_type: " << details.process_type
-        << " file_size: " << details.file_size
+        << " status: " << static_cast<int>(details.status)
         << " app_state: " << details.app_state
         << " was_oom_protected_status: " << details.was_oom_protected_status;
 
@@ -182,6 +219,7 @@
 
   base::Optional<GURL> last_oom_url_;
   std::unique_ptr<ukm::TestAutoSetUkmRecorder> test_ukm_recorder_;
+  std::unique_ptr<DumpCreator> dump_creator_;
 
  private:
   base::SimpleTestTickClock* test_tick_clock_;
diff --git a/chrome/browser/resources/md_bookmarks/store_client.js b/chrome/browser/resources/md_bookmarks/store_client.js
index bc5b434..cee299b 100644
--- a/chrome/browser/resources/md_bookmarks/store_client.js
+++ b/chrome/browser/resources/md_bookmarks/store_client.js
@@ -49,10 +49,6 @@
      * @param {function(!BookmarksPageState)} valueGetter
      */
     watch: function(localProperty, valueGetter) {
-      if (!this.getPropertyInfo(localProperty).defined) {
-        console.error(
-            'No property ' + localProperty + ' defined on ' + this.is);
-      }
       this.watches_.push({
         localProperty: localProperty,
         valueGetter: valueGetter,
diff --git a/chrome/browser/resources/media_router/elements/route_controls/route_controls.css b/chrome/browser/resources/media_router/elements/route_controls/route_controls.css
index 15ac0ae..a57d0db 100644
--- a/chrome/browser/resources/media_router/elements/route_controls/route_controls.css
+++ b/chrome/browser/resources/media_router/elements/route_controls/route_controls.css
@@ -87,6 +87,13 @@
   white-space: nowrap;
 }
 
+#hangouts-local-present-checkbox {
+  --cr-checkbox-label-container: {
+    -webkit-padding-start: 14px;
+  }
+  align-items: start;
+}
+
 #hangouts-local-present-checkbox-subtitle {
   display: block;
   font-size: 0.8em;
diff --git a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
index 15a5fc87..faa1fe2 100644
--- a/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
+++ b/chrome/browser/resources/settings/settings_page/settings_animated_pages.js
@@ -38,6 +38,10 @@
     focusConfig: Object,
   },
 
+  listeners: {
+    'neon-animation-finish': 'onNeonAnimationFinish_',
+  },
+
   /**
    * The last "previous" route reported by the router.
    * @private {?settings.Route}
@@ -51,6 +55,18 @@
         Polymer.dom(this).observeNodes(this.lightDomChanged_.bind(this));
   },
 
+  /** @private */
+  onNeonAnimationFinish_: function() {
+    if (settings.lastRouteChangeWasPopstate())
+      return;
+
+    // Set initial focus when navigating to a subpage for a11y.
+    let subPage = /** @type {SettingsSubpageElement} */ (
+        this.querySelector('settings-subpage.iron-selected'));
+    if (subPage)
+      subPage.initialFocus();
+  },
+
   /**
    * @param {!Event} e
    * @private
@@ -61,14 +77,8 @@
 
     // Don't attempt to focus any anchor element, unless last navigation was a
     // 'pop' (backwards) navigation.
-    if (!settings.lastRouteChangeWasPopstate()) {
-      // Exception for a11y: set initial focus when navigating to a subpage.
-      let subPage = /** @type {SettingsSubpageElement} */ (
-          this.querySelector('settings-subpage.iron-selected'));
-      if (subPage)
-        subPage.initialFocus();
+    if (!settings.lastRouteChangeWasPopstate())
       return;
-    }
 
     // Only handle iron-select events from neon-animatable elements and the
     // given whitelist of settings-subpage instances.
diff --git a/chrome/browser/resources/settings/site_settings/all_sites.html b/chrome/browser/resources/settings/site_settings/all_sites.html
index d91cf76..7b2c5ef 100644
--- a/chrome/browser/resources/settings/site_settings/all_sites.html
+++ b/chrome/browser/resources/settings/site_settings/all_sites.html
@@ -21,7 +21,7 @@
     </div>
     <div class="list-frame without-heading" id="listContainer">
       <template is="dom-repeat" items="[[sites]]">
-        <site-entry site="{{item}}" label="[[item.displayName]]">
+        <site-entry site="[[item]]">
       </template>
     </div>
   </template>
diff --git a/chrome/browser/resources/settings/site_settings/all_sites.js b/chrome/browser/resources/settings/site_settings/all_sites.js
index 81c9e55..e239bea 100644
--- a/chrome/browser/resources/settings/site_settings/all_sites.js
+++ b/chrome/browser/resources/settings/site_settings/all_sites.js
@@ -14,8 +14,8 @@
 
   properties: {
     /**
-     * Array of sites to display in the widget.
-     * @type {!Array<!SiteException>}
+     * Array of sites to display in the widget, grouped into their eTLD+1s.
+     * @type {!Array<!EffectiveTopLevelDomainPlus1>}
      */
     sites: {
       type: Array,
@@ -36,101 +36,53 @@
 
   /**
    * Retrieves a list of all known sites with site details.
-   * @return {!Promise<!Array<!RawSiteException>>}
    * @private
    */
-  getAllSitesList_: function() {
-    /** @type {!Array<!RawSiteException>} */
-    const promiseList = [];
-
+  populateList_: function() {
+    /** @type {!Array<settings.ContentSettingsTypes>} */
+    let contentTypes = [];
     const types = Object.values(settings.ContentSettingsTypes);
-    for (let i = 0; i < types.length; i++) {
+    for (let i = 0; i < types.length; ++i) {
       const type = types[i];
       // <if expr="not chromeos">
       if (type == settings.ContentSettingsTypes.PROTECTED_CONTENT)
         continue;
       // </if>
+      // Some categories store their data in a custom way.
       if (type == settings.ContentSettingsTypes.PROTOCOL_HANDLERS ||
           type == settings.ContentSettingsTypes.ZOOM_LEVELS) {
-        // Some categories store their data in a custom way.
         continue;
       }
-
-      promiseList.push(this.browserProxy_.getExceptionList(type));
+      // These categories are gated behind flags.
+      if (type == settings.ContentSettingsTypes.SENSORS &&
+          !loadTimeData.getBoolean('enableSensorsContentSetting')) {
+        continue;
+      }
+      if (type == settings.ContentSettingsTypes.ADS &&
+          !loadTimeData.getBoolean('enableSafeBrowsingSubresourceFilter')) {
+        continue;
+      }
+      if (type == settings.ContentSettingsTypes.SOUND &&
+          !loadTimeData.getBoolean('enableSoundContentSetting')) {
+        continue;
+      }
+      if (type == settings.ContentSettingsTypes.CLIPBOARD &&
+          !loadTimeData.getBoolean('enableClipboardContentSetting')) {
+        continue;
+      }
+      if (type == settings.ContentSettingsTypes.PAYMENT_HANDLER &&
+          !loadTimeData.getBoolean('enablePaymentHandlerContentSetting')) {
+        continue;
+      }
+      contentTypes.push(type);
     }
 
-    return Promise.all(promiseList);
-  },
-
-  /** @private */
-  populateList_: function() {
-    this.getAllSitesList_().then(this.processExceptions_.bind(this));
-  },
-
-  /**
-   * Process the exception list returned from the native layer.
-   * @param {!Array<!RawSiteException>} data List of sites (exceptions)
-   *     to process.
-   * @private
-   */
-  processExceptions_: function(data) {
-    const sites = /** @type {!Array<!RawSiteException>} */ ([]);
-    for (let i = 0; i < data.length; ++i) {
-      const exceptionList = data[i];
-      for (let k = 0; k < exceptionList.length; ++k) {
-        sites.push(exceptionList[k]);
-      }
-    }
-    this.sites = this.toSiteArray_(sites);
-  },
-
-  /**
-   * TODO(dschuyler): Move this processing to C++ handler.
-   * Converts a list of exceptions received from the C++ handler to
-   * full SiteException objects. The list is sorted by site name, then protocol
-   * and port and de-duped (by origin).
-   * @param {!Array<!RawSiteException>} sites A list of sites to convert.
-   * @return {!Array<!SiteException>} A list of full SiteExceptions. Sorted and
-   *    deduped.
-   * @private
-   */
-  toSiteArray_: function(sites) {
-    const self = this;
-    sites.sort(function(a, b) {
-      const url1 = self.toUrl(a.origin);
-      const url2 = self.toUrl(b.origin);
-      let comparison = url1.host.localeCompare(url2.host);
-      if (comparison == 0) {
-        comparison = url1.protocol.localeCompare(url2.protocol);
-        if (comparison == 0) {
-          comparison = url1.port.localeCompare(url2.port);
-          if (comparison == 0) {
-            // Compare hosts for the embedding origins.
-            let host1 = self.toUrl(a.embeddingOrigin);
-            let host2 = self.toUrl(b.embeddingOrigin);
-            host1 = (host1 == null) ? '' : host1.host;
-            host2 = (host2 == null) ? '' : host2.host;
-            return host1.localeCompare(host2);
-          }
-        }
-      }
-      return comparison;
+    this.browserProxy_.getAllSites(contentTypes).then((response) => {
+      let allSites = [];
+      response.forEach((etld1) => {
+        allSites = allSites.concat(etld1.origins);
+      });
+      this.sites = allSites;
     });
-    const results = /** @type {!Array<!SiteException>} */ ([]);
-    let lastOrigin = '';
-    let lastEmbeddingOrigin = '';
-    for (let i = 0; i < sites.length; ++i) {
-      // Remove duplicates.
-      if (sites[i].origin == lastOrigin &&
-          sites[i].embeddingOrigin == lastEmbeddingOrigin) {
-        continue;
-      }
-      /** @type {!SiteException} */
-      const siteException = this.expandSiteException(sites[i]);
-      results.push(siteException);
-      lastOrigin = siteException.origin;
-      lastEmbeddingOrigin = siteException.embeddingOrigin;
-    }
-    return results;
   },
 });
diff --git a/chrome/browser/resources/settings/site_settings/edit_exception_dialog.html b/chrome/browser/resources/settings/site_settings/edit_exception_dialog.html
index ced08d7..070c275 100644
--- a/chrome/browser/resources/settings/site_settings/edit_exception_dialog.html
+++ b/chrome/browser/resources/settings/site_settings/edit_exception_dialog.html
@@ -8,7 +8,13 @@
 
 <dom-module id="settings-edit-exception-dialog">
   <template>
-    <style include="settings-shared"></style>
+    <style include="settings-shared">
+      cr-dialog {
+        --cr-dialog-body: {
+          height: 68px;
+        };
+      }
+    </style>
     <cr-dialog id="dialog">
       <div slot="title">$i18n{editSiteTitle}</div>
       <div slot="body">
diff --git a/chrome/browser/resources/settings/site_settings/site_entry.html b/chrome/browser/resources/settings/site_settings/site_entry.html
index 8e0e8d5..85c290b 100644
--- a/chrome/browser/resources/settings/site_settings/site_entry.html
+++ b/chrome/browser/resources/settings/site_settings/site_entry.html
@@ -9,13 +9,13 @@
     <style include="settings-shared"></style>
     <div class="settings-box list-item" on-click="onOriginTap_"
         actionable>
-      <div class="favicon-image" style$="[[computeSiteIcon(site.origin)]]">
+      <div class="favicon-image" style$="[[computeSiteIcon(site)]]">
       </div>
       <div class="middle text-elide" id="displayName">
-        [[site.displayName]]
+        [[site]]
       </div>
       <paper-icon-button-light class="subpage-arrow">
-        <button aria-label$="[[site.displayName]]"
+        <button aria-label$="[[site]]"
             aria-describedby="displayName"></button>
       </paper-icon-button-light>
     </div>
diff --git a/chrome/browser/resources/settings/site_settings/site_entry.js b/chrome/browser/resources/settings/site_settings/site_entry.js
index b424b21..e16e635 100644
--- a/chrome/browser/resources/settings/site_settings/site_entry.js
+++ b/chrome/browser/resources/settings/site_settings/site_entry.js
@@ -17,7 +17,7 @@
      * TODO(https://crbug.com/835712): This should be an object representing a
      * ETLD+1 site.
      */
-    site: Object,
+    site: String,
   },
 
   /** @override */
@@ -31,7 +31,7 @@
   onOriginTap_: function(event) {
     settings.navigateTo(
         settings.routes.SITE_SETTINGS_SITE_DETAILS,
-        new URLSearchParams('site=' + this.site.origin));
+        new URLSearchParams('site=' + this.site));
   },
 
 });
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
index 7974cfd..d23fe89 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
+++ b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.js
@@ -19,6 +19,16 @@
 };
 
 /**
+ * Represents a list of sites, grouped under the same eTLD+1. For example, an
+ * origin "https://www.example.com" would be grouped together with
+ * "https://login.example.com" and "http://example.com" under a common eTLD+1 of
+ * "example.com".
+ * @typedef {{etld1: string,
+ *            origins: Array<string>}}
+ */
+let EffectiveTopLevelDomainPlus1;
+
+/**
  * The site exception information passed from the C++ handler.
  * See also: SiteException.
  * @typedef {{embeddingOrigin: string,
@@ -106,6 +116,15 @@
     getDefaultValueForContentType(contentType) {}
 
     /**
+     * Gets a list of sites, grouped by eTLD+1, affected by any of the content
+     * settings specified by |contentTypes|.
+     * @param {string} contentTypes A list of the content types to retrieve
+     *     sites for.
+     * @return {!Promise<!Array<!EffectiveTopLevelDomainPlus1>>}
+     */
+    getAllSites(contentTypes) {}
+
+    /**
      * Gets the exceptions (site list) for a particular category.
      * @param {string} contentType The name of the category to query.
      * @return {!Promise<!Array<!RawSiteException>>}
@@ -298,6 +317,11 @@
     }
 
     /** @override */
+    getAllSites(contentTypes) {
+      return cr.sendWithPromise('getAllSites', contentTypes);
+    }
+
+    /** @override */
     getExceptionList(contentType) {
       return cr.sendWithPromise('getExceptionList', contentType);
     }
diff --git a/chrome/browser/resources/settings/site_settings_page/site_settings_page.js b/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
index eb57c9f..4f611936 100644
--- a/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
+++ b/chrome/browser/resources/settings/site_settings_page/site_settings_page.js
@@ -137,7 +137,8 @@
     pairs.forEach(pair => {
       const route = pair[0];
       const id = pair[1];
-      this.focusConfig.set(route.path, '* /deep/ #' + id + ' .subpage-arrow');
+      this.focusConfig.set(
+          route.path, '* /deep/ #' + id + ' .subpage-arrow button');
     });
   },
 
diff --git a/chrome/browser/search/background/ntp_background.proto b/chrome/browser/search/background/ntp_background.proto
index 1821c1a9..9d30eca 100644
--- a/chrome/browser/search/background/ntp_background.proto
+++ b/chrome/browser/search/background/ntp_background.proto
@@ -19,7 +19,7 @@
 }
 
 message Image {
-  // A unique ID for the image. Useful for analytics.
+  // A unique ID for the image.
   optional fixed64 asset_id = 1;
 
   // The image URL.
@@ -62,3 +62,23 @@
   // A list of every available collection for the given language and region.
   repeated Collection collections = 1;
 }
+
+message GetImagesInCollectionRequest {
+  // Deprecated or unused tag numbers
+  reserved 4;
+
+  // The id of the collection being requested.
+  optional string collection_id = 1;
+
+  // The language that should be used for content. e.g. "en-US"
+  optional string language = 2;
+
+  // The approximate permanent location of the user e.g. "us".
+  optional string region = 3;
+}
+
+message GetImagesInCollectionResponse {
+  // A list of all the images in the requested collection, filtered by language
+  // and region.
+  repeated Image images = 1;
+}
diff --git a/chrome/browser/search/background/ntp_background_data.cc b/chrome/browser/search/background/ntp_background_data.cc
index 728ae9f..57ca655 100644
--- a/chrome/browser/search/background/ntp_background_data.cc
+++ b/chrome/browser/search/background/ntp_background_data.cc
@@ -34,3 +34,35 @@
 
   return collection_info;
 }
+
+CollectionImage::CollectionImage() = default;
+CollectionImage::CollectionImage(const CollectionImage&) = default;
+CollectionImage::CollectionImage(CollectionImage&&) = default;
+CollectionImage::~CollectionImage() = default;
+
+CollectionImage& CollectionImage::operator=(const CollectionImage&) = default;
+CollectionImage& CollectionImage::operator=(CollectionImage&&) = default;
+
+bool operator==(const CollectionImage& lhs, const CollectionImage& rhs) {
+  return lhs.collection_id == rhs.collection_id &&
+         lhs.asset_id == rhs.asset_id && lhs.image_url == rhs.image_url &&
+         lhs.attribution == rhs.attribution;
+}
+
+bool operator!=(const CollectionImage& lhs, const CollectionImage& rhs) {
+  return !(lhs == rhs);
+}
+
+CollectionImage CollectionImage::CreateFromProto(
+    std::string collection_id,
+    const ntp::background::Image& image) {
+  CollectionImage collection_image;
+  collection_image.collection_id = collection_id;
+  collection_image.asset_id = image.asset_id();
+  collection_image.image_url = GURL(image.image_url());
+  for (const auto& attribution : image.attribution()) {
+    collection_image.attribution.push_back(attribution.text());
+  }
+
+  return collection_image;
+}
diff --git a/chrome/browser/search/background/ntp_background_data.h b/chrome/browser/search/background/ntp_background_data.h
index 9e0e543f..a0bfd66 100644
--- a/chrome/browser/search/background/ntp_background_data.h
+++ b/chrome/browser/search/background/ntp_background_data.h
@@ -12,8 +12,8 @@
 
 // Background images are organized into collections, according to a theme. This
 // struct contains the data required to display information about a collection,
-// including a representative image. The complete set of images must be
-// requested separately, by referencing the identifier for this collection.
+// including a representative image. The complete set of CollectionImages must
+// be requested separately, by referencing the identifier for this collection.
 struct CollectionInfo {
   CollectionInfo();
   CollectionInfo(const CollectionInfo&);
@@ -37,4 +37,31 @@
 bool operator==(const CollectionInfo& lhs, const CollectionInfo& rhs);
 bool operator!=(const CollectionInfo& lhs, const CollectionInfo& rhs);
 
+// Represents an image within a collection. The associated collection_id may be
+// used to get CollectionInfo.
+struct CollectionImage {
+  CollectionImage();
+  CollectionImage(const CollectionImage&);
+  CollectionImage(CollectionImage&&);
+  ~CollectionImage();
+
+  CollectionImage& operator=(const CollectionImage&);
+  CollectionImage& operator=(CollectionImage&&);
+
+  static CollectionImage CreateFromProto(std::string collection_id,
+                                         const ntp::background::Image& image);
+
+  // A unique identifier for the collection the image is in.
+  std::string collection_id;
+  // A unique identifier for the image.
+  uint64_t asset_id;
+  // The image URL.
+  GURL image_url;
+  // The attribution list for the image.
+  std::vector<std::string> attribution;
+};
+
+bool operator==(const CollectionImage& lhs, const CollectionImage& rhs);
+bool operator!=(const CollectionImage& lhs, const CollectionImage& rhs);
+
 #endif  // CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUND_DATA_H_
diff --git a/chrome/browser/search/background/ntp_background_service.cc b/chrome/browser/search/background/ntp_background_service.cc
index 844cd478..b9609ef 100644
--- a/chrome/browser/search/background/ntp_background_service.cc
+++ b/chrome/browser/search/background/ntp_background_service.cc
@@ -19,24 +19,31 @@
 constexpr char kProtoMimeType[] = "application/x-protobuf";
 
 // The url to download the proto of the complete list of wallpaper collections.
-constexpr char kBackdropCollectionsUrl[] =
+constexpr char kCollectionsUrl[] =
     "https://clients3.google.com/cast/chromecast/home/wallpaper/"
     "collections?rt=b";
-
+// The url to download the metadata of the images in a collection.
+constexpr char kCollectionImagesUrl[] =
+    "https://clients3.google.com/cast/chromecast/home/wallpaper/"
+    "collection-images?rt=b";
 }  // namespace
 
 NtpBackgroundService::NtpBackgroundService(
     scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
-    const base::Optional<GURL>& api_url_override)
+    const base::Optional<GURL>& collections_api_url_override,
+    const base::Optional<GURL>& collection_images_api_url_override)
     : url_loader_factory_(url_loader_factory) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-  api_url_ = api_url_override.value_or(GURL(kBackdropCollectionsUrl));
+  collections_api_url_ =
+      collections_api_url_override.value_or(GURL(kCollectionsUrl));
+  collection_images_api_url_ =
+      collection_images_api_url_override.value_or(GURL(kCollectionImagesUrl));
 }
 
 NtpBackgroundService::~NtpBackgroundService() = default;
 
 void NtpBackgroundService::FetchCollectionInfo() {
-  if (simple_loader_ != nullptr)
+  if (collections_loader_ != nullptr)
     return;
 
   net::NetworkTrafficAnnotationTag traffic_annotation =
@@ -76,14 +83,14 @@
   request.SerializeToString(&serialized_proto);
 
   auto resource_request = std::make_unique<network::ResourceRequest>();
-  resource_request->url = api_url_;
+  resource_request->url = collections_api_url_;
   resource_request->method = "POST";
   resource_request->load_flags = net::LOAD_DO_NOT_SEND_AUTH_DATA;
 
-  simple_loader_ = network::SimpleURLLoader::Create(std::move(resource_request),
-                                                    traffic_annotation);
-  simple_loader_->AttachStringForUpload(serialized_proto, kProtoMimeType);
-  simple_loader_->DownloadToString(
+  collections_loader_ = network::SimpleURLLoader::Create(
+      std::move(resource_request), traffic_annotation);
+  collections_loader_->AttachStringForUpload(serialized_proto, kProtoMimeType);
+  collections_loader_->DownloadToString(
       url_loader_factory_.get(),
       base::BindOnce(&NtpBackgroundService::OnCollectionInfoFetchComplete,
                      base::Unretained(this)),
@@ -95,14 +102,14 @@
   collection_info_.clear();
   // The loader will be deleted when the request is handled.
   std::unique_ptr<network::SimpleURLLoader> loader_deleter(
-      std::move(simple_loader_));
+      std::move(collections_loader_));
 
   if (!response_body) {
     // This represents network errors (i.e. the server did not provide a
     // response).
     DLOG(WARNING) << "Request failed with error: "
                   << loader_deleter->NetError();
-    NotifyObservers();
+    NotifyObservers(FetchComplete::COLLECTION_INFO);
     return;
   }
 
@@ -111,7 +118,7 @@
     DLOG(WARNING)
         << "Deserializing Backdrop wallpaper proto for collection info "
            "failed.";
-    NotifyObservers();
+    NotifyObservers(FetchComplete::COLLECTION_INFO);
     return;
   }
 
@@ -120,7 +127,97 @@
         CollectionInfo::CreateFromProto(collections_response.collections(i)));
   }
 
-  NotifyObservers();
+  NotifyObservers(FetchComplete::COLLECTION_INFO);
+}
+
+void NtpBackgroundService::FetchCollectionImageInfo(
+    const std::string& collection_id) {
+  if (image_info_loader_ != nullptr)
+    return;
+
+  net::NetworkTrafficAnnotationTag traffic_annotation =
+      net::DefineNetworkTrafficAnnotation("backdrop_collection_images_download",
+                                          R"(
+        semantics {
+          sender: "Desktop NTP Background Selector"
+          description:
+            "The Chrome Desktop New Tab Page background selector displays a "
+            "rich set of wallpapers for users to choose from. Each wallpaper "
+            "belongs to a collection (e.g. Arts, Landscape etc.). The list of "
+            "all available collections is obtained from the Backdrop wallpaper "
+            "service."
+          trigger:
+            "Clicking the the settings (gear) icon on the New Tab page."
+          data:
+            "The Backdrop protocol buffer messages. No user data is included."
+          destination: GOOGLE_OWNED_SERVICE
+        }
+        policy {
+          cookies_allowed: NO
+          setting:
+            "Users can control this feature by selecting a non-Google default "
+            "search engine in Chrome settings under 'Search Engine'."
+          chrome_policy {
+            DefaultSearchProviderEnabled {
+              policy_options {mode: MANDATORY}
+              DefaultSearchProviderEnabled: false
+            }
+          }
+        })");
+
+  requested_collection_id_ = collection_id;
+  ntp::background::GetImagesInCollectionRequest request;
+  request.set_collection_id(collection_id);
+  // The language field may include the country code (e.g. "en-US").
+  request.set_language(g_browser_process->GetApplicationLocale());
+  std::string serialized_proto;
+  request.SerializeToString(&serialized_proto);
+
+  auto resource_request = std::make_unique<network::ResourceRequest>();
+  resource_request->url = collection_images_api_url_;
+  resource_request->method = "POST";
+  resource_request->load_flags = net::LOAD_DO_NOT_SEND_AUTH_DATA;
+
+  image_info_loader_ = network::SimpleURLLoader::Create(
+      std::move(resource_request), traffic_annotation);
+  image_info_loader_->AttachStringForUpload(serialized_proto, kProtoMimeType);
+  image_info_loader_->DownloadToString(
+      url_loader_factory_.get(),
+      base::BindOnce(&NtpBackgroundService::OnCollectionImageInfoFetchComplete,
+                     base::Unretained(this)),
+      1024 * 1024);
+}
+
+void NtpBackgroundService::OnCollectionImageInfoFetchComplete(
+    std::unique_ptr<std::string> response_body) {
+  collection_images_.clear();
+  // The loader will be deleted when the request is handled.
+  std::unique_ptr<network::SimpleURLLoader> loader_deleter(
+      std::move(image_info_loader_));
+
+  if (!response_body) {
+    // This represents network errors (i.e. the server did not provide a
+    // response).
+    DLOG(WARNING) << "Request failed with error: "
+                  << loader_deleter->NetError();
+    NotifyObservers(FetchComplete::COLLECTION_IMAGE_INFO);
+    return;
+  }
+
+  ntp::background::GetImagesInCollectionResponse images_response;
+  if (!images_response.ParseFromString(*response_body)) {
+    DLOG(WARNING)
+        << "Deserializing Backdrop wallpaper proto for image info failed.";
+    NotifyObservers(FetchComplete::COLLECTION_IMAGE_INFO);
+    return;
+  }
+
+  for (int i = 0; i < images_response.images_size(); ++i) {
+    collection_images_.push_back(CollectionImage::CreateFromProto(
+        requested_collection_id_, images_response.images(i)));
+  }
+
+  NotifyObservers(FetchComplete::COLLECTION_IMAGE_INFO);
 }
 
 void NtpBackgroundService::AddObserver(NtpBackgroundServiceObserver* observer) {
@@ -132,12 +229,23 @@
   observers_.RemoveObserver(observer);
 }
 
-void NtpBackgroundService::NotifyObservers() {
+void NtpBackgroundService::NotifyObservers(FetchComplete fetch_complete) {
   for (auto& observer : observers_) {
-    observer.OnCollectionInfoAvailable();
+    switch (fetch_complete) {
+      case FetchComplete::COLLECTION_INFO:
+        observer.OnCollectionInfoAvailable();
+        break;
+      case FetchComplete::COLLECTION_IMAGE_INFO:
+        observer.OnCollectionImagesAvailable();
+        break;
+    }
   }
 }
 
-GURL NtpBackgroundService::GetLoadURLForTesting() const {
-  return api_url_;
+GURL NtpBackgroundService::GetCollectionsLoadURLForTesting() const {
+  return collections_api_url_;
+}
+
+GURL NtpBackgroundService::GetImagesURLForTesting() const {
+  return collection_images_api_url_;
 }
diff --git a/chrome/browser/search/background/ntp_background_service.h b/chrome/browser/search/background/ntp_background_service.h
index bbc7bba..3ba90541 100644
--- a/chrome/browser/search/background/ntp_background_service.h
+++ b/chrome/browser/search/background/ntp_background_service.h
@@ -28,43 +28,73 @@
  public:
   NtpBackgroundService(
       scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
-      const base::Optional<GURL>& api_url_override);
+      const base::Optional<GURL>& collections_api_url_override,
+      const base::Optional<GURL>& collection_images_api_url_override);
   ~NtpBackgroundService() override;
 
   // Requests an asynchronous fetch from the network. After the update
-  // completes, OnCollectionInfoUpdated will be called on the observers.
+  // completes, OnCollectionInfoAvailable will be called on the observers.
   void FetchCollectionInfo();
 
-  // Returns the currently cached CollectionInfo, if any.
-  const std::vector<CollectionInfo>& collection_info() const {
-    return collection_info_;
-  }
+  // Requests an asynchronous fetch of metadata about images in the specified
+  // collection. After the update completes, OnCollectionImagesAvailable will be
+  // called on the observers. Requests that are made while an asynchronous fetch
+  // is in progress will be dropped until the currently active loader completes.
+  void FetchCollectionImageInfo(const std::string& collection_id);
 
   // Add/remove observers. All observers must unregister themselves before the
   // NtpBackgroundService is destroyed.
   void AddObserver(NtpBackgroundServiceObserver* observer);
   void RemoveObserver(NtpBackgroundServiceObserver* observer);
 
-  GURL GetLoadURLForTesting() const;
+  // Returns the currently cached CollectionInfo, if any.
+  const std::vector<CollectionInfo>& collection_info() const {
+    return collection_info_;
+  }
+
+  // Returns the currently cached CollectionImages, if any.
+  const std::vector<CollectionImage>& collection_images() const {
+    return collection_images_;
+  }
+
+  GURL GetCollectionsLoadURLForTesting() const;
+  GURL GetImagesURLForTesting() const;
 
  private:
-  GURL api_url_;
+  GURL collections_api_url_;
+  GURL collection_images_api_url_;
 
   // Used to download the proto from the Backdrop service.
   scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
-  std::unique_ptr<network::SimpleURLLoader> simple_loader_;
+  std::unique_ptr<network::SimpleURLLoader> collections_loader_;
+  std::unique_ptr<network::SimpleURLLoader> image_info_loader_;
 
   base::ObserverList<NtpBackgroundServiceObserver, true> observers_;
 
   // Callback that processes the response from the FetchCollectionInfo request,
-  // refreshing the contents of collection_info_data_ with server-provided data.
+  // refreshing the contents of collection_info_ with server-provided data.
   void OnCollectionInfoFetchComplete(
       const std::unique_ptr<std::string> response_body);
 
-  void NotifyObservers();
+  // Callback that processes the response from the FetchCollectionImages
+  // request, refreshing the contents of collection_images_ with
+  // server-provided data.
+  void OnCollectionImageInfoFetchComplete(
+      const std::unique_ptr<std::string> response_body);
+
+  enum class FetchComplete {
+    // Indicates that asynchronous fetch of CollectionInfo has completed.
+    COLLECTION_INFO,
+    // Indicates that asynchronous fetch of CollectionImages has completed.
+    COLLECTION_IMAGE_INFO
+  };
+  void NotifyObservers(FetchComplete fetch_complete);
 
   std::vector<CollectionInfo> collection_info_;
 
+  std::vector<CollectionImage> collection_images_;
+  std::string requested_collection_id_;
+
   DISALLOW_COPY_AND_ASSIGN(NtpBackgroundService);
 };
 
diff --git a/chrome/browser/search/background/ntp_background_service_factory.cc b/chrome/browser/search/background/ntp_background_service_factory.cc
index 1d6aecc3..ac365ebb 100644
--- a/chrome/browser/search/background/ntp_background_service_factory.cc
+++ b/chrome/browser/search/background/ntp_background_service_factory.cc
@@ -42,15 +42,24 @@
     return nullptr;
   }
 
-  std::string api_url = base::GetFieldTrialParamValueByFeature(
+  std::string collections_api_url = base::GetFieldTrialParamValueByFeature(
       features::kNtpBackgrounds, "background-collections-api-url");
-  base::Optional<GURL> override_api_url;
-  if (!api_url.empty()) {
-    override_api_url = GURL(api_url);
+  std::string collection_images_api_url =
+      base::GetFieldTrialParamValueByFeature(
+          features::kNtpBackgrounds, "background-collection-images-api-url");
+  base::Optional<GURL> collection_api_url_override;
+  base::Optional<GURL> collection_images_api_url_override;
+  if (!collections_api_url.empty()) {
+    collection_api_url_override = GURL(collections_api_url);
+  }
+  if (!collection_images_api_url.empty()) {
+    collection_images_api_url_override = GURL(collection_images_api_url);
   }
 
   auto url_loader_factory =
       content::BrowserContext::GetDefaultStoragePartition(context)
           ->GetURLLoaderFactoryForBrowserProcess();
-  return new NtpBackgroundService(url_loader_factory, override_api_url);
+  return new NtpBackgroundService(url_loader_factory,
+                                  collection_api_url_override,
+                                  collection_images_api_url_override);
 }
diff --git a/chrome/browser/search/background/ntp_background_service_observer.h b/chrome/browser/search/background/ntp_background_service_observer.h
index 017a3a8..8c99c710 100644
--- a/chrome/browser/search/background/ntp_background_service_observer.h
+++ b/chrome/browser/search/background/ntp_background_service_observer.h
@@ -8,12 +8,19 @@
 // Observer for NtpBackgroundService.
 class NtpBackgroundServiceObserver {
  public:
-  // Called when the CollectionInfoData is updated, usually as the result of a
+  // Called when the CollectionInfo is updated, usually as the result of a
   // FetchCollectionInfo() call on the service. Note that this is called after
   // each FetchCollectionInfo(), even if the network request failed, or if it
   // didn't result in an actual change to the cached data. You can get the new
-  // data via NtpBackgroundService::collection_info_data().
+  // data via NtpBackgroundService::collection_info().
   virtual void OnCollectionInfoAvailable() = 0;
+
+  // Called when the CollectionImages are updated, usually as the result of a
+  // FetchCollectionImageInfo() call on the service. Note that this is called
+  // after each FetchCollectionImage(), even if the network request failed, or
+  // if it didn't result in an actual change to the cached data. You can get the
+  // new data via NtpBackgroundService::collection_images().
+  virtual void OnCollectionImagesAvailable() = 0;
 };
 
 #endif  // CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUND_SERVICE_OBSERVER_H_
diff --git a/chrome/browser/search/background/ntp_background_service_unittest.cc b/chrome/browser/search/background/ntp_background_service_unittest.cc
index 9bd7861..4e1ba3f 100644
--- a/chrome/browser/search/background/ntp_background_service_unittest.cc
+++ b/chrome/browser/search/background/ntp_background_service_unittest.cc
@@ -18,6 +18,8 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
+using testing::Eq;
+
 class NtpBackgroundServiceTest : public testing::Test {
  public:
   NtpBackgroundServiceTest()
@@ -32,20 +34,20 @@
     testing::Test::SetUp();
 
     service_ = std::make_unique<NtpBackgroundService>(
-        test_shared_loader_factory_, base::nullopt);
+        test_shared_loader_factory_, base::nullopt, base::nullopt);
   }
 
-  void SetUpResponseWithData(const std::string& response) {
+  void SetUpResponseWithData(const GURL& load_url,
+                             const std::string& response) {
     test_url_loader_factory_.SetInterceptor(base::BindLambdaForTesting(
         [&](const network::ResourceRequest& request) {}));
-    test_url_loader_factory_.AddResponse(
-        service_->GetLoadURLForTesting().spec(), response);
+    test_url_loader_factory_.AddResponse(load_url.spec(), response);
   }
 
-  void SetUpResponseWithNetworkError() {
+  void SetUpResponseWithNetworkError(const GURL& load_url) {
     test_url_loader_factory_.AddResponse(
-        service_->GetLoadURLForTesting(), network::ResourceResponseHead(),
-        std::string(), network::URLLoaderCompletionStatus(net::HTTP_NOT_FOUND));
+        load_url, network::ResourceResponseHead(), std::string(),
+        network::URLLoaderCompletionStatus(net::HTTP_NOT_FOUND));
   }
 
   NtpBackgroundService* service() { return service_.get(); }
@@ -61,27 +63,26 @@
 };
 
 TEST_F(NtpBackgroundServiceTest, CollectionInfoNetworkError) {
-  SetUpResponseWithNetworkError();
+  SetUpResponseWithNetworkError(service()->GetCollectionsLoadURLForTesting());
 
   ASSERT_TRUE(service()->collection_info().empty());
 
   base::RunLoop loop;
-  loop.QuitWhenIdle();
   service()->FetchCollectionInfo();
-  loop.Run();
+  loop.RunUntilIdle();
 
   ASSERT_TRUE(service()->collection_info().empty());
 }
 
 TEST_F(NtpBackgroundServiceTest, BadCollectionsResponse) {
-  SetUpResponseWithData("bad serialized GetCollectionsResponse");
+  SetUpResponseWithData(service()->GetCollectionsLoadURLForTesting(),
+                        "bad serialized GetCollectionsResponse");
 
   ASSERT_TRUE(service()->collection_info().empty());
 
   base::RunLoop loop;
-  loop.QuitWhenIdle();
   service()->FetchCollectionInfo();
-  loop.Run();
+  loop.RunUntilIdle();
 
   EXPECT_TRUE(service()->collection_info().empty());
 }
@@ -90,20 +91,20 @@
   ntp::background::Collection collection;
   collection.set_collection_id("shapes");
   collection.set_collection_name("Shapes");
-  collection.add_preview()->set_image_url("image url");
+  collection.add_preview()->set_image_url("https://wallpapers.co/some_image");
   ntp::background::GetCollectionsResponse response;
   *response.add_collections() = collection;
   std::string response_string;
   response.SerializeToString(&response_string);
 
-  SetUpResponseWithData(response_string);
+  SetUpResponseWithData(service()->GetCollectionsLoadURLForTesting(),
+                        response_string);
 
   ASSERT_TRUE(service()->collection_info().empty());
 
   base::RunLoop loop;
-  loop.QuitWhenIdle();
   service()->FetchCollectionInfo();
-  loop.Run();
+  loop.RunUntilIdle();
 
   CollectionInfo collection_info;
   collection_info.collection_id = collection.collection_id();
@@ -111,5 +112,109 @@
   collection_info.preview_image_url = GURL(collection.preview(0).image_url());
 
   EXPECT_FALSE(service()->collection_info().empty());
-  EXPECT_THAT(service()->collection_info().at(0), testing::Eq(collection_info));
+  EXPECT_THAT(service()->collection_info().at(0), Eq(collection_info));
+}
+
+TEST_F(NtpBackgroundServiceTest, CollectionImagesNetworkError) {
+  SetUpResponseWithNetworkError(service()->GetImagesURLForTesting());
+
+  ASSERT_TRUE(service()->collection_images().empty());
+
+  base::RunLoop loop;
+  service()->FetchCollectionImageInfo("shapes");
+  loop.RunUntilIdle();
+
+  ASSERT_TRUE(service()->collection_images().empty());
+}
+
+TEST_F(NtpBackgroundServiceTest, BadCollectionImagesResponse) {
+  SetUpResponseWithData(service()->GetImagesURLForTesting(),
+                        "bad serialized GetImagesInCollectionResponse");
+
+  ASSERT_TRUE(service()->collection_images().empty());
+
+  base::RunLoop loop;
+  service()->FetchCollectionImageInfo("shapes");
+  loop.RunUntilIdle();
+
+  EXPECT_TRUE(service()->collection_images().empty());
+}
+
+TEST_F(NtpBackgroundServiceTest, GoodCollectionImagesResponse) {
+  ntp::background::Image image;
+  image.set_asset_id(12345);
+  image.set_image_url("https://wallpapers.co/some_image");
+  image.add_attribution()->set_text("attribution text");
+  ntp::background::GetImagesInCollectionResponse response;
+  *response.add_images() = image;
+  std::string response_string;
+  response.SerializeToString(&response_string);
+
+  SetUpResponseWithData(service()->GetImagesURLForTesting(), response_string);
+
+  ASSERT_TRUE(service()->collection_images().empty());
+
+  base::RunLoop loop;
+  service()->FetchCollectionImageInfo("shapes");
+  loop.RunUntilIdle();
+
+  CollectionImage collection_image;
+  collection_image.collection_id = "shapes";
+  collection_image.asset_id = image.asset_id();
+  collection_image.image_url = GURL(image.image_url());
+  collection_image.attribution.push_back(image.attribution(0).text());
+
+  EXPECT_FALSE(service()->collection_images().empty());
+  EXPECT_THAT(service()->collection_images().at(0), Eq(collection_image));
+}
+
+TEST_F(NtpBackgroundServiceTest, MultipleRequests) {
+  ntp::background::Collection collection;
+  collection.set_collection_id("shapes");
+  collection.set_collection_name("Shapes");
+  collection.add_preview()->set_image_url("https://wallpapers.co/some_image");
+  ntp::background::GetCollectionsResponse collection_response;
+  *collection_response.add_collections() = collection;
+  std::string collection_response_string;
+  collection_response.SerializeToString(&collection_response_string);
+
+  ntp::background::Image image;
+  image.set_asset_id(12345);
+  image.set_image_url("https://wallpapers.co/some_image");
+  image.add_attribution()->set_text("attribution text");
+  ntp::background::GetImagesInCollectionResponse image_response;
+  *image_response.add_images() = image;
+  std::string image_response_string;
+  image_response.SerializeToString(&image_response_string);
+
+  SetUpResponseWithData(service()->GetCollectionsLoadURLForTesting(),
+                        collection_response_string);
+  SetUpResponseWithData(service()->GetImagesURLForTesting(),
+                        image_response_string);
+
+  ASSERT_TRUE(service()->collection_info().empty());
+  ASSERT_TRUE(service()->collection_images().empty());
+
+  base::RunLoop loop;
+  service()->FetchCollectionInfo();
+  service()->FetchCollectionImageInfo("shapes");
+  // Subsequent requests are ignored while the loader is in use.
+  service()->FetchCollectionImageInfo("colors");
+  loop.RunUntilIdle();
+
+  CollectionInfo collection_info;
+  collection_info.collection_id = collection.collection_id();
+  collection_info.collection_name = collection.collection_name();
+  collection_info.preview_image_url = GURL(collection.preview(0).image_url());
+
+  CollectionImage collection_image;
+  collection_image.collection_id = "shapes";
+  collection_image.asset_id = image.asset_id();
+  collection_image.image_url = GURL(image.image_url());
+  collection_image.attribution.push_back(image.attribution(0).text());
+
+  EXPECT_FALSE(service()->collection_info().empty());
+  EXPECT_THAT(service()->collection_info().at(0), Eq(collection_info));
+  EXPECT_FALSE(service()->collection_images().empty());
+  EXPECT_THAT(service()->collection_images().at(0), Eq(collection_image));
 }
diff --git a/chrome/browser/search/local_ntp_source.cc b/chrome/browser/search/local_ntp_source.cc
index 1422a6b..ddcd762 100644
--- a/chrome/browser/search/local_ntp_source.cc
+++ b/chrome/browser/search/local_ntp_source.cc
@@ -74,6 +74,7 @@
 const char kMainHtmlFilename[] = "local-ntp.html";
 const char kNtpBackgroundCollectionScriptFilename[] =
     "ntp-background-collections.js";
+const char kNtpBackgroundImageScriptFilename[] = "ntp-background-images.js";
 const char kOneGoogleBarScriptFilename[] = "one-google.js";
 const char kDoodleScriptFilename[] = "doodle.js";
 
@@ -94,6 +95,7 @@
     {"images/close_3_mask.png", IDR_CLOSE_3_MASK, "image/png"},
     {"images/ntp_default_favicon.png", IDR_NTP_DEFAULT_FAVICON, "image/png"},
     {kNtpBackgroundCollectionScriptFilename, kLocalResource, "text/javascript"},
+    {kNtpBackgroundImageScriptFilename, kLocalResource, "text/javascript"},
     {kOneGoogleBarScriptFilename, kLocalResource, "text/javascript"},
     {kDoodleScriptFilename, kLocalResource, "text/javascript"},
 };
@@ -220,10 +222,10 @@
 }
 
 base::Value ConvertCollectionInfoToDict(
-    const std::vector<CollectionInfo> collection_info_data) {
+    const std::vector<CollectionInfo>& collection_info) {
   base::Value collections(base::Value::Type::LIST);
-  collections.GetList().reserve(collection_info_data.size());
-  for (const CollectionInfo& collection : collection_info_data) {
+  collections.GetList().reserve(collection_info.size());
+  for (const CollectionInfo& collection : collection_info) {
     base::Value dict(base::Value::Type::DICTIONARY);
     dict.SetKey("collectionId", base::Value(collection.collection_id));
     dict.SetKey("collectionName", base::Value(collection.collection_name));
@@ -234,6 +236,23 @@
   return collections;
 }
 
+base::Value ConvertCollectionImageToDict(
+    const std::vector<CollectionImage>& collection_image) {
+  base::Value images(base::Value::Type::LIST);
+  images.GetList().reserve(collection_image.size());
+  for (const CollectionImage& image : collection_image) {
+    base::Value dict(base::Value::Type::DICTIONARY);
+    dict.SetKey("imageUrl", base::Value(image.image_url.spec()));
+    base::Value attributions(base::Value::Type::LIST);
+    for (const auto& attribution : image.attribution) {
+      attributions.GetList().push_back(base::Value(attribution));
+    }
+    dict.SetKey("attributions", std::move(attributions));
+    images.GetList().push_back(std::move(dict));
+  }
+  return images;
+}
+
 std::unique_ptr<base::DictionaryValue> ConvertOGBDataToDict(
     const OneGoogleBarData& og) {
   auto result = std::make_unique<base::DictionaryValue>();
@@ -568,11 +587,30 @@
       return;
     }
 
-    ntp_background_requests_.emplace_back(base::TimeTicks::Now(), callback);
+    ntp_background_collections_requests_.emplace_back(base::TimeTicks::Now(),
+                                                      callback);
     ntp_background_service_->FetchCollectionInfo();
     return;
   }
 
+  if (stripped_path == kNtpBackgroundImageScriptFilename) {
+    if (!ntp_background_service_) {
+      callback.Run(nullptr);
+      return;
+    }
+    std::string collection_id_param;
+    GURL path_url = GURL(chrome::kChromeSearchLocalNtpUrl).Resolve(path);
+    if (net::GetValueForKeyInQuery(path_url, "collection_id",
+                                   &collection_id_param)) {
+      ntp_background_image_info_requests_.emplace_back(base::TimeTicks::Now(),
+                                                       callback);
+      ntp_background_service_->FetchCollectionImageInfo(collection_id_param);
+    } else {
+      callback.Run(nullptr);
+    }
+    return;
+  }
+
   if (stripped_path == kOneGoogleBarScriptFilename) {
     if (!one_google_bar_service_) {
       callback.Run(nullptr);
@@ -695,7 +733,7 @@
 void LocalNtpSource::OnCollectionInfoAvailable() {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
-  if (ntp_background_requests_.empty())
+  if (ntp_background_collections_requests_.empty())
     return;
 
   scoped_refptr<base::RefCountedString> result;
@@ -707,7 +745,7 @@
   result = base::RefCountedString::TakeString(&js);
 
   base::TimeTicks now = base::TimeTicks::Now();
-  for (const auto& request : ntp_background_requests_) {
+  for (const auto& request : ntp_background_collections_requests_) {
     request.callback.Run(result);
     base::TimeDelta delta = now - request.start_time;
     UMA_HISTOGRAM_MEDIUM_TIMES(
@@ -723,7 +761,39 @@
           delta);
     }
   }
-  ntp_background_requests_.clear();
+  ntp_background_collections_requests_.clear();
+}
+
+void LocalNtpSource::OnCollectionImagesAvailable() {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+
+  if (ntp_background_image_info_requests_.empty())
+    return;
+
+  scoped_refptr<base::RefCountedString> result;
+  std::string js;
+  base::JSONWriter::Write(ConvertCollectionImageToDict(
+                              ntp_background_service_->collection_images()),
+                          &js);
+  js = "var coll_img = " + js + ";";
+  result = base::RefCountedString::TakeString(&js);
+
+  base::TimeTicks now = base::TimeTicks::Now();
+  for (const auto& request : ntp_background_image_info_requests_) {
+    request.callback.Run(result);
+    base::TimeDelta delta = now - request.start_time;
+    UMA_HISTOGRAM_MEDIUM_TIMES(
+        "NewTabPage.BackgroundService.Images.RequestLatency", delta);
+    // Any response where no images are returned is considered a failure.
+    if (ntp_background_service_->collection_images().empty()) {
+      UMA_HISTOGRAM_MEDIUM_TIMES(
+          "NewTabPage.BackgroundService.Images.RequestLatency.Failure", delta);
+    } else {
+      UMA_HISTOGRAM_MEDIUM_TIMES(
+          "NewTabPage.BackgroundService.Images.RequestLatency.Success", delta);
+    }
+  }
+  ntp_background_image_info_requests_.clear();
 }
 
 void LocalNtpSource::OnOneGoogleBarDataUpdated() {
diff --git a/chrome/browser/search/local_ntp_source.h b/chrome/browser/search/local_ntp_source.h
index 5fe6b67..1705666 100644
--- a/chrome/browser/search/local_ntp_source.h
+++ b/chrome/browser/search/local_ntp_source.h
@@ -89,6 +89,7 @@
 
   // Overridden from NtpBackgroundServiceObserver:
   void OnCollectionInfoAvailable() override;
+  void OnCollectionImagesAvailable() override;
 
   // Overridden from OneGoogleBarServiceObserver:
   void OnOneGoogleBarDataUpdated() override;
@@ -98,7 +99,8 @@
 
   Profile* const profile_;
 
-  std::vector<NtpBackgroundRequest> ntp_background_requests_;
+  std::vector<NtpBackgroundRequest> ntp_background_collections_requests_;
+  std::vector<NtpBackgroundRequest> ntp_background_image_info_requests_;
 
   NtpBackgroundService* ntp_background_service_;
 
diff --git a/chrome/browser/sync/test/integration/preferences_helper.cc b/chrome/browser/sync/test/integration/preferences_helper.cc
index 3b50d009..5c21f98 100644
--- a/chrome/browser/sync/test/integration/preferences_helper.cc
+++ b/chrome/browser/sync/test/integration/preferences_helper.cc
@@ -7,10 +7,14 @@
 #include <utility>
 
 #include "base/strings/stringprintf.h"
+#include "base/threading/thread_restrictions.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
+#include "chrome/common/chrome_constants.h"
+#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/prefs/persistent_pref_store.h"
 #include "components/prefs/pref_change_registrar.h"
 #include "components/prefs/pref_service.h"
 #include "components/prefs/scoped_user_pref_update.h"
@@ -27,6 +31,15 @@
   return test()->verifier()->GetPrefs();
 }
 
+user_prefs::PrefRegistrySyncable* GetRegistry(Profile* profile) {
+  // TODO(tschumann): Not sure what's the cleanest way to avoid this deprecated
+  // call is. Ideally we could use a servicification integration test.
+  // Another option would be to have a ForTest-only variant of
+  // KeyedServiceBaseFactory::GetAssociatedPrefRegistry().
+  return static_cast<user_prefs::PrefRegistrySyncable*>(
+      profile->GetPrefs()->DeprecatedGetPrefRegistry());
+}
+
 void ChangeBooleanPref(int index, const char* pref_name) {
   bool new_value = !GetPrefs(index)->GetBoolean(pref_name);
   GetPrefs(index)->SetBoolean(pref_name, new_value);
@@ -92,6 +105,26 @@
   }
 }
 
+scoped_refptr<PrefStore> BuildPrefStoreFromPrefsFile(Profile* profile) {
+  profile->GetPrefs()->CommitPendingWrite();
+  // Writes are scheduled on the IO thread. The JsonPrefStore requires all
+  // access (construction, Get, Set, ReadPrefs) to be made from the same thread.
+  // So instead of reading the file from the IO thread, we simply schedule a
+  // dummy task to avoid races with writing the file and reading it.
+  base::RunLoop run_loop;
+  profile->GetIOTaskRunner()->PostTask(FROM_HERE,
+                                       base::BindOnce(run_loop.QuitClosure()));
+  run_loop.Run();
+
+  auto pref_store = base::MakeRefCounted<JsonPrefStore>(
+      profile->GetPath().Append(chrome::kPreferencesFilename));
+  base::ScopedAllowBlockingForTesting allow_blocking;
+  if (pref_store->ReadPrefs() != PersistentPrefStore::PREF_READ_ERROR_NONE) {
+    ADD_FAILURE() << " Failed reading the prefs file into the store.";
+  }
+  return pref_store;
+}
+
 bool BooleanPrefMatches(const char* pref_name) {
   bool reference_value;
   if (test()->use_verifier()) {
diff --git a/chrome/browser/sync/test/integration/preferences_helper.h b/chrome/browser/sync/test/integration/preferences_helper.h
index e535464a..f2e971a 100644
--- a/chrome/browser/sync/test/integration/preferences_helper.h
+++ b/chrome/browser/sync/test/integration/preferences_helper.h
@@ -12,11 +12,18 @@
 #include <vector>
 
 #include "base/files/file_path.h"
+#include "base/memory/scoped_refptr.h"
 #include "base/values.h"
 #include "chrome/browser/sync/test/integration/status_change_checker.h"
+#include "components/prefs/json_pref_store.h"
 
 class PrefChangeRegistrar;
 class PrefService;
+class Profile;
+
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
 
 namespace preferences_helper {
 
@@ -26,6 +33,9 @@
 // Used to access the preferences within the verifier sync profile.
 PrefService* GetVerifierPrefs();
 
+// Provides access to the syncable pref registy of a profile.
+user_prefs::PrefRegistrySyncable* GetRegistry(Profile* profile);
+
 // Inverts the value of the boolean preference with name |pref_name| in the
 // profile with index |index|. Also inverts its value in |verifier| if
 // DisableVerifier() hasn't been called.
@@ -67,6 +77,10 @@
                     const char* pref_name,
                     const base::ListValue& new_value);
 
+// Reads preferences from a given profile's pref file (after flushing) and loads
+// them into a new created pref store.
+scoped_refptr<PrefStore> BuildPrefStoreFromPrefsFile(Profile* profile);
+
 // Used to verify that the boolean preference with name |pref_name| has the
 // same value across all profiles. Also checks |verifier| if DisableVerifier()
 // hasn't been called.
diff --git a/chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc
index 3834db9..1dab72f8f 100644
--- a/chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc
+++ b/chrome/browser/sync/test/integration/single_client_preferences_sync_test.cc
@@ -3,14 +3,26 @@
 // found in the LICENSE file.
 
 #include "base/macros.h"
+#include "base/values.h"
 #include "chrome/browser/sync/test/integration/preferences_helper.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/browser/sync/test/integration/updated_progress_marker_checker.h"
 #include "chrome/common/pref_names.h"
 #include "components/browser_sync/profile_sync_service.h"
+#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/prefs/json_pref_store.h"
+#include "components/prefs/pref_service.h"
+#include "testing/gmock/include/gmock/gmock.h"
 
 using preferences_helper::BooleanPrefMatches;
+using preferences_helper::BuildPrefStoreFromPrefsFile;
 using preferences_helper::ChangeBooleanPref;
+using preferences_helper::GetRegistry;
+using user_prefs::PrefRegistrySyncable;
+using testing::Eq;
+using testing::NotNull;
+
+namespace {
 
 class SingleClientPreferencesSyncTest : public SyncTest {
  public:
@@ -26,5 +38,57 @@
   ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage));
   ChangeBooleanPref(0, prefs::kHomePageIsNewTabPage);
   ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait());
-  ASSERT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage));
+  EXPECT_TRUE(BooleanPrefMatches(prefs::kHomePageIsNewTabPage));
 }
+
+// This test simply verifies that preferences registered after sync started
+// get properly synced.
+IN_PROC_BROWSER_TEST_F(SingleClientPreferencesSyncTest, LateRegistration) {
+  ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
+  PrefRegistrySyncable* registry = GetRegistry(GetProfile(0));
+  const std::string pref_name = "testing.my-test-preference";
+  registry->WhitelistLateRegistrationPrefForSync(pref_name);
+  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
+  registry->RegisterBooleanPref(
+      pref_name, true, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  // Verify the default is properly used.
+  EXPECT_TRUE(GetProfile(0)->GetPrefs()->GetBoolean(pref_name));
+  // Now make a change and verify it gets uploaded.
+  GetProfile(0)->GetPrefs()->SetBoolean(pref_name, false);
+  ASSERT_FALSE(GetProfile(0)->GetPrefs()->GetBoolean(pref_name));
+  EXPECT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait());
+
+  GetRegistry(verifier())
+      ->RegisterBooleanPref(pref_name, true,
+                            user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  EXPECT_FALSE(BooleanPrefMatches(pref_name.c_str()));
+}
+
+IN_PROC_BROWSER_TEST_F(SingleClientPreferencesSyncTest,
+                       ShouldRemoveBadDataWhenRegistering) {
+  // Populate the data store with data of type boolean but register as string.
+  SetPreexistingPreferencesFileContents(
+      0, "{\"testing\":{\"my-test-preference\":true}}");
+  ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
+  PrefRegistrySyncable* registry = GetRegistry(GetProfile(0));
+  registry->RegisterStringPref("testing.my-test-preference", "default-value",
+                               user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  const PrefService::Preference* preference =
+      GetProfile(0)->GetPrefs()->FindPreference("testing.my-test-preference");
+  ASSERT_THAT(preference, NotNull());
+  EXPECT_THAT(preference->GetType(), Eq(base::Value::Type::STRING));
+  EXPECT_THAT(preference->GetValue()->GetString(), Eq("default-value"));
+  // This might actually expose a bug: IsDefaultValue() is looking for the
+  // the store with highest priority which has a value for the preference's
+  // name. For this, no type checks are done, and hence this value is not
+  // recognized as a default value. --> file a bug!
+  EXPECT_TRUE(preference->IsDefaultValue());
+
+  // To verify the bad data has been removed, we read the JSON file from disk.
+  scoped_refptr<PrefStore> pref_store =
+      BuildPrefStoreFromPrefsFile(GetProfile(0));
+  const base::Value* result;
+  EXPECT_FALSE(pref_store->GetValue("testing.my-test-preference", &result));
+}
+
+}  // namespace
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index 9a8fa18..d0ba2b5 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -402,13 +402,24 @@
 }
 
 Profile* SyncTest::MakeTestProfile(base::FilePath profile_path, int index) {
-  if (!preexisting_preferences_file_contents_.empty()) {
+  const auto& preference_contents_it =
+      preexisting_preferences_file_contents_.find(index);
+  if (preference_contents_it != preexisting_preferences_file_contents_.end() &&
+      !preference_contents_it->second.empty()) {
+    // The profile directory might not exist yet (e.g. for the verifier_
+    // profile).
+    if (!base::PathExists(profile_path) &&
+        !base::CreateDirectory(profile_path)) {
+      LOG(FATAL) << "Could not create profile directory: " << profile_path;
+    }
     base::FilePath pref_path(profile_path.Append(chrome::kPreferencesFilename));
-    const char* contents = preexisting_preferences_file_contents_.c_str();
-    size_t contents_length = preexisting_preferences_file_contents_.size();
-    if (base::WriteFile(pref_path, contents, contents_length) !=
-        static_cast<int>(contents_length)) {
-      LOG(FATAL) << "Preexisting Preferences file could not be written.";
+    int write_result =
+        base::WriteFile(pref_path, preference_contents_it->second.c_str(),
+                        preference_contents_it->second.size());
+    if (write_result !=
+        static_cast<int>(preference_contents_it->second.size())) {
+      LOG(FATAL) << "Preexisting Preferences file could not be written to "
+                 << pref_path;
     }
   }
 
@@ -1184,8 +1195,9 @@
 }
 
 void SyncTest::SetPreexistingPreferencesFileContents(
+    int index,
     const std::string& contents) {
-  preexisting_preferences_file_contents_ = contents;
+  preexisting_preferences_file_contents_[index] = contents;
 }
 
 bool SyncTest::ClearServerData(ProfileSyncServiceHarness* harness) {
diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h
index 7ddacb2..ea88d953 100644
--- a/chrome/browser/sync/test/integration/sync_test.h
+++ b/chrome/browser/sync/test/integration/sync_test.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_
 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_SYNC_TEST_H_
 
+#include <map>
 #include <memory>
 #include <string>
 #include <vector>
@@ -274,9 +275,10 @@
   void DisableNotificationsImpl();
   void EnableNotificationsImpl();
 
-  // If non-empty, |contents| will be written to a profile's Preferences file
-  // before the Profile object is created.
-  void SetPreexistingPreferencesFileContents(const std::string& contents);
+  // If non-empty, |contents| will be written to the Preferences file of the
+  // profile at |index| before that Profile object is created.
+  void SetPreexistingPreferencesFileContents(int index,
+                                             const std::string& contents);
 
   // Helper to ProfileManager::CreateProfileAsync that creates a new profile
   // used for UI Signin. Blocks until profile is created.
@@ -310,8 +312,9 @@
                                     Profile* profile,
                                     Profile::CreateStatus status);
 
-  // Helper to Profile::CreateProfile that handles path creation. It creates
-  // a profile then registers it as a testing profile.
+  // Helper to Profile::CreateProfile that handles path creation, setting up
+  // preexisting pref files, and registering the created profile  as a testing
+  // profile.
   Profile* MakeTestProfile(base::FilePath profile_path, int index);
 
   // Helper method used to create a Gaia account at runtime.
@@ -468,7 +471,8 @@
 
   // The contents to be written to a profile's Preferences file before the
   // Profile object is created. If empty, no preexisting file will be written.
-  std::string preexisting_preferences_file_contents_;
+  // The map key corresponds to the profile's index.
+  std::map<int, std::string> preexisting_preferences_file_contents_;
 
   // Disable extension install verification.
   extensions::ScopedInstallVerifierBypassForTest ignore_install_verification_;
diff --git a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
index 24319b5d..f11b2b5 100644
--- a/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
+++ b/chrome/browser/sync/test/integration/two_client_preferences_sync_test.cc
@@ -12,14 +12,20 @@
 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
 #include "chrome/browser/sync/test/integration/sync_test.h"
 #include "chrome/common/pref_names.h"
+#include "components/pref_registry/pref_registry_syncable.h"
 #include "components/prefs/pref_service.h"
+#include "testing/gmock/include/gmock/gmock.h"
 
 using preferences_helper::BooleanPrefMatches;
+using preferences_helper::BuildPrefStoreFromPrefsFile;
 using preferences_helper::ChangeBooleanPref;
 using preferences_helper::ChangeIntegerPref;
 using preferences_helper::ChangeListPref;
 using preferences_helper::ChangeStringPref;
 using preferences_helper::GetPrefs;
+using preferences_helper::GetRegistry;
+using testing::Eq;
+using user_prefs::PrefRegistrySyncable;
 
 class TwoClientPreferencesSyncTest : public SyncTest {
  public:
@@ -32,7 +38,7 @@
   DISALLOW_COPY_AND_ASSIGN(TwoClientPreferencesSyncTest);
 };
 
-IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ONLY(Sanity)) {
+IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTest, E2E_ENABLED(Sanity)) {
   DisableVerifier();
   ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
   ASSERT_TRUE(StringPrefMatchChecker(prefs::kHomePage).Wait());
@@ -144,3 +150,98 @@
   ChangeBooleanPref(0, prefs::kShowHomeButton);
   ASSERT_TRUE(BooleanPrefMatchChecker(prefs::kShowHomeButton).Wait());
 }
+
+// The following tests use lower-level mechanisms to wait for sync cycle
+// completions. Those only work reliably with self notifications turned on.
+class TwoClientPreferencesSyncTestWithSelfNotifications : public SyncTest {
+ public:
+  TwoClientPreferencesSyncTestWithSelfNotifications() : SyncTest(TWO_CLIENT) {}
+  ~TwoClientPreferencesSyncTestWithSelfNotifications() override {}
+
+  void SetUp() override {
+    // If verifiers are enabled, ChangeBooleanPref() and similar methods will
+    // apply changes to both the specified client and the verifier profile.
+    // These tests should only apply changes in one client.
+    DisableVerifier();
+    SyncTest::SetUp();
+  }
+
+  bool TestUsesSelfNotifications() override { return true; }
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(TwoClientPreferencesSyncTestWithSelfNotifications);
+};
+
+// Tests that late registered prefs are kept in sync with other clients.
+IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
+                       E2E_ENABLED(LateRegisteredPrefsShouldSync)) {
+  // client0 has the pref registered before sync and is modifying a pref before
+  // that pref got registered with client1 (but after client1 started syncing).
+  ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
+
+  constexpr char pref_name[] = "testing.my-test-preference";
+  GetRegistry(GetProfile(0))
+      ->RegisterBooleanPref(pref_name, false,
+                            user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  GetRegistry(GetProfile(1))
+      ->WhitelistLateRegistrationPrefForSync("testing.my-test-preference");
+
+  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
+
+  ASSERT_THAT(GetPrefs(0)->GetBoolean(pref_name), Eq(false));
+  ChangeBooleanPref(0, pref_name);
+  ASSERT_THAT(GetPrefs(0)->GetBoolean(pref_name), Eq(true));
+  GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1));
+
+  // Now register the pref and verify it's up-to-date.
+  GetRegistry(GetProfile(1))
+      ->RegisterBooleanPref(pref_name, false,
+                            user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  EXPECT_THAT(GetPrefs(1)->GetBoolean(pref_name), Eq(true));
+
+  // Make sure that subsequent changes are synced.
+  ChangeBooleanPref(0, pref_name);
+  ASSERT_THAT(GetPrefs(0)->GetBoolean(pref_name), Eq(false));
+  EXPECT_TRUE(BooleanPrefMatchChecker(pref_name).Wait());
+  EXPECT_THAT(GetPrefs(1)->GetBoolean(pref_name), Eq(false));
+
+  // Make sure that subsequent changes are synced.
+  ChangeBooleanPref(1, pref_name);
+  ASSERT_THAT(GetPrefs(1)->GetBoolean(pref_name), Eq(true));
+  EXPECT_TRUE(BooleanPrefMatchChecker(pref_name).Wait());
+  EXPECT_THAT(GetPrefs(0)->GetBoolean(pref_name), Eq(true));
+}
+
+IN_PROC_BROWSER_TEST_F(TwoClientPreferencesSyncTestWithSelfNotifications,
+                       E2E_ENABLED(ShouldKeepLocalDataOnTypeMismatch)) {
+  // Client 1 has type-conflicting data in it's pref file. Verify that incoming
+  // values from sync of other type do not modify the local state.
+  SetPreexistingPreferencesFileContents(
+      1, "{\"testing\":{\"my-test-preference\": \"some-string\"}}");
+  ASSERT_TRUE(SetupClients()) << "SetupClients() failed.";
+
+  constexpr char pref_name[] = "testing.my-test-preference";
+  GetRegistry(GetProfile(0))
+      ->RegisterBooleanPref(pref_name, false,
+                            user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  GetRegistry(GetProfile(1))
+      ->WhitelistLateRegistrationPrefForSync("testing.my-test-preference");
+  ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
+
+  ChangeBooleanPref(0, pref_name);
+  ASSERT_THAT(GetPrefs(0)->GetBoolean(pref_name), Eq(true));
+  GetClient(0)->AwaitMutualSyncCycleCompletion(GetClient(1));
+
+  // Verify the value got not stored at client1 (because of type mismatch).
+  scoped_refptr<PrefStore> pref_store =
+      BuildPrefStoreFromPrefsFile(GetProfile(1));
+  const base::Value* result;
+  ASSERT_TRUE(pref_store->GetValue("testing.my-test-preference", &result));
+  EXPECT_THAT(result->GetString(), Eq("some-string"));
+
+  // Verify reads at client1 get served the default value.
+  GetRegistry(GetProfile(1))
+      ->RegisterBooleanPref(pref_name, false,
+                            user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  EXPECT_THAT(GetPrefs(1)->GetBoolean(pref_name), Eq(false));
+}
diff --git a/chrome/browser/ui/app_list/crostini/crostini_app_context_menu.cc b/chrome/browser/ui/app_list/crostini/crostini_app_context_menu.cc
index 24f6427..35af9d8e 100644
--- a/chrome/browser/ui/app_list/crostini/crostini_app_context_menu.cc
+++ b/chrome/browser/ui/app_list/crostini/crostini_app_context_menu.cc
@@ -43,7 +43,7 @@
   switch (command_id) {
     case UNINSTALL:
       if (app_id() == kCrostiniTerminalId) {
-        ShowCrostiniUninstallerView(profile());
+        ShowCrostiniUninstallerView(profile(), CrostiniUISurface::kAppList);
         return;
       }
       break;
diff --git a/chrome/browser/ui/app_list/crostini/crostini_app_model_builder.cc b/chrome/browser/ui/app_list/crostini/crostini_app_model_builder.cc
index cd9517b..b4ec52f 100644
--- a/chrome/browser/ui/app_list/crostini/crostini_app_model_builder.cc
+++ b/chrome/browser/ui/app_list/crostini/crostini_app_model_builder.cc
@@ -49,16 +49,13 @@
     // becomes enabled.
     return;
   }
-  std::unique_ptr<crostini::CrostiniRegistryService::Registration>
-      registration = registry_service->GetRegistration(app_id);
-  DCHECK(registration);
-  if (registration->no_display)
+  crostini::CrostiniRegistryService::Registration registration =
+      *registry_service->GetRegistration(app_id);
+  if (registration.NoDisplay())
     return;
-  const std::string& localized_name =
-      crostini::CrostiniRegistryService::Registration::Localize(
-          registration->name);
-  InsertApp(std::make_unique<CrostiniAppItem>(
-      profile(), model_updater(), GetSyncItem(app_id), app_id, localized_name));
+  InsertApp(std::make_unique<CrostiniAppItem>(profile(), model_updater(),
+                                              GetSyncItem(app_id), app_id,
+                                              registration.Name()));
 }
 
 void CrostiniAppModelBuilder::OnRegistryUpdated(
diff --git a/chrome/browser/ui/app_list/search/app_search_provider.cc b/chrome/browser/ui/app_list/search/app_search_provider.cc
index c97f6597..b32281c 100644
--- a/chrome/browser/ui/app_list/search/app_search_provider.cc
+++ b/chrome/browser/ui/app_list/search/app_search_provider.cc
@@ -387,18 +387,15 @@
     crostini::CrostiniRegistryService* registry_service =
         crostini::CrostiniRegistryServiceFactory::GetForProfile(profile());
     for (const std::string& app_id : registry_service->GetRegisteredAppIds()) {
-      std::unique_ptr<crostini::CrostiniRegistryService::Registration>
-          registration = registry_service->GetRegistration(app_id);
-      if (registration->no_display)
+      crostini::CrostiniRegistryService::Registration registration =
+          *registry_service->GetRegistration(app_id);
+      if (registration.NoDisplay())
         continue;
-      const std::string& name =
-          crostini::CrostiniRegistryService::Registration::Localize(
-              registration->name);
       // Eventually it would be nice to use additional data points, for example
       // the 'Keywords' desktop entry field and the executable file name.
       apps->emplace_back(std::make_unique<AppSearchProvider::App>(
-          this, app_id, name, registration->last_launch_time,
-          registration->install_time));
+          this, app_id, registration.Name(), registration.LastLaunchTime(),
+          registration.InstallTime()));
 
       // Until it's been installed, the Terminal is hidden unless you search
       // for 'Terminal' exactly (case insensitive).
diff --git a/chrome/browser/ui/ash/chrome_keyboard_ui.cc b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
index 9e748a3..d361ec3c 100644
--- a/chrome/browser/ui/ash/chrome_keyboard_ui.cc
+++ b/chrome/browser/ui/ash/chrome_keyboard_ui.cc
@@ -540,3 +540,9 @@
   int render_view_id = render_view_host->GetRoutingID();
   zoom_map->SetTemporaryZoomLevel(render_process_id, render_view_id, 0);
 }
+
+void ChromeKeyboardUI::DidFinishLoad(
+    content::RenderFrameHost* render_frame_host,
+    const GURL& validated_url) {
+  keyboard_controller()->NotifyContentsLoaded();
+}
diff --git a/chrome/browser/ui/ash/chrome_keyboard_ui.h b/chrome/browser/ui/ash/chrome_keyboard_ui.h
index f62ed4b3..e922dc2 100644
--- a/chrome/browser/ui/ash/chrome_keyboard_ui.h
+++ b/chrome/browser/ui/ash/chrome_keyboard_ui.h
@@ -117,6 +117,8 @@
 
   // content::WebContentsObserver overrides
   void RenderViewCreated(content::RenderViewHost* render_view_host) override;
+  void DidFinishLoad(content::RenderFrameHost* render_frame_host,
+                     const GURL& validated_url) override;
 
   // The BrowserContext to use for creating the WebContents hosting the
   // keyboard.
diff --git a/chrome/browser/ui/ash/keyboard_controller_browsertest.cc b/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
index e783398..730efa7 100644
--- a/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
+++ b/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
@@ -62,6 +62,8 @@
     // Mock window.resizeTo that is expected to be called after navigate to a
     // new virtual keyboard.
     ui()->GetContentsWindow()->SetBounds(init_bounds);
+    // Mock KeyboardUI notifying KeyboardController that the contents loaded.
+    keyboard::KeyboardController::GetInstance()->NotifyContentsLoaded();
   }
 
   void FocusNonEditableNode() {
@@ -180,6 +182,7 @@
       keyboard::KeyboardController::GetInstance();
   controller->ShowKeyboard(true);
   controller->ui()->GetContentsWindow()->SetBounds(test_bounds);
+  controller->NotifyContentsLoaded();
   gfx::Rect keyboard_bounds = controller->GetContainerWindow()->bounds();
   // Starts overscroll.
   controller->NotifyContentsBoundsChanging(keyboard_bounds);
diff --git a/chrome/browser/ui/ash/launcher/crostini_shelf_context_menu.cc b/chrome/browser/ui/ash/launcher/crostini_shelf_context_menu.cc
index c1a11e0..641c9a5 100644
--- a/chrome/browser/ui/ash/launcher/crostini_shelf_context_menu.cc
+++ b/chrome/browser/ui/ash/launcher/crostini_shelf_context_menu.cc
@@ -33,8 +33,8 @@
   const crostini::CrostiniRegistryService* registry_service =
       crostini::CrostiniRegistryServiceFactory::GetForProfile(
           controller()->profile());
-  std::unique_ptr<crostini::CrostiniRegistryService::Registration>
-      registration = registry_service->GetRegistration(item().id.app_id);
+  base::Optional<crostini::CrostiniRegistryService::Registration> registration =
+      registry_service->GetRegistration(item().id.app_id);
   if (registration)
     AddPinMenu(menu_model);
 
diff --git a/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc b/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
index 02620367a..a376eb8 100644
--- a/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
+++ b/chrome/browser/ui/ash/launcher/launcher_controller_helper.cc
@@ -128,11 +128,11 @@
   crostini::CrostiniRegistryService* registry_service =
       crostini::CrostiniRegistryServiceFactory::GetForProfile(profile);
   if (registry_service && registry_service->IsCrostiniShelfAppId(app_id)) {
-    std::unique_ptr<crostini::CrostiniRegistryService::Registration>
+    base::Optional<crostini::CrostiniRegistryService::Registration>
         registration = registry_service->GetRegistration(app_id);
     if (!registration)
       return base::string16();
-    return base::UTF8ToUTF16(registration->Localize(registration->name));
+    return base::UTF8ToUTF16(registration->Name());
   }
 
   const extensions::Extension* extension = GetExtensionByID(profile, app_id);
@@ -173,7 +173,7 @@
   crostini::CrostiniRegistryService* registry_service =
       crostini::CrostiniRegistryServiceFactory::GetForProfile(profile_);
   if (registry_service && registry_service->IsCrostiniShelfAppId(id))
-    return registry_service->GetRegistration(id) != nullptr;
+    return registry_service->GetRegistration(id).has_value();
 
   if (app_list::IsInternalApp(id))
     return true;
diff --git a/chrome/browser/ui/ash/tablet_mode_page_behavior_browsertest.cc b/chrome/browser/ui/ash/tablet_mode_page_behavior_browsertest.cc
index 6a8e81e..c8abfea 100644
--- a/chrome/browser/ui/ash/tablet_mode_page_behavior_browsertest.cc
+++ b/chrome/browser/ui/ash/tablet_mode_page_behavior_browsertest.cc
@@ -11,6 +11,7 @@
 #include "chrome/common/url_constants.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host.h"
 #include "content/public/browser/web_contents.h"
 #include "content/public/common/web_preferences.h"
 #include "content/public/test/browser_test_utils.h"
@@ -48,9 +49,13 @@
     return web_contents->GetRenderViewHost()->GetWebkitPreferences();
   }
 
-  void ValidateWebPrefs(const content::WebPreferences& web_prefs,
+  void ValidateWebPrefs(const content::WebContents* web_contents,
                         bool tablet_mode_enabled) const {
+    const content::WebPreferences web_prefs =
+        GetWebKitPreferences(web_contents);
     if (tablet_mode_enabled) {
+      EXPECT_TRUE(web_prefs.double_tap_to_zoom_enabled);
+      EXPECT_TRUE(web_prefs.text_autosizing_enabled);
       EXPECT_TRUE(web_prefs.viewport_enabled);
       EXPECT_TRUE(web_prefs.viewport_meta_enabled);
       EXPECT_TRUE(web_prefs.shrinks_viewport_contents_to_fit);
@@ -59,6 +64,8 @@
       EXPECT_FLOAT_EQ(web_prefs.default_minimum_page_scale_factor, 0.25f);
       EXPECT_FLOAT_EQ(web_prefs.default_maximum_page_scale_factor, 5.0f);
     } else {
+      EXPECT_FALSE(web_prefs.double_tap_to_zoom_enabled);
+      EXPECT_FALSE(web_prefs.text_autosizing_enabled);
       EXPECT_FALSE(web_prefs.viewport_enabled);
       EXPECT_FALSE(web_prefs.viewport_meta_enabled);
       EXPECT_FALSE(web_prefs.shrinks_viewport_contents_to_fit);
@@ -82,30 +89,25 @@
 
   // Validate that before tablet mode is enabled, mobile-behavior-related prefs
   // are disabled.
-  ValidateWebPrefs(GetWebKitPreferences(web_contents),
-                   false /* tablet_mode_enabled */);
+  ValidateWebPrefs(web_contents, false /* tablet_mode_enabled */);
 
   // Now enable tablet mode, and expect that the same page's web prefs get
   // updated.
   ToggleTabletMode();
   ASSERT_TRUE(GetTabletModeEnabled());
-  ValidateWebPrefs(GetWebKitPreferences(web_contents),
-                   true /* tablet_mode_enabled */);
+  ValidateWebPrefs(web_contents, true /* tablet_mode_enabled */);
 
   // Any newly added pages should have the correct tablet mode prefs.
   Browser* browser_2 = CreateBrowser(browser()->profile());
   auto* web_contents_2 = GetActiveWebContents(browser_2);
   ASSERT_TRUE(web_contents_2);
-  ValidateWebPrefs(GetWebKitPreferences(web_contents_2),
-                   true /* tablet_mode_enabled */);
+  ValidateWebPrefs(web_contents_2, true /* tablet_mode_enabled */);
 
   // Disable tablet mode and expect both pages's prefs are updated.
   ToggleTabletMode();
   ASSERT_FALSE(GetTabletModeEnabled());
-  ValidateWebPrefs(GetWebKitPreferences(web_contents),
-                   false /* tablet_mode_enabled */);
-  ValidateWebPrefs(GetWebKitPreferences(web_contents_2),
-                   false /* tablet_mode_enabled */);
+  ValidateWebPrefs(web_contents, false /* tablet_mode_enabled */);
+  ValidateWebPrefs(web_contents_2, false /* tablet_mode_enabled */);
 }
 
 IN_PROC_BROWSER_TEST_F(TabletModePageBehaviorTest, ExcludeInternalPages) {
@@ -122,8 +124,7 @@
   // remain unaffected as if tablet mode is off.
   ToggleTabletMode();
   ASSERT_TRUE(GetTabletModeEnabled());
-  ValidateWebPrefs(GetWebKitPreferences(web_contents),
-                   false /* tablet_mode_enabled */);
+  ValidateWebPrefs(web_contents, false /* tablet_mode_enabled */);
 }
 
 IN_PROC_BROWSER_TEST_F(TabletModePageBehaviorTest, ExcludeHostedApps) {
@@ -145,8 +146,7 @@
   // app remain unaffected as if tablet mode is off.
   ToggleTabletMode();
   ASSERT_TRUE(GetTabletModeEnabled());
-  ValidateWebPrefs(GetWebKitPreferences(web_contents),
-                   false /* tablet_mode_enabled */);
+  ValidateWebPrefs(web_contents, false /* tablet_mode_enabled */);
 }
 
 IN_PROC_BROWSER_TEST_F(TabletModePageBehaviorTest, ExcludeNTPs) {
@@ -161,8 +161,7 @@
   // NTPs should not be affected in tablet mode.
   ToggleTabletMode();
   ASSERT_TRUE(GetTabletModeEnabled());
-  ValidateWebPrefs(GetWebKitPreferences(web_contents),
-                   false /* tablet_mode_enabled */);
+  ValidateWebPrefs(web_contents, false /* tablet_mode_enabled */);
 }
 
 }  // namespace
diff --git a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
index 17fd7461..53b1209e3 100644
--- a/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
+++ b/chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc
@@ -331,8 +331,16 @@
   // - they can be requested for many tabs at the same time
   // and therefore auto-dismissal is inappropriate for them.
 
-  return AppModalDialogManager()->RunBeforeUnloadDialog(
-      web_contents, render_frame_host, is_reload, std::move(callback));
+  bool browser_is_app = false;
+#if !defined(OS_ANDROID)
+  Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
+  if (browser) {
+    browser_is_app = browser->is_app();
+  }
+#endif
+  return AppModalDialogManager()->RunBeforeUnloadDialogWithOptions(
+      web_contents, render_frame_host, is_reload, browser_is_app,
+      std::move(callback));
 }
 
 bool JavaScriptDialogTabHelper::HandleJavaScriptDialog(
diff --git a/chrome/browser/ui/views/crostini/crostini_installer_view.cc b/chrome/browser/ui/views/crostini/crostini_installer_view.cc
index c2ea12a..6a0fc52 100644
--- a/chrome/browser/ui/views/crostini/crostini_installer_view.cc
+++ b/chrome/browser/ui/views/crostini/crostini_installer_view.cc
@@ -42,10 +42,13 @@
 constexpr int kDownloadSizeInBytes = 300 * 1024 * 1024;
 
 constexpr char kCrostiniSetupResultHistogram[] = "Crostini.SetupResult";
+constexpr char kCrostiniSetupSourceHistogram[] = "Crostini.SetupSource";
 
 }  // namespace
 
-void ShowCrostiniInstallerView(Profile* profile) {
+void ShowCrostiniInstallerView(Profile* profile, CrostiniUISurface ui_surface) {
+  base::UmaHistogramEnumeration(kCrostiniSetupSourceHistogram, ui_surface,
+                                CrostiniUISurface::kCount);
   return CrostiniInstallerView::Show(profile);
 }
 
diff --git a/chrome/browser/ui/views/crostini/crostini_uninstaller_view.cc b/chrome/browser/ui/views/crostini/crostini_uninstaller_view.cc
index 9b601bc..e7cf046 100644
--- a/chrome/browser/ui/views/crostini/crostini_uninstaller_view.cc
+++ b/chrome/browser/ui/views/crostini/crostini_uninstaller_view.cc
@@ -27,6 +27,7 @@
 CrostiniUninstallerView* g_crostini_uninstaller_view = nullptr;
 
 constexpr char kCrostiniUninstallResultHistogram[] = "Crostini.UninstallResult";
+constexpr char kCrostiniUninstallSourceHistogram[] = "Crostini.UninstallSource";
 
 }  // namespace
 
@@ -39,7 +40,10 @@
   kCount
 };
 
-void ShowCrostiniUninstallerView(Profile* profile) {
+void ShowCrostiniUninstallerView(Profile* profile,
+                                 CrostiniUISurface ui_surface) {
+  base::UmaHistogramEnumeration(kCrostiniUninstallSourceHistogram, ui_surface,
+                                CrostiniUISurface::kCount);
   return CrostiniUninstallerView::Show(profile);
 }
 
diff --git a/chrome/browser/ui/views/frame/browser_frame_ash_browsertest.cc b/chrome/browser/ui/views/frame/browser_frame_ash_browsertest.cc
index cf54050..cfc1d94 100644
--- a/chrome/browser/ui/views/frame/browser_frame_ash_browsertest.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_ash_browsertest.cc
@@ -48,11 +48,12 @@
   DISALLOW_COPY_AND_ASSIGN(WidgetBoundsWatcher);
 };
 
+// Tests both BrowserFrameAsh and BrowserFrameMus.
 class BrowserTestParam : public InProcessBrowserTest,
                          public testing::WithParamInterface<bool> {
  public:
-  BrowserTestParam() {}
-  ~BrowserTestParam() {}
+  BrowserTestParam() = default;
+  ~BrowserTestParam() override = default;
 
   bool CreateV1App() { return GetParam(); }
 
diff --git a/chrome/browser/ui/views/frame/browser_frame_mus.cc b/chrome/browser/ui/views/frame/browser_frame_mus.cc
index f246d5c..9ae16f3a 100644
--- a/chrome/browser/ui/views/frame/browser_frame_mus.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_mus.cc
@@ -8,6 +8,7 @@
 
 #include <memory>
 
+#include "chrome/browser/ui/browser_window_state.h"
 #include "chrome/browser/ui/views/frame/browser_frame.h"
 #include "chrome/browser/ui/views/frame/browser_view.h"
 #include "chrome/common/extensions/extension_constants.h"
@@ -36,6 +37,8 @@
     : views::DesktopNativeWidgetAura(browser_frame),
       browser_frame_(browser_frame),
       browser_view_(browser_view) {
+  DCHECK(browser_frame_);
+  DCHECK(browser_view_);
 #if defined(OS_CHROMEOS)
   // Not used with Mus on Chrome OS.
   DCHECK_EQ(chromeos::GetAshConfig(), ash::Config::MASH);
@@ -48,7 +51,8 @@
   views::Widget::InitParams params;
   params.name = "BrowserFrame";
   params.native_widget = this;
-  params.bounds = gfx::Rect(10, 10, 640, 480);
+  chrome::GetSavedWindowBoundsAndShowState(browser_view_->browser(),
+                                           &params.bounds, &params.show_state);
   params.delegate = browser_view_;
   std::map<std::string, std::vector<uint8_t>> properties =
       views::MusClient::ConfigurePropertiesFromParams(params);
diff --git a/chrome/browser/ui/views/frame/browser_frame_mus.h b/chrome/browser/ui/views/frame/browser_frame_mus.h
index f6a2cb2f..e8bbe53 100644
--- a/chrome/browser/ui/views/frame/browser_frame_mus.h
+++ b/chrome/browser/ui/views/frame/browser_frame_mus.h
@@ -12,8 +12,11 @@
 class BrowserFrame;
 class BrowserView;
 
-class BrowserFrameMus : public NativeBrowserFrame,
-                        public views::DesktopNativeWidgetAura {
+// Used with mash on Chrome OS.
+// TODO(jamescook): Rename to BrowserFrameMash. Linux Ozone used to use this
+// frame but doesn't any more.
+class BrowserFrameMus : public views::DesktopNativeWidgetAura,
+                        public NativeBrowserFrame {
  public:
   BrowserFrameMus(BrowserFrame* browser_frame, BrowserView* browser_view);
   ~BrowserFrameMus() override;
diff --git a/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.cc b/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.cc
index 0e684ae1..65ceedb 100644
--- a/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.cc
+++ b/chrome/browser/ui/views/media_router/media_router_dialog_controller_views.cc
@@ -5,6 +5,7 @@
 #include "chrome/browser/ui/views/media_router/media_router_dialog_controller_views.h"
 
 #include "base/feature_list.h"
+#include "build/build_config.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h"
 #include "chrome/browser/ui/toolbar/media_router_action.h"
@@ -13,17 +14,37 @@
 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
 #include "chrome/browser/ui/webui/media_router/media_router_dialog_controller_webui_impl.h"
 #include "chrome/common/chrome_features.h"
+#include "ui/base/ui_base_features.h"
 
 DEFINE_WEB_CONTENTS_USER_DATA_KEY(
     media_router::MediaRouterDialogControllerViews);
 
 namespace media_router {
 
+namespace {
+
+// Returns true if the Views implementation of the Cast dialog should be used.
+// Returns false if the WebUI implementation should be used.
+bool ShouldUseViewsDialog() {
+#if defined(OS_MACOSX)
+#if BUILDFLAG(MAC_VIEWS_BROWSER)
+  return base::FeatureList::IsEnabled(features::kViewsCastDialog) &&
+         !features::IsViewsBrowserCocoa();
+#else  // !BUILDFLAG(MAC_VIEWS_BROWSER)
+  return false;
+#endif
+#else  // !defined(OS_MACOSX)
+  return base::FeatureList::IsEnabled(features::kViewsCastDialog);
+#endif
+}
+
+}  // namespace
+
 // static
 MediaRouterDialogControllerImplBase*
 MediaRouterDialogControllerImplBase::GetOrCreateForWebContents(
     content::WebContents* web_contents) {
-  if (base::FeatureList::IsEnabled(features::kViewsCastDialog)) {
+  if (ShouldUseViewsDialog()) {
     return MediaRouterDialogControllerViews::GetOrCreateForWebContents(
         web_contents);
   } else {
diff --git a/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.cc
index 780e746..0009574 100644
--- a/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.cc
@@ -121,11 +121,6 @@
   builder->Add("arcOverlayLoading", IDS_ARC_POPUP_HELP_LOADING);
 }
 
-void ArcTermsOfServiceScreenHandler::SendArcManagedStatus(Profile* profile) {
-  CallJS("setArcManaged",
-         arc::IsArcPlayStoreEnabledPreferenceManagedForProfile(profile));
-}
-
 void ArcTermsOfServiceScreenHandler::OnMetricsModeChanged(bool enabled,
                                                           bool managed) {
   const Profile* const profile = ProfileManager::GetActiveUserProfile();
@@ -235,7 +230,9 @@
 
   ShowScreen(kScreenId);
 
-  SendArcManagedStatus(profile);
+  arc_managed_ = arc::IsArcPlayStoreEnabledPreferenceManagedForProfile(profile);
+  CallJS("setArcManaged", arc_managed_);
+
   MaybeLoadPlayStoreToS(true);
   StartNetworkAndTimeZoneObserving();
 
@@ -253,7 +250,7 @@
 
 void ArcTermsOfServiceScreenHandler::RecordConsents(
     const std::string& tos_content,
-    bool record_tos_consent,
+    bool record_tos_content,
     bool tos_accepted,
     bool record_backup_consent,
     bool backup_accepted,
@@ -267,14 +264,16 @@
   DCHECK(signin_manager->IsAuthenticated());
   const std::string account_id = signin_manager->GetAuthenticatedAccountId();
 
-  if (record_tos_consent) {
-    consent_auditor->RecordGaiaConsent(
-        account_id, consent_auditor::Feature::PLAY_STORE,
-        ArcSupportHost::ComputePlayToSConsentIds(tos_content),
-        IDS_ARC_OOBE_TERMS_BUTTON_ACCEPT,
-        tos_accepted ? consent_auditor::ConsentStatus::GIVEN
-                     : consent_auditor::ConsentStatus::NOT_GIVEN);
-  }
+  // TODO(jhorwich): Replace this approach when passing |is_managed| boolean is
+  // supported by the underlying consent protos.
+  const std::vector<int> consent_ids = ArcSupportHost::ComputePlayToSConsentIds(
+      record_tos_content ? tos_content : "");
+
+  consent_auditor->RecordGaiaConsent(
+      account_id, consent_auditor::Feature::PLAY_STORE, consent_ids,
+      IDS_ARC_OOBE_TERMS_BUTTON_ACCEPT,
+      tos_accepted ? consent_auditor::ConsentStatus::GIVEN
+                   : consent_auditor::ConsentStatus::NOT_GIVEN);
 
   if (record_backup_consent) {
     consent_auditor->RecordGaiaConsent(
@@ -301,8 +300,7 @@
 
   // Record consents as not accepted for consents that are under user control
   // when the user skips ARC setup.
-  RecordConsents(tos_content,
-                 /*record_tos_content=*/true, /*tos_accepted=*/false,
+  RecordConsents(tos_content, !arc_managed_, /*tos_accepted=*/false,
                  !backup_restore_managed_, /*backup_accepted=*/false,
                  !location_services_managed_, /*location_accepted=*/false);
 
@@ -321,8 +319,7 @@
 
   // Record consents as accepted or not accepted as appropriate for consents
   // that are under user control when the user completes ARC setup.
-  RecordConsents(tos_content,
-                 /*record_tos_content=*/true, /*tos_accepted=*/true,
+  RecordConsents(tos_content, !arc_managed_, /*tos_accepted=*/true,
                  !backup_restore_managed_, enable_backup_restore,
                  !location_services_managed_, enable_location_services);
 
diff --git a/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.h
index a8300513..45d39e2 100644
--- a/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/arc_terms_of_service_screen_handler.h
@@ -17,8 +17,6 @@
 #include "chromeos/network/network_state_handler_observer.h"
 #include "chromeos/settings/timezone_settings.h"
 
-class Profile;
-
 namespace arc {
 class ArcOptInPreferenceHandler;
 }
@@ -86,9 +84,6 @@
                       bool record_location_consent,
                       bool location_accepted);
 
-  // Sends if Arc enable status is manged to screen.
-  void SendArcManagedStatus(Profile* profile);
-
   bool NeedDispatchEventOnAction();
 
   // arc::ArcOptInPreferenceHandlerObserver:
@@ -107,6 +102,9 @@
   // To filter out duplicate notifications from html.
   bool action_taken_ = false;
 
+  // To track if ARC preference is managed.
+  bool arc_managed_ = false;
+
   // To track if optional features are managed preferences.
   bool backup_restore_managed_ = false;
   bool location_services_managed_ = false;
diff --git a/chrome/browser/ui/webui/settings/chromeos/crostini_handler.cc b/chrome/browser/ui/webui/settings/chromeos/crostini_handler.cc
index 03a08ca..4b10001 100644
--- a/chrome/browser/ui/webui/settings/chromeos/crostini_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/crostini_handler.cc
@@ -31,12 +31,14 @@
 void CrostiniHandler::HandleRequestCrostiniInstallerView(
     const base::ListValue* args) {
   AllowJavascript();
-  ShowCrostiniInstallerView(Profile::FromWebUI(web_ui()));
+  ShowCrostiniInstallerView(Profile::FromWebUI(web_ui()),
+                            CrostiniUISurface::kSettings);
 }
 
 void CrostiniHandler::HandleRequestRemoveCrostini(const base::ListValue* args) {
   AllowJavascript();
-  ShowCrostiniUninstallerView(Profile::FromWebUI(web_ui()));
+  ShowCrostiniUninstallerView(Profile::FromWebUI(web_ui()),
+                              CrostiniUISurface::kSettings);
 }
 
 }  // namespace settings
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler.cc b/chrome/browser/ui/webui/settings/site_settings_handler.cc
index 10862aa2..21344e4f 100644
--- a/chrome/browser/ui/webui/settings/site_settings_handler.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_handler.cc
@@ -5,7 +5,9 @@
 #include "chrome/browser/ui/webui/settings/site_settings_handler.h"
 
 #include <algorithm>
+#include <map>
 #include <memory>
+#include <set>
 #include <string>
 #include <utility>
 
@@ -149,6 +151,10 @@
           &SiteSettingsHandler::HandleGetDefaultValueForContentType,
           base::Unretained(this)));
   web_ui()->RegisterMessageCallback(
+      "getAllSites",
+      base::BindRepeating(&SiteSettingsHandler::HandleGetAllSites,
+                          base::Unretained(this)));
+  web_ui()->RegisterMessageCallback(
       "getExceptionList",
       base::BindRepeating(&SiteSettingsHandler::HandleGetExceptionList,
                           base::Unretained(this)));
@@ -486,6 +492,88 @@
   ResolveJavascriptCallback(*callback_id, category);
 }
 
+void SiteSettingsHandler::HandleGetAllSites(const base::ListValue* args) {
+  AllowJavascript();
+
+  CHECK_EQ(2U, args->GetSize());
+  const base::Value* callback_id;
+  CHECK(args->Get(0, &callback_id));
+  const base::ListValue* types;
+  CHECK(args->GetList(1, &types));
+
+  // Incognito contains incognito content settings plus non-incognito content
+  // settings. Thus if it exists, just get exceptions for the incognito profile.
+  Profile* profile = profile_;
+  if (profile_->HasOffTheRecordProfile() &&
+      profile_->GetOffTheRecordProfile() != profile_) {
+    profile = profile_->GetOffTheRecordProfile();
+  }
+  DCHECK(profile);
+  HostContentSettingsMap* map =
+      HostContentSettingsMapFactory::GetForProfile(profile);
+
+  std::map<std::string, std::set<std::string>> all_sites_map;
+  // Convert |types| to a list of ContentSettingsTypes.
+  for (size_t i = 0; i < types->GetSize(); ++i) {
+    std::string type;
+    types->GetString(i, &type);
+    ContentSettingsType content_type =
+        site_settings::ContentSettingsTypeFromGroupName(type);
+
+    // TODO(https://crbug.com/835712): Add extension content settings, plus
+    // sites that use any non-zero amount of storage.
+
+    ContentSettingsForOneType entries;
+    map->GetSettingsForOneType(content_type, std::string(), &entries);
+    for (const ContentSettingPatternSource& e : entries) {
+      // Ignore default settings.
+      if (e.primary_pattern == ContentSettingsPattern::Wildcard() &&
+          e.source != SiteSettingSourceToString(
+                          site_settings::SiteSettingSource::kPreference)) {
+        continue;
+      }
+      // Ignore embedded content settings.
+      if (e.primary_pattern != e.secondary_pattern &&
+          e.secondary_pattern != ContentSettingsPattern::Wildcard()) {
+        continue;
+      }
+      // TODO(https://crbug.com/835712): Add in embargoed exceptions.
+      const GURL url(e.primary_pattern.ToString());
+      // Ignore patterns.
+      if (url::Origin::Create(url).unique())
+        continue;
+
+      // Group origins via eTLD+1.
+      std::string etld1_string =
+          net::registry_controlled_domains::GetDomainAndRegistry(
+              url,
+              net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES);
+      auto entry = all_sites_map.find(etld1_string);
+      if (entry == all_sites_map.end()) {
+        all_sites_map.emplace(etld1_string,
+                              std::set<std::string>({url.spec()}));
+      } else {
+        entry->second.insert(url.spec());
+      }
+    }
+  }
+
+  // Convert |all_sites_map| to a list of base::DictionaryValues.
+  base::Value result(base::Value::Type::LIST);
+  for (const auto& entry : all_sites_map) {
+    // eTLD+1 is the effective top level domain + 1.
+    base::Value eTLD1(base::Value::Type::DICTIONARY);
+    eTLD1.SetKey("etld1", base::Value(entry.first));
+    base::Value origin_list(base::Value::Type::LIST);
+    for (const std::string& origin : entry.second) {
+      origin_list.GetList().emplace_back(origin);
+    }
+    eTLD1.SetKey("origins", std::move(origin_list));
+    result.GetList().push_back(std::move(eTLD1));
+  }
+  ResolveJavascriptCallback(*callback_id, result);
+}
+
 void SiteSettingsHandler::HandleGetExceptionList(const base::ListValue* args) {
   AllowJavascript();
 
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler.h b/chrome/browser/ui/webui/settings/site_settings_handler.h
index 9c78d45..0ddb5d8 100644
--- a/chrome/browser/ui/webui/settings/site_settings_handler.h
+++ b/chrome/browser/ui/webui/settings/site_settings_handler.h
@@ -84,6 +84,7 @@
   FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, GetAndSetOriginPermissions);
   FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, GetAndSetForInvalidURLs);
   FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, Incognito);
+  FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, GetAllSites);
   FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, Origins);
   FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, Patterns);
   FRIEND_TEST_ALL_PREFIXES(SiteSettingsHandlerTest, ZoomLevels);
@@ -108,6 +109,10 @@
   void HandleSetDefaultValueForContentType(const base::ListValue* args);
   void HandleGetDefaultValueForContentType(const base::ListValue* args);
 
+  // Returns a list of sites, grouped by their effective top level domain plus
+  // 1, affected by any of the content settings specified in |args|.
+  void HandleGetAllSites(const base::ListValue* args);
+
   // Returns the list of site exceptions for a given content settings type.
   void HandleGetExceptionList(const base::ListValue* args);
 
diff --git a/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc b/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc
index 6efafe4..1358770 100644
--- a/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc
+++ b/chrome/browser/ui/webui/settings/site_settings_handler_unittest.cc
@@ -355,6 +355,88 @@
                   site_settings::SiteSettingSource::kDefault, 3U);
 }
 
+TEST_F(SiteSettingsHandlerTest, GetAllSites) {
+  base::ListValue get_all_sites_args;
+  get_all_sites_args.AppendString(kCallbackId);
+  base::Value category_list(base::Value::Type::LIST);
+  category_list.GetList().emplace_back(kNotifications);
+  category_list.GetList().emplace_back(kFlash);
+  get_all_sites_args.GetList().push_back(std::move(category_list));
+
+  // Test Chrome built-in defaults are marked as default.
+  handler()->HandleGetAllSites(&get_all_sites_args);
+  EXPECT_EQ(1U, web_ui()->call_data().size());
+
+  const content::TestWebUI::CallData& data = *web_ui()->call_data().back();
+  EXPECT_EQ("cr.webUIResponse", data.function_name());
+
+  EXPECT_EQ(kCallbackId, data.arg1()->GetString());
+  ASSERT_TRUE(data.arg2()->GetBool());
+
+  const base::Value::ListStorage& etld1_groups_empty = data.arg3()->GetList();
+  EXPECT_EQ(0UL, etld1_groups_empty.size());
+
+  // Add a couple of exceptions and check they appear in all sites.
+  HostContentSettingsMap* map =
+      HostContentSettingsMapFactory::GetForProfile(profile());
+  const GURL url1("http://example.com");
+  const GURL url2("https://other.example.com");
+  std::string resource_identifier;
+  map->SetContentSettingDefaultScope(
+      url1, url1, CONTENT_SETTINGS_TYPE_NOTIFICATIONS, resource_identifier,
+      CONTENT_SETTING_BLOCK);
+  map->SetContentSettingDefaultScope(url2, url2, CONTENT_SETTINGS_TYPE_PLUGINS,
+                                     resource_identifier,
+                                     CONTENT_SETTING_ALLOW);
+  handler()->HandleGetAllSites(&get_all_sites_args);
+
+  const content::TestWebUI::CallData& data2 = *web_ui()->call_data().back();
+  EXPECT_EQ("cr.webUIResponse", data2.function_name());
+
+  EXPECT_EQ(kCallbackId, data2.arg1()->GetString());
+  ASSERT_TRUE(data2.arg2()->GetBool());
+
+  const base::Value::ListStorage& etld1_groups = data2.arg3()->GetList();
+  EXPECT_EQ(1UL, etld1_groups.size());
+  for (const base::Value& etld1 : etld1_groups) {
+    const std::string& etld1_string = etld1.FindKey("etld1")->GetString();
+    const base::Value::ListStorage& origin_list =
+        etld1.FindKey("origins")->GetList();
+    EXPECT_EQ("example.com", etld1_string);
+    EXPECT_EQ(2UL, origin_list.size());
+    EXPECT_EQ(url1.spec(), origin_list[0].GetString());
+    EXPECT_EQ(url2.spec(), origin_list[1].GetString());
+  }
+
+  // Add an additional exception belonging to a different eTLD+1.
+  const GURL url3("https://example2.net");
+  map->SetContentSettingDefaultScope(url3, url3, CONTENT_SETTINGS_TYPE_PLUGINS,
+                                     resource_identifier,
+                                     CONTENT_SETTING_BLOCK);
+  handler()->HandleGetAllSites(&get_all_sites_args);
+
+  const content::TestWebUI::CallData& data3 = *web_ui()->call_data().back();
+  EXPECT_EQ("cr.webUIResponse", data3.function_name());
+
+  EXPECT_EQ(kCallbackId, data3.arg1()->GetString());
+  ASSERT_TRUE(data3.arg2()->GetBool());
+
+  const base::Value::ListStorage& etld1_groups_multiple =
+      data3.arg3()->GetList();
+  EXPECT_EQ(2UL, etld1_groups_multiple.size());
+  for (const base::Value& etld1 : etld1_groups_multiple) {
+    const std::string& etld1_string = etld1.FindKey("etld1")->GetString();
+    const base::Value::ListStorage& origin_list =
+        etld1.FindKey("origins")->GetList();
+    if (etld1_string == "example2.net") {
+      EXPECT_EQ(1UL, origin_list.size());
+      EXPECT_EQ(url3.spec(), origin_list[0].GetString());
+    } else {
+      EXPECT_EQ("example.com", etld1_string);
+    }
+  }
+}
+
 TEST_F(SiteSettingsHandlerTest, Origins) {
   const std::string google("https://www.google.com:443");
   const std::string uma_base("WebsiteSettings.Menu.PermissionChanged");
diff --git a/chrome/notification_helper/notification_activator.cc b/chrome/notification_helper/notification_activator.cc
index 439986bc..3e65264 100644
--- a/chrome/notification_helper/notification_activator.cc
+++ b/chrome/notification_helper/notification_activator.cc
@@ -7,6 +7,7 @@
 #include <shellapi.h>
 
 #include "base/command_line.h"
+#include "base/metrics/histogram_macros.h"
 #include "base/process/process.h"
 #include "base/strings/string16.h"
 #include "base/win/windows_types.h"
@@ -19,6 +20,22 @@
 // The response entered by the user while interacting with the toast.
 const wchar_t kUserResponse[] = L"userResponse";
 
+// These values are persisted to logs. Entries should not be renumbered and
+// numeric values should never be reused.
+enum class NotificationActivatorStatus {
+  kSuccess = 0,
+  kChromeExeMissing = 1,
+  kLaunchChromeFailed = 2,
+  kLaunchIdEmpty = 3,
+  kAllowSetForegroundWindowFailed = 4,
+  kMaxValue = kAllowSetForegroundWindowFailed,
+};
+
+void LogNotificationActivatorHistogram(NotificationActivatorStatus status) {
+  UMA_HISTOGRAM_ENUMERATION(
+      "Notifications.NotificationHelper.NotificationActivatorStatus", status);
+}
+
 }  // namespace
 
 namespace notification_helper {
@@ -53,13 +70,26 @@
   base::FilePath chrome_exe_path = GetChromeExePath();
   if (chrome_exe_path.empty()) {
     Trace(L"Failed to get chrome exe path\n");
+    LogNotificationActivatorHistogram(
+        NotificationActivatorStatus::kChromeExeMissing);
     return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
   }
 
+  bool is_hitogram_logged = false;
+
   // |invoked_args| contains the launch ID string encoded by Chrome. Chrome adds
   // it to the launch argument of the toast and gets it back via |invoked_args|
   // here. Chrome needs the data to be able to look up the notification on its
   // end.
+  //
+  // TODO(chengx): When |invoked_args| is null or empty, there is no need to
+  // launch chrome. However, we still launch chrome for now to help investigate
+  // issue 839942.
+  if (invoked_args == nullptr || invoked_args[0] == 0) {
+    LogNotificationActivatorHistogram(
+        NotificationActivatorStatus::kLaunchIdEmpty);
+    is_hitogram_logged = true;
+  }
   base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
   command_line.AppendSwitchNative(switches::kNotificationLaunchId,
                                   invoked_args);
@@ -87,6 +117,8 @@
   if (!::ShellExecuteEx(&info)) {
     DWORD error_code = ::GetLastError();
     Trace(L"Unable to launch Chrome.exe; error: 0x%08X\n", error_code);
+    LogNotificationActivatorHistogram(
+        NotificationActivatorStatus::kLaunchChromeFailed);
     return HRESULT_FROM_WIN32(error_code);
   }
 
@@ -102,9 +134,15 @@
       // The lack of ability to set the window to foreground is not reason
       // enough to fail the activation call. The user will see the Chrome icon
       // flash in the task bar if this happens, which is a graceful failure.
+      LogNotificationActivatorHistogram(
+          NotificationActivatorStatus::kAllowSetForegroundWindowFailed);
+      is_hitogram_logged = true;
     }
   }
 
+  if (!is_hitogram_logged)
+    LogNotificationActivatorHistogram(NotificationActivatorStatus::kSuccess);
+
   return S_OK;
 }
 
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index a76e6ba..4bf45d71 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -720,7 +720,7 @@
       "../browser/ui/blocked_content/tab_under_blocker_browsertest.cc",
       "../browser/ui/tabs/pinned_tab_service_browsertest.cc",
 
-      #If this list is used on Android in the future, these browser / speech/*
+      # If this list is used on Android in the future, these browser / speech/*
       # files will probably not be applicable.
       "../browser/speech/extension_api/tts_extension_apitest.cc",
       "../browser/speech/speech_recognition_browsertest.cc",
@@ -1327,6 +1327,7 @@
         "../browser/extensions/sandboxed_pages_apitest.cc",
         "../browser/extensions/service_worker_apitest.cc",
         "../browser/extensions/shared_module_apitest.cc",
+        "../browser/extensions/shared_worker_apitest.cc",
         "../browser/extensions/startup_helper_browsertest.cc",
         "../browser/extensions/stubs_apitest.cc",
         "../browser/extensions/subscribe_page_action_browsertest.cc",
@@ -4247,6 +4248,7 @@
         "../browser/conflicts/installed_applications_win_unittest.cc",
         "../browser/conflicts/module_blacklist_cache_util_win_unittest.cc",
         "../browser/conflicts/module_list_filter_win_unittest.cc",
+        "../browser/conflicts/module_load_attempt_log_listener_win_unittest.cc",
         "../browser/conflicts/registry_key_watcher_win_unittest.cc",
         "../browser/google/google_update_win_unittest.cc",
       ]
diff --git a/chrome/test/chromedriver/VERSION b/chrome/test/chromedriver/VERSION
index 555eb8e..23f36200 100644
--- a/chrome/test/chromedriver/VERSION
+++ b/chrome/test/chromedriver/VERSION
@@ -1 +1 @@
-2.38
+2.39
diff --git a/chrome/test/chromedriver/test/run_all_tests.py b/chrome/test/chromedriver/test/run_all_tests.py
index b0dc576..8261cecc 100755
--- a/chrome/test/chromedriver/test/run_all_tests.py
+++ b/chrome/test/chromedriver/test/run_all_tests.py
@@ -191,18 +191,21 @@
     versions = {'HEAD': archive.GetLatestRevision()}
     # Linux64 build numbers
     if util.IsLinux():
+      versions['68'] = '561732'
       versions['67'] = '550422'
       versions['66'] = '540276'
 
 
     # Mac build numbers
     elif util.IsMac():
+      versions['68'] = '561733'
       versions['67'] = '550418'
       versions['66'] = '540271'
 
 
     # Windows build numbers
     elif util.IsWindows():
+      versions['68'] = '561732'
       versions['67'] = '550416'
       versions['66'] = '540272'
 
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index 9a5dd2b..be6a2a9 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -80,6 +80,8 @@
 _VERSION_SPECIFIC_FILTER = {}
 _VERSION_SPECIFIC_FILTER['HEAD'] = []
 
+_VERSION_SPECIFIC_FILTER['68'] = []
+
 _VERSION_SPECIFIC_FILTER['67'] = []
 
 _VERSION_SPECIFIC_FILTER['66'] = [
diff --git a/chrome/test/data/extensions/api_test/file_browser/OWNERS b/chrome/test/data/extensions/api_test/file_browser/OWNERS
index 2eb77e1..73220a8 100644
--- a/chrome/test/data/extensions/api_test/file_browser/OWNERS
+++ b/chrome/test/data/extensions/api_test/file_browser/OWNERS
@@ -1,3 +1 @@
-# This should match ui/file_manager/file_manager/OWNERS
-hirono@chromium.org
-yoshiki@chromium.org
+file://ui/file_manager/OWNERS
diff --git a/chrome/test/data/extensions/api_test/shared_worker/basic/background.js b/chrome/test/data/extensions/api_test/shared_worker/basic/background.js
new file mode 100644
index 0000000..ffe4668
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/basic/background.js
@@ -0,0 +1,29 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+chrome.test.runTests([
+  function worker() {
+    const workerPort = new SharedWorker("worker.js").port;
+    workerPort.onmessage = (evt) => {
+      if (evt.data != 'hullo there!') {
+        chrome.test.fail();
+      } else {
+        chrome.test.succeed();
+      }
+    };
+    workerPort.start();
+  },
+
+  function workerWithImport() {
+    const workerPort = new SharedWorker("worker-with-import.js").port;
+    workerPort.onmessage = (evt) => {
+      if (evt.data != 'hullo there!') {
+        chrome.test.fail();
+      } else {
+        chrome.test.succeed();
+      }
+    };
+    workerPort.start();
+  }
+]);
diff --git a/chrome/test/data/extensions/api_test/shared_worker/basic/manifest.json b/chrome/test/data/extensions/api_test/shared_worker/basic/manifest.json
new file mode 100644
index 0000000..45b5e02a
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/basic/manifest.json
@@ -0,0 +1,8 @@
+{
+  "name": "Shared worker",
+  "version": "1.0",
+  "manifest_version": 2,
+  "background": {
+    "scripts": ["background.js"]
+  }
+}
diff --git a/chrome/test/data/extensions/api_test/shared_worker/basic/worker-with-import.js b/chrome/test/data/extensions/api_test/shared_worker/basic/worker-with-import.js
new file mode 100644
index 0000000..84dc961a
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/basic/worker-with-import.js
@@ -0,0 +1,5 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+importScripts('worker.js');
diff --git a/chrome/test/data/extensions/api_test/shared_worker/basic/worker.js b/chrome/test/data/extensions/api_test/shared_worker/basic/worker.js
new file mode 100644
index 0000000..6725c60f
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/basic/worker.js
@@ -0,0 +1,9 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+self.addEventListener('connect', function(e) {
+  var port = e.ports[0];
+  port.start();
+  port.postMessage('hullo there!');
+});
diff --git a/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/background.html b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/background.html
new file mode 100644
index 0000000..b46d8a6
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/background.html
@@ -0,0 +1,10 @@
+<!--
+Copyright 2018 The Chromium Authors. All rights reserved.
+Use of this source code is governed by a BSD-style license that can be
+found in the LICENSE file.
+-->
+
+<html><body>
+background.html contents for testing.
+<script src="background.js"></script>
+</body></html>
diff --git a/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/background.js b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/background.js
new file mode 100644
index 0000000..d4017d3c
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/background.js
@@ -0,0 +1,86 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+async function setup() {
+  const reg = await navigator.serviceWorker.register('service_worker.js');
+  await navigator.serviceWorker.ready;
+  if (navigator.serviceWorker.controller) {
+    chrome.test.sendMessage('CONTROLLED');
+  } else {
+    chrome.test.sendMessage('READY');
+  }
+}
+
+async function getMessageFromWorker(worker) {
+  return new Promise(resolve => {
+    worker.port.onmessage = evt => {
+      resolve(evt.data);
+    }
+  });
+}
+
+async function getMessageFromServiceWorker() {
+  return new Promise(resolve => {
+    navigator.serviceWorker.onmessage = evt => {
+      resolve(evt.data);
+    }
+  });
+}
+
+
+async function start() {
+  await setup();
+  if (!navigator.serviceWorker.controller) {
+    // The browser will reload this background page so it gets controlled.
+    return;
+  }
+
+  // Start the shared worker. It should send a message about the resources it
+  // loaded.
+  const sharedWorker = new SharedWorker('shared_worker.js');
+  sharedWorker.port.start();
+  const kExpectedMessage = [
+    'CONNECTED',
+    'SCRIPT_IMPORTED',
+    'FETCHED'
+  ];
+  const data = await getMessageFromWorker(sharedWorker);
+  if (data.length != kExpectedMessage.length) {
+    throw new Error('bad message length: ' +
+        `expected ${kExpectedMessage.length}, got ${data.length}`);
+  }
+  for (let i = 0; i < data.length; i++) {
+    if (data[i] != kExpectedMessage[i]) {
+      throw new Error(
+          `bad message: expected ${kExpectedMessage[i]}, got ${data[i]}`);
+    }
+  }
+
+  // Ask the service worker what URLs it intercepted.
+  navigator.serviceWorker.controller.postMessage('tell me what urls you saw');
+  const urls = await getMessageFromServiceWorker();
+  const kExpectedUrls = [
+    'background.html',
+    'background.js',
+    'shared_worker.js',
+    'shared_worker_import.js',
+    'data_for_fetch'
+  ];
+  if (urls.length != kExpectedUrls.length) {
+    throw new Error(
+        `bad urls: expected ${kExpectedUrls.length}, got ${urls.length}`);
+  }
+  for (let i = 0; i < urls.length; i++) {
+    const expected = new URL(kExpectedUrls[i], self.location).toString();
+    if (urls[i] != expected)
+      throw new Error(`bad url: expected ${expected}, got ${urls[i]}`);
+  }
+
+  chrome.test.sendMessage('PASS');
+}
+
+start().catch(err => {
+     console.error(err.name + ': ' + err.message);
+     chrome.test.sendMessage('FAIL');
+  });
diff --git a/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/data_for_fetch b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/data_for_fetch
new file mode 100644
index 0000000..4a8187e
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/data_for_fetch
@@ -0,0 +1 @@
+FETCHED
diff --git a/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/manifest.json b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/manifest.json
new file mode 100644
index 0000000..03b17d2c
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/manifest.json
@@ -0,0 +1,9 @@
+{
+  "name": "Shared worker",
+  "version": "1.0",
+  "manifest_version": 2,
+  "background": {
+    "page": "background.html",
+    "persistent": false
+  }
+}
diff --git a/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/service_worker.js b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/service_worker.js
new file mode 100644
index 0000000..268939f
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/service_worker.js
@@ -0,0 +1,14 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let urlsSeen = [];
+
+self.addEventListener('fetch', e => {
+  urlsSeen.push(e.request.url);
+});
+
+self.addEventListener('message', e => {
+  e.source.postMessage(urlsSeen);
+  urlsSeen = [];
+});
diff --git a/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/shared_worker.js b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/shared_worker.js
new file mode 100644
index 0000000..7bf824f4
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/shared_worker.js
@@ -0,0 +1,22 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+let importScriptsGreeting;
+let message = [];
+
+self.onconnect = async function(e) {
+  const port = e.ports[0];
+  port.start();
+  message.push('CONNECTED');
+
+  // The import scripts writes to |importScriptsGreeting|.
+  importScripts('shared_worker_import.js');
+  message.push(importScriptsGreeting);
+
+  const resp = await fetch(new URL('data_for_fetch', self.location));
+  const text = await resp.text();
+  message.push(text.trim());
+
+  port.postMessage(message);
+};
diff --git a/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/shared_worker_import.js b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/shared_worker_import.js
new file mode 100644
index 0000000..ca79e47
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/shared_worker/service_worker_controlled/shared_worker_import.js
@@ -0,0 +1,5 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+importScriptsGreeting = 'SCRIPT_IMPORTED';
diff --git a/chrome/test/data/webui/settings/all_sites_tests.js b/chrome/test/data/webui/settings/all_sites_tests.js
index 72e1d23..545539b 100644
--- a/chrome/test/data/webui/settings/all_sites_tests.js
+++ b/chrome/test/data/webui/settings/all_sites_tests.js
@@ -3,19 +3,6 @@
 // found in the LICENSE file.
 
 /**
- * An example pref with exceptions with origins and patterns from
- * different providers.
- * @type {SiteSettingsPref}
- */
-let prefsMixedProvider;
-
-/**
- * An example pref with mixed origin and pattern.
- * @type {SiteSettingsPref}
- */
-let prefsMixedOriginAndPattern;
-
-/**
  * An example pref with multiple categories and multiple allow/block
  * state.
  * @type {SiteSettingsPref}
@@ -45,28 +32,6 @@
 
   // Initialize a site-list before each test.
   setup(function() {
-    prefsMixedProvider = test_util.createSiteSettingsPrefs(
-        [], [test_util.createContentSettingTypeToValuePair(
-                settings.ContentSettingsTypes.GEOLOCATION, [
-                  test_util.createRawSiteException('https://[*.]foo.com', {
-                    setting: settings.ContentSetting.BLOCK,
-                    source: settings.SiteSettingSource.POLICY,
-                  }),
-                  test_util.createRawSiteException('https://bar.foo.com', {
-                    setting: settings.ContentSetting.BLOCK,
-                  }),
-                  test_util.createRawSiteException('https://[*.]foo.com', {
-                    setting: settings.ContentSetting.BLOCK,
-                  }),
-                ])]);
-
-    prefsMixedOriginAndPattern = test_util.createSiteSettingsPrefs(
-        [], [test_util.createContentSettingTypeToValuePair(
-                settings.ContentSettingsTypes.GEOLOCATION, [
-                  test_util.createRawSiteException('https://foo.com'),
-                  test_util.createRawSiteException('https://[*.]foo.com'),
-                ])]);
-
     prefsVarious = test_util.createSiteSettingsPrefs([], [
       test_util.createContentSettingTypeToValuePair(
           settings.ContentSettingsTypes.GEOLOCATION,
@@ -94,7 +59,6 @@
     browserProxy = new TestSiteSettingsPrefsBrowserProxy();
     settings.SiteSettingsPrefsBrowserProxyImpl.instance_ = browserProxy;
     PolymerTest.clearBody();
-    browserProxy.setPrefs(prefsMixedOriginAndPattern);
     testElement = document.createElement('all-sites');
     assertTrue(!!testElement);
     document.body.appendChild(testElement);
@@ -120,124 +84,23 @@
     };
   }
 
-  test('All sites category no action menu', function() {
+  test('All sites list populated', function() {
     setUpCategory(prefsVarious);
-    return browserProxy.whenCalled('getExceptionList')
-        .then(function(contentType) {
-          // Use resolver to ensure that the list container is populated.
-          const resolver = new PromiseResolver();
-          testElement.async(resolver.resolve);
-          return resolver.promise.then(function() {
-            const item = testElement.$.listContainer.children[0];
-            assertEquals('SITE-ENTRY', item.tagName);
-            const name = item.root.querySelector('#displayName');
-            assertTrue(!!name);
-          });
-        });
+    testElement.populateList_();
+    return browserProxy.whenCalled('getAllSites').then(function() {
+      // Use resolver to ensure that the list container is populated.
+      const resolver = new PromiseResolver();
+      testElement.async(resolver.resolve);
+      return resolver.promise.then(function() {
+        assertEquals(3, testElement.sites.length);
+
+        // Flush to be sure list container is populated.
+        Polymer.dom.flush();
+        const siteEntries =
+            testElement.$.listContainer.querySelectorAll('site-entry');
+        assertEquals(3, siteEntries.length);
+      });
+    });
   });
 
-  test('All sites category', function() {
-    // Prefs: Multiple and overlapping sites.
-    setUpCategory(prefsVarious);
-
-    return browserProxy.whenCalled('getExceptionList')
-        .then(function(contentType) {
-          // Use resolver to ensure asserts bubble up to the framework with
-          // meaningful errors.
-          const resolver = new PromiseResolver();
-          testElement.async(resolver.resolve);
-          return resolver.promise.then(function() {
-            // All Sites calls getExceptionList for all categories, starting
-            // with Cookies.
-            assertEquals(settings.ContentSettingsTypes.COOKIES, contentType);
-
-            // Required for firstItem to be found below.
-            Polymer.dom.flush();
-
-            // Validate that the sites gets populated from pre-canned prefs.
-            assertEquals(
-                3, testElement.sites.length,
-                'If this fails with 5 instead of the expected 3, then ' +
-                    'the de-duping of sites is not working for site_list');
-            assertEquals(
-                prefsVarious
-                    .exceptions[settings.ContentSettingsTypes.GEOLOCATION][1]
-                    .origin,
-                testElement.sites[0].origin);
-            assertEquals(
-                prefsVarious
-                    .exceptions[settings.ContentSettingsTypes.GEOLOCATION][0]
-                    .origin,
-                testElement.sites[1].origin);
-            assertEquals(
-                prefsVarious
-                    .exceptions[settings.ContentSettingsTypes.NOTIFICATIONS][0]
-                    .origin,
-                testElement.sites[2].origin);
-            assertEquals(undefined, testElement.selectedOrigin);
-
-            // Validate that the sites are shown in UI and can be selected.
-            const firstItem = testElement.$.listContainer.children[1];
-            const clickable = firstItem.root.querySelector('.middle');
-            assertNotEquals(undefined, clickable);
-            MockInteractions.tap(clickable);
-            assertEquals(
-                prefsVarious
-                    .exceptions[settings.ContentSettingsTypes.GEOLOCATION][0]
-                    .origin,
-                settings.getQueryParameters().get('site'));
-          });
-        });
-  });
-
-  test('All sites mixed pattern and origin', function() {
-    // Prefs: One site, represented as origin and pattern.
-    setUpCategory(prefsMixedOriginAndPattern);
-
-    return browserProxy.whenCalled('getExceptionList')
-        .then(function(contentType) {
-          // Use resolver to ensure asserts bubble up to the framework with
-          // meaningful errors.
-          const resolver = new PromiseResolver();
-          testElement.async(resolver.resolve);
-          return resolver.promise.then(function() {
-            // All Sites calls getExceptionList for all categories, starting
-            // with Cookies.
-            assertEquals(settings.ContentSettingsTypes.COOKIES, contentType);
-
-            // Required for firstItem to be found below.
-            Polymer.dom.flush();
-
-            // Validate that the sites gets populated from pre-canned prefs.
-            // TODO(dschuyler): de-duping of sites is under discussion, so
-            // it is currently disabled. It should be enabled again or this
-            // code should be removed.
-            assertEquals(
-                2, testElement.sites.length,
-                'If this fails with 1 instead of the expected 2, then ' +
-                    'the de-duping of sites has been enabled for site_list.');
-            if (testElement.sites.length == 1) {
-              assertEquals(
-                  prefsMixedOriginAndPattern
-                      .exceptions[settings.ContentSettingsTypes.GEOLOCATION][0]
-                      .origin,
-                  testElement.sites[0].displayName);
-            }
-
-            assertEquals(undefined, testElement.selectedOrigin);
-            // Validate that the sites are shown in UI and can be selected.
-            const firstItem = testElement.$.listContainer.children[0];
-            const clickable = firstItem.root.querySelector('.middle');
-            assertNotEquals(undefined, clickable);
-            MockInteractions.tap(clickable);
-            if (testElement.sites.length == 1) {
-              assertEquals(
-                  prefsMixedOriginAndPattern
-                      .exceptions[settings.ContentSettingsTypes.GEOLOCATION][0]
-                      .origin,
-                  testElement.sites[0].displayName);
-            }
-          });
-        });
-  });
 });
diff --git a/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js b/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js
index d8d0e57..e6db670 100644
--- a/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js
+++ b/chrome/test/data/webui/settings/test_site_settings_prefs_browser_proxy.js
@@ -25,6 +25,7 @@
       'clearFlashPref',
       'fetchUsbDevices',
       'fetchZoomLevels',
+      'getAllSites',
       'getDefaultValueForContentType',
       'getExceptionList',
       'getOriginPermissions',
@@ -187,6 +188,33 @@
   }
 
   /** @override */
+  getAllSites(contentTypes) {
+    this.methodCalled('getAllSites', contentTypes);
+    const origins_set = new Set();
+
+    contentTypes.forEach((contentType) => {
+      this.prefs_.exceptions[contentType].forEach((exception) => {
+        if (exception.origin.includes('*'))
+          return;
+        origins_set.add(exception.origin);
+      });
+    });
+
+    const origins_array = [...origins_set];
+    let result = [];
+    origins_array.forEach((origin, index) => {
+      // Functionality to extract the eTLD+1 from an origin exists only on the
+      // C++ side, so just use a placeholder string in testing client-side code.
+      let entry = {};
+      entry['etld1'] = 'eTLD Name ' + index;
+      entry['origins'] = [origin];
+      result.push(entry);
+    });
+
+    return Promise.resolve(result);
+  }
+
+  /** @override */
   getDefaultValueForContentType(contentType) {
     this.methodCalled('getDefaultValueForContentType', contentType);
     let pref = this.prefs_.defaults[contentType];
diff --git a/chrome/utility/mash_service_factory.cc b/chrome/utility/mash_service_factory.cc
index b9f7198..7630f98 100644
--- a/chrome/utility/mash_service_factory.cc
+++ b/chrome/utility/mash_service_factory.cc
@@ -17,6 +17,7 @@
 #include "ash/window_manager_service.h"
 #include "base/bind.h"
 #include "base/message_loop/message_loop.h"
+#include "base/metrics/histogram_macros.h"
 #include "build/build_config.h"
 #include "components/services/font/font_service_app.h"
 #include "components/services/font/public/interfaces/constants.mojom.h"
@@ -26,6 +27,18 @@
 
 namespace {
 
+// These values are persisted to logs. Entries should not be renumbered and
+// numeric values should never be reused.
+enum class MashService {
+  kAsh = 0,
+  kAutoclick = 1,
+  kQuickLaunch = 2,
+  kShortcutViewer = 3,
+  kTapVisualizer = 4,
+  kFont = 5,
+  kMaxValue = kFont,
+};
+
 using ServiceFactoryFunction = std::unique_ptr<service_manager::Service>();
 
 void RegisterMashService(
@@ -65,30 +78,41 @@
   services->emplace(ui::mojom::kServiceName, service_info);
 }
 
+// Wrapper function so we only have one copy of histogram macro generated code.
+void RecordMashServiceLaunch(MashService service) {
+  UMA_HISTOGRAM_ENUMERATION("Launch.MashService", service);
+}
+
 std::unique_ptr<service_manager::Service> CreateAshService() {
+  RecordMashServiceLaunch(MashService::kAsh);
   const bool show_primary_host_on_connect = true;
   return std::make_unique<ash::WindowManagerService>(
       show_primary_host_on_connect);
 }
 
 std::unique_ptr<service_manager::Service> CreateAutoclickApp() {
+  RecordMashServiceLaunch(MashService::kAutoclick);
   return std::make_unique<autoclick::AutoclickApplication>();
 }
 
 std::unique_ptr<service_manager::Service> CreateQuickLaunchApp() {
+  RecordMashServiceLaunch(MashService::kQuickLaunch);
   return std::make_unique<quick_launch::QuickLaunchApplication>();
 }
 
 std::unique_ptr<service_manager::Service> CreateShortcutViewerApp() {
+  RecordMashServiceLaunch(MashService::kShortcutViewer);
   return std::make_unique<
       keyboard_shortcut_viewer::ShortcutViewerApplication>();
 }
 
 std::unique_ptr<service_manager::Service> CreateTapVisualizerApp() {
+  RecordMashServiceLaunch(MashService::kTapVisualizer);
   return std::make_unique<tap_visualizer::TapVisualizerApp>();
 }
 
 std::unique_ptr<service_manager::Service> CreateFontService() {
+  RecordMashServiceLaunch(MashService::kFont);
   return std::make_unique<font_service::FontServiceApp>();
 }
 
diff --git a/chrome_elf/BUILD.gn b/chrome_elf/BUILD.gn
index 6cdabcb..c451120 100644
--- a/chrome_elf/BUILD.gn
+++ b/chrome_elf/BUILD.gn
@@ -93,6 +93,8 @@
   ]
 
   deps = [
+    ":sha1",
+    ":third_party_shared_defines",
     "//base",
     "//chrome/common:constants",
   ]
@@ -290,6 +292,7 @@
     "third_party_dlls/imes_unittest.cc",
     "third_party_dlls/logs_unittest.cc",
     "third_party_dlls/main_unittest.cc",
+    "third_party_dlls/main_unittest_exe.h",
     "third_party_dlls/packed_list_file_unittest.cc",
   ]
   include_dirs = [ "$target_gen_dir" ]
@@ -320,6 +323,8 @@
     ":blacklist_test_dll_2",
     ":blacklist_test_dll_3",
     ":chrome_elf",
+    ":main_unittest_dll_1",
+    ":main_unittest_dll_2",
     ":third_party_dlls_test_exe",
   ]
 }
@@ -362,13 +367,36 @@
   ]
 }
 
+shared_library("main_unittest_dll_1") {
+  testonly = true
+  sources = [
+    "third_party_dlls/main_unittest_dll_1.cc",
+  ]
+  deps = [
+    "//build/config:exe_and_shlib_deps",
+  ]
+}
+
+shared_library("main_unittest_dll_2") {
+  testonly = true
+  sources = [
+    "third_party_dlls/main_unittest_dll_2.cc",
+    "third_party_dlls/main_unittest_dll_2.def",
+  ]
+  deps = [
+    "//build/config:exe_and_shlib_deps",
+  ]
+}
+
 executable("third_party_dlls_test_exe") {
   testonly = true
   sources = [
     "third_party_dlls/main_unittest_exe.cc",
+    "third_party_dlls/main_unittest_exe.h",
   ]
   deps = [
     ":third_party_dlls",
+    "//base",
     "//build/config:exe_and_shlib_deps",
     "//build/win:default_exe_manifest",
     "//chrome/install_static:install_static_util",
diff --git a/chrome_elf/chrome_elf_test_stubs.cc b/chrome_elf/chrome_elf_test_stubs.cc
index 240c6b229..12dba81b 100644
--- a/chrome_elf/chrome_elf_test_stubs.cc
+++ b/chrome_elf/chrome_elf_test_stubs.cc
@@ -5,8 +5,12 @@
 #include "base/command_line.h"
 #include "base/files/file_path.h"
 #include "base/path_service.h"
+#include "base/stl_util.h"
+#include "base/win/windows_types.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome_elf/chrome_elf_main.h"
+#include "chrome_elf/sha1/sha1.h"
+#include "chrome_elf/third_party_dlls/logging_api.h"
 
 // This function is a temporary workaround for https://crbug.com/655788. We
 // need to come up with a better way to initialize crash reporting that can
@@ -35,3 +39,67 @@
 }
 
 void SetMetricsClientId(const char* client_id) {}
+
+struct TestLogEntry {
+  third_party_dlls::LogType log_type;
+  uint8_t basename_hash[elf_sha1::kSHA1Length];
+  uint8_t code_id_hash[elf_sha1::kSHA1Length];
+};
+
+// This test stub always writes 2 hardcoded entries into the buffer, if the
+// buffer size is large enough.
+uint32_t DrainLog(uint8_t* buffer,
+                  uint32_t buffer_size,
+                  uint32_t* log_remaining) {
+  // Alternate between log types.
+  TestLogEntry kTestLogEntries[] = {
+      {
+          third_party_dlls::LogType::kAllowed,
+          {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
+           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19},
+          {0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+           0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49},
+      },
+      {
+          third_party_dlls::LogType::kBlocked,
+          {0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
+           0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB},
+          {0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
+           0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD},
+      },
+  };
+
+  // Each entry shares the module path for convenience.
+  static constexpr char kModulePath[] = "C:\\foo\\bar\\module.dll";
+  static constexpr uint32_t kModulePathLength = base::size(kModulePath) - 1;
+
+  if (log_remaining) {
+    *log_remaining = third_party_dlls::GetLogEntrySize(kModulePathLength) *
+                     base::size(kTestLogEntries);
+  }
+
+  uint8_t* tracker = buffer;
+  for (const auto& test_entry : kTestLogEntries) {
+    uint32_t entry_size = third_party_dlls::GetLogEntrySize(kModulePathLength);
+    if (tracker + entry_size > buffer + buffer_size)
+      break;
+
+    third_party_dlls::LogEntry* log_entry =
+        reinterpret_cast<third_party_dlls::LogEntry*>(tracker);
+
+    log_entry->type = test_entry.log_type;
+    ::memcpy(log_entry->basename_hash, test_entry.basename_hash,
+             sizeof(test_entry.basename_hash));
+    ::memcpy(log_entry->code_id_hash, test_entry.code_id_hash,
+             sizeof(test_entry.code_id_hash));
+    log_entry->path_len = kModulePathLength;
+    ::memcpy(log_entry->path, kModulePath, log_entry->path_len + 1);
+
+    tracker += entry_size;
+  }
+  return tracker - buffer;
+}
+
+bool RegisterLogNotification(HANDLE event_handle) {
+  return true;
+}
diff --git a/chrome_elf/pe_image_safe/pe_image_safe.cc b/chrome_elf/pe_image_safe/pe_image_safe.cc
index 5d83ef77..7778c5ec 100644
--- a/chrome_elf/pe_image_safe/pe_image_safe.cc
+++ b/chrome_elf/pe_image_safe/pe_image_safe.cc
@@ -91,6 +91,7 @@
     return nullptr;
   }
 
+  // Sanity check that the full optional header is in this buffer.
   if ((bitness_ == ImageBitness::k64 &&
        (optional_header_offset + sizeof(IMAGE_OPTIONAL_HEADER64)) >
            image_size_) ||
@@ -99,6 +100,18 @@
     return nullptr;
   }
 
+  // If |image_size_| is currently |kImageSizeNotSet| (this is an image mapped
+  // into memory by NTLoader), now the size can be updated for accuracy.
+  if (image_size_ == kImageSizeNotSet) {
+    if (bitness_ == ImageBitness::k64) {
+      image_size_ = reinterpret_cast<PIMAGE_OPTIONAL_HEADER64>(optional_header)
+                        ->SizeOfImage;
+    } else {
+      image_size_ = reinterpret_cast<PIMAGE_OPTIONAL_HEADER32>(optional_header)
+                        ->SizeOfImage;
+    }
+  }
+
   // Nothing to verify inside the optional header at this point.
   opt_header_ = reinterpret_cast<BYTE*>(optional_header);
 
@@ -128,7 +141,7 @@
 
 void* PEImageSafe::GetImageDirectoryEntryAddr(int directory,
                                               DWORD* directory_size) {
-  assert(directory > 0 && directory < IMAGE_NUMBEROF_DIRECTORY_ENTRIES &&
+  assert(directory >= 0 && directory < IMAGE_NUMBEROF_DIRECTORY_ENTRIES &&
          ldr_image_mapping_);
 
   // GetOptionalHeader() validates the optional header.
diff --git a/chrome_elf/pe_image_safe/pe_image_safe.h b/chrome_elf/pe_image_safe/pe_image_safe.h
index 666ec4bb5..99c01f7 100644
--- a/chrome_elf/pe_image_safe/pe_image_safe.h
+++ b/chrome_elf/pe_image_safe/pe_image_safe.h
@@ -9,12 +9,15 @@
 
 #include <windows.h>
 
+#include <limits>
+
 // https://msdn.microsoft.com/library/windows/desktop/ms684179.aspx
 #define LDR_IS_DATAFILE(handle) (((ULONG_PTR)(handle)) & (ULONG_PTR)1)
 
 namespace pe_image_safe {
 
 constexpr DWORD kPageSize = 4096;
+constexpr DWORD kImageSizeNotSet = std::numeric_limits<DWORD>::max();
 
 enum class ImageBitness { kUnknown, k32, k64 };
 
@@ -45,6 +48,11 @@
   // Some functions can only be used on images that have been memory mapped by
   // the NT Loader (e.g. LoadLibrary).  This constructor must be used to enable
   // that functionality.
+  // - Note: If the mapped image size is not known (e.g. via LoadLibrary), pass
+  //   kImageSizeNotSet for |buffer_size|.  The value will be mined from the PE
+  //   headers.
+  // - Note: Full load or LOAD_LIBRARY_AS_IMAGE_RESOURCE required.
+  // LOAD_LIBRARY_AS_DATAFILE* is not sufficient for some APIs.
   PEImageSafe(HMODULE buffer, DWORD buffer_size)
       : image_(buffer), image_size_(buffer_size) {
     ldr_image_mapping_ = !LDR_IS_DATAFILE(buffer);
diff --git a/chrome_elf/third_party_dlls/DEPS b/chrome_elf/third_party_dlls/DEPS
index c1938a6..2ff284c 100644
--- a/chrome_elf/third_party_dlls/DEPS
+++ b/chrome_elf/third_party_dlls/DEPS
@@ -15,7 +15,7 @@
   "+chrome_elf/third_party_dlls",
 ]
 specific_include_rules = {
-  ".*_unittest\.cc": [
+  ".*_unittest.*": [
     "+base",
   ]
-}
\ No newline at end of file
+}
diff --git a/chrome_elf/third_party_dlls/hook.cc b/chrome_elf/third_party_dlls/hook.cc
index 57c181c..c356e6e 100644
--- a/chrome_elf/third_party_dlls/hook.cc
+++ b/chrome_elf/third_party_dlls/hook.cc
@@ -16,6 +16,7 @@
 #include "chrome_elf/third_party_dlls/logs.h"
 #include "chrome_elf/third_party_dlls/main.h"
 #include "chrome_elf/third_party_dlls/packed_list_file.h"
+#include "chrome_elf/third_party_dlls/packed_list_format.h"
 #include "sandbox/win/src/interception_internal.h"
 #include "sandbox/win/src/internal_types.h"
 #include "sandbox/win/src/nt_internals.h"
@@ -165,7 +166,8 @@
   section_path->clear();
   section_basename->clear();
 
-  pe_image_safe::PEImageSafe image(buffer, buffer_size);
+  pe_image_safe::PEImageSafe image(reinterpret_cast<HMODULE>(buffer),
+                                   buffer_size);
   PIMAGE_FILE_HEADER file_header = image.GetFileHeader();
   if (!file_header ||
       image.GetImageBitness() == pe_image_safe::ImageBitness::kUnknown) {
@@ -204,6 +206,7 @@
 
   // For now, consider it a success if at least one source results in a name.
   // Allow for the rare case of one or the other not being there.
+  // (E.g.: a module could have no export directory.)
   if (image_name->empty() && temp_section_path.empty())
     return false;
 
@@ -278,13 +281,16 @@
     return ret;
   }
 
-  // Note that one of either image_name or section_basename can be empty, and
-  // the resulting hash string would be empty as well.
-  std::string image_name_hash = elf_sha1::SHA1HashString(image_name);
-  std::string section_basename_hash =
-      elf_sha1::SHA1HashString(section_basename);
+  // Note that one of either image_name or section_basename can be empty.
+  std::string image_name_hash;
+  if (!image_name.empty())
+    image_name_hash = elf_sha1::SHA1HashString(image_name);
+  std::string section_basename_hash;
+  if (!section_basename.empty())
+    section_basename_hash = elf_sha1::SHA1HashString(section_basename);
   std::string fingerprint_hash =
-      GetFingerprintHash(image_size, time_date_stamp);
+      GetFingerprintString(image_size, time_date_stamp);
+  fingerprint_hash = elf_sha1::SHA1HashString(fingerprint_hash);
 
   // Check sources for blacklist decision.
   bool block = false;
@@ -315,7 +321,8 @@
     // No block.
     // Ensure a non-null image name for the log.  Prefer the section basename
     // (to match the path).
-    name_matched = section_basename.empty() ? &image_name : &section_basename;
+    name_matched =
+        section_basename.empty() ? &image_name_hash : &section_basename_hash;
   }
   // IME is an explicit whitelist.
   // TODO(pennymac): create an explicit allow LogType?
@@ -462,4 +469,18 @@
   return HookStatus::kSuccess;
 }
 
+bool GetDataFromImageForTesting(PVOID mapped_image,
+                                DWORD* time_date_stamp,
+                                DWORD* image_size,
+                                std::string* image_name,
+                                std::string* section_path,
+                                std::string* section_basename) {
+  if (!g_nt_query_virtual_memory_func)
+    InitImports();
+
+  return GetDataFromImage(mapped_image, pe_image_safe::kImageSizeNotSet,
+                          time_date_stamp, image_size, image_name, section_path,
+                          section_basename);
+}
+
 }  // namespace third_party_dlls
diff --git a/chrome_elf/third_party_dlls/hook.h b/chrome_elf/third_party_dlls/hook.h
index 62affc10..be29d592 100644
--- a/chrome_elf/third_party_dlls/hook.h
+++ b/chrome_elf/third_party_dlls/hook.h
@@ -5,6 +5,10 @@
 #ifndef CHROME_ELF_THIRD_PARTY_DLLS_HOOK_H_
 #define CHROME_ELF_THIRD_PARTY_DLLS_HOOK_H_
 
+#include <windows.h>
+
+#include <string>
+
 namespace third_party_dlls {
 
 // "static_cast<int>(HookStatus::value)" to access underlying value.
@@ -21,6 +25,14 @@
 // - Ensure the rest of third_party_dlls is initialized before hooking.
 HookStatus ApplyHook();
 
+// Testing-only access to private GetDataFromImage() function.
+bool GetDataFromImageForTesting(PVOID mapped_image,
+                                DWORD* time_date_stamp,
+                                DWORD* image_size,
+                                std::string* image_name,
+                                std::string* section_path,
+                                std::string* section_basename);
+
 }  // namespace third_party_dlls
 
 #endif  // CHROME_ELF_THIRD_PARTY_DLLS_HOOK_H_
diff --git a/chrome_elf/third_party_dlls/main_unittest.cc b/chrome_elf/third_party_dlls/main_unittest.cc
index f668e2ed..66845a4 100644
--- a/chrome_elf/third_party_dlls/main_unittest.cc
+++ b/chrome_elf/third_party_dlls/main_unittest.cc
@@ -7,45 +7,438 @@
 #include <windows.h>
 
 #include "base/command_line.h"
+#include "base/files/file_util.h"
+#include "base/files/scoped_temp_dir.h"
+#include "base/path_service.h"
 #include "base/process/launch.h"
+#include "base/scoped_native_library.h"
+#include "base/sha1.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/stringprintf.h"
+#include "base/strings/utf_string_conversions.h"
 #include "base/test/test_timeouts.h"
+#include "chrome_elf/sha1/sha1.h"
+#include "chrome_elf/third_party_dlls/hook.h"
+#include "chrome_elf/third_party_dlls/main_unittest_exe.h"
+#include "chrome_elf/third_party_dlls/packed_list_file.h"
+#include "chrome_elf/third_party_dlls/packed_list_format.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace third_party_dlls {
 namespace {
 
+constexpr wchar_t kTestExeFilename[] = L"third_party_dlls_test_exe.exe";
+constexpr wchar_t kTestBlFileName[] = L"blfile";
+constexpr wchar_t kTestDllName1[] = L"main_unittest_dll_1.dll";
+constexpr wchar_t kTestDllName1MixedCase[] = L"MaiN_uniTtest_dLL_1.Dll";
+constexpr wchar_t kTestDllName2[] = L"main_unittest_dll_2.dll";
+constexpr wchar_t kChineseUnicode[] = {0x68D5, 0x8272, 0x72D0, 0x72F8, 0x002E,
+                                       0x0064, 0x006C, 0x006C, 0x0000};
+constexpr wchar_t kOldBlacklistDllName[] = L"libapi2hook.dll";
+
+struct TestModuleData {
+  std::string image_name;
+  std::string section_path;
+  std::string section_basename;
+  DWORD timedatestamp;
+  DWORD imagesize;
+};
+
 // NOTE: TestTimeouts::action_max_timeout() is not long enough here.
 base::TimeDelta g_timeout = ::IsDebuggerPresent()
                                 ? base::TimeDelta::FromMilliseconds(INFINITE)
                                 : base::TimeDelta::FromMilliseconds(5000);
 
-//------------------------------------------------------------------------------
-// Third-party tests
-//------------------------------------------------------------------------------
-
-// These tests spawn a child test process to keep the hooking contained to a
-// separate process.  This prevents test clashes in certain testing
-// configurations.
-TEST(ThirdParty, Main) {
-  constexpr wchar_t exe_filename[] = L"third_party_dlls_test_exe.exe";
-
-  // 1. Spawn the test process with NO blacklist.  Expect successful DLL load.
-  const wchar_t* sys_dll_test = L"1";
-
-  base::CommandLine cmd_line = base::CommandLine::FromString(exe_filename);
-  cmd_line.AppendArgNative(sys_dll_test);
-
+// Centralize child test process control.
+void LaunchChildAndWait(const base::CommandLine& command_line, int* exit_code) {
   base::Process proc =
-      base::LaunchProcess(cmd_line, base::LaunchOptionsForTest());
+      base::LaunchProcess(command_line, base::LaunchOptionsForTest());
   ASSERT_TRUE(proc.IsValid());
 
-  int exit_code = 0;
-  if (!proc.WaitForExitWithTimeout(g_timeout, &exit_code)) {
+  *exit_code = 0;
+  if (!proc.WaitForExitWithTimeout(g_timeout, exit_code)) {
     // Timeout while waiting.  Try to cleanup.
     proc.Terminate(1, false);
     ADD_FAILURE();
-    return;
   }
+
+  return;
+}
+
+// Given the name and path of a test DLL, mine the data of interest out of it
+// and return it via |test_module|.
+// - Note: the DLL must be loaded into memory by NTLoader to mine all of the
+//         desired data (not just read from disk).
+bool GetTestModuleData(const std::wstring& file_name,
+                       const std::wstring& file_path,
+                       TestModuleData* test_module) {
+  base::FilePath path(file_path);
+  path = path.Append(file_name);
+
+  // Map the target DLL into memory just long enough to mine data out of it.
+  base::ScopedNativeLibrary test_dll(path);
+  if (!test_dll.is_valid())
+    return false;
+
+  return GetDataFromImageForTesting(
+      test_dll.get(), &test_module->timedatestamp, &test_module->imagesize,
+      &test_module->image_name, &test_module->section_path,
+      &test_module->section_basename);
+}
+
+// Turn given data into a PackedListModule structure.
+// - |image_name| should be utf-8 at this point.
+PackedListModule GeneratePackedListModule(const std::string& image_name,
+                                          DWORD timedatestamp,
+                                          DWORD imagesize) {
+  // Internally, an empty string should not be passed in here.
+  assert(!image_name.empty());
+
+  // SHA1 hash the two strings, and copy them into the new struct.
+  std::string code_id = GetFingerprintString(imagesize, timedatestamp);
+  code_id = elf_sha1::SHA1HashString(code_id);
+  std::string name_hash = elf_sha1::SHA1HashString(image_name);
+
+  PackedListModule packed_module;
+  ::memcpy(packed_module.code_id_hash, code_id.data(), elf_sha1::kSHA1Length);
+  ::memcpy(packed_module.basename_hash, name_hash.data(),
+           elf_sha1::kSHA1Length);
+
+  return packed_module;
+}
+
+inline std::wstring MakePath(const std::wstring& path,
+                             const std::wstring& name) {
+  std::wstring full_path(path);
+  full_path.push_back(L'\\');
+  full_path.append(name);
+  return full_path;
+}
+
+inline bool MakeFileCopy(const std::wstring& old_path,
+                         const std::wstring& old_name,
+                         const std::wstring& new_path,
+                         const std::wstring& new_name) {
+  base::FilePath source(MakePath(old_path, old_name));
+  base::FilePath destination(MakePath(new_path, new_name));
+  return base::CopyFileW(source, destination);
+}
+
+//------------------------------------------------------------------------------
+// ThirdPartyTest class
+//------------------------------------------------------------------------------
+
+class ThirdPartyTest : public testing::Test {
+ protected:
+  ThirdPartyTest() = default;
+
+  void SetUp() override {
+    // Setup temp test dir.
+    ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir());
+
+    // Store full path to test file.
+    base::FilePath path = scoped_temp_dir_.GetPath();
+    path = path.Append(kTestBlFileName);
+    bl_test_file_path_ = std::move(path.value());
+
+    // Also store a copy of current exe directory for efficiency.
+    base::FilePath exe;
+    ASSERT_TRUE(base::PathService::Get(base::DIR_EXE, &exe));
+    exe_dir_ = std::move(exe.value());
+
+    // Create the blacklist file empty.
+    base::File file(base::FilePath(bl_test_file_path_),
+                    base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE |
+                        base::File::FLAG_SHARE_DELETE |
+                        base::File::FLAG_DELETE_ON_CLOSE);
+    ASSERT_TRUE(file.IsValid());
+
+    // Leave file handle open for DELETE_ON_CLOSE.
+    bl_file_ = std::move(file);
+  }
+
+  void TearDown() override {}
+
+  // Overwrite the content of the blacklist file.
+  bool WriteModulesToBlacklist(const std::vector<PackedListModule>& list) {
+    bl_file_.SetLength(0);
+
+    // Write content {metadata}{array_of_modules}.
+    PackedListMetadata meta = {kInitialVersion,
+                               static_cast<uint32_t>(list.size())};
+
+    if (bl_file_.Write(0, reinterpret_cast<const char*>(&meta), sizeof(meta)) !=
+        static_cast<int>(sizeof(meta))) {
+      return false;
+    }
+    int size = static_cast<int>(list.size() * sizeof(PackedListModule));
+    if (bl_file_.Write(sizeof(PackedListMetadata),
+                       reinterpret_cast<const char*>(list.data()),
+                       size) != size) {
+      return false;
+    }
+
+    return true;
+  }
+
+  const base::string16& GetBlTestFilePath() { return bl_test_file_path_; }
+  const base::string16& GetExeDir() { return exe_dir_; }
+  const std::wstring& GetScopedTempDirValue() {
+    return scoped_temp_dir_.GetPath().value();
+  }
+
+ private:
+  base::ScopedTempDir scoped_temp_dir_;
+  base::File bl_file_;
+  base::string16 bl_test_file_path_;
+  base::string16 exe_dir_;
+
+  DISALLOW_COPY_AND_ASSIGN(ThirdPartyTest);
+};
+
+//------------------------------------------------------------------------------
+// Third-party tests
+//
+// These tests spawn a child test process to keep the hooking contained to a
+// separate process.  This prevents test clashes in certain testing
+// configurations.
+//------------------------------------------------------------------------------
+
+// Note: The test module used in this unittest has no export table.
+TEST_F(ThirdPartyTest, Base) {
+  // 1. Spawn the test process with NO blacklist.  Expect successful
+  // initialization.
+  base::CommandLine cmd_line1 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line1.AppendArgNative(GetBlTestFilePath());
+  cmd_line1.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestOnlyInitialization));
+
+  int exit_code = 0;
+  LaunchChildAndWait(cmd_line1, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadSuccess, exit_code);
+
+  //----------------------------------------------------------------------------
+  // 2. Spawn the test process with NO blacklist.  Expect successful DLL load.
+  base::CommandLine cmd_line2 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line2.AppendArgNative(GetBlTestFilePath());
+  cmd_line2.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestSingleDllLoad));
+  cmd_line2.AppendArgNative(MakePath(GetExeDir(), kTestDllName1));
+
+  LaunchChildAndWait(cmd_line2, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadSuccess, exit_code);
+
+  //----------------------------------------------------------------------------
+  // 3. Spawn the test process with blacklist.  Expect failed DLL load.
+  TestModuleData module_data = {};
+  ASSERT_TRUE(GetTestModuleData(kTestDllName1, GetExeDir(), &module_data));
+
+  // Note: image_name will be empty, as there is no export table in this test
+  //       module.
+  EXPECT_TRUE(module_data.image_name.empty());
+
+  std::vector<PackedListModule> vector(1);
+  vector.emplace_back(GeneratePackedListModule(module_data.section_basename,
+                                               module_data.timedatestamp,
+                                               module_data.imagesize));
+  ASSERT_TRUE(WriteModulesToBlacklist(vector));
+
+  base::CommandLine cmd_line3 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line3.AppendArgNative(GetBlTestFilePath());
+  cmd_line3.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestSingleDllLoad));
+  cmd_line3.AppendArgNative(MakePath(GetExeDir(), kTestDllName1));
+
+  LaunchChildAndWait(cmd_line3, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadFailed, exit_code);
+
+  //----------------------------------------------------------------------------
+  // 4. Spawn the test process with blacklist.  Expect failed DLL load.
+  //    ** Rename the module with some upper-case characters to test that
+  //       the hook matching handles case properly.
+  ASSERT_TRUE(MakeFileCopy(GetExeDir(), kTestDllName1, GetScopedTempDirValue(),
+                           kTestDllName1MixedCase));
+
+  // Note: the blacklist is already set from the previous test.
+  // Note: using the module with no export table for this test, to ensure that
+  //       the section name (the rename) is used in the comparison.
+
+  base::CommandLine cmd_line4 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line4.AppendArgNative(GetBlTestFilePath());
+  cmd_line4.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestSingleDllLoad));
+  cmd_line4.AppendArgNative(
+      MakePath(GetScopedTempDirValue(), kTestDllName1MixedCase));
+
+  LaunchChildAndWait(cmd_line4, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadFailed, exit_code);
+}
+
+// Note: The test module used in this unittest has no export table.
+TEST_F(ThirdPartyTest, WideCharEncoding) {
+  // Rename module to chinese unicode (kChineseUnicode).  Be sure to handle
+  // any conversions to UTF8 appropriately here.  No ASCII.
+  ASSERT_TRUE(MakeFileCopy(GetExeDir(), kTestDllName1, GetScopedTempDirValue(),
+                           kChineseUnicode));
+
+  // 1) Test a successful DLL load with no blacklist.
+  base::CommandLine cmd_line1 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line1.AppendArgNative(GetBlTestFilePath());
+  cmd_line1.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestSingleDllLoad));
+  cmd_line1.AppendArgNative(MakePath(GetScopedTempDirValue(), kChineseUnicode));
+
+  int exit_code = 0;
+  LaunchChildAndWait(cmd_line1, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadSuccess, exit_code);
+
+  //----------------------------------------------------------------------------
+  // 2) Test a failed DLL load with blacklist.
+  TestModuleData module_data = {};
+  ASSERT_TRUE(GetTestModuleData(kChineseUnicode, GetScopedTempDirValue(),
+                                &module_data));
+
+  // Note: image_name will be empty, as there is no export table in this test
+  //       module.
+  EXPECT_TRUE(module_data.image_name.empty());
+
+  std::vector<PackedListModule> vector;
+  vector.emplace_back(GeneratePackedListModule(module_data.section_basename,
+                                               module_data.timedatestamp,
+                                               module_data.imagesize));
+  ASSERT_TRUE(WriteModulesToBlacklist(vector));
+
+  base::CommandLine cmd_line2 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line2.AppendArgNative(GetBlTestFilePath());
+  cmd_line2.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestSingleDllLoad));
+  cmd_line2.AppendArgNative(MakePath(GetScopedTempDirValue(), kChineseUnicode));
+
+  LaunchChildAndWait(cmd_line2, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadFailed, exit_code);
+}
+
+// Note: The test module used in this unittest has an export table.
+TEST_F(ThirdPartyTest, WideCharEncodingWithExportDir) {
+  // Rename module to chinese unicode (kChineseUnicode).  Be sure to handle
+  // any conversions to UTF8 appropriately here.  No ASCII.
+  ASSERT_TRUE(MakeFileCopy(GetExeDir(), kTestDllName2, GetScopedTempDirValue(),
+                           kChineseUnicode));
+
+  // 1) Test a successful DLL load with no blacklist.
+  base::CommandLine cmd_line1 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line1.AppendArgNative(GetBlTestFilePath());
+  cmd_line1.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestSingleDllLoad));
+  cmd_line1.AppendArgNative(MakePath(GetScopedTempDirValue(), kChineseUnicode));
+
+  int exit_code = 0;
+  LaunchChildAndWait(cmd_line1, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadSuccess, exit_code);
+
+  //----------------------------------------------------------------------------
+  // 2) Test a failed DLL load with blacklist.
+  TestModuleData module_data = {};
+  ASSERT_TRUE(GetTestModuleData(kChineseUnicode, GetScopedTempDirValue(),
+                                &module_data));
+  // Ensure the export section was found as expected.
+  EXPECT_FALSE(module_data.image_name.empty());
+
+  // NOTE: a file rename does not affect the module name mined from the export
+  //       table in the PE.  So image_name and section_basename will be
+  //       different. Ensure blacklisting both section name and image name
+  //       works!
+
+  // 2a) Only blacklist the original DLL name, which should be mined out of the
+  //     export table by the hook, and the load should be blocked.
+  std::vector<PackedListModule> vector;
+  vector.emplace_back(GeneratePackedListModule(
+      base::UTF16ToASCII(kTestDllName2), module_data.timedatestamp,
+      module_data.imagesize));
+  ASSERT_TRUE(WriteModulesToBlacklist(vector));
+
+  base::CommandLine cmd_line2 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line2.AppendArgNative(GetBlTestFilePath());
+  cmd_line2.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestSingleDllLoad));
+  cmd_line2.AppendArgNative(MakePath(GetScopedTempDirValue(), kChineseUnicode));
+
+  LaunchChildAndWait(cmd_line2, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadFailed, exit_code);
+
+  // 2b) Only blacklist the new DLL file name, which should be mined out of the
+  //     section by the hook, and the load should be blocked.
+  vector.clear();
+  vector.emplace_back(GeneratePackedListModule(
+      base::UTF16ToUTF8(kChineseUnicode), module_data.timedatestamp,
+      module_data.imagesize));
+  ASSERT_TRUE(WriteModulesToBlacklist(vector));
+
+  base::CommandLine cmd_line3 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line3.AppendArgNative(GetBlTestFilePath());
+  cmd_line3.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestSingleDllLoad));
+  cmd_line3.AppendArgNative(MakePath(GetScopedTempDirValue(), kChineseUnicode));
+
+  LaunchChildAndWait(cmd_line3, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadFailed, exit_code);
+}
+
+// Note: The test module used in this unittest has no export table.
+TEST_F(ThirdPartyTest, DeprecatedBlacklistSanityCheck) {
+  // Rename module to something on the old, deprecated, hard-coded blacklist.
+  ASSERT_TRUE(MakeFileCopy(GetExeDir(), kTestDllName1, GetScopedTempDirValue(),
+                           kOldBlacklistDllName));
+
+  // 1) Test a failed DLL load with no blacklist (the old, hard-coded blacklist
+  //    should trigger a block).
+  base::CommandLine cmd_line1 = base::CommandLine::FromString(kTestExeFilename);
+  cmd_line1.AppendArgNative(GetBlTestFilePath());
+  cmd_line1.AppendArgNative(
+      base::IntToString16(main_unittest_exe::kTestSingleDllLoad));
+  cmd_line1.AppendArgNative(
+      MakePath(GetScopedTempDirValue(), kOldBlacklistDllName));
+
+  int exit_code = 0;
+  LaunchChildAndWait(cmd_line1, &exit_code);
+  ASSERT_EQ(main_unittest_exe::kDllLoadFailed, exit_code);
+}
+
+// Note: This test only sanity checks the two SHA1 libraries used on either side
+//       of the Third-Party block.
+//       This Side: chrome_elf\third_party_dlls\*,
+//                  elf_sha1::SHA1HashString().
+//       The Other Side: chrome\browser\conflicts\module_list_filter_win.cc,
+//                       base::SHA1HashString().
+TEST_F(ThirdPartyTest, SHA1SanityCheck) {
+  // Rename module to chinese unicode (kChineseUnicode).  Be sure to handle
+  // any conversions to UTF8 appropriately here.  No ASCII.
+  ASSERT_TRUE(MakeFileCopy(GetExeDir(), kTestDllName1, GetScopedTempDirValue(),
+                           kChineseUnicode));
+
+  TestModuleData module_data = {};
+  ASSERT_TRUE(GetTestModuleData(kChineseUnicode, GetScopedTempDirValue(),
+                                &module_data));
+
+  // Get hashes from elf_sha1.
+  PackedListModule elf_sha1_generated = GeneratePackedListModule(
+      base::UTF16ToUTF8(kChineseUnicode), module_data.timedatestamp,
+      module_data.imagesize);
+
+  // Get hashes from base_sha1.
+  const std::string module_basename_hash =
+      base::SHA1HashString(base::UTF16ToUTF8(kChineseUnicode));
+  const std::string module_code_id_hash =
+      base::SHA1HashString(base::StringPrintf(
+          "%08lX%lx", module_data.timedatestamp, module_data.imagesize));
+
+  // Compare the hashes.
+  EXPECT_EQ(::memcmp(elf_sha1_generated.basename_hash,
+                     module_basename_hash.data(), elf_sha1::kSHA1Length),
+            0);
+  EXPECT_EQ(::memcmp(elf_sha1_generated.code_id_hash,
+                     module_code_id_hash.data(), elf_sha1::kSHA1Length),
+            0);
 }
 
 }  // namespace
diff --git a/chrome_elf/third_party_dlls/main_unittest_dll_1.cc b/chrome_elf/third_party_dlls/main_unittest_dll_1.cc
new file mode 100644
index 0000000..60e9bfb1
--- /dev/null
+++ b/chrome_elf/third_party_dlls/main_unittest_dll_1.cc
@@ -0,0 +1,9 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <windows.h>
+
+BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
+  return TRUE;
+}
diff --git a/chrome_elf/third_party_dlls/main_unittest_dll_2.cc b/chrome_elf/third_party_dlls/main_unittest_dll_2.cc
new file mode 100644
index 0000000..cee6fac
--- /dev/null
+++ b/chrome_elf/third_party_dlls/main_unittest_dll_2.cc
@@ -0,0 +1,14 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <windows.h>
+
+extern "C" {
+// Have a dummy export so that the module gets an export table entry.
+void DummyExport() {}
+}  // extern "C"
+
+BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
+  return TRUE;
+}
diff --git a/chrome_elf/third_party_dlls/main_unittest_dll_2.def b/chrome_elf/third_party_dlls/main_unittest_dll_2.def
new file mode 100644
index 0000000..ba77883
--- /dev/null
+++ b/chrome_elf/third_party_dlls/main_unittest_dll_2.def
@@ -0,0 +1,8 @@
+; Copyright 2018 The Chromium Authors. All rights reserved.
+; Use of this source code is governed by a BSD-style license that can be
+; found in the LICENSE file.
+
+LIBRARY  "main_unittest_dll_2.dll"
+
+EXPORTS
+  DummyExport
diff --git a/chrome_elf/third_party_dlls/main_unittest_exe.cc b/chrome_elf/third_party_dlls/main_unittest_exe.cc
index 88f8acd..09f2b897 100644
--- a/chrome_elf/third_party_dlls/main_unittest_exe.cc
+++ b/chrome_elf/third_party_dlls/main_unittest_exe.cc
@@ -3,10 +3,41 @@
 // found in the LICENSE file.
 #include <windows.h>
 
+#include "chrome_elf/third_party_dlls/main_unittest_exe.h"
+
 #include <stdlib.h>
 
+#include <shellapi.h>
+
+#include "base/files/file.h"
+#include "base/scoped_native_library.h"
+#include "base/strings/utf_string_conversions.h"
 #include "chrome/install_static/product_install_details.h"
+#include "chrome_elf/third_party_dlls/logging_api.h"
 #include "chrome_elf/third_party_dlls/main.h"
+#include "chrome_elf/third_party_dlls/packed_list_file.h"
+
+using namespace third_party_dlls::main_unittest_exe;
+
+namespace {
+
+// Function object which invokes LocalFree on its parameter, which must be
+// a pointer.  To be used with std::unique_ptr and CommandLineToArgvW().
+struct LocalFreeDeleter {
+  inline void operator()(wchar_t** ptr) const { ::LocalFree(ptr); }
+};
+
+// Attempt to load a given DLL.
+ExitCode LoadDll(std::wstring name) {
+  base::FilePath dll_path(name);
+  base::ScopedNativeLibrary dll(dll_path);
+  if (!dll.is_valid())
+    return kDllLoadFailed;
+
+  return kDllLoadSuccess;
+}
+
+}  // namespace
 
 //------------------------------------------------------------------------------
 // PUBLIC
@@ -16,18 +47,84 @@
 // - Init third_party_dlls, which will apply a hook to NtMapViewOfSection.
 // - Attempt to load a specific DLL.
 //
+// Arguments:
+// #1: path to test blacklist file (mandatory).
+// #2: test identifier (mandatory).
+// #3: path to dll (test-identifier dependent).
+//
 // Returns:
 // - Negative values in case of unexpected error.
 // - 0 for successful DLL load.
 // - 1 for failed DLL load.
-int main(int argc, char** argv) {
+int main() {
+  // NOTE: The arguments must be treated as unicode for these tests.
+  int argument_count = 0;
+  std::unique_ptr<wchar_t* [], LocalFreeDeleter> argv(
+      ::CommandLineToArgvW(::GetCommandLineW(), &argument_count));
+  if (!argv)
+    return kBadCommandLine;
+
   if (third_party_dlls::IsThirdPartyInitialized())
-    _exit(-1);
+    return kThirdPartyAlreadyInitialized;
 
   install_static::InitializeProductDetailsForPrimaryModule();
 
+  // Get the required arguments, path to blacklist file and test id to run.
+  if (argument_count < 3)
+    return kMissingArgument;
+
+  const wchar_t* blacklist_path = argv[1];
+  if (!blacklist_path || ::wcslen(blacklist_path) == 0) {
+    return kBadBlacklistPath;
+  }
+
+  const wchar_t* arg2 = argv[2];
+  int test_id = ::_wtoi(arg2);
+  if (!test_id)
+    return kUnsupportedTestId;
+
+  // Override blacklist path before initializing.
+  third_party_dlls::OverrideFilePathForTesting(blacklist_path);
+
   if (!third_party_dlls::Init())
-    _exit(-2);
+    return kThirdPartyInitFailure;
+
+  // Switch on test id.
+  switch (test_id) {
+    // Just initialization.
+    case kTestOnlyInitialization:
+      break;
+    // Single DLL load.
+    case kTestSingleDllLoad: {
+      if (argument_count < 4)
+        return kMissingArgument;
+      const wchar_t* dll_name = argv[3];
+      if (!dll_name || ::wcslen(dll_name) == 0)
+        return kBadArgument;
+      ExitCode code = LoadDll(dll_name);
+
+      // Get logging.  Ensure the log is as expected.
+      uint32_t bytes = 0;
+      DrainLog(nullptr, 0, &bytes);
+      if (!bytes)
+        return kEmptyLog;
+      auto buffer = std::unique_ptr<uint8_t[]>(new uint8_t[bytes]);
+      bytes = DrainLog(&buffer[0], bytes, nullptr);
+      third_party_dlls::LogEntry* entry =
+          reinterpret_cast<third_party_dlls::LogEntry*>(&buffer[0]);
+      if ((code == kDllLoadFailed &&
+           entry->type != third_party_dlls::kBlocked) ||
+          (code == kDllLoadSuccess &&
+           entry->type != third_party_dlls::kAllowed)) {
+        return kUnexpectedLog;
+      }
+
+      return code;
+    }
+    // Unsupported argument.
+    default:
+      return kUnsupportedTestId;
+  }
 
   return 0;
 }
diff --git a/chrome_elf/third_party_dlls/main_unittest_exe.h b/chrome_elf/third_party_dlls/main_unittest_exe.h
new file mode 100644
index 0000000..2fc7946
--- /dev/null
+++ b/chrome_elf/third_party_dlls/main_unittest_exe.h
@@ -0,0 +1,34 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_ELF_THIRD_PARTY_DLLS_MAIN_UNITTEST_EXE_H_
+#define CHROME_ELF_THIRD_PARTY_DLLS_MAIN_UNITTEST_EXE_H_
+
+namespace third_party_dlls {
+namespace main_unittest_exe {
+
+enum ExitCode {
+  kDllLoadSuccess = 0,
+  kDllLoadFailed = 1,
+  // Unexpected failures are negative ints:
+  kBadCommandLine = -1,
+  kThirdPartyAlreadyInitialized = -2,
+  kThirdPartyInitFailure = -3,
+  kMissingArgument = -4,
+  kBadBlacklistPath = -5,
+  kBadArgument = -6,
+  kUnsupportedTestId = -7,
+  kEmptyLog = -8,
+  kUnexpectedLog = -9,
+};
+
+enum TestId {
+  kTestOnlyInitialization = 1,
+  kTestSingleDllLoad = 2,
+};
+
+}  // namespace main_unittest_exe
+}  // namespace third_party_dlls
+
+#endif  // CHROME_ELF_THIRD_PARTY_DLLS_MAIN_UNITTEST_EXE_H_
diff --git a/chrome_elf/third_party_dlls/packed_list_file.cc b/chrome_elf/third_party_dlls/packed_list_file.cc
index 05d496d..86aadcb37 100644
--- a/chrome_elf/third_party_dlls/packed_list_file.cc
+++ b/chrome_elf/third_party_dlls/packed_list_file.cc
@@ -13,7 +13,6 @@
 #include <limits>
 
 #include "chrome/install_static/user_data_dir.h"
-#include "chrome_elf/sha1/sha1.h"
 #include "chrome_elf/third_party_dlls/packed_list_format.h"
 
 namespace third_party_dlls {
@@ -57,6 +56,11 @@
   if (!::ReadFile(file, &metadata, sizeof(PackedListMetadata), &bytes_read,
                   FALSE) ||
       bytes_read != sizeof(PackedListMetadata)) {
+    // If |bytes_read| is actually 0, then the file was empty.
+    // A decision was made to return kArraySizeZero here, instead of a
+    // full failure.
+    if (!bytes_read)
+      return FileStatus::kArraySizeZero;
     return FileStatus::kMetadataReadFail;
   }
 
@@ -164,15 +168,6 @@
 // Public defines & functions
 //------------------------------------------------------------------------------
 
-std::string GetFingerprintHash(DWORD image_size, DWORD time_data_stamp) {
-  // Max hex 32-bit value is 8 characters long.  2*8+1.
-  char buffer[17] = {};
-  ::snprintf(buffer, sizeof(buffer), "%08lX%lx", time_data_stamp, image_size);
-
-  std::string shell(buffer);
-  return elf_sha1::SHA1HashString(shell);
-}
-
 bool IsModuleListed(const std::string& basename_hash,
                     const std::string& fingerprint_hash) {
   assert(g_initialized);
diff --git a/chrome_elf/third_party_dlls/packed_list_file.h b/chrome_elf/third_party_dlls/packed_list_file.h
index 54e644cb..9dab05ad 100644
--- a/chrome_elf/third_party_dlls/packed_list_file.h
+++ b/chrome_elf/third_party_dlls/packed_list_file.h
@@ -27,10 +27,6 @@
   COUNT
 };
 
-// Utility function that takes required PE fingerprint data and returns a SHA-1
-// fingerprint hash.  To be used with IsModuleListed() and logging APIs.
-std::string GetFingerprintHash(DWORD image_size, DWORD time_data_stamp);
-
 // Look up a binary based on the required data points.
 // - Returns true if match found in the list.
 bool IsModuleListed(const std::string& basename_hash,
diff --git a/chrome_elf/third_party_dlls/packed_list_file_unittest.cc b/chrome_elf/third_party_dlls/packed_list_file_unittest.cc
index d4eb361..c7a7b13 100644
--- a/chrome_elf/third_party_dlls/packed_list_file_unittest.cc
+++ b/chrome_elf/third_party_dlls/packed_list_file_unittest.cc
@@ -169,13 +169,15 @@
   // Test matching.
   for (const auto& test_module : GetTestArray()) {
     fingerprint_hash =
-        GetFingerprintHash(test_module.imagesize, test_module.timedatestamp);
+        GetFingerprintString(test_module.imagesize, test_module.timedatestamp);
+    fingerprint_hash = elf_sha1::SHA1HashString(fingerprint_hash);
     name_hash = elf_sha1::SHA1HashString(test_module.basename);
     EXPECT_TRUE(IsModuleListed(name_hash, fingerprint_hash));
   }
 
   // Test a failure to match.
-  fingerprint_hash = GetFingerprintHash(1337, 0x12345678);
+  fingerprint_hash = GetFingerprintString(1337, 0x12345678);
+  fingerprint_hash = elf_sha1::SHA1HashString(fingerprint_hash);
   name_hash = elf_sha1::SHA1HashString("booya.dll");
   EXPECT_FALSE(IsModuleListed(name_hash, fingerprint_hash));
 }
@@ -184,7 +186,8 @@
 TEST_F(ThirdPartyFileTest, NoFiles) {
   ASSERT_EQ(InitFromFile(), FileStatus::kSuccess);
 
-  std::string fingerprint_hash = GetFingerprintHash(1337, 0x12345678);
+  std::string fingerprint_hash = GetFingerprintString(1337, 0x12345678);
+  fingerprint_hash = elf_sha1::SHA1HashString(fingerprint_hash);
   std::string name_hash = elf_sha1::SHA1HashString("booya.dll");
   EXPECT_FALSE(IsModuleListed(name_hash, fingerprint_hash));
 }
diff --git a/chrome_elf/third_party_dlls/packed_list_format.cc b/chrome_elf/third_party_dlls/packed_list_format.cc
index 0090dfe..d93898c 100644
--- a/chrome_elf/third_party_dlls/packed_list_format.cc
+++ b/chrome_elf/third_party_dlls/packed_list_format.cc
@@ -20,4 +20,13 @@
 // Packed module data cache file.
 const wchar_t kBlFileName[] = L"\\bldata";
 
+std::string GetFingerprintString(uint32_t image_size,
+                                 uint32_t time_data_stamp) {
+  // Max hex 32-bit value is 8 characters long.  2*8+1.
+  char buffer[17] = {};
+  ::snprintf(buffer, sizeof(buffer), "%08X%x", time_data_stamp, image_size);
+
+  return std::string(buffer);
+}
+
 }  // namespace third_party_dlls
diff --git a/chrome_elf/third_party_dlls/packed_list_format.h b/chrome_elf/third_party_dlls/packed_list_format.h
index b252146..719a6697 100644
--- a/chrome_elf/third_party_dlls/packed_list_format.h
+++ b/chrome_elf/third_party_dlls/packed_list_format.h
@@ -10,6 +10,8 @@
 #ifndef CHROME_ELF_THIRD_PARTY_DLLS_PACKED_LIST_FORMAT_H_
 #define CHROME_ELF_THIRD_PARTY_DLLS_PACKED_LIST_FORMAT_H_
 
+#include <string>
+
 #include <stdint.h>
 
 #include "chrome_elf/sha1/sha1.h"
@@ -52,15 +54,22 @@
 struct PackedListModule {
   // SHA1 of lowercase, UTF-8 basename (no path).
   uint8_t basename_hash[elf_sha1::kSHA1Length];
-  // Code ID. This is equivalent to the string generated by formatting
-  // the FileHeader.TimeDateStamp and OptionalHeader.SizeOfImage with the
-  // formatting string %08X%x. Then SHA1 the string.
+  // Code ID. Get the formatted string via GetFingerprintString(), then SHA1.
   uint8_t code_id_hash[elf_sha1::kSHA1Length];
   // A timestamp used for tracking "last attempted load".  Used to manage
   // lifetime of entries in the local caches.
   uint32_t time_date_stamp;
 };
 
+// Centralized utility function that takes required PE fingerprint data and
+// returns a formatted fingerprint string. The caller should SHA1 hash the
+// returned string.
+// - This string is generated by formatting the FileHeader.TimeDateStamp
+//   and OptionalHeader.SizeOfImage with the formatting string %08X%x.
+// - To be used for PackedListModule.code_id_hash, IsModuleListed() and logging
+//   APIs.
+std::string GetFingerprintString(uint32_t image_size, uint32_t time_data_stamp);
+
 // These structs are directly written to a storage type. Therefore the padding
 // should be consistent across compilations.
 static_assert(sizeof(PackedListMetadata) == 8,
diff --git a/chromecast/browser/android/BUILD.gn b/chromecast/browser/android/BUILD.gn
index 1c532e0..5bb910f 100644
--- a/chromecast/browser/android/BUILD.gn
+++ b/chromecast/browser/android/BUILD.gn
@@ -134,6 +134,7 @@
     "//chromecast/base:base_java",
     "//components/content_view:content_view_java",
     "//components/crash/android:java",
+    "//components/embedder_support/android:media_java",
     "//content/public/android:content_java",
     "//device/geolocation:geolocation_java",
     "//media/base/android:media_java",
diff --git a/chromecast/browser/android/DEPS b/chromecast/browser/android/DEPS
index 31449f7..b548760 100644
--- a/chromecast/browser/android/DEPS
+++ b/chromecast/browser/android/DEPS
@@ -1,4 +1,5 @@
 include_rules = [
+  "+components/embedder_support/android",
   "+components/content_view",
   "+content/public/android",
   "+jni",
diff --git a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsSurfaceHelper.java b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsSurfaceHelper.java
index ecb6d6f..d31190c 100644
--- a/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsSurfaceHelper.java
+++ b/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastWebContentsSurfaceHelper.java
@@ -22,7 +22,7 @@
 import org.chromium.chromecast.base.ScopeFactories;
 import org.chromium.chromecast.base.ScopeFactory;
 import org.chromium.chromecast.base.Unit;
-import org.chromium.content.browser.ActivityContentVideoViewEmbedder;
+import org.chromium.components.embedder_support.media.ActivityContentVideoViewEmbedder;
 import org.chromium.content.browser.MediaSessionImpl;
 import org.chromium.content_public.browser.ContentVideoViewEmbedder;
 import org.chromium.content_public.browser.WebContents;
diff --git a/chromeos/chromeos_switches.cc b/chromeos/chromeos_switches.cc
index 2de01828..8181d792 100644
--- a/chromeos/chromeos_switches.cc
+++ b/chromeos/chromeos_switches.cc
@@ -554,6 +554,10 @@
 // If true, files in Android internal storage will be shown in Files app.
 const char kShowAndroidFilesInFilesApp[] = "show-android-files-in-files-app";
 
+// If true, Files app navigation is displayed with a new UI. Items are
+// re-ordered and "Downloads" is displayed inside section "My Files".
+const char kFilesAppNewStyleNavigation[] = "new-files-app-navigation";
+
 // If true, the developer tool overlay will be shown for the login/lock screen.
 // This makes it easier to test layout logic.
 const char kShowLoginDevOverlay[] = "show-login-dev-overlay";
diff --git a/chromeos/chromeos_switches.h b/chromeos/chromeos_switches.h
index 942de858..4cea44e8 100644
--- a/chromeos/chromeos_switches.h
+++ b/chromeos/chromeos_switches.h
@@ -152,6 +152,7 @@
 CHROMEOS_EXPORT extern const char kShelfHoverPreviews[];
 CHROMEOS_EXPORT extern const char kShillStub[];
 CHROMEOS_EXPORT extern const char kShowAndroidFilesInFilesApp[];
+CHROMEOS_EXPORT extern const char kFilesAppNewStyleNavigation[];
 CHROMEOS_EXPORT extern const char kShowLoginDevOverlay[];
 CHROMEOS_EXPORT extern const char kSmsTestMessages[];
 CHROMEOS_EXPORT extern const char kStubCrosSettings[];
diff --git a/chromeos/services/secure_channel/BUILD.gn b/chromeos/services/secure_channel/BUILD.gn
index cfd3781..192a9026 100644
--- a/chromeos/services/secure_channel/BUILD.gn
+++ b/chromeos/services/secure_channel/BUILD.gn
@@ -6,6 +6,10 @@
 
 static_library("secure_channel") {
   sources = [
+    "active_connection_manager.cc",
+    "active_connection_manager.h",
+    "active_connection_manager_impl.cc",
+    "active_connection_manager_impl.h",
     "authenticated_channel.cc",
     "authenticated_channel.h",
     "authenticated_channel_impl.cc",
@@ -56,6 +60,8 @@
   testonly = true
 
   sources = [
+    "fake_active_connection_manager.cc",
+    "fake_active_connection_manager.h",
     "fake_authenticated_channel.cc",
     "fake_authenticated_channel.h",
     "fake_connect_to_device_operation.cc",
@@ -94,6 +100,7 @@
   testonly = true
 
   sources = [
+    "active_connection_manager_impl_unittest.cc",
     "authenticated_channel_impl_unittest.cc",
     "connect_to_device_operation_base_unittest.cc",
     "connect_to_device_operation_factory_base_unittest.cc",
diff --git a/chromeos/services/secure_channel/active_connection_manager.cc b/chromeos/services/secure_channel/active_connection_manager.cc
new file mode 100644
index 0000000..1170dc3
--- /dev/null
+++ b/chromeos/services/secure_channel/active_connection_manager.cc
@@ -0,0 +1,85 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromeos/services/secure_channel/active_connection_manager.h"
+
+#include "base/logging.h"
+#include "chromeos/components/proximity_auth/logging/logging.h"
+#include "chromeos/services/secure_channel/authenticated_channel.h"
+
+namespace chromeos {
+
+namespace secure_channel {
+
+ActiveConnectionManager::ActiveConnectionManager(Delegate* delegate)
+    : delegate_(delegate) {
+  DCHECK(delegate);
+}
+
+ActiveConnectionManager::~ActiveConnectionManager() = default;
+
+void ActiveConnectionManager::AddActiveConnection(
+    std::unique_ptr<AuthenticatedChannel> authenticated_channel,
+    std::vector<ClientConnectionParameters> initial_clients,
+    const ConnectionDetails& connection_details) {
+  DCHECK(authenticated_channel);
+  DCHECK(!authenticated_channel->is_disconnected());
+
+  auto connection_state = GetConnectionState(connection_details);
+  if (connection_state != ConnectionState::kNoConnectionExists) {
+    PA_LOG(ERROR) << "ActiveConnectionManager::AddActiveConnection(): Tried to "
+                  << "add new active channel, but the connection state was "
+                  << connection_state
+                  << ". Connection details: " << connection_details;
+    NOTREACHED();
+    return;
+  }
+
+  PerformAddActiveConnection(std::move(authenticated_channel),
+                             std::move(initial_clients), connection_details);
+}
+
+void ActiveConnectionManager::AddClientToChannel(
+    ClientConnectionParameters client_connection_parameters,
+    const ConnectionDetails& connection_details) {
+  auto connection_state = GetConnectionState(connection_details);
+  if (connection_state != ConnectionState::kActiveConnectionExists) {
+    PA_LOG(ERROR) << "ActiveConnectionManager::AddClientToChannel(): Tried to "
+                  << "add new client to active channel, but the connection "
+                  << "state was " << connection_state << ". "
+                  << "Connection details: " << connection_details;
+    NOTREACHED();
+    return;
+  }
+
+  PerformAddClientToChannel(std::move(client_connection_parameters),
+                            connection_details);
+}
+
+void ActiveConnectionManager::OnChannelDisconnected(
+    const ConnectionDetails& connection_details) {
+  delegate_->OnDisconnected(connection_details);
+}
+
+std::ostream& operator<<(
+    std::ostream& stream,
+    const ActiveConnectionManager::ConnectionState& connection_state) {
+  switch (connection_state) {
+    case ActiveConnectionManager::ConnectionState::kActiveConnectionExists:
+      stream << "[active connection exists]";
+      break;
+    case ActiveConnectionManager::ConnectionState::kNoConnectionExists:
+      stream << "[no connection exists]";
+      break;
+    case ActiveConnectionManager::ConnectionState::
+        kDisconnectingConnectionExists:
+      stream << "[disconnection connection exists]";
+      break;
+  }
+  return stream;
+}
+
+}  // namespace secure_channel
+
+}  // namespace chromeos
diff --git a/chromeos/services/secure_channel/active_connection_manager.h b/chromeos/services/secure_channel/active_connection_manager.h
new file mode 100644
index 0000000..010d5ca
--- /dev/null
+++ b/chromeos/services/secure_channel/active_connection_manager.h
@@ -0,0 +1,92 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_SERVICES_SECURE_CHANNEL_ACTIVE_CONNECTION_MANAGER_H_
+#define CHROMEOS_SERVICES_SECURE_CHANNEL_ACTIVE_CONNECTION_MANAGER_H_
+
+#include <ostream>
+#include <string>
+#include <vector>
+
+#include "base/macros.h"
+#include "chromeos/services/secure_channel/client_connection_parameters.h"
+#include "chromeos/services/secure_channel/connection_details.h"
+#include "chromeos/services/secure_channel/public/mojom/secure_channel.mojom.h"
+
+namespace chromeos {
+
+namespace secure_channel {
+
+class AuthenticatedChannel;
+
+// Manages zero or more active connections to remote devices. Each connection
+// can be shared among one or more clients so that the underlying resources for
+// the connection to not need to be duplicated.
+class ActiveConnectionManager {
+ public:
+  class Delegate {
+   public:
+    virtual ~Delegate() = default;
+    virtual void OnDisconnected(
+        const ConnectionDetails& connection_details) = 0;
+  };
+
+  enum class ConnectionState {
+    kActiveConnectionExists,
+    kNoConnectionExists,
+    kDisconnectingConnectionExists
+  };
+
+  virtual ~ActiveConnectionManager();
+
+  virtual ConnectionState GetConnectionState(
+      const ConnectionDetails& connection_details) const = 0;
+
+  // Adds an active connection to be managed. A connection can only be added if
+  // GetConnectionState() returns kNoConnectionExists.
+  void AddActiveConnection(
+      std::unique_ptr<AuthenticatedChannel> authenticated_channel,
+      std::vector<ClientConnectionParameters> initial_clients,
+      const ConnectionDetails& connection_details);
+
+  // Adds a client to an active connection. A client can only be added if
+  // GetConnectionState() returns kActiveConnectionExists.
+  void AddClientToChannel(
+      ClientConnectionParameters client_connection_parameters,
+      const ConnectionDetails& connection_details);
+
+ protected:
+  ActiveConnectionManager(Delegate* delegate);
+
+  // Actually adds the provided connection. By the time this function is called,
+  // it has already been verified that there is no existing connection.
+  virtual void PerformAddActiveConnection(
+      std::unique_ptr<AuthenticatedChannel> authenticated_channel,
+      std::vector<ClientConnectionParameters> initial_clients,
+      const ConnectionDetails& connection_details) = 0;
+
+  // Actually adds the provided client/feature pair. By the time this function
+  // is called, it has already been verified that there an active connection
+  // exists.
+  virtual void PerformAddClientToChannel(
+      ClientConnectionParameters client_connection_parameters,
+      const ConnectionDetails& connection_details) = 0;
+
+  void OnChannelDisconnected(const ConnectionDetails& connection_details);
+
+ private:
+  Delegate* delegate_;
+
+  DISALLOW_COPY_AND_ASSIGN(ActiveConnectionManager);
+};
+
+std::ostream& operator<<(
+    std::ostream& stream,
+    const ActiveConnectionManager::ConnectionState& connection_state);
+
+}  // namespace secure_channel
+
+}  // namespace chromeos
+
+#endif  // CHROMEOS_SERVICES_SECURE_CHANNEL_ACTIVE_CONNECTION_MANAGER_H_
diff --git a/chromeos/services/secure_channel/active_connection_manager_impl.cc b/chromeos/services/secure_channel/active_connection_manager_impl.cc
new file mode 100644
index 0000000..fdac647
--- /dev/null
+++ b/chromeos/services/secure_channel/active_connection_manager_impl.cc
@@ -0,0 +1,108 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromeos/services/secure_channel/active_connection_manager_impl.h"
+
+#include "base/no_destructor.h"
+#include "base/stl_util.h"
+#include "chromeos/components/proximity_auth/logging/logging.h"
+#include "chromeos/services/secure_channel/multiplexed_channel_impl.h"
+
+namespace chromeos {
+
+namespace secure_channel {
+
+// static
+ActiveConnectionManagerImpl::Factory*
+    ActiveConnectionManagerImpl::Factory::test_factory_ = nullptr;
+
+// static
+ActiveConnectionManagerImpl::Factory*
+ActiveConnectionManagerImpl::Factory::Get() {
+  if (test_factory_)
+    return test_factory_;
+
+  static base::NoDestructor<ActiveConnectionManagerImpl::Factory> factory;
+  return factory.get();
+}
+
+// static
+void ActiveConnectionManagerImpl::Factory::SetFactoryForTesting(
+    Factory* test_factory) {
+  test_factory_ = test_factory;
+}
+
+ActiveConnectionManagerImpl::Factory::~Factory() = default;
+
+std::unique_ptr<ActiveConnectionManager>
+ActiveConnectionManagerImpl::Factory::BuildInstance(
+    ActiveConnectionManager::Delegate* delegate) {
+  return base::WrapUnique(new ActiveConnectionManagerImpl(delegate));
+}
+
+ActiveConnectionManagerImpl::ActiveConnectionManagerImpl(
+    ActiveConnectionManager::Delegate* delegate)
+    : ActiveConnectionManager(delegate) {}
+
+ActiveConnectionManagerImpl::~ActiveConnectionManagerImpl() = default;
+
+ActiveConnectionManager::ConnectionState
+ActiveConnectionManagerImpl::GetConnectionState(
+    const ConnectionDetails& connection_details) const {
+  if (!base::ContainsKey(details_to_channel_map_, connection_details))
+    return ConnectionState::kNoConnectionExists;
+
+  const MultiplexedChannel* channel =
+      details_to_channel_map_.at(connection_details).get();
+  DCHECK(channel);
+  DCHECK(!channel->IsDisconnected());
+
+  return channel->IsDisconnecting()
+             ? ConnectionState::kDisconnectingConnectionExists
+             : ConnectionState::kActiveConnectionExists;
+}
+
+void ActiveConnectionManagerImpl::PerformAddActiveConnection(
+    std::unique_ptr<AuthenticatedChannel> authenticated_channel,
+    std::vector<ClientConnectionParameters> initial_clients,
+    const ConnectionDetails& connection_details) {
+  details_to_channel_map_[connection_details] =
+      MultiplexedChannelImpl::Factory::Get()->BuildInstance(
+          std::move(authenticated_channel), this /* delegate */,
+          connection_details, &initial_clients);
+}
+
+void ActiveConnectionManagerImpl::PerformAddClientToChannel(
+    ClientConnectionParameters client_connection_parameters,
+    const ConnectionDetails& connection_details) {
+  bool success =
+      details_to_channel_map_[connection_details]->AddClientToChannel(
+          std::move(client_connection_parameters));
+  if (!success) {
+    PA_LOG(ERROR) << "ActiveConnectionManagerImpl::"
+                  << "PerformAddClientToChannel(): Could not add "
+                  << "ClientConnectionParameters to MultiplexedChannel.";
+    NOTREACHED();
+  }
+}
+
+void ActiveConnectionManagerImpl::OnDisconnected(
+    const ConnectionDetails& connection_details) {
+  // Make a copy of |connection_details|, since the owner of these details is
+  // deleted below.
+  const ConnectionDetails connection_details_copy = connection_details;
+
+  size_t num_deleted = details_to_channel_map_.erase(connection_details);
+  if (num_deleted != 1u) {
+    PA_LOG(ERROR) << "ActiveConnectionManagerImpl::OnDisconnected(): Tried to "
+                  << "delete map entry, but it did not exist.";
+    NOTREACHED();
+  }
+
+  OnChannelDisconnected(connection_details_copy);
+}
+
+}  // namespace secure_channel
+
+}  // namespace chromeos
diff --git a/chromeos/services/secure_channel/active_connection_manager_impl.h b/chromeos/services/secure_channel/active_connection_manager_impl.h
new file mode 100644
index 0000000..4caafd8
--- /dev/null
+++ b/chromeos/services/secure_channel/active_connection_manager_impl.h
@@ -0,0 +1,71 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_SERVICES_SECURE_CHANNEL_ACTIVE_CONNECTION_MANAGER_IMPL_H_
+#define CHROMEOS_SERVICES_SECURE_CHANNEL_ACTIVE_CONNECTION_MANAGER_IMPL_H_
+
+#include <string>
+#include <unordered_map>
+
+#include "base/macros.h"
+#include "chromeos/services/secure_channel/active_connection_manager.h"
+#include "chromeos/services/secure_channel/connection_details.h"
+#include "chromeos/services/secure_channel/connection_medium.h"
+#include "chromeos/services/secure_channel/multiplexed_channel.h"
+#include "chromeos/services/secure_channel/public/mojom/secure_channel.mojom.h"
+
+namespace chromeos {
+
+namespace secure_channel {
+
+// Concrete ActiveConnectionManager implementation, which utilizes
+// MultiplexedChannel instances to share individual connected channels with
+// multiple clients.
+class ActiveConnectionManagerImpl : public ActiveConnectionManager,
+                                    public MultiplexedChannel::Delegate {
+ public:
+  class Factory {
+   public:
+    static Factory* Get();
+    static void SetFactoryForTesting(Factory* test_factory);
+    virtual ~Factory();
+    virtual std::unique_ptr<ActiveConnectionManager> BuildInstance(
+        ActiveConnectionManager::Delegate* delegate);
+
+   private:
+    static Factory* test_factory_;
+  };
+
+  ~ActiveConnectionManagerImpl() override;
+
+ private:
+  ActiveConnectionManagerImpl(ActiveConnectionManager::Delegate* delegate);
+
+  // ActiveConnectionManager:
+  ConnectionState GetConnectionState(
+      const ConnectionDetails& connection_details) const override;
+  void PerformAddActiveConnection(
+      std::unique_ptr<AuthenticatedChannel> authenticated_channel,
+      std::vector<ClientConnectionParameters> initial_clients,
+      const ConnectionDetails& connection_details) override;
+  void PerformAddClientToChannel(
+      ClientConnectionParameters client_connection_parameters,
+      const ConnectionDetails& connection_details) override;
+
+  // MultiplexedChannel::Delegate:
+  void OnDisconnected(const ConnectionDetails& connection_details) override;
+
+  std::unordered_map<ConnectionDetails,
+                     std::unique_ptr<MultiplexedChannel>,
+                     ConnectionDetailsHash>
+      details_to_channel_map_;
+
+  DISALLOW_COPY_AND_ASSIGN(ActiveConnectionManagerImpl);
+};
+
+}  // namespace secure_channel
+
+}  // namespace chromeos
+
+#endif  // CHROMEOS_SERVICES_SECURE_CHANNEL_ACTIVE_CONNECTION_MANAGER_IMPL_H_
diff --git a/chromeos/services/secure_channel/active_connection_manager_impl_unittest.cc b/chromeos/services/secure_channel/active_connection_manager_impl_unittest.cc
new file mode 100644
index 0000000..eb44829
--- /dev/null
+++ b/chromeos/services/secure_channel/active_connection_manager_impl_unittest.cc
@@ -0,0 +1,401 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromeos/services/secure_channel/active_connection_manager_impl.h"
+
+#include <memory>
+
+#include "base/macros.h"
+#include "base/test/gtest_util.h"
+#include "base/test/scoped_task_environment.h"
+#include "base/unguessable_token.h"
+#include "chromeos/services/secure_channel/client_connection_parameters.h"
+#include "chromeos/services/secure_channel/connection_details.h"
+#include "chromeos/services/secure_channel/fake_active_connection_manager.h"
+#include "chromeos/services/secure_channel/fake_authenticated_channel.h"
+#include "chromeos/services/secure_channel/fake_multiplexed_channel.h"
+#include "chromeos/services/secure_channel/multiplexed_channel_impl.h"
+#include "chromeos/services/secure_channel/test_client_connection_parameters_factory.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace chromeos {
+
+namespace secure_channel {
+
+namespace {
+
+class FakeMultiplexedChannelFactory : public MultiplexedChannelImpl::Factory {
+ public:
+  FakeMultiplexedChannelFactory(MultiplexedChannel::Delegate* expected_delegate)
+      : expected_delegate_(expected_delegate) {}
+  ~FakeMultiplexedChannelFactory() override = default;
+
+  std::unordered_map<ConnectionDetails,
+                     FakeMultiplexedChannel*,
+                     ConnectionDetailsHash>&
+  connection_details_to_active_channel_map() {
+    return connection_details_to_active_channel_map_;
+  }
+
+  void set_next_expected_authenticated_channel(
+      AuthenticatedChannel* authenticated_channel) {
+    next_expected_authenticated_channel_ = authenticated_channel;
+  }
+
+  // MultiplexedChannelImpl::Factory:
+  std::unique_ptr<MultiplexedChannel> BuildInstance(
+      std::unique_ptr<AuthenticatedChannel> authenticated_channel,
+      MultiplexedChannel::Delegate* delegate,
+      ConnectionDetails connection_details,
+      std::vector<ClientConnectionParameters>* initial_clients) override {
+    EXPECT_EQ(expected_delegate_, delegate);
+    EXPECT_EQ(next_expected_authenticated_channel_,
+              authenticated_channel.get());
+    next_expected_authenticated_channel_ = nullptr;
+
+    auto fake_channel = std::make_unique<FakeMultiplexedChannel>(
+        delegate, connection_details,
+        base::BindOnce(&FakeMultiplexedChannelFactory::OnChannelDeleted,
+                       base::Unretained(this)));
+
+    for (auto& initial_client : *initial_clients)
+      fake_channel->AddClientToChannel(std::move(initial_client));
+
+    connection_details_to_active_channel_map_[connection_details] =
+        fake_channel.get();
+
+    return fake_channel;
+  }
+
+ private:
+  void OnChannelDeleted(const ConnectionDetails& connection_details) {
+    size_t num_deleted =
+        connection_details_to_active_channel_map_.erase(connection_details);
+    EXPECT_EQ(1u, num_deleted);
+  }
+
+  const MultiplexedChannel::Delegate* expected_delegate_;
+
+  AuthenticatedChannel* next_expected_authenticated_channel_ = nullptr;
+
+  std::unordered_map<ConnectionDetails,
+                     FakeMultiplexedChannel*,
+                     ConnectionDetailsHash>
+      connection_details_to_active_channel_map_;
+
+  DISALLOW_COPY_AND_ASSIGN(FakeMultiplexedChannelFactory);
+};
+
+std::vector<base::UnguessableToken> ClientListToIdList(
+    const std::vector<ClientConnectionParameters>& client_list) {
+  std::vector<base::UnguessableToken> id_list;
+  std::transform(client_list.begin(), client_list.end(),
+                 std::back_inserter(id_list),
+                 [](auto& client) { return client.id(); });
+  return id_list;
+}
+
+}  // namespace
+
+class SecureChannelActiveConnectionManagerImplTest : public testing::Test {
+ protected:
+  SecureChannelActiveConnectionManagerImplTest() = default;
+  ~SecureChannelActiveConnectionManagerImplTest() override = default;
+
+  // testing::Test:
+  void SetUp() override {
+    fake_delegate_ = std::make_unique<FakeActiveConnectionManagerDelegate>();
+
+    manager_ = ActiveConnectionManagerImpl::Factory::Get()->BuildInstance(
+        fake_delegate_.get());
+
+    ActiveConnectionManagerImpl* ptr_as_impl =
+        static_cast<ActiveConnectionManagerImpl*>(manager_.get());
+    fake_multiplexed_channel_factory_ =
+        std::make_unique<FakeMultiplexedChannelFactory>(ptr_as_impl);
+    MultiplexedChannelImpl::Factory::SetFactoryForTesting(
+        fake_multiplexed_channel_factory_.get());
+  }
+
+  void TearDown() override {
+    MultiplexedChannelImpl::Factory::SetFactoryForTesting(nullptr);
+  }
+
+  void AddActiveConnectionAndVerifyState(
+      const std::string& device_id,
+      std::vector<ClientConnectionParameters> initial_clients) {
+    EXPECT_EQ(ActiveConnectionManager::ConnectionState::kNoConnectionExists,
+              GetConnectionState(device_id));
+
+    std::vector<base::UnguessableToken> initial_client_ids =
+        ClientListToIdList(initial_clients);
+
+    auto fake_authenticated_channel =
+        std::make_unique<FakeAuthenticatedChannel>();
+    fake_multiplexed_channel_factory_->set_next_expected_authenticated_channel(
+        fake_authenticated_channel.get());
+
+    manager_->AddActiveConnection(
+        std::move(fake_authenticated_channel), std::move(initial_clients),
+        ConnectionDetails(device_id, ConnectionMedium::kBluetoothLowEnergy));
+
+    // The connection should be active, and the initial clients should now be
+    // present in the associated channel.
+    EXPECT_EQ(ActiveConnectionManager::ConnectionState::kActiveConnectionExists,
+              GetConnectionState(device_id));
+    EXPECT_EQ(initial_client_ids,
+              ClientListToIdList(
+                  GetActiveChannelForDeviceId(device_id)->added_clients()));
+  }
+
+  void AddNewClientAndVerifyState(
+      const std::string& device_id,
+      ClientConnectionParameters client_connection_parameters) {
+    EXPECT_EQ(ActiveConnectionManager::ConnectionState::kActiveConnectionExists,
+              GetConnectionState(device_id));
+
+    // Initialize to the IDs before this call.
+    std::vector<base::UnguessableToken> client_ids = ClientListToIdList(
+        GetActiveChannelForDeviceId(device_id)->added_clients());
+
+    // Add in the new ID for this new client.
+    client_ids.push_back(client_connection_parameters.id());
+
+    manager_->AddClientToChannel(
+        std::move(client_connection_parameters),
+        ConnectionDetails(device_id, ConnectionMedium::kBluetoothLowEnergy));
+
+    // The connection should remain active, and the clients list should now have
+    // the new client.
+    EXPECT_EQ(ActiveConnectionManager::ConnectionState::kActiveConnectionExists,
+              GetConnectionState(device_id));
+    EXPECT_EQ(client_ids,
+              ClientListToIdList(
+                  GetActiveChannelForDeviceId(device_id)->added_clients()));
+  }
+
+  ActiveConnectionManager::ConnectionState GetConnectionState(
+      const std::string device_id) {
+    return manager_->GetConnectionState(
+        ConnectionDetails(device_id, ConnectionMedium::kBluetoothLowEnergy));
+  }
+
+  FakeMultiplexedChannel* GetActiveChannelForDeviceId(
+      const std::string& device_id) {
+    ConnectionDetails connection_details(device_id,
+                                         ConnectionMedium::kBluetoothLowEnergy);
+    if (!base::ContainsKey(fake_multiplexed_channel_factory_
+                               ->connection_details_to_active_channel_map(),
+                           connection_details)) {
+      return nullptr;
+    }
+
+    return fake_multiplexed_channel_factory_
+        ->connection_details_to_active_channel_map()[connection_details];
+  }
+
+  size_t GetNumActiveChannels() {
+    return fake_multiplexed_channel_factory_
+        ->connection_details_to_active_channel_map()
+        .size();
+  }
+
+  size_t GetNumDisconnections(const std::string& device_id) {
+    ConnectionDetails connection_details(device_id,
+                                         ConnectionMedium::kBluetoothLowEnergy);
+
+    const auto& map =
+        fake_delegate_->connection_details_to_num_disconnections_map();
+    EXPECT_TRUE(base::ContainsKey(map, connection_details));
+
+    return map.at(connection_details);
+  }
+
+  ActiveConnectionManager* active_connection_manager() {
+    return manager_.get();
+  }
+
+ private:
+  const base::test::ScopedTaskEnvironment scoped_task_environment_;
+
+  std::unique_ptr<FakeMultiplexedChannelFactory>
+      fake_multiplexed_channel_factory_;
+  std::unique_ptr<FakeActiveConnectionManagerDelegate> fake_delegate_;
+
+  std::unique_ptr<ActiveConnectionManager> manager_;
+
+  DISALLOW_COPY_AND_ASSIGN(SecureChannelActiveConnectionManagerImplTest);
+};
+
+TEST_F(SecureChannelActiveConnectionManagerImplTest, EdgeCases) {
+  auto* client_factory = TestClientConnectionParametersFactory::Get();
+
+  std::vector<ClientConnectionParameters> client_list;
+  client_list.push_back(client_factory->Create("feature"));
+
+  AddActiveConnectionAndVerifyState("deviceId", std::move(client_list));
+
+  // Try to add another channel for the same ConnectionDetails; this should
+  // fail, since one already exists.
+  client_list.push_back(client_factory->Create("feature"));
+  EXPECT_DCHECK_DEATH(active_connection_manager()->AddActiveConnection(
+      std::make_unique<FakeAuthenticatedChannel>(), std::move(client_list),
+      ConnectionDetails("deviceId", ConnectionMedium::kBluetoothLowEnergy)));
+
+  // Move to disconnecting state.
+  GetActiveChannelForDeviceId("deviceId")->SetDisconnecting();
+  EXPECT_EQ(
+      ActiveConnectionManager::ConnectionState::kDisconnectingConnectionExists,
+      GetConnectionState("deviceId"));
+
+  // Try to add another channel; this should still fail while disconnecting.
+  client_list.push_back(client_factory->Create("feature"));
+  EXPECT_DCHECK_DEATH(active_connection_manager()->AddActiveConnection(
+      std::make_unique<FakeAuthenticatedChannel>(), std::move(client_list),
+      ConnectionDetails("deviceId", ConnectionMedium::kBluetoothLowEnergy)));
+
+  // Try to add an additional client; this should also fail while disconnecting.
+  EXPECT_DCHECK_DEATH(active_connection_manager()->AddClientToChannel(
+      client_factory->Create("feature"),
+      ConnectionDetails("deviceId", ConnectionMedium::kBluetoothLowEnergy)));
+
+  GetActiveChannelForDeviceId("deviceId")->SetDisconnected();
+  EXPECT_EQ(ActiveConnectionManager::ConnectionState::kNoConnectionExists,
+            GetConnectionState("deviceId"));
+
+  // Try to add an additional client; this should also fail while disconnected.
+  EXPECT_DCHECK_DEATH(active_connection_manager()->AddClientToChannel(
+      client_factory->Create("feature"),
+      ConnectionDetails("deviceId", ConnectionMedium::kBluetoothLowEnergy)));
+}
+
+TEST_F(SecureChannelActiveConnectionManagerImplTest, SingleChannel_OneClient) {
+  auto* client_factory = TestClientConnectionParametersFactory::Get();
+
+  std::vector<ClientConnectionParameters> client_list;
+  client_list.push_back(client_factory->Create("feature"));
+
+  AddActiveConnectionAndVerifyState("deviceId", std::move(client_list));
+  EXPECT_EQ(1u, GetNumActiveChannels());
+
+  GetActiveChannelForDeviceId("deviceId")->SetDisconnecting();
+  EXPECT_EQ(
+      ActiveConnectionManager::ConnectionState::kDisconnectingConnectionExists,
+      GetConnectionState("deviceId"));
+  EXPECT_EQ(1u, GetNumActiveChannels());
+
+  GetActiveChannelForDeviceId("deviceId")->SetDisconnected();
+  EXPECT_EQ(ActiveConnectionManager::ConnectionState::kNoConnectionExists,
+            GetConnectionState("deviceId"));
+  EXPECT_EQ(0u, GetNumActiveChannels());
+  EXPECT_EQ(1u, GetNumDisconnections("deviceId"));
+}
+
+TEST_F(SecureChannelActiveConnectionManagerImplTest,
+       SingleChannel_MultipleClients) {
+  auto* client_factory = TestClientConnectionParametersFactory::Get();
+
+  std::vector<ClientConnectionParameters> client_list;
+  client_list.push_back(client_factory->Create("feature1"));
+  client_list.push_back(client_factory->Create("feature2"));
+
+  AddActiveConnectionAndVerifyState("deviceId", std::move(client_list));
+  EXPECT_EQ(1u, GetNumActiveChannels());
+
+  AddNewClientAndVerifyState("deviceId", client_factory->Create("feature3"));
+  EXPECT_EQ(1u, GetNumActiveChannels());
+
+  GetActiveChannelForDeviceId("deviceId")->SetDisconnecting();
+  EXPECT_EQ(
+      ActiveConnectionManager::ConnectionState::kDisconnectingConnectionExists,
+      GetConnectionState("deviceId"));
+  EXPECT_EQ(1u, GetNumActiveChannels());
+
+  GetActiveChannelForDeviceId("deviceId")->SetDisconnected();
+  EXPECT_EQ(ActiveConnectionManager::ConnectionState::kNoConnectionExists,
+            GetConnectionState("deviceId"));
+  EXPECT_EQ(0u, GetNumActiveChannels());
+  EXPECT_EQ(1u, GetNumDisconnections("deviceId"));
+}
+
+TEST_F(SecureChannelActiveConnectionManagerImplTest,
+       MultipleChannels_MultipleClients) {
+  auto* client_factory = TestClientConnectionParametersFactory::Get();
+
+  // Add an initial channel with two clients.
+  std::vector<ClientConnectionParameters> client_list;
+  client_list.push_back(client_factory->Create("feature1"));
+  client_list.push_back(client_factory->Create("feature2"));
+
+  AddActiveConnectionAndVerifyState("deviceId1", std::move(client_list));
+  EXPECT_EQ(1u, GetNumActiveChannels());
+
+  // Add another channel with two more clients.
+  client_list.push_back(client_factory->Create("feature3"));
+  client_list.push_back(client_factory->Create("feature4"));
+
+  AddActiveConnectionAndVerifyState("deviceId2", std::move(client_list));
+  EXPECT_EQ(2u, GetNumActiveChannels());
+
+  // Add a new client to the first channel.
+  AddNewClientAndVerifyState("deviceId1", client_factory->Create("feature5"));
+  EXPECT_EQ(2u, GetNumActiveChannels());
+
+  // Add a new client to the second channel.
+  AddNewClientAndVerifyState("deviceId2", client_factory->Create("feature6"));
+  EXPECT_EQ(2u, GetNumActiveChannels());
+
+  // Start disconnecting the first channel.
+  GetActiveChannelForDeviceId("deviceId1")->SetDisconnecting();
+  EXPECT_EQ(
+      ActiveConnectionManager::ConnectionState::kDisconnectingConnectionExists,
+      GetConnectionState("deviceId1"));
+  EXPECT_EQ(2u, GetNumActiveChannels());
+
+  // Disconnect the first channel.
+  GetActiveChannelForDeviceId("deviceId1")->SetDisconnected();
+  EXPECT_EQ(ActiveConnectionManager::ConnectionState::kNoConnectionExists,
+            GetConnectionState("deviceId1"));
+  EXPECT_EQ(1u, GetNumActiveChannels());
+  EXPECT_EQ(1u, GetNumDisconnections("deviceId1"));
+
+  // Now, add another channel for the same device that just disconnected.
+  client_list.push_back(client_factory->Create("feature7"));
+  client_list.push_back(client_factory->Create("feature8"));
+
+  AddActiveConnectionAndVerifyState("deviceId1", std::move(client_list));
+  EXPECT_EQ(2u, GetNumActiveChannels());
+
+  // Start disconnecting the second channel.
+  GetActiveChannelForDeviceId("deviceId2")->SetDisconnecting();
+  EXPECT_EQ(
+      ActiveConnectionManager::ConnectionState::kDisconnectingConnectionExists,
+      GetConnectionState("deviceId2"));
+  EXPECT_EQ(2u, GetNumActiveChannels());
+
+  // Disconnect the second channel.
+  GetActiveChannelForDeviceId("deviceId2")->SetDisconnected();
+  EXPECT_EQ(ActiveConnectionManager::ConnectionState::kNoConnectionExists,
+            GetConnectionState("deviceId2"));
+  EXPECT_EQ(1u, GetNumActiveChannels());
+  EXPECT_EQ(1u, GetNumDisconnections("deviceId2"));
+
+  // Start disconnecting the second iteration of the first channel.
+  GetActiveChannelForDeviceId("deviceId1")->SetDisconnecting();
+  EXPECT_EQ(
+      ActiveConnectionManager::ConnectionState::kDisconnectingConnectionExists,
+      GetConnectionState("deviceId1"));
+  EXPECT_EQ(1u, GetNumActiveChannels());
+
+  // Disconnect the second iteration of the first channel.
+  GetActiveChannelForDeviceId("deviceId1")->SetDisconnected();
+  EXPECT_EQ(ActiveConnectionManager::ConnectionState::kNoConnectionExists,
+            GetConnectionState("deviceId1"));
+  EXPECT_EQ(0u, GetNumActiveChannels());
+  EXPECT_EQ(2u, GetNumDisconnections("deviceId1"));
+}
+
+}  // namespace secure_channel
+
+}  // namespace chromeos
diff --git a/chromeos/services/secure_channel/fake_active_connection_manager.cc b/chromeos/services/secure_channel/fake_active_connection_manager.cc
new file mode 100644
index 0000000..a6d8fd0
--- /dev/null
+++ b/chromeos/services/secure_channel/fake_active_connection_manager.cc
@@ -0,0 +1,97 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chromeos/services/secure_channel/fake_active_connection_manager.h"
+
+#include "base/logging.h"
+#include "base/stl_util.h"
+#include "chromeos/services/secure_channel/authenticated_channel.h"
+
+namespace chromeos {
+
+namespace secure_channel {
+
+FakeActiveConnectionManager::FakeActiveConnectionManager(
+    ActiveConnectionManager::Delegate* delegate)
+    : ActiveConnectionManager(delegate) {}
+
+FakeActiveConnectionManager::~FakeActiveConnectionManager() = default;
+
+void FakeActiveConnectionManager::SetDisconnecting(
+    const ConnectionDetails& connection_details) {
+  DCHECK(base::ContainsKey(connection_details_to_channel_map_,
+                           connection_details));
+
+  ConnectionState& state =
+      std::get<0>(connection_details_to_channel_map_[connection_details]);
+  DCHECK_EQ(ConnectionState::kActiveConnectionExists, state);
+
+  state = ConnectionState::kDisconnectingConnectionExists;
+}
+
+void FakeActiveConnectionManager::SetDisconnected(
+    const ConnectionDetails& connection_details) {
+  DCHECK(base::ContainsKey(connection_details_to_channel_map_,
+                           connection_details));
+  DCHECK_NE(
+      ConnectionState::kNoConnectionExists,
+      std::get<0>(connection_details_to_channel_map_[connection_details]));
+
+  size_t num_erased =
+      connection_details_to_channel_map_.erase(connection_details);
+  DCHECK_EQ(1u, num_erased);
+
+  OnChannelDisconnected(connection_details);
+}
+
+ActiveConnectionManager::ConnectionState
+FakeActiveConnectionManager::GetConnectionState(
+    const ConnectionDetails& connection_details) const {
+  if (!base::ContainsKey(connection_details_to_channel_map_,
+                         connection_details)) {
+    return ConnectionState::kNoConnectionExists;
+  }
+
+  return std::get<0>(connection_details_to_channel_map_.at(connection_details));
+}
+
+void FakeActiveConnectionManager::PerformAddActiveConnection(
+    std::unique_ptr<AuthenticatedChannel> authenticated_channel,
+    std::vector<ClientConnectionParameters> initial_clients,
+    const ConnectionDetails& connection_details) {
+  DCHECK(!base::ContainsKey(connection_details_to_channel_map_,
+                            connection_details));
+  connection_details_to_channel_map_[connection_details] = std::make_tuple(
+      ConnectionState::kActiveConnectionExists,
+      std::move(authenticated_channel), std::move(initial_clients));
+}
+
+void FakeActiveConnectionManager::PerformAddClientToChannel(
+    ClientConnectionParameters client_connection_parameters,
+    const ConnectionDetails& connection_details) {
+  DCHECK(base::ContainsKey(connection_details_to_channel_map_,
+                           connection_details));
+  std::get<2>(connection_details_to_channel_map_[connection_details])
+      .push_back(std::move(client_connection_parameters));
+}
+
+FakeActiveConnectionManagerDelegate::FakeActiveConnectionManagerDelegate() =
+    default;
+
+FakeActiveConnectionManagerDelegate::~FakeActiveConnectionManagerDelegate() =
+    default;
+
+void FakeActiveConnectionManagerDelegate::OnDisconnected(
+    const ConnectionDetails& connection_details) {
+  if (!base::ContainsKey(connection_details_to_num_disconnections_map_,
+                         connection_details)) {
+    connection_details_to_num_disconnections_map_[connection_details] = 0u;
+  }
+
+  ++connection_details_to_num_disconnections_map_[connection_details];
+}
+
+}  // namespace secure_channel
+
+}  // namespace chromeos
diff --git a/chromeos/services/secure_channel/fake_active_connection_manager.h b/chromeos/services/secure_channel/fake_active_connection_manager.h
new file mode 100644
index 0000000..71779f5
--- /dev/null
+++ b/chromeos/services/secure_channel/fake_active_connection_manager.h
@@ -0,0 +1,88 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMEOS_SERVICES_SECURE_CHANNEL_FAKE_ACTIVE_CONNECTION_MANAGER_H_
+#define CHROMEOS_SERVICES_SECURE_CHANNEL_FAKE_ACTIVE_CONNECTION_MANAGER_H_
+
+#include <memory>
+#include <string>
+#include <tuple>
+#include <unordered_map>
+#include <vector>
+
+#include "base/macros.h"
+#include "chromeos/services/secure_channel/active_connection_manager.h"
+#include "chromeos/services/secure_channel/client_connection_parameters.h"
+#include "chromeos/services/secure_channel/connection_details.h"
+#include "chromeos/services/secure_channel/public/mojom/secure_channel.mojom.h"
+
+namespace chromeos {
+
+namespace secure_channel {
+
+class AuthenticatedChannel;
+
+// Test ActiveConnectionManager implementation.
+class FakeActiveConnectionManager : public ActiveConnectionManager {
+ public:
+  FakeActiveConnectionManager(ActiveConnectionManager::Delegate* delegate);
+  ~FakeActiveConnectionManager() override;
+
+  using DetailsToMetadataMap =
+      std::unordered_map<ConnectionDetails,
+                         std::tuple<ConnectionState,
+                                    std::unique_ptr<AuthenticatedChannel>,
+                                    std::vector<ClientConnectionParameters>>,
+                         ConnectionDetailsHash>;
+
+  DetailsToMetadataMap& connection_details_to_channel_map() {
+    return connection_details_to_channel_map_;
+  }
+
+  void SetDisconnecting(const ConnectionDetails& connection_details);
+  void SetDisconnected(const ConnectionDetails& connection_details);
+
+ private:
+  // ActiveConnectionManager:
+  ConnectionState GetConnectionState(
+      const ConnectionDetails& connection_details) const override;
+  void PerformAddActiveConnection(
+      std::unique_ptr<AuthenticatedChannel> authenticated_channel,
+      std::vector<ClientConnectionParameters> initial_clients,
+      const ConnectionDetails& connection_details) override;
+  void PerformAddClientToChannel(
+      ClientConnectionParameters client_connection_parameters,
+      const ConnectionDetails& connection_details) override;
+
+  DetailsToMetadataMap connection_details_to_channel_map_;
+
+  DISALLOW_COPY_AND_ASSIGN(FakeActiveConnectionManager);
+};
+
+// Test ActiveConnectionManager::Delegate implementation.
+class FakeActiveConnectionManagerDelegate
+    : public ActiveConnectionManager::Delegate {
+ public:
+  FakeActiveConnectionManagerDelegate();
+  ~FakeActiveConnectionManagerDelegate() override;
+
+  const std::unordered_map<ConnectionDetails, size_t, ConnectionDetailsHash>&
+  connection_details_to_num_disconnections_map() {
+    return connection_details_to_num_disconnections_map_;
+  }
+
+ private:
+  void OnDisconnected(const ConnectionDetails& connection_details) override;
+
+  std::unordered_map<ConnectionDetails, size_t, ConnectionDetailsHash>
+      connection_details_to_num_disconnections_map_;
+
+  DISALLOW_COPY_AND_ASSIGN(FakeActiveConnectionManagerDelegate);
+};
+
+}  // namespace secure_channel
+
+}  // namespace chromeos
+
+#endif  // CHROMEOS_SERVICES_SECURE_CHANNEL_FAKE_ACTIVE_CONNECTION_MANAGER_H_
diff --git a/components/app_modal/javascript_dialog_manager.cc b/components/app_modal/javascript_dialog_manager.cc
index 6e7dc9f..7f927eb0 100644
--- a/components/app_modal/javascript_dialog_manager.cc
+++ b/components/app_modal/javascript_dialog_manager.cc
@@ -234,6 +234,16 @@
     content::RenderFrameHost* render_frame_host,
     bool is_reload,
     DialogClosedCallback callback) {
+  RunBeforeUnloadDialogWithOptions(web_contents, render_frame_host, is_reload,
+                                   false, std::move(callback));
+}
+
+void JavaScriptDialogManager::RunBeforeUnloadDialogWithOptions(
+    content::WebContents* web_contents,
+    content::RenderFrameHost* render_frame_host,
+    bool is_reload,
+    bool is_app,
+    DialogClosedCallback callback) {
   ChromeJavaScriptDialogExtraData* extra_data =
       &javascript_dialog_extra_data_[web_contents];
 
@@ -245,21 +255,27 @@
   }
 
   // Build the dialog message. We explicitly do _not_ allow the webpage to
-  // specify the contents of this dialog, because most of the time nowadays it's
-  // used for scams.
+  // specify the contents of this dialog, as per the current spec
   //
-  // This does not violate the spec. Per
-  // https://html.spec.whatwg.org/#prompt-to-unload-a-document, step 7:
+  // https://html.spec.whatwg.org/#unloading-documents, step 8:
   //
-  // "The prompt shown by the user agent may include the string of the
-  // returnValue attribute, or some leading subset thereof."
+  // "The message shown to the user is not customizable, but instead
+  // determined by the user agent. In particular, the actual value of the
+  // returnValue attribute is ignored."
   //
-  // The prompt MAY include the string. It doesn't any more. Scam web page
-  // authors have abused this, so we're taking away the toys from everyone. This
-  // is why we can't have nice things.
+  // This message used to be customizable, but it was frequently abused by
+  // scam websites so the specification was changed.
 
-  const base::string16 title = l10n_util::GetStringUTF16(is_reload ?
-      IDS_BEFORERELOAD_MESSAGEBOX_TITLE : IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE);
+  base::string16 title;
+  if (is_app) {
+    title = l10n_util::GetStringUTF16(
+        is_reload ? IDS_BEFORERELOAD_APP_MESSAGEBOX_TITLE
+                  : IDS_BEFOREUNLOAD_APP_MESSAGEBOX_TITLE);
+  } else {
+    title = l10n_util::GetStringUTF16(is_reload
+                                          ? IDS_BEFORERELOAD_MESSAGEBOX_TITLE
+                                          : IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE);
+  }
   const base::string16 message =
       l10n_util::GetStringUTF16(IDS_BEFOREUNLOAD_MESSAGEBOX_MESSAGE);
 
diff --git a/components/app_modal/javascript_dialog_manager.h b/components/app_modal/javascript_dialog_manager.h
index 57c1cac..49088146 100644
--- a/components/app_modal/javascript_dialog_manager.h
+++ b/components/app_modal/javascript_dialog_manager.h
@@ -42,6 +42,15 @@
   base::string16 GetTitle(content::WebContents* web_contents,
                           const GURL& alerting_frame_url);
 
+  // Displays a dialog asking the user if they want to leave a page. Displays
+  // a different message if the site is in an app window.
+  void RunBeforeUnloadDialogWithOptions(
+      content::WebContents* web_contents,
+      content::RenderFrameHost* render_frame_host,
+      bool is_reload,
+      bool is_app,
+      DialogClosedCallback callback);
+
   // JavaScriptDialogManager:
   void RunJavaScriptDialog(content::WebContents* web_contents,
                            content::RenderFrameHost* render_frame_host,
diff --git a/components/app_modal_strings.grdp b/components/app_modal_strings.grdp
index 7ffaaeb..fcb4999 100644
--- a/components/app_modal_strings.grdp
+++ b/components/app_modal_strings.grdp
@@ -23,6 +23,9 @@
   <message name="IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE" desc="Title for the 'before unload' dialog.">
     Leave site?
   </message>
+ <message name="IDS_BEFOREUNLOAD_APP_MESSAGEBOX_TITLE" desc="Title for the 'before unload' dialog for apps.">
+    Leave app?
+  </message>
   <message name="IDS_BEFOREUNLOAD_MESSAGEBOX_OK_BUTTON_LABEL" desc="The text on the button which navigates the user away from the page.">
     Leave
   </message>
@@ -34,6 +37,9 @@
   <message name="IDS_BEFORERELOAD_MESSAGEBOX_TITLE" desc="Title for the 'before unload' dialog for reloads.">
     Reload site?
   </message>
+  <message name="IDS_BEFORERELOAD_APP_MESSAGEBOX_TITLE" desc="Title for the 'before unload' dialog for reloads of apps.">
+    Reload app?
+  </message>
   <message name="IDS_BEFORERELOAD_MESSAGEBOX_OK_BUTTON_LABEL" desc="The text on the button which reloads the page.">
     Reload
   </message>
diff --git a/components/crash/content/browser/crash_dump_manager_android.cc b/components/crash/content/browser/crash_dump_manager_android.cc
index 1cc00de..9d5d271 100644
--- a/components/crash/content/browser/crash_dump_manager_android.cc
+++ b/components/crash/content/browser/crash_dump_manager_android.cc
@@ -27,6 +27,7 @@
 namespace breakpad {
 
 namespace {
+
 base::LazyInstance<CrashDumpManager>::Leaky g_instance =
     LAZY_INSTANCE_INITIALIZER;
 
@@ -98,6 +99,23 @@
   }
 }
 
+class DefaultUploader : public CrashDumpManager::Uploader {
+ public:
+  DefaultUploader() = default;
+  ~DefaultUploader() override = default;
+
+  // CrashDumpManager::Uploader:
+  void TryToUploadCrashDump(const base::FilePath& crash_dump_path) override {
+    // Hop over to Java to attempt to attach the logcat to the crash. This may
+    // fail, which is ok -- if it does, the crash will still be uploaded on the
+    // next browser start.
+    JNIEnv* env = base::android::AttachCurrentThread();
+    base::android::ScopedJavaLocalRef<jstring> j_dump_path =
+        base::android::ConvertUTF8ToJavaString(env, crash_dump_path.value());
+    Java_CrashDumpManager_tryToUploadMinidump(env, j_dump_path);
+  }
+};
+
 }  // namespace
 
 CrashDumpManager::CrashDumpDetails::CrashDumpDetails(
@@ -119,7 +137,6 @@
                        other.process_type,
                        other.was_oom_protected_status,
                        other.app_state) {
-  file_size = other.file_size;
   status = other.status;
 }
 
@@ -132,7 +149,8 @@
 bool CrashDumpManager::IsForegroundOom(const CrashDumpDetails& details) {
   // If the crash is size 0, it is an OOM.
   return details.process_type == content::PROCESS_TYPE_RENDERER &&
-         details.was_oom_protected_status && details.file_size == 0 &&
+         details.was_oom_protected_status &&
+         details.status == CrashDumpStatus::kEmptyDump &&
          details.app_state ==
              base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES;
 }
@@ -148,7 +166,8 @@
 CrashDumpManager::CrashDumpManager()
     : async_observers_(
           base::MakeRefCounted<
-              base::ObserverListThreadSafe<CrashDumpManager::Observer>>()) {}
+              base::ObserverListThreadSafe<CrashDumpManager::Observer>>()),
+      uploader_(std::make_unique<DefaultUploader>()) {}
 
 CrashDumpManager::~CrashDumpManager() {}
 
@@ -274,14 +293,8 @@
   }
   VLOG(1) << "Crash minidump successfully generated: " << dest_path.value();
 
-  // Hop over to Java to attempt to attach the logcat to the crash. This may
-  // fail, which is ok -- if it does, the crash will still be uploaded on the
-  // next browser start.
-  JNIEnv* env = base::android::AttachCurrentThread();
-  base::android::ScopedJavaLocalRef<jstring> j_dest_path =
-      base::android::ConvertUTF8ToJavaString(env, dest_path.value());
-  Java_CrashDumpManager_tryToUploadMinidump(env, j_dest_path);
   details.status = CrashDumpStatus::kValidDump;
+  uploader_->TryToUploadCrashDump(dest_path);
   NotifyObservers(details);
 }
 
diff --git a/components/crash/content/browser/crash_dump_manager_android.h b/components/crash/content/browser/crash_dump_manager_android.h
index 96f14e1..a08f9ce 100644
--- a/components/crash/content/browser/crash_dump_manager_android.h
+++ b/components/crash/content/browser/crash_dump_manager_android.h
@@ -6,6 +6,8 @@
 #define COMPONENTS_CRASH_CONTENT_BROWSER_CRASH_DUMP_MANAGER_ANDROID_H_
 
 #include <map>
+#include <memory>
+#include <utility>
 
 #include "base/android/application_status_listener.h"
 #include "base/files/file_path.h"
@@ -69,7 +71,6 @@
     content::ProcessType process_type = content::PROCESS_TYPE_UNKNOWN;
     bool was_oom_protected_status = false;
     base::android::ApplicationState app_state;
-    int64_t file_size = 0;
     CrashDumpStatus status = CrashDumpStatus::kNoDump;
   };
 
@@ -82,6 +83,16 @@
     virtual void OnCrashDumpProcessed(const CrashDumpDetails& details) {}
   };
 
+  // Class which aids in uploading a crash dump.
+  class Uploader {
+   public:
+    virtual ~Uploader() = default;
+
+    // Attempts to upload the specified child process minidump.
+    virtual void TryToUploadCrashDump(
+        const base::FilePath& crash_dump_path) = 0;
+  };
+
   static CrashDumpManager* GetInstance();
 
   // True when |details| is a foreground out of memory crash.
@@ -97,6 +108,13 @@
 
   base::ScopedFD CreateMinidumpFileForChild(int process_host_id);
 
+  // Careful, |uploader_| is accessed on one of the task scheduler threads.
+  // Tests should set this before any other threads are spawned.
+  void set_uploader_for_testing(std::unique_ptr<Uploader> uploader) {
+    DCHECK(uploader);
+    uploader_ = std::move(uploader);
+  }
+
  private:
   friend struct base::LazyInstanceTraitsBase<CrashDumpManager>;
 
@@ -114,6 +132,9 @@
   scoped_refptr<base::ObserverListThreadSafe<CrashDumpManager::Observer>>
       async_observers_;
 
+  // Should never be nullptr.
+  std::unique_ptr<Uploader> uploader_;
+
   // This map should only be accessed with its lock aquired as it is accessed
   // from the PROCESS_LAUNCHER and UI threads.
   base::Lock process_host_id_to_minidump_path_lock_;
diff --git a/components/crash/content/browser/crash_dump_manager_android_unittest.cc b/components/crash/content/browser/crash_dump_manager_android_unittest.cc
index a3ad2e19..17ca1fd2 100644
--- a/components/crash/content/browser/crash_dump_manager_android_unittest.cc
+++ b/components/crash/content/browser/crash_dump_manager_android_unittest.cc
@@ -4,6 +4,7 @@
 
 #include "components/crash/content/browser/crash_dump_manager_android.h"
 
+#include <string>
 #include <utility>
 
 #include "base/at_exit.h"
@@ -11,19 +12,41 @@
 #include "base/bind_helpers.h"
 #include "base/callback.h"
 #include "base/files/file.h"
+#include "base/files/file_util.h"
 #include "base/files/scoped_file.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
+#include "base/memory/scoped_refptr.h"
 #include "base/optional.h"
 #include "base/run_loop.h"
+#include "base/sequenced_task_runner.h"
 #include "base/task_scheduler/post_task.h"
 #include "base/test/histogram_tester.h"
 #include "base/test/scoped_task_environment.h"
+#include "base/threading/sequenced_task_runner_handle.h"
 #include "base/threading/thread_restrictions.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace breakpad {
 
+class CrashDumpManagerTest;
+
+class NoOpUploader : public CrashDumpManager::Uploader {
+ public:
+  NoOpUploader(scoped_refptr<base::SequencedTaskRunner> test_runner,
+               CrashDumpManagerTest* test_harness)
+      : test_runner_(std::move(test_runner)), test_harness_(test_harness) {}
+  ~NoOpUploader() override = default;
+
+  // CrashDumpManager::Uploader:
+  void TryToUploadCrashDump(const base::FilePath& crash_dump_path) override;
+
+ private:
+  scoped_refptr<base::SequencedTaskRunner> test_runner_;
+  CrashDumpManagerTest* test_harness_;
+  DISALLOW_COPY_AND_ASSIGN(NoOpUploader);
+};
+
 class CrashDumpManagerTest : public testing::Test {
  public:
   CrashDumpManagerTest()
@@ -34,28 +57,56 @@
   void SetUp() override {
     // Initialize the manager.
     ASSERT_TRUE(CrashDumpManager::GetInstance());
+    CrashDumpManager::GetInstance()->set_uploader_for_testing(
+        std::make_unique<NoOpUploader>(base::SequencedTaskRunnerHandle::Get(),
+                                       this));
   }
 
-  // TODO(csharrison): This test harness is not robust enough. Namely, it does
-  // not support actually processing a non-empty crash dump, due to JNI calls.
-  static void CreateAndProcessEmptyMinidump(
-      const CrashDumpObserver::TerminationInfo& info) {
+  void OnUploadedCrashDump() {
+    dumps_uploaded_++;
+    if (!upload_waiter_.is_null())
+      std::move(upload_waiter_).Run();
+  }
+
+  void WaitForCrashDumpsUploaded(int num_dumps) {
+    EXPECT_LE(num_dumps, dumps_uploaded_);
+    while (num_dumps < dumps_uploaded_) {
+      base::RunLoop run_loop;
+      upload_waiter_ = run_loop.QuitClosure();
+      run_loop.Run();
+    }
+  }
+
+  static void CreateAndProcessCrashDump(
+      const CrashDumpObserver::TerminationInfo& info,
+      const std::string& data) {
     base::ScopedFD fd =
         CrashDumpManager::GetInstance()->CreateMinidumpFileForChild(
             info.process_host_id);
     EXPECT_TRUE(fd.is_valid());
+    base::WriteFileDescriptor(fd.get(), data.data(), data.size());
     base::ScopedTempDir dump_dir;
     EXPECT_TRUE(dump_dir.CreateUniqueTempDir());
     CrashDumpManager::GetInstance()->ProcessMinidumpFileFromChild(
         dump_dir.GetPath(), info);
   }
 
+ protected:
+  int dumps_uploaded_ = 0;
+
  private:
   base::ShadowingAtExitManager at_exit_;
   base::test::ScopedTaskEnvironment scoped_environment_;
+  base::OnceClosure upload_waiter_;
   DISALLOW_COPY_AND_ASSIGN(CrashDumpManagerTest);
 };
 
+void NoOpUploader::TryToUploadCrashDump(const base::FilePath& crash_dump_path) {
+  test_runner_->PostTask(
+      FROM_HERE, base::BindOnce(&CrashDumpManagerTest::OnUploadedCrashDump,
+                                base::Unretained(test_harness_)));
+}
+
 class CrashDumpManagerObserver : public CrashDumpManager::Observer {
  public:
   CrashDumpManagerObserver() {}
@@ -104,8 +155,8 @@
   termination_info.was_oom_protected_status = true;
   base::PostTaskWithTraits(
       FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
-      base::Bind(&CrashDumpManagerTest::CreateAndProcessEmptyMinidump,
-                 termination_info));
+      base::BindOnce(&CrashDumpManagerTest::CreateAndProcessCrashDump,
+                     termination_info, ""));
   crash_dump_observer.WaitForProcessed();
 
   const CrashDumpManager::CrashDumpDetails& details =
@@ -115,12 +166,13 @@
   EXPECT_TRUE(details.was_oom_protected_status);
   EXPECT_EQ(base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES,
             details.app_state);
-  EXPECT_EQ(0, details.file_size);
   EXPECT_EQ(CrashDumpManager::CrashDumpStatus::kEmptyDump, details.status);
+  EXPECT_TRUE(CrashDumpManager::IsForegroundOom(details));
 
   histogram_tester.ExpectUniqueSample(
       "Tab.RendererDetailedExitStatus",
       CrashDumpManager::EMPTY_MINIDUMP_WHILE_RUNNING, 1);
+  EXPECT_EQ(0, dumps_uploaded_);
 }
 
 TEST_F(CrashDumpManagerTest, NoDumpCreated) {
@@ -142,9 +194,9 @@
   termination_info.was_oom_protected_status = true;
   base::PostTaskWithTraits(
       FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
-      base::Bind(&CrashDumpManager::ProcessMinidumpFileFromChild,
-                 base::Unretained(manager), base::FilePath(),
-                 termination_info));
+      base::BindOnce(&CrashDumpManager::ProcessMinidumpFileFromChild,
+                     base::Unretained(manager), base::FilePath(),
+                     termination_info));
   crash_dump_observer.WaitForProcessed();
 
   const CrashDumpManager::CrashDumpDetails& details =
@@ -154,10 +206,50 @@
   EXPECT_TRUE(details.was_oom_protected_status);
   EXPECT_EQ(base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES,
             details.app_state);
-  EXPECT_EQ(0, details.file_size);
   EXPECT_EQ(CrashDumpManager::CrashDumpStatus::kNoDump, details.status);
+  EXPECT_FALSE(CrashDumpManager::IsForegroundOom(details));
 
   histogram_tester.ExpectTotalCount("Tab.RendererDetailedExitStatus", 0);
+  EXPECT_EQ(0, dumps_uploaded_);
+}
+
+TEST_F(CrashDumpManagerTest, NonOomCrash) {
+  base::HistogramTester histogram_tester;
+  CrashDumpManager* manager = CrashDumpManager::GetInstance();
+
+  CrashDumpManagerObserver crash_dump_observer;
+  manager->AddObserver(&crash_dump_observer);
+
+  CrashDumpObserver::TerminationInfo termination_info;
+  termination_info.process_host_id = 1;
+  termination_info.pid = base::kNullProcessHandle;
+  termination_info.process_type = content::PROCESS_TYPE_RENDERER;
+  termination_info.app_state =
+      base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES;
+  termination_info.normal_termination = false;
+  termination_info.has_oom_protection_bindings = true;
+  termination_info.was_killed_intentionally_by_browser = false;
+  termination_info.was_oom_protected_status = true;
+  base::PostTaskWithTraits(
+      FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND},
+      base::BindOnce(&CrashDumpManagerTest::CreateAndProcessCrashDump,
+                     termination_info, "Some non-empty crash data"));
+  crash_dump_observer.WaitForProcessed();
+
+  const CrashDumpManager::CrashDumpDetails& details =
+      crash_dump_observer.last_details();
+  EXPECT_EQ(termination_info.process_host_id, details.process_host_id);
+  EXPECT_EQ(content::PROCESS_TYPE_RENDERER, details.process_type);
+  EXPECT_TRUE(details.was_oom_protected_status);
+  EXPECT_EQ(base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES,
+            details.app_state);
+  EXPECT_EQ(CrashDumpManager::CrashDumpStatus::kValidDump, details.status);
+  EXPECT_FALSE(CrashDumpManager::IsForegroundOom(details));
+
+  histogram_tester.ExpectUniqueSample(
+      "Tab.RendererDetailedExitStatus",
+      CrashDumpManager::VALID_MINIDUMP_WHILE_RUNNING, 1);
+  WaitForCrashDumpsUploaded(1);
 }
 
 }  // namespace breakpad
diff --git a/components/cronet/android/test/quic_test_server.cc b/components/cronet/android/test/quic_test_server.cc
index 34edcd76..79d2dd8 100644
--- a/components/cronet/android/test/quic_test_server.cc
+++ b/components/cronet/android/test/quic_test_server.cc
@@ -30,7 +30,7 @@
 static const int kServerPort = 6121;
 
 base::Thread* g_quic_server_thread = nullptr;
-net::QuicMemoryCacheBackend* g_quic_memory_cache_backend = nullptr;
+quic::QuicMemoryCacheBackend* g_quic_memory_cache_backend = nullptr;
 net::QuicSimpleServer* g_quic_server = nullptr;
 
 void StartOnServerThread(const base::FilePath& test_files_root,
@@ -41,9 +41,9 @@
   // Set up in-memory cache.
   base::FilePath file_dir = test_files_root.Append("quic_data");
   CHECK(base::PathExists(file_dir)) << "Quic data does not exist";
-  g_quic_memory_cache_backend = new net::QuicMemoryCacheBackend();
+  g_quic_memory_cache_backend = new quic::QuicMemoryCacheBackend();
   g_quic_memory_cache_backend->InitializeBackend(file_dir.value());
-  net::QuicConfig config;
+  quic::QuicConfig config;
 
   // Set up server certs.
   base::FilePath directory = test_data_dir.Append("net/data/ssl/certificates");
@@ -55,8 +55,8 @@
       base::FilePath()));
   g_quic_server = new net::QuicSimpleServer(
       std::move(proof_source), config,
-      net::QuicCryptoServerConfig::ConfigOptions(), net::AllSupportedVersions(),
-      g_quic_memory_cache_backend);
+      quic::QuicCryptoServerConfig::ConfigOptions(),
+      quic::AllSupportedVersions(), g_quic_memory_cache_backend);
 
   // Start listening.
   int rv = g_quic_server->Listen(
diff --git a/components/cronet/cronet_url_request_context.cc b/components/cronet/cronet_url_request_context.cc
index efbf20d..eb8d26ba 100644
--- a/components/cronet/cronet_url_request_context.cc
+++ b/components/cronet/cronet_url_request_context.cc
@@ -422,7 +422,7 @@
           static_cast<uint16_t>(quic_hint->alternate_port));
       context_->http_server_properties()->SetQuicAlternativeService(
           quic_server, alternative_service, base::Time::Max(),
-          net::QuicTransportVersionVector());
+          quic::QuicTransportVersionVector());
     }
   }
 
diff --git a/components/cronet/ios/cronet_environment.mm b/components/cronet/ios/cronet_environment.mm
index 8ecaabf..11f7a5d 100644
--- a/components/cronet/ios/cronet_environment.mm
+++ b/components/cronet/ios/cronet_environment.mm
@@ -399,7 +399,7 @@
                                          quic_hint.port());
     main_context_->http_server_properties()->SetQuicAlternativeService(
         quic_hint_server, alternative_service, base::Time::Max(),
-        net::QuicTransportVersionVector());
+        quic::QuicTransportVersionVector());
   }
 
   main_context_->transport_security_state()
diff --git a/components/cronet/url_request_context_config_unittest.cc b/components/cronet/url_request_context_config_unittest.cc
index 851ca7a..275eed65 100644
--- a/components/cronet/url_request_context_config_unittest.cc
+++ b/components/cronet/url_request_context_config_unittest.cc
@@ -91,10 +91,10 @@
   const net::HttpNetworkSession::Params* params =
       context->GetNetworkSessionParams();
   // Check Quic Connection options.
-  net::QuicTagVector quic_connection_options;
-  quic_connection_options.push_back(net::kTIME);
-  quic_connection_options.push_back(net::kTBBR);
-  quic_connection_options.push_back(net::kREJ);
+  quic::QuicTagVector quic_connection_options;
+  quic_connection_options.push_back(quic::kTIME);
+  quic_connection_options.push_back(quic::kTBBR);
+  quic_connection_options.push_back(quic::kREJ);
   EXPECT_EQ(quic_connection_options, params->quic_connection_options);
 
   // Check Custom QUIC User Agent Id.
@@ -403,15 +403,15 @@
   const net::HttpNetworkSession::Params* params =
       context->GetNetworkSessionParams();
 
-  net::QuicTagVector connection_options;
-  connection_options.push_back(net::kTIME);
-  connection_options.push_back(net::kTBBR);
-  connection_options.push_back(net::kREJ);
+  quic::QuicTagVector connection_options;
+  connection_options.push_back(quic::kTIME);
+  connection_options.push_back(quic::kTBBR);
+  connection_options.push_back(quic::kREJ);
   EXPECT_EQ(connection_options, params->quic_connection_options);
 
-  net::QuicTagVector client_connection_options;
-  client_connection_options.push_back(net::kTBBR);
-  client_connection_options.push_back(net::k1RTT);
+  quic::QuicTagVector client_connection_options;
+  client_connection_options.push_back(quic::kTBBR);
+  client_connection_options.push_back(quic::k1RTT);
   EXPECT_EQ(client_connection_options, params->quic_client_connection_options);
 }
 
diff --git a/components/data_reduction_proxy/content/browser/data_reduction_proxy_pingback_client_impl_unittest.cc b/components/data_reduction_proxy/content/browser/data_reduction_proxy_pingback_client_impl_unittest.cc
index 7761afa..c15bc30 100644
--- a/components/data_reduction_proxy/content/browser/data_reduction_proxy_pingback_client_impl_unittest.cc
+++ b/components/data_reduction_proxy/content/browser/data_reduction_proxy_pingback_client_impl_unittest.cc
@@ -171,7 +171,9 @@
     breakpad::CrashDumpManager::CrashDumpDetails details = {
         kCrashProcessId, content::PROCESS_TYPE_RENDERER, oom,
         base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES};
-    details.file_size = oom ? 0 : 1;
+    details.status =
+        oom ? breakpad::CrashDumpManager::CrashDumpStatus::kEmptyDump
+            : breakpad::CrashDumpManager::CrashDumpStatus::kValidDump;
     static_cast<breakpad::CrashDumpManager::Observer*>(pingback_client_.get())
         ->OnCrashDumpProcessed(details);
 #endif
diff --git a/components/domain_reliability/quic_error_mapping.cc b/components/domain_reliability/quic_error_mapping.cc
index f7d54f6..cac76e3 100644
--- a/components/domain_reliability/quic_error_mapping.cc
+++ b/components/domain_reliability/quic_error_mapping.cc
@@ -9,261 +9,266 @@
 namespace {
 
 const struct QuicErrorMapping {
-  net::QuicErrorCode quic_error;
+  quic::QuicErrorCode quic_error;
   const char* beacon_quic_error;
 } kQuicErrorMap[] = {
     // Connection has reached an invalid state.
-    {net::QUIC_INTERNAL_ERROR, "quic.internal_error"},
+    {quic::QUIC_INTERNAL_ERROR, "quic.internal_error"},
     // There were data frames after the a fin or reset.
-    {net::QUIC_STREAM_DATA_AFTER_TERMINATION,
+    {quic::QUIC_STREAM_DATA_AFTER_TERMINATION,
      "quic.stream_data.after_termination"},
     // Control frame is malformed.
-    {net::QUIC_INVALID_PACKET_HEADER, "quic.invalid.packet_header"},
+    {quic::QUIC_INVALID_PACKET_HEADER, "quic.invalid.packet_header"},
     // Frame data is malformed.
-    {net::QUIC_INVALID_FRAME_DATA, "quic.invalid_frame_data"},
+    {quic::QUIC_INVALID_FRAME_DATA, "quic.invalid_frame_data"},
     // The packet contained no payload.
-    {net::QUIC_MISSING_PAYLOAD, "quic.missing.payload"},
+    {quic::QUIC_MISSING_PAYLOAD, "quic.missing.payload"},
     // FEC data is malformed.
-    {net::QUIC_INVALID_FEC_DATA, "quic.invalid.fec_data"},
+    {quic::QUIC_INVALID_FEC_DATA, "quic.invalid.fec_data"},
     // STREAM frame data is malformed.
-    {net::QUIC_INVALID_STREAM_DATA, "quic.invalid.stream_data"},
+    {quic::QUIC_INVALID_STREAM_DATA, "quic.invalid.stream_data"},
     // STREAM frame data is not encrypted.
-    {net::QUIC_UNENCRYPTED_STREAM_DATA, "quic.unencrypted.stream_data"},
+    {quic::QUIC_UNENCRYPTED_STREAM_DATA, "quic.unencrypted.stream_data"},
     // Attempt to send unencrypted STREAM frame.
-    {net::QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA,
+    {quic::QUIC_ATTEMPT_TO_SEND_UNENCRYPTED_STREAM_DATA,
      "quic.attempt.to.unencrypted.stream.data"},
     // Received a frame which is likely the result of memory corruption.
-    {net::QUIC_MAYBE_CORRUPTED_MEMORY, "quic.maybe.corrupted.momery"},
+    {quic::QUIC_MAYBE_CORRUPTED_MEMORY, "quic.maybe.corrupted.momery"},
     // FEC frame data is not encrypted.
-    {net::QUIC_UNENCRYPTED_FEC_DATA, "quic.unencrypted.fec.data"},
+    {quic::QUIC_UNENCRYPTED_FEC_DATA, "quic.unencrypted.fec.data"},
     // RST_STREAM frame data is malformed.
-    {net::QUIC_INVALID_RST_STREAM_DATA, "quic.invalid.rst_stream_data"},
+    {quic::QUIC_INVALID_RST_STREAM_DATA, "quic.invalid.rst_stream_data"},
     // CONNECTION_CLOSE frame data is malformed.
-    {net::QUIC_INVALID_CONNECTION_CLOSE_DATA,
+    {quic::QUIC_INVALID_CONNECTION_CLOSE_DATA,
      "quic.invalid.connection_close_data"},
     // GOAWAY frame data is malformed.
-    {net::QUIC_INVALID_GOAWAY_DATA, "quic.invalid.goaway_data"},
+    {quic::QUIC_INVALID_GOAWAY_DATA, "quic.invalid.goaway_data"},
     // WINDOW_UPDATE frame data is malformed.
-    {net::QUIC_INVALID_WINDOW_UPDATE_DATA, "quic.invalid.window_update_data"},
+    {quic::QUIC_INVALID_WINDOW_UPDATE_DATA, "quic.invalid.window_update_data"},
     // BLOCKED frame data is malformed.
-    {net::QUIC_INVALID_BLOCKED_DATA, "quic.invalid.blocked_data"},
+    {quic::QUIC_INVALID_BLOCKED_DATA, "quic.invalid.blocked_data"},
     // STOP_WAITING frame data is malformed.
-    {net::QUIC_INVALID_STOP_WAITING_DATA, "quic.invalid.stop_waiting_data"},
+    {quic::QUIC_INVALID_STOP_WAITING_DATA, "quic.invalid.stop_waiting_data"},
     // PATH_CLOSE frame data is malformed.
-    {net::QUIC_INVALID_PATH_CLOSE_DATA, "quic.invalid_path_close_data"},
+    {quic::QUIC_INVALID_PATH_CLOSE_DATA, "quic.invalid_path_close_data"},
     // ACK frame data is malformed.
-    {net::QUIC_INVALID_ACK_DATA, "quic.invalid.ack_data"},
+    {quic::QUIC_INVALID_ACK_DATA, "quic.invalid.ack_data"},
 
     // Version negotiation packet is malformed.
-    {net::QUIC_INVALID_VERSION_NEGOTIATION_PACKET,
+    {quic::QUIC_INVALID_VERSION_NEGOTIATION_PACKET,
      "quic_invalid_version_negotiation_packet"},
     // Public RST packet is malformed.
-    {net::QUIC_INVALID_PUBLIC_RST_PACKET, "quic.invalid.public_rst_packet"},
+    {quic::QUIC_INVALID_PUBLIC_RST_PACKET, "quic.invalid.public_rst_packet"},
 
     // There was an error decrypting.
-    {net::QUIC_DECRYPTION_FAILURE, "quic.decryption.failure"},
+    {quic::QUIC_DECRYPTION_FAILURE, "quic.decryption.failure"},
     // There was an error encrypting.
-    {net::QUIC_ENCRYPTION_FAILURE, "quic.encryption.failure"},
+    {quic::QUIC_ENCRYPTION_FAILURE, "quic.encryption.failure"},
     // The packet exceeded kMaxPacketSize.
-    {net::QUIC_PACKET_TOO_LARGE, "quic.packet.too_large"},
+    {quic::QUIC_PACKET_TOO_LARGE, "quic.packet.too_large"},
     // The peer is going away.  May be a client or server.
-    {net::QUIC_PEER_GOING_AWAY, "quic.peer_going_away"},
+    {quic::QUIC_PEER_GOING_AWAY, "quic.peer_going_away"},
     // A stream ID was invalid.
-    {net::QUIC_INVALID_STREAM_ID, "quic.invalid_stream_id"},
+    {quic::QUIC_INVALID_STREAM_ID, "quic.invalid_stream_id"},
     // A priority was invalid.
-    {net::QUIC_INVALID_PRIORITY, "quic.invalid_priority"},
+    {quic::QUIC_INVALID_PRIORITY, "quic.invalid_priority"},
     // Too many streams already open.
-    {net::QUIC_TOO_MANY_OPEN_STREAMS, "quic.too_many_open_streams"},
+    {quic::QUIC_TOO_MANY_OPEN_STREAMS, "quic.too_many_open_streams"},
     // The peer created too many available streams.
-    {net::QUIC_TOO_MANY_AVAILABLE_STREAMS, "quic.too_many_available_streams"},
+    {quic::QUIC_TOO_MANY_AVAILABLE_STREAMS, "quic.too_many_available_streams"},
     // Received public reset for this connection.
-    {net::QUIC_PUBLIC_RESET, "quic.public_reset"},
+    {quic::QUIC_PUBLIC_RESET, "quic.public_reset"},
     // Invalid protocol version.
-    {net::QUIC_INVALID_VERSION, "quic.invalid_version"},
+    {quic::QUIC_INVALID_VERSION, "quic.invalid_version"},
 
     // The Header ID for a stream was too far from the previous.
-    {net::QUIC_INVALID_HEADER_ID, "quic.invalid_header_id"},
+    {quic::QUIC_INVALID_HEADER_ID, "quic.invalid_header_id"},
     // Negotiable parameter received during handshake had invalid value.
-    {net::QUIC_INVALID_NEGOTIATED_VALUE, "quic.invalid_negotiated_value"},
+    {quic::QUIC_INVALID_NEGOTIATED_VALUE, "quic.invalid_negotiated_value"},
     // There was an error decompressing data.
-    {net::QUIC_DECOMPRESSION_FAILURE, "quic.decompression_failure"},
+    {quic::QUIC_DECOMPRESSION_FAILURE, "quic.decompression_failure"},
     // We hit our prenegotiated (or default) timeout
-    {net::QUIC_NETWORK_IDLE_TIMEOUT, "quic.connection.idle_time_out"},
+    {quic::QUIC_NETWORK_IDLE_TIMEOUT, "quic.connection.idle_time_out"},
     // We hit our overall connection timeout
-    {net::QUIC_HANDSHAKE_TIMEOUT, "quic.connection.handshake_timed_out"},
+    {quic::QUIC_HANDSHAKE_TIMEOUT, "quic.connection.handshake_timed_out"},
     // There was an error encountered migrating addresses.
-    {net::QUIC_ERROR_MIGRATING_ADDRESS, "quic.error_migrating_address"},
+    {quic::QUIC_ERROR_MIGRATING_ADDRESS, "quic.error_migrating_address"},
     // There was an error encountered migrating port only.
-    {net::QUIC_ERROR_MIGRATING_PORT, "quic.error_migrating_port"},
+    {quic::QUIC_ERROR_MIGRATING_PORT, "quic.error_migrating_port"},
     // There was an error while writing to the socket.
-    {net::QUIC_PACKET_WRITE_ERROR, "quic.packet.write_error"},
+    {quic::QUIC_PACKET_WRITE_ERROR, "quic.packet.write_error"},
     // There was an error while reading from the socket.
-    {net::QUIC_PACKET_READ_ERROR, "quic.packet.read_error"},
+    {quic::QUIC_PACKET_READ_ERROR, "quic.packet.read_error"},
     // We received a STREAM_FRAME with no data and no fin flag set.
-    {net::QUIC_EMPTY_STREAM_FRAME_NO_FIN, "quic.empty_stream_frame_no_fin"},
+    {quic::QUIC_EMPTY_STREAM_FRAME_NO_FIN, "quic.empty_stream_frame_no_fin"},
     // We received invalid data on the headers stream.
-    {net::QUIC_INVALID_HEADERS_STREAM_DATA, "quic.invalid_headers_stream_data"},
+    {quic::QUIC_INVALID_HEADERS_STREAM_DATA,
+     "quic.invalid_headers_stream_data"},
     // The peer received too much data, violating flow control.
-    {net::QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA,
+    {quic::QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA,
      "quic.flow_control.received_too_much_data"},
     // The peer sent too much data, violating flow control.
-    {net::QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA,
+    {quic::QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA,
      "quic.flow_control.sent_too_much_data"},
     // The peer received an invalid flow control window.
-    {net::QUIC_FLOW_CONTROL_INVALID_WINDOW, "quic.flow_control.invalid_window"},
+    {quic::QUIC_FLOW_CONTROL_INVALID_WINDOW,
+     "quic.flow_control.invalid_window"},
     // The connection has been IP pooled into an existing connection.
-    {net::QUIC_CONNECTION_IP_POOLED, "quic.connection.ip_pooled"},
+    {quic::QUIC_CONNECTION_IP_POOLED, "quic.connection.ip_pooled"},
     // The connection has too many outstanding sent packets.
-    {net::QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS,
+    {quic::QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS,
      "quic.too_many_outstanding_sent_packets"},
     // The connection has too many outstanding received packets.
-    {net::QUIC_TOO_MANY_OUTSTANDING_RECEIVED_PACKETS,
+    {quic::QUIC_TOO_MANY_OUTSTANDING_RECEIVED_PACKETS,
      "quic.too_many_outstanding_received_packets"},
     // The quic connection job to load server config is cancelled.
-    {net::QUIC_CONNECTION_CANCELLED, "quic.connection.cancelled"},
+    {quic::QUIC_CONNECTION_CANCELLED, "quic.connection.cancelled"},
     // Disabled QUIC because of high packet loss rate.
-    {net::QUIC_BAD_PACKET_LOSS_RATE, "quic.bad_packet_loss_rate"},
+    {quic::QUIC_BAD_PACKET_LOSS_RATE, "quic.bad_packet_loss_rate"},
     // Disabled QUIC because of too many PUBLIC_RESETs post handshake.
-    {net::QUIC_PUBLIC_RESETS_POST_HANDSHAKE,
+    {quic::QUIC_PUBLIC_RESETS_POST_HANDSHAKE,
      "quic.public_resets_post_handshake"},
     // Closed because we failed to serialize a packet.
-    {net::QUIC_FAILED_TO_SERIALIZE_PACKET, "quic.failed_to_serialize_packet"},
+    {quic::QUIC_FAILED_TO_SERIALIZE_PACKET, "quic.failed_to_serialize_packet"},
     // QUIC timed out after too many RTOs.
-    {net::QUIC_TOO_MANY_RTOS, "quic.too_many_rtos"},
+    {quic::QUIC_TOO_MANY_RTOS, "quic.too_many_rtos"},
     // Crypto errors.
 
     // Hanshake failed.
-    {net::QUIC_HANDSHAKE_FAILED, "quic.handshake_failed"},
+    {quic::QUIC_HANDSHAKE_FAILED, "quic.handshake_failed"},
     // Handshake message contained out of order tags.
-    {net::QUIC_CRYPTO_TAGS_OUT_OF_ORDER, "quic.crypto.tags_out_of_order"},
+    {quic::QUIC_CRYPTO_TAGS_OUT_OF_ORDER, "quic.crypto.tags_out_of_order"},
     // Handshake message contained too many entries.
-    {net::QUIC_CRYPTO_TOO_MANY_ENTRIES, "quic.crypto.too_many_entries"},
+    {quic::QUIC_CRYPTO_TOO_MANY_ENTRIES, "quic.crypto.too_many_entries"},
     // Handshake message contained an invalid value length.
-    {net::QUIC_CRYPTO_INVALID_VALUE_LENGTH, "quic.crypto.invalid_value_length"},
+    {quic::QUIC_CRYPTO_INVALID_VALUE_LENGTH,
+     "quic.crypto.invalid_value_length"},
     // A crypto message was received after the handshake was complete.
-    {net::QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE,
+    {quic::QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE,
      "quic.crypto_message_after_handshake_complete"},
     // A crypto message was received with an illegal message tag.
-    {net::QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "quic.invalid_crypto_message_type"},
+    {quic::QUIC_INVALID_CRYPTO_MESSAGE_TYPE,
+     "quic.invalid_crypto_message_type"},
     // A crypto message was received with an illegal parameter.
-    {net::QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER,
+    {quic::QUIC_INVALID_CRYPTO_MESSAGE_PARAMETER,
      "quic.invalid_crypto_message_parameter"},
     // An invalid channel id signature was supplied.
-    {net::QUIC_INVALID_CHANNEL_ID_SIGNATURE,
+    {quic::QUIC_INVALID_CHANNEL_ID_SIGNATURE,
      "quic.invalid_channel_id_signature"},
     // A crypto message was received with a mandatory parameter missing.
-    {net::QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND,
+    {quic::QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND,
      "quic.crypto_message.parameter_not_found"},
     // A crypto message was received with a parameter that has no overlap
     // with the local parameter.
-    {net::QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP,
+    {quic::QUIC_CRYPTO_MESSAGE_PARAMETER_NO_OVERLAP,
      "quic.crypto_message.parameter_no_overlap"},
     // A crypto message was received that contained a parameter with too few
     // values.
-    {net::QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND,
+    {quic::QUIC_CRYPTO_MESSAGE_INDEX_NOT_FOUND,
      "quic_crypto_message_index_not_found"},
     // A demand for an unsupport proof type was received.
-    {net::QUIC_UNSUPPORTED_PROOF_DEMAND, "quic.unsupported_proof_demand"},
+    {quic::QUIC_UNSUPPORTED_PROOF_DEMAND, "quic.unsupported_proof_demand"},
     // An internal error occured in crypto processing.
-    {net::QUIC_CRYPTO_INTERNAL_ERROR, "quic.crypto.internal_error"},
+    {quic::QUIC_CRYPTO_INTERNAL_ERROR, "quic.crypto.internal_error"},
     // A crypto handshake message specified an unsupported version.
-    {net::QUIC_CRYPTO_VERSION_NOT_SUPPORTED,
+    {quic::QUIC_CRYPTO_VERSION_NOT_SUPPORTED,
      "quic.crypto.version_not_supported"},
     // A crypto handshake message resulted in a stateless reject.
-    {net::QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT,
+    {quic::QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT,
      "quic.crypto.handshake_stateless_reject"},
     // There was no intersection between the crypto primitives supported by the
     // peer and ourselves.
-    {net::QUIC_CRYPTO_NO_SUPPORT, "quic.crypto.no_support"},
+    {quic::QUIC_CRYPTO_NO_SUPPORT, "quic.crypto.no_support"},
     // The server rejected our client hello messages too many times.
-    {net::QUIC_CRYPTO_TOO_MANY_REJECTS, "quic.crypto.too_many_rejects"},
+    {quic::QUIC_CRYPTO_TOO_MANY_REJECTS, "quic.crypto.too_many_rejects"},
     // The client rejected the server's certificate chain or signature.
-    {net::QUIC_PROOF_INVALID, "quic.proof_invalid"},
+    {quic::QUIC_PROOF_INVALID, "quic.proof_invalid"},
     // A crypto message was received with a duplicate tag.
-    {net::QUIC_CRYPTO_DUPLICATE_TAG, "quic.crypto.duplicate_tag"},
+    {quic::QUIC_CRYPTO_DUPLICATE_TAG, "quic.crypto.duplicate_tag"},
     // A crypto message was received with the wrong encryption level (i.e. it
     // should have been encrypted but was not.)
-    {net::QUIC_CRYPTO_ENCRYPTION_LEVEL_INCORRECT,
+    {quic::QUIC_CRYPTO_ENCRYPTION_LEVEL_INCORRECT,
      "quic.crypto.encryption_level_incorrect"},
     // The server config for a server has expired.
-    {net::QUIC_CRYPTO_SERVER_CONFIG_EXPIRED,
+    {quic::QUIC_CRYPTO_SERVER_CONFIG_EXPIRED,
      "quic.crypto.server_config_expired"},
     // We failed to setup the symmetric keys for a connection.
-    {net::QUIC_CRYPTO_SYMMETRIC_KEY_SETUP_FAILED,
+    {quic::QUIC_CRYPTO_SYMMETRIC_KEY_SETUP_FAILED,
      "quic.crypto.symmetric_key_setup_failed"},
     // A handshake message arrived, but we are still validating the
     // previous handshake message.
-    {net::QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO,
+    {quic::QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO,
      "quic.crypto_message_while_validating_client_hello"},
     // A server config update arrived before the handshake is complete.
-    {net::QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE,
+    {quic::QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE,
      "quic.crypto.update_before_handshake_complete"},
     // CHLO cannot fit in one packet.
-    {net::QUIC_CRYPTO_CHLO_TOO_LARGE, "quic.crypto.chlo_too_large"},
+    {quic::QUIC_CRYPTO_CHLO_TOO_LARGE, "quic.crypto.chlo_too_large"},
     // This connection involved a version negotiation which appears to have been
     // tampered with.
-    {net::QUIC_VERSION_NEGOTIATION_MISMATCH,
+    {quic::QUIC_VERSION_NEGOTIATION_MISMATCH,
      "quic.version_negotiation_mismatch"},
 
     // Multipath is not enabled, but a packet with multipath flag on is
     // received.
-    {net::QUIC_BAD_MULTIPATH_FLAG, "quic.bad_multipath_flag"},
+    {quic::QUIC_BAD_MULTIPATH_FLAG, "quic.bad_multipath_flag"},
     // A path is supposed to exist but does not.
-    {net::QUIC_MULTIPATH_PATH_DOES_NOT_EXIST,
+    {quic::QUIC_MULTIPATH_PATH_DOES_NOT_EXIST,
      "quic.quic_multipath_path_does_not_exist"},
     // A path is supposed to be active but is not.
-    {net::QUIC_MULTIPATH_PATH_NOT_ACTIVE,
+    {quic::QUIC_MULTIPATH_PATH_NOT_ACTIVE,
      "quic.quic_multipath_path_not_active"},
 
     // Network change and connection migration errors.
 
     // IP address changed causing connection close.
-    {net::QUIC_IP_ADDRESS_CHANGED, "quic.ip_address_changed"},
+    {quic::QUIC_IP_ADDRESS_CHANGED, "quic.ip_address_changed"},
     // Network changed, but connection had no migratable streams.
-    {net::QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS,
+    {quic::QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS,
      "quic.connection_migration_no_migratable_streams"},
     // Connection changed networks too many times.
-    {net::QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES,
+    {quic::QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES,
      "quic.connection_migration_too_many_changes"},
     // Connection migration was attempted, but there was no new network to
     // migrate to.
-    {net::QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK,
+    {quic::QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK,
      "quic.connection_migration_no_new_network"},
     // Network changed, but connection had one or more non-migratable streams.
-    {net::QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM,
+    {quic::QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM,
      "quic.connection_migration_non_migratable_stream"},
     // Network changed, but connection migration was disabled by config.
-    {net::QUIC_CONNECTION_MIGRATION_DISABLED_BY_CONFIG,
+    {quic::QUIC_CONNECTION_MIGRATION_DISABLED_BY_CONFIG,
      "quic.connection_migration_disabled_by_config"},
     // Network changed, but error was encountered on the alternative network.
-    {net::QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR,
+    {quic::QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR,
      "quic.connection_migration_internal_error"},
 
     // Stream frame overlaps with buffered data.
-    {net::QUIC_OVERLAPPING_STREAM_DATA, "quic.overlapping_stream_data"},
+    {quic::QUIC_OVERLAPPING_STREAM_DATA, "quic.overlapping_stream_data"},
     // Stream frames arrived too discontiguously so that stream sequencer buffer
     // maintains too many intervals.
-    {net::QUIC_TOO_MANY_STREAM_DATA_INTERVALS,
+    {quic::QUIC_TOO_MANY_STREAM_DATA_INTERVALS,
      "quic.too_many_stream_data_intervals"},
     // Sequencer buffer get into weird state where continuing read/write
     // will lead to crash.
-    {net::QUIC_STREAM_SEQUENCER_INVALID_STATE,
+    {quic::QUIC_STREAM_SEQUENCER_INVALID_STATE,
      "quic.stream_sequencer_invalid_state"},
     // Connection closed because of server hits max number of sessions allowed.
-    {net::QUIC_TOO_MANY_SESSIONS_ON_SERVER, "quic.too_many_sessions_on_server"},
+    {quic::QUIC_TOO_MANY_SESSIONS_ON_SERVER,
+     "quic.too_many_sessions_on_server"},
     // There was an error decompressing data.
-    {net::QUIC_DECOMPRESSION_FAILURE, "quic.decompression_failure"},
+    {quic::QUIC_DECOMPRESSION_FAILURE, "quic.decompression_failure"},
     // Receive a RST_STREAM with offset larger than kMaxStreamLength.
-    {net::QUIC_STREAM_LENGTH_OVERFLOW, "quic.stream_length_overflow"},
+    {quic::QUIC_STREAM_LENGTH_OVERFLOW, "quic.stream_length_overflow"},
 
     // No error. Used as bound while iterating.
-    {net::QUIC_LAST_ERROR, "quic.last_error"}};
+    {quic::QUIC_LAST_ERROR, "quic.last_error"}};
 
-// Must be updated any time a net::QuicErrorCode is deprecated in
+// Must be updated any time a quic::QuicErrorCode is deprecated in
 // net/quic/core/quic_packets.h.
 const int kDeprecatedQuicErrorCount = 5;
 const int kActiveQuicErrorCount =
-    net::QUIC_LAST_ERROR - kDeprecatedQuicErrorCount;
+    quic::QUIC_LAST_ERROR - kDeprecatedQuicErrorCount;
 
 static_assert(arraysize(kQuicErrorMap) == kActiveQuicErrorCount,
               "quic_error_map is not in sync with quic protocol!");
@@ -271,9 +276,9 @@
 }  // namespace
 
 // static
-bool GetDomainReliabilityBeaconQuicError(net::QuicErrorCode quic_error,
+bool GetDomainReliabilityBeaconQuicError(quic::QuicErrorCode quic_error,
                                          std::string* beacon_quic_error_out) {
-  if (quic_error != net::QUIC_NO_ERROR) {
+  if (quic_error != quic::QUIC_NO_ERROR) {
     // Convert a QUIC error.
     // TODO(juliatuttle): Consider sorting and using binary search?
     for (size_t i = 0; i < arraysize(kQuicErrorMap); i++) {
diff --git a/components/domain_reliability/quic_error_mapping.h b/components/domain_reliability/quic_error_mapping.h
index 48e5b23..26bf389f 100644
--- a/components/domain_reliability/quic_error_mapping.h
+++ b/components/domain_reliability/quic_error_mapping.h
@@ -18,7 +18,7 @@
 // that should be recorded in a beacon. Returns true and parse the QUIC error
 // code in |beacon_quic_error_out| if it could.
 // Returns false and clear |beacon_quic_error_out| otherwise.
-bool GetDomainReliabilityBeaconQuicError(net::QuicErrorCode quic_error,
+bool GetDomainReliabilityBeaconQuicError(quic::QuicErrorCode quic_error,
                                          std::string* beacon_quic_error_out);
 
 }  // namespace domain_reliability
diff --git a/components/drive/about_resource_loader_unittest.cc b/components/drive/about_resource_loader_unittest.cc
index 1ad695c..24c23a7 100644
--- a/components/drive/about_resource_loader_unittest.cc
+++ b/components/drive/about_resource_loader_unittest.cc
@@ -46,7 +46,7 @@
 
     cache_.reset(new FileCache(metadata_storage_.get(), temp_dir_.GetPath(),
                                base::ThreadTaskRunnerHandle::Get().get(),
-                               NULL /* free_disk_space_getter */));
+                               nullptr /* free_disk_space_getter */));
     ASSERT_TRUE(cache_->Initialize());
 
     metadata_.reset(
diff --git a/components/drive/change_list_loader_unittest.cc b/components/drive/change_list_loader_unittest.cc
index 1633acd..6d25893 100644
--- a/components/drive/change_list_loader_unittest.cc
+++ b/components/drive/change_list_loader_unittest.cc
@@ -103,7 +103,7 @@
 
     cache_.reset(new FileCache(metadata_storage_.get(), temp_dir_.GetPath(),
                                base::ThreadTaskRunnerHandle::Get().get(),
-                               NULL /* free_disk_space_getter */));
+                               nullptr /* free_disk_space_getter */));
     ASSERT_TRUE(cache_->Initialize());
 
     metadata_.reset(new ResourceMetadata(
diff --git a/components/drive/directory_loader_unittest.cc b/components/drive/directory_loader_unittest.cc
index c51f49e2..c36f832c 100644
--- a/components/drive/directory_loader_unittest.cc
+++ b/components/drive/directory_loader_unittest.cc
@@ -92,7 +92,7 @@
 
     cache_.reset(new FileCache(metadata_storage_.get(), temp_dir_.GetPath(),
                                base::ThreadTaskRunnerHandle::Get().get(),
-                               NULL /* free_disk_space_getter */));
+                               nullptr /* free_disk_space_getter */));
     ASSERT_TRUE(cache_->Initialize());
 
     metadata_.reset(new ResourceMetadata(
diff --git a/components/drive/file_system_core_util.cc b/components/drive/file_system_core_util.cc
index 0332592..373f200 100644
--- a/components/drive/file_system_core_util.cc
+++ b/components/drive/file_system_core_util.cc
@@ -150,7 +150,7 @@
                     const GURL& url,
                     const std::string& resource_id) {
   std::string content =
-      base::StringPrintf("{\"url\": \"%s\", \"resource_id\": \"%s\"}",
+      base::StringPrintf(R"({"url": "%s", "resource_id": "%s"})",
                          url.spec().c_str(), resource_id.c_str());
   return base::WriteFile(file_path, content.data(), content.size()) ==
          static_cast<int>(content.size());
diff --git a/components/drive/file_system_core_util_unittest.cc b/components/drive/file_system_core_util_unittest.cc
index 35752cd..c592365 100644
--- a/components/drive/file_system_core_util_unittest.cc
+++ b/components/drive/file_system_core_util_unittest.cc
@@ -25,9 +25,9 @@
 
 TEST_F(FileSystemUtilTest, EscapeUnescapeCacheFileName) {
   const std::string kUnescapedFileName(
-      "tmp:`~!@#$%^&*()-_=+[{|]}\\\\;\',<.>/?");
+      R"(tmp:`~!@#$%^&*()-_=+[{|]}\\;',<.>/?)");
   const std::string kEscapedFileName(
-      "tmp:`~!@#$%25^&*()-_=+[{|]}\\\\;\',<%2E>%2F?");
+      R"(tmp:`~!@#$%25^&*()-_=+[{|]}\\;',<%2E>%2F?)");
   EXPECT_EQ(kEscapedFileName, EscapeCacheFileName(kUnescapedFileName));
   EXPECT_EQ(kUnescapedFileName, UnescapeCacheFileName(kEscapedFileName));
 }
diff --git a/components/drive/search_metadata_unittest.cc b/components/drive/search_metadata_unittest.cc
index 89bc5a0a..0c7985f 100644
--- a/components/drive/search_metadata_unittest.cc
+++ b/components/drive/search_metadata_unittest.cc
@@ -480,10 +480,8 @@
   // \xE3\x80\x80 is ideographic space.
   SearchMetadata(
       base::ThreadTaskRunnerHandle::Get(), resource_metadata_.get(),
-      "Directory\xE3\x80\x80"
-      "1",
-      base::Bind(&MatchesType, SEARCH_METADATA_ALL), kDefaultAtMostNumMatches,
-      MetadataSearchOrder::LAST_ACCESSED,
+      R"(Directory 1)", base::Bind(&MatchesType, SEARCH_METADATA_ALL),
+      kDefaultAtMostNumMatches, MetadataSearchOrder::LAST_ACCESSED,
       google_apis::test_util::CreateCopyResultCallback(&error, &result));
 
   base::RunLoop().RunUntilIdle();
diff --git a/components/drive/start_page_token_loader_unittest.cc b/components/drive/start_page_token_loader_unittest.cc
index f7dfab11..8972a68 100644
--- a/components/drive/start_page_token_loader_unittest.cc
+++ b/components/drive/start_page_token_loader_unittest.cc
@@ -46,7 +46,7 @@
 
     cache_.reset(new FileCache(metadata_storage_.get(), temp_dir_.GetPath(),
                                base::ThreadTaskRunnerHandle::Get().get(),
-                               NULL /* free_disk_space_getter */));
+                               nullptr /* free_disk_space_getter */));
     ASSERT_TRUE(cache_->Initialize());
 
     metadata_.reset(
diff --git a/components/drive/sync_client_unittest.cc b/components/drive/sync_client_unittest.cc
index ec6bec85..c3841a3 100644
--- a/components/drive/sync_client_unittest.cc
+++ b/components/drive/sync_client_unittest.cc
@@ -130,7 +130,7 @@
 
     cache_.reset(new FileCache(metadata_storage_.get(), temp_dir_.GetPath(),
                                base::ThreadTaskRunnerHandle::Get().get(),
-                               NULL /* free_disk_space_getter */));
+                               nullptr /* free_disk_space_getter */));
     ASSERT_TRUE(cache_->Initialize());
 
     metadata_.reset(new internal::ResourceMetadata(
diff --git a/components/drive/team_drive_list_loader_unittest.cc b/components/drive/team_drive_list_loader_unittest.cc
index 738a9cd..f26e94ea 100644
--- a/components/drive/team_drive_list_loader_unittest.cc
+++ b/components/drive/team_drive_list_loader_unittest.cc
@@ -53,7 +53,7 @@
 
     cache_.reset(new FileCache(metadata_storage_.get(), temp_dir_.GetPath(),
                                base::ThreadTaskRunnerHandle::Get().get(),
-                               NULL /* free_disk_space_getter */));
+                               nullptr /* free_disk_space_getter */));
     ASSERT_TRUE(cache_->Initialize());
 
     metadata_.reset(
diff --git a/components/embedder_support/android/BUILD.gn b/components/embedder_support/android/BUILD.gn
new file mode 100644
index 0000000..ba2ac85
--- /dev/null
+++ b/components/embedder_support/android/BUILD.gn
@@ -0,0 +1,12 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/android/rules.gni")
+
+android_library("media_java") {
+  deps = [
+    "//content/public/android:content_java",
+  ]
+  java_files = [ "java/src/org/chromium/components/embedder_support/media/ActivityContentVideoViewEmbedder.java" ]
+}
diff --git a/components/embedder_support/android/DEPS b/components/embedder_support/android/DEPS
new file mode 100644
index 0000000..ad8365b
--- /dev/null
+++ b/components/embedder_support/android/DEPS
@@ -0,0 +1,4 @@
+include_rules = [
+  "-content/public/android/java",
+  "+content/public/android/java/src/org/chromium/content_public",
+]
diff --git a/components/embedder_support/android/OWNERS b/components/embedder_support/android/OWNERS
new file mode 100644
index 0000000..7bf23a78
--- /dev/null
+++ b/components/embedder_support/android/OWNERS
@@ -0,0 +1,6 @@
+boliu@chromium.org
+jinsukkim@chromium.org
+tedchoc@chromium.org
+
+# COMPONENT: Internals>Core
+# OS: Android
diff --git a/components/embedder_support/android/README b/components/embedder_support/android/README
new file mode 100644
index 0000000..27b915d
--- /dev/null
+++ b/components/embedder_support/android/README
@@ -0,0 +1,2 @@
+Collection of Android libraries that provides embedders with
+typical implementations of interfaces of content layer.
diff --git a/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewEmbedder.java b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/media/ActivityContentVideoViewEmbedder.java
similarity index 76%
rename from content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewEmbedder.java
rename to components/embedder_support/android/java/src/org/chromium/components/embedder_support/media/ActivityContentVideoViewEmbedder.java
index 7ad5246..7c2eed9 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewEmbedder.java
+++ b/components/embedder_support/android/java/src/org/chromium/components/embedder_support/media/ActivityContentVideoViewEmbedder.java
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-package org.chromium.content.browser;
+package org.chromium.components.embedder_support.media;
 
 import android.annotation.SuppressLint;
 import android.app.Activity;
@@ -22,7 +22,7 @@
     private final Activity mActivity;
     private View mView;
 
-    public ActivityContentVideoViewEmbedder(Activity activity)  {
+    public ActivityContentVideoViewEmbedder(Activity activity) {
         this.mActivity = activity;
     }
 
@@ -30,10 +30,8 @@
     public void enterFullscreenVideo(View view, boolean isVideoLoaded) {
         FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView();
         decor.addView(view, 0,
-                new FrameLayout.LayoutParams(
-                        ViewGroup.LayoutParams.MATCH_PARENT,
-                        ViewGroup.LayoutParams.MATCH_PARENT,
-                        Gravity.CENTER));
+                new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
+                        ViewGroup.LayoutParams.MATCH_PARENT, Gravity.CENTER));
         setSystemUiVisibility(true);
         mView = view;
     }
@@ -54,8 +52,7 @@
     public void setSystemUiVisibility(boolean enterFullscreen) {
         View decor = mActivity.getWindow().getDecorView();
         if (enterFullscreen) {
-            mActivity.getWindow().setFlags(
-                    WindowManager.LayoutParams.FLAG_FULLSCREEN,
+            mActivity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                     WindowManager.LayoutParams.FLAG_FULLSCREEN);
         } else {
             mActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
@@ -66,10 +63,8 @@
 
         int systemUiVisibility = decor.getSystemUiVisibility();
         int flags = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
-                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
-                | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
-                | View.SYSTEM_UI_FLAG_FULLSCREEN
-                | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
+                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+                | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
         if (enterFullscreen) {
             systemUiVisibility |= flags;
         } else {
diff --git a/components/grpc_support/test/get_stream_engine.cc b/components/grpc_support/test/get_stream_engine.cc
index 6721ffc..d5e2a55 100644
--- a/components/grpc_support/test/get_stream_engine.cc
+++ b/components/grpc_support/test/get_stream_engine.cc
@@ -60,7 +60,7 @@
           "https", net::QuicSimpleTestServer::GetHost(), 443);
       server_properties_->SetQuicAlternativeService(
           quic_hint_server, alternative_service, base::Time::Max(),
-          net::QuicTransportVersionVector());
+          quic::QuicTransportVersionVector());
 
       request_context_->set_cert_verifier(mock_cert_verifier_.get());
       request_context_->set_host_resolver(host_resolver_.get());
diff --git a/components/network_session_configurator/browser/network_session_configurator.cc b/components/network_session_configurator/browser/network_session_configurator.cc
index d9f2a3d0..9edfab6 100644
--- a/components/network_session_configurator/browser/network_session_configurator.cc
+++ b/components/network_session_configurator/browser/network_session_configurator.cc
@@ -168,23 +168,23 @@
       "true");
 }
 
-net::QuicTagVector GetQuicConnectionOptions(
+quic::QuicTagVector GetQuicConnectionOptions(
     const VariationParameters& quic_trial_params) {
   VariationParameters::const_iterator it =
       quic_trial_params.find("connection_options");
   if (it == quic_trial_params.end()) {
-    return net::QuicTagVector();
+    return quic::QuicTagVector();
   }
 
   return net::ParseQuicConnectionOptions(it->second);
 }
 
-net::QuicTagVector GetQuicClientConnectionOptions(
+quic::QuicTagVector GetQuicClientConnectionOptions(
     const VariationParameters& quic_trial_params) {
   VariationParameters::const_iterator it =
       quic_trial_params.find("client_connection_options");
   if (it == quic_trial_params.end()) {
-    return net::QuicTagVector();
+    return quic::QuicTagVector();
   }
 
   return net::ParseQuicConnectionOptions(it->second);
@@ -327,7 +327,7 @@
   return 0;
 }
 
-net::QuicTransportVersionVector GetQuicVersions(
+quic::QuicTransportVersionVector GetQuicVersions(
     const VariationParameters& quic_trial_params) {
   return network_session_configurator::ParseQuicVersions(
       GetVariationParam(quic_trial_params, "quic_version"));
@@ -377,7 +377,7 @@
     int reduced_ping_timeout_seconds =
         GetQuicReducedPingTimeoutSeconds(quic_trial_params);
     if (reduced_ping_timeout_seconds > 0 &&
-        reduced_ping_timeout_seconds < net::kPingTimeoutSecs) {
+        reduced_ping_timeout_seconds < quic::kPingTimeoutSecs) {
       params->quic_reduced_ping_timeout_seconds = reduced_ping_timeout_seconds;
     }
     int max_time_before_crypto_handshake_seconds =
@@ -427,7 +427,7 @@
 
   params->quic_user_agent_id = quic_user_agent_id;
 
-  net::QuicTransportVersionVector supported_versions =
+  quic::QuicTransportVersionVector supported_versions =
       GetQuicVersions(quic_trial_params);
   if (!supported_versions.empty())
     params->quic_supported_versions = supported_versions;
@@ -437,17 +437,17 @@
 
 namespace network_session_configurator {
 
-net::QuicTransportVersionVector ParseQuicVersions(
+quic::QuicTransportVersionVector ParseQuicVersions(
     const std::string& quic_versions) {
-  net::QuicTransportVersionVector supported_versions;
-  net::QuicTransportVersionVector all_supported_versions =
-      net::AllSupportedTransportVersions();
+  quic::QuicTransportVersionVector supported_versions;
+  quic::QuicTransportVersionVector all_supported_versions =
+      quic::AllSupportedTransportVersions();
 
   for (const base::StringPiece& version : base::SplitStringPiece(
            quic_versions, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)) {
     auto it = all_supported_versions.begin();
     while (it != all_supported_versions.end()) {
-      if (net::QuicVersionToString(*it) == version) {
+      if (quic::QuicVersionToString(*it) == version) {
         supported_versions.push_back(*it);
         // Remove the supported version to deduplicate versions extracted from
         // |quic_versions|.
@@ -509,7 +509,7 @@
     }
 
     if (command_line.HasSwitch(switches::kQuicVersion)) {
-      net::QuicTransportVersionVector supported_versions =
+      quic::QuicTransportVersionVector supported_versions =
           network_session_configurator::ParseQuicVersions(
               command_line.GetSwitchValueASCII(switches::kQuicVersion));
       if (!supported_versions.empty())
diff --git a/components/network_session_configurator/browser/network_session_configurator.h b/components/network_session_configurator/browser/network_session_configurator.h
index a3e624c26..4b501fb 100644
--- a/components/network_session_configurator/browser/network_session_configurator.h
+++ b/components/network_session_configurator/browser/network_session_configurator.h
@@ -20,7 +20,7 @@
 // trials and command line.
 
 // Parse serialized QUIC versions string.
-net::QuicTransportVersionVector ParseQuicVersions(
+quic::QuicTransportVersionVector ParseQuicVersions(
     const std::string& quic_versions);
 
 // Configure |params| based on field trials and command line,
diff --git a/components/network_session_configurator/browser/network_session_configurator_unittest.cc b/components/network_session_configurator/browser/network_session_configurator_unittest.cc
index 7e14acf..26a7aee 100644
--- a/components/network_session_configurator/browser/network_session_configurator_unittest.cc
+++ b/components/network_session_configurator/browser/network_session_configurator_unittest.cc
@@ -89,16 +89,16 @@
   EXPECT_TRUE(params_.retry_without_alt_svc_on_quic_errors);
   EXPECT_FALSE(params_.support_ietf_format_quic_altsvc);
   EXPECT_EQ(1350u, params_.quic_max_packet_length);
-  EXPECT_EQ(net::QuicTagVector(), params_.quic_connection_options);
-  EXPECT_EQ(net::QuicTagVector(), params_.quic_client_connection_options);
+  EXPECT_EQ(quic::QuicTagVector(), params_.quic_connection_options);
+  EXPECT_EQ(quic::QuicTagVector(), params_.quic_client_connection_options);
   EXPECT_FALSE(params_.enable_server_push_cancellation);
   EXPECT_FALSE(params_.quic_close_sessions_on_ip_change);
   EXPECT_EQ(net::kIdleConnectionTimeoutSeconds,
             params_.quic_idle_connection_timeout_seconds);
-  EXPECT_EQ(net::kPingTimeoutSecs, params_.quic_reduced_ping_timeout_seconds);
-  EXPECT_EQ(net::kMaxTimeForCryptoHandshakeSecs,
+  EXPECT_EQ(quic::kPingTimeoutSecs, params_.quic_reduced_ping_timeout_seconds);
+  EXPECT_EQ(quic::kMaxTimeForCryptoHandshakeSecs,
             params_.quic_max_time_before_crypto_handshake_seconds);
-  EXPECT_EQ(net::kInitialIdleTimeoutSecs,
+  EXPECT_EQ(quic::kInitialIdleTimeoutSecs,
             params_.quic_max_idle_time_before_crypto_handshake_seconds);
   EXPECT_FALSE(params_.quic_race_cert_verification);
   EXPECT_FALSE(params_.quic_estimate_initial_rtt);
@@ -200,7 +200,7 @@
   variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
   base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
   ParseFieldTrials();
-  EXPECT_EQ(net::kPingTimeoutSecs, params_.quic_reduced_ping_timeout_seconds);
+  EXPECT_EQ(quic::kPingTimeoutSecs, params_.quic_reduced_ping_timeout_seconds);
 }
 
 TEST_F(NetworkSessionConfiguratorTest,
@@ -210,7 +210,7 @@
   variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
   base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
   ParseFieldTrials();
-  EXPECT_EQ(net::kPingTimeoutSecs, params_.quic_reduced_ping_timeout_seconds);
+  EXPECT_EQ(quic::kPingTimeoutSecs, params_.quic_reduced_ping_timeout_seconds);
 }
 
 TEST_F(NetworkSessionConfiguratorTest,
@@ -240,7 +240,7 @@
   variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
   base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
   ParseFieldTrials();
-  EXPECT_EQ(net::kMaxTimeForCryptoHandshakeSecs,
+  EXPECT_EQ(quic::kMaxTimeForCryptoHandshakeSecs,
             params_.quic_max_time_before_crypto_handshake_seconds);
 }
 
@@ -261,7 +261,7 @@
   variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
   base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
   ParseFieldTrials();
-  EXPECT_EQ(net::kInitialIdleTimeoutSecs,
+  EXPECT_EQ(quic::kInitialIdleTimeoutSecs,
             params_.quic_max_idle_time_before_crypto_handshake_seconds);
 }
 
@@ -375,14 +375,14 @@
 TEST_F(NetworkSessionConfiguratorTest, QuicVersionFromFieldTrialParams) {
   std::map<std::string, std::string> field_trial_params;
   field_trial_params["quic_version"] =
-      net::QuicVersionToString(net::AllSupportedTransportVersions().back());
+      quic::QuicVersionToString(quic::AllSupportedTransportVersions().back());
   variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
   base::FieldTrialList::CreateFieldTrial("QUIC", "Enabled");
 
   ParseFieldTrials();
 
-  net::QuicTransportVersionVector supported_versions;
-  supported_versions.push_back(net::AllSupportedTransportVersions().back());
+  quic::QuicTransportVersionVector supported_versions;
+  supported_versions.push_back(quic::AllSupportedTransportVersions().back());
   EXPECT_EQ(supported_versions, params_.quic_supported_versions);
 }
 
@@ -390,9 +390,9 @@
        MultipleQuicVersionFromFieldTrialParams) {
   std::map<std::string, std::string> field_trial_params;
   std::string quic_versions =
-      net::QuicVersionToString(net::AllSupportedTransportVersions().front()) +
+      quic::QuicVersionToString(quic::AllSupportedTransportVersions().front()) +
       "," +
-      net::QuicVersionToString(net::AllSupportedTransportVersions().back());
+      quic::QuicVersionToString(quic::AllSupportedTransportVersions().back());
 
   field_trial_params["quic_version"] = quic_versions;
   variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
@@ -400,18 +400,18 @@
 
   ParseFieldTrials();
 
-  net::QuicTransportVersionVector supported_versions;
-  supported_versions.push_back(net::AllSupportedTransportVersions().front());
-  supported_versions.push_back(net::AllSupportedTransportVersions().back());
+  quic::QuicTransportVersionVector supported_versions;
+  supported_versions.push_back(quic::AllSupportedTransportVersions().front());
+  supported_versions.push_back(quic::AllSupportedTransportVersions().back());
   EXPECT_EQ(supported_versions, params_.quic_supported_versions);
 }
 
 TEST_F(NetworkSessionConfiguratorTest, SameQuicVersionsFromFieldTrialParams) {
   std::map<std::string, std::string> field_trial_params;
   std::string quic_versions =
-      net::QuicVersionToString(net::AllSupportedTransportVersions().front()) +
+      quic::QuicVersionToString(quic::AllSupportedTransportVersions().front()) +
       "," +
-      net::QuicVersionToString(net::AllSupportedTransportVersions().front());
+      quic::QuicVersionToString(quic::AllSupportedTransportVersions().front());
 
   field_trial_params["quic_version"] = quic_versions;
   variations::AssociateVariationParams("QUIC", "Enabled", field_trial_params);
@@ -419,8 +419,8 @@
 
   ParseFieldTrials();
 
-  net::QuicTransportVersionVector supported_versions;
-  supported_versions.push_back(net::AllSupportedTransportVersions().front());
+  quic::QuicTransportVersionVector supported_versions;
+  supported_versions.push_back(quic::AllSupportedTransportVersions().front());
   EXPECT_EQ(supported_versions, params_.quic_supported_versions);
 }
 
@@ -433,10 +433,10 @@
 
   ParseFieldTrials();
 
-  net::QuicTagVector options;
-  options.push_back(net::kTIME);
-  options.push_back(net::kTBBR);
-  options.push_back(net::kREJ);
+  quic::QuicTagVector options;
+  options.push_back(quic::kTIME);
+  options.push_back(quic::kTBBR);
+  options.push_back(quic::kREJ);
   EXPECT_EQ(options, params_.quic_connection_options);
 }
 
@@ -449,9 +449,9 @@
 
   ParseFieldTrials();
 
-  net::QuicTagVector options;
-  options.push_back(net::kTBBR);
-  options.push_back(net::k1RTT);
+  quic::QuicTagVector options;
+  options.push_back(quic::kTBBR);
+  options.push_back(quic::k1RTT);
   EXPECT_EQ(options, params_.quic_client_connection_options);
 }
 
@@ -558,10 +558,10 @@
                                  "TIMER,TBBR,REJ");
   ParseCommandLineAndFieldTrials(command_line);
 
-  net::QuicTagVector expected_options;
-  expected_options.push_back(net::kTIME);
-  expected_options.push_back(net::kTBBR);
-  expected_options.push_back(net::kREJ);
+  quic::QuicTagVector expected_options;
+  expected_options.push_back(quic::kTIME);
+  expected_options.push_back(quic::kTBBR);
+  expected_options.push_back(quic::kREJ);
   EXPECT_EQ(expected_options, params_.quic_connection_options);
 }
 
@@ -574,13 +574,13 @@
 }
 
 TEST_F(NetworkSessionConfiguratorTest, QuicVersion) {
-  net::QuicTransportVersionVector supported_versions =
-      net::AllSupportedTransportVersions();
+  quic::QuicTransportVersionVector supported_versions =
+      quic::AllSupportedTransportVersions();
   for (const auto& version : supported_versions) {
     base::CommandLine command_line(base::CommandLine::NO_PROGRAM);
     command_line.AppendSwitch(switches::kEnableQuic);
     command_line.AppendSwitchASCII(switches::kQuicVersion,
-                                   net::QuicVersionToString(version));
+                                   quic::QuicVersionToString(version));
     ParseCommandLineAndFieldTrials(command_line);
     ASSERT_EQ(1u, params_.quic_supported_versions.size());
     EXPECT_EQ(version, params_.quic_supported_versions[0]);
diff --git a/components/policy/resources/policy_templates_am.xtb b/components/policy/resources/policy_templates_am.xtb
index 0d943ddb..72ab871 100644
--- a/components/policy/resources/policy_templates_am.xtb
+++ b/components/policy/resources/policy_templates_am.xtb
@@ -79,7 +79,6 @@
 
           የማስፋት መለኪያው 100% ወይም ከዚያ በላይ መሆን አለበት።</translation>
 <translation id="131353325527891113">የተጠቃሚ ስሞችን በመግቢያ ገጽ ላይ አሳይ</translation>
-<translation id="1325295456374328159">በተጠቃሚ ክፍለ ጊዜ የተፈቀዱ አካባቢዎችን አዋቅር</translation>
 <translation id="1327466551276625742">ከመስመር ውጪ ሲሆን የአውታረ መረብ መዋቅር ጥያቄን ያንቁ</translation>
 <translation id="1330145147221172764">የታይታ የቁልፍ ሰሌዳን አንቃ</translation>
 <translation id="13356285923490863">የመምሪያ ስም</translation>
@@ -462,9 +461,6 @@
 
       «በሚነሳበት ጊዜ የሚወሰደው እርምጃ» ውስጥ «የዩአርኤልዎች  ዝርዝር ክፈት»ን እስካልመረጡ ድረስ የ«በሚነሳበት ጊዜ የሚከፈቱ ዩአርኤልዎች » ዝርዝር ይዘት ይተዋል።</translation>
 <translation id="2327252517317514801">G Suite እንዲደርሱ የሚፈቀድላቸው ጎራዎችን ይግለጹ</translation>
-<translation id="2337466621458842053">ምስሎችን እንዲያሳዩ የተፈቀደላቸው ጣቢያዎችን የሚገልጹ የዩ አር ኤል ስርዓተ ጥለቶችን እንዲያዘጋጁ ያስችልዎታል።
-
-           ይህ መመሪያ እንዳልተዋቀረ ከተተወ፣ ከተዋቀረ «DefaultImagesSetting»፣ አለበለዚያ ደግሞ የተጠቃሚው የግል ውቅር ሁለንተናዊው ነባሪ እሴት ለሁሉም ጣቢያዎች ስራ ላይ ይውላል።</translation>
 <translation id="2372547058085956601">የይፋዊ ክፍለ-ጊዜ ራስ-ግባ መዘግየት።
 
       የ|DeviceLocalAccountAutoLoginId| መመሪያው ካልተዋቀረ ይህ መመሪያ ምንም ውጤት የለውም። አለበለዚያ፦
@@ -1234,9 +1230,6 @@
       ይህን ቅንብር ካነቁ ወይም ካሰናከሉ ተጠቃሚዎች ይህን ቅንብር በ<ph name="PRODUCT_NAME" /> ውስጥ ሊቀይሩት ወይም ሊሽሩት አይችሉም።
 
       ይህ መመሪያ እንዳልተዋቀረ ከተተወ ይሄ ይነቃል ግን ተጠቃሚው ሊቀይረው ይችላል።</translation>
-<translation id="4525521128313814366">ምስሎች እንዲያሳዩ የማይፈቀድላቸው ጣቢያዎችን የሚገልጽ የዩ አር ኤል ስርዓተ ጥለቶች ዝርዝር እንዲያስቀምጡ ያስችልዎታል።
-
-          ይህ መመሪያ እንዳልተዋቀረ ከተተወ ከተዋቀረ የ«DefaultImagesSetting» መመሪያ፣ አለበለዚያ ደግሞ የተጠቃሚው የግል ውቅር ሁለንተናዊ ነባሪ ዋጋ ስራ ላይ ይውላል።</translation>
 <translation id="4531706050939927436">Google Playን በመጠቀም የAndroid መተግበሪያዎች ከGoogle አስተዳዳሪ መሥሪያው ሆነው በግዳጅ መጫን ይችላሉ። ይህን መመሪያ አይጠቀሙትም።</translation>
 <translation id="4534500438517478692">የAndroid ገድብ ስም፦</translation>
 <translation id="4541530620466526913">መሣሪያ-አካባቢያዊ መለያዎች</translation>
@@ -1535,9 +1528,6 @@
 <translation id="5457065417344056871">በአሳሽ ውስጥ የእንግዳ ሁነታን ያንቁ</translation>
 <translation id="5457924070961220141"><ph name="PRODUCT_FRAME_NAME" /> ሲጫን ነባሪውን የኤች ቲ ኤም ኤል ማሳያውን እንዲያዋቅሩ ያስችልዎታል።
           ይህ መመሪያ እንዳልተዋቀረ ሲተው ስራ ላይ የሚውለው ነባሪ ቅንብር አስተናጋጅ አሳሹ ማሳየቱን እንዲፈጽም መፍቀድ ነው፣ ግን ከፈለጉም ይህንን ሽረው <ph name="PRODUCT_FRAME_NAME" /> በነባሪነት የኤች ቲ ኤም ኤል ገጾችን እንዲያሳይ ማድረግ ይችላሉ።</translation>
-<translation id="5459155981813668716">አካባቢ ቋንቋዎችን <ph name="PRODUCT_OS_NAME" /> የሚታዩበትን ያዋቅራል።
-
-      ይህ መመሪያ ከተዋቀረ፣ ተጠቃሚው በዚህ መመሪያ ከተጠቀሱት አካባቢ ቋንቋዎች ወደ አንዱ እንዲታይ ብቻ <ph name="PRODUCT_OS_NAME" />ን ማዋቀር ይችላል። ይህ መመሪያ ካልተዋቀረ ወይም ወደ ባዶ ዝርዝር ከተቀናበረ፣ <ph name="PRODUCT_OS_NAME" /> በሁሉም የሚደገፉ አካባቢ ቋንቋዎች ላይ ሊታይ ይችላል። ይህ መመሪያ ወደ በማይሠሩ እሴቶች ዝርዝር ከተቀናበረ፣ ሁሉም የማይሠሩ እሴቶች ችላ ይባላሉ። አንድ ተጠቃሚ ቀደም ሲል <ph name="PRODUCT_OS_NAME" />ን በዚህ መመሪያ ወደ የማይፈቀድ ቋንቋ እንዲታይ አድርጎ ካዋቀረ፣ የማሳያ አካባቢ ቋንቋው ተጠቃሚው በሚቀጥለው ጊዜ በመለያ ሲገባ ወደ የሚፈቀድ የአካባቢ ቋንቋ ይቀየራል። ተጠቃሚው በዚህ መመሪያ የሚፈቀዱ ተመራጭ የአካባቢ ቋንቋዎች ወደ አንዱ አዋቅሮ ከነበረ፣ <ph name="PRODUCT_OS_NAME" /> ወደዚህ የአካባቢ ቋንቋ ይቀየራል። አለበለዚያ፣ <ph name="PRODUCT_OS_NAME" /> በዚህ መመሪያ ወደ ተጠቀሰው የመጀመሪያው የሚሠራ እሴት ወይም ተመላሽ የአካባቢ ቋንቋ (አሁን ላይ en-US) ይቀየራል፣ ይህም የሚሆነው ይህ መመሪያ የማይሠሩ ግቤቶች ካሉት ብቻ ነው።</translation>
 <translation id="5464816904705580310">የሚቀናበሩ ተጠቃሚዎች ቅንብሮችን ያዋቅሩ።</translation>
 <translation id="546726650689747237">በሶኬት ኃይል ላይ ሲሆን የማያ ገጽ መፍዘዝ መዘግየት</translation>
 <translation id="5469825884154817306">በእነዚህ ጣቢያዎች ላይ ምስሎችን አግድ</translation>
@@ -2321,9 +2311,6 @@
 
       ይህ መመሪያ እንደ የሚመከር ብቻ ነው ሊዋቀር የሚችለው። የሚመከሩ አካባቢዎች ስብስብ ወደ ላይ ለመውሰድ ይህን መመሪያ መጠቀም ይችላሉ፣ ነገር ግን ተጠቃሚዎች ለክፍለ-ጊዜያቸው ሁልጊዜ በ<ph name="PRODUCT_OS_NAME" /> የሚደገፍ አካባቢ እንዲመርጡ ይፈቀድላቸዋል።
       </translation>
-<translation id="7763311235717725977">ድር ጣቢያዎች ምስሎችን ማሳየት የሚፈቀድላቸው እንደሆነ እንዲያዋቅሩ ያስችልዎታል። ምስሎችን ማሳየት ለሁሉም ጣቢያዎች ሊፈቀድ ወይም ሊከለከል ይችላል።
-
-          ይህ መመሪያ እንዳልተዋቀረ ከተተወ «AllowImages» ስራ ላይ ይውልና ተጠቃሚው ሊቀይረው ይችላል።</translation>
 <translation id="7763479091692861127"> ለስርዓተ ክወና ዝማኔዎች የሚፈቀዱ የግንኙነት አይነቶች። የስርዓተ ክወና ዝማኔዎች በመጠናቸው ምክንያት ግንኙነቱ ላይ ከባድ ጫና ሊያሳድሩ ይችላሉ፣ እንዲሁም ተጨማሪ ወጪ ሊያስከትሉም ይችላሉ። ስለዚህ  በነባሪት ውድ ተብለው ለሚወሰዱ የግንኙነት አይነቶች በነባሪነት አልነቁም፣ ለጊዜው WiMax፣ ብሉቱዝ እና የተንቀሳቃሽ ስልክን ጨምሮ።
 
       የሚታወቁት የግንኙነት አይነት ለዪዎች «ኤተርኔት»፣ «wifi»፣ «wimax»፣ «ብሉቱዝ» እና «ተንቀሳቃሽ ስልክ» ናቸው።</translation>
diff --git a/components/policy/resources/policy_templates_ar.xtb b/components/policy/resources/policy_templates_ar.xtb
index 9900357b..5d97ae43 100644
--- a/components/policy/resources/policy_templates_ar.xtb
+++ b/components/policy/resources/policy_templates_ar.xtb
@@ -446,7 +446,6 @@
 
       يتم تجاهل محتويات القائمة "عناوين URL التي يتم فتحها عند بدء التشغيل" ما لم تحدد قائمة عناوين URL في "إجراءات عند بدء التشغيل".</translation>
 <translation id="2327252517317514801">‏تحديد النطاقات المسموح لها بالوصول إلى G Suite</translation>
-<translation id="2337466621458842053">‏للسماح لك بتعيين قائمة أنماط عناوين URL التي تحدد المواقع التي يُسمح لها بعرض الصور. إذا تم ترك هذه السياسة بدون تعيين، فسيتم استخدام القيمة التلقائية العامة مع جميع المواقع إما من السياسة 'DefaultImagesSetting' إذا كان قد تم تعيينها أو من التهيئة الشخصية للمستخدم بدلاً من ذلك.</translation>
 <translation id="2372547058085956601">‏مهلة تسجيل الدخول التلقائي في الجلسة العامة.
 
       في حالة عدم تعيين السياسة |DeviceLocalAccountAutoLoginId|، فلن يكون لها أي تأثير. وإلا:
@@ -1163,7 +1162,6 @@
       إذا تم تفعيل هذا الإعداد أو إيقافه، فلن يتمكن المستخدمون من تغيير هذا الإعداد أو تجاوزه في <ph name="PRODUCT_NAME" />.
 
       إذا تم ترك هذه السياسة بدون تعيين، فسيتم تفعيل هذا الإعداد وسيتمكن المستخدم من تغييره.</translation>
-<translation id="4525521128313814366">‏للسماح لك بتعيين قائمة أنماط عناوين URL التي تحدد المواقع التي لا يُسمح لها بعرض الصور. إذا تم ترك هذه السياسة بدون تعيين، فسيتم استخدام القيمة التلقائية العامة مع جميع المواقع إما من السياسة 'DefaultImagesSetting' إذا كان قد تم تعيينها أو من التهيئة الشخصية للمستخدم.</translation>
 <translation id="4531706050939927436">‏يمكن فرض تثبيت تطبيقات Android من وحدة تحكم المشرف في Google باستخدام Google Play. ولا تستخدم هذه التطبيقات هذه السياسة.</translation>
 <translation id="4534500438517478692">‏اسم تقييد Android:</translation>
 <translation id="4541530620466526913">حسابات الجهاز المحلية</translation>
@@ -2163,7 +2161,6 @@
 
       يمكن تعيين هذه السياسة فقط كموصى بها. ويمكنك استخدام هذه السياسة لنقل مجموعة من اللغات الموصى بها إلى الأعلى ولكن يسمح للمستخدمين دائمًا باختيار أي لغة يدعمها <ph name="PRODUCT_OS_NAME" /> لجلستهم.
       </translation>
-<translation id="7763311235717725977">‏للسماح لك بتعيين ما إذا كان يُسمح للمواقع الإلكترونية بعرض الصور. يمكن أن يكون عرض الصور مسموحًا به لكل مواقع الويب أو مرفوضًا لكل مواقع الويب. إذا تم ترك هذه السياسة بدون تعيين، فسيتم استخدام السياسة "AllowImages" وسيتمكن المستخدم من تغييرها.</translation>
 <translation id="7763479091692861127">‏ أنواع الاتصالات التي يسمح باستخدامها لتحديثات نظام التشغيل. ربما يكون لتحديثات نظام التشغيل ضغطًا كبيرًا على الاتصال نظرًا لحجمها وقد تتحمل تكلفة إضافية. ولهذا لا يتم تمكينها لأنواع الاتصالات التي تُعد مكلفة، والتي تتضمن اتصالات WiMax وبلوتوث والشبكة الخلوية في الوقت الحالي.
 
       إن معرّفات أنواع الاتصالات المعتمدة هي "ethernet" و"wifi" و"wimax" و"bluetooth" و"cellular".</translation>
diff --git a/components/policy/resources/policy_templates_bg.xtb b/components/policy/resources/policy_templates_bg.xtb
index 51fa3dbb..7a262cd 100644
--- a/components/policy/resources/policy_templates_bg.xtb
+++ b/components/policy/resources/policy_templates_bg.xtb
@@ -75,7 +75,6 @@
 
           Коефициентът на промяна трябва да е 100% или по-голям.</translation>
 <translation id="131353325527891113">Показване на потребителските имена на екрана за вход</translation>
-<translation id="1325295456374328159">Конфигуриране на разрешените локали за потребителските сесии</translation>
 <translation id="1327466551276625742">Активиране на подканата за конфигуриране на мрежа, когато устройството е офлайн</translation>
 <translation id="1330145147221172764">Активиране на екранната клавиатура</translation>
 <translation id="13356285923490863">Име на правилото</translation>
@@ -458,9 +457,6 @@
 
       Съдържанието на списъка „URL адреси за отваряне при стартиране“ се пренебрегва, освен ако не изберете „Отваряне на списък с URL адреси“ в „Действия при стартиране“.</translation>
 <translation id="2327252517317514801">Дефиниране на домейните с разрешен достъп до G Suite</translation>
-<translation id="2337466621458842053">Позволява да зададете списък с образци за URL адреси, посочващи сайтове, на които е разрешено да показват изображения.
-
-Ако това правило е оставено незададено, за всички сайтове ще се използва глобалната стандартна стойност от правилото „DefaultImagesSetting“, ако е зададено, или в противен случай – личната конфигурация на потребителя.</translation>
 <translation id="2372547058085956601">Забавянето преди автоматично влизане в обществена сесия.
 
 Ако правилото |DeviceLocalAccountAutoLoginId| не е зададено, DeviceLocalAccountAutoLoginDelay няма ефект. В противен случай:
@@ -1198,7 +1194,6 @@
 И в двата случая потребителите не могат да променят, нито да отменят тази настройка в <ph name="PRODUCT_NAME" />.
 
 Ако това правило е оставено незададено, настройката ще бъде активирана, но потребителят ще може да я променя.</translation>
-<translation id="4525521128313814366">Позволява да зададете списък с образци за URL адреси, посочващи сайтове, на които не е разрешено да показват изображения. Ако това правило е оставено незададено, за всички сайтове ще се използва глобалната стандартна стойност от правилото „DefaultImagesSetting“, ако е зададено, или в противен случай – личната конфигурация на потребителя.</translation>
 <translation id="4531706050939927436">Приложенията за Android могат да се инсталират принудително от Google Admin console посредством Google Play. Това правило няма ефект върху тях.</translation>
 <translation id="4534500438517478692">Име на ограничението за Android:</translation>
 <translation id="4541530620466526913">Локални за устройството профили</translation>
@@ -1473,9 +1468,6 @@
 <translation id="5447306928176905178">Активиране на отчитането на информация за паметта (размера на свободната памет за JS) към страницата (оттеглено)</translation>
 <translation id="5457065417344056871">Активиране на режима на гост в браузъра</translation>
 <translation id="5457924070961220141">Позволява да конфигурирате стандартната програма за изобразяване на HTML, когато продуктът <ph name="PRODUCT_FRAME_NAME" /> е инсталиран. Настройката по подразбиране, използвана, когато това правило е оставено незададено, е да се разреши на браузъра на хоста да извършва изобразяването, но можете да я отмените по свой избор и да зададете на <ph name="PRODUCT_FRAME_NAME" /> да изпълнява тази функция по подразбиране.</translation>
-<translation id="5459155981813668716">Конфигурира локалите, на които да е разрешено показването на <ph name="PRODUCT_OS_NAME" />.
-
-Ако това правило е зададено, локалите за показване на <ph name="PRODUCT_OS_NAME" />, които може да избере потребителят, са ограничени до посочените в правилото. В случай че то не е зададено или е конфигурирано като празен списък, <ph name="PRODUCT_OS_NAME" /> може да се показва на всички поддържани локали. При посочване на списък с невалидни стойности те ще бъдат пренебрегнати. Ако по-рано потребителят е конфигурирал <ph name="PRODUCT_OS_NAME" /> да се показва на език, който не е разрешен от това правило, ще се превключи към разрешен локал следващия път, когато потребителят влезе в профила си. Ако потребителят е конфигурирал предпочитани локали и един от тях е разрешен от това правило, <ph name="PRODUCT_OS_NAME" /> ще превключи към този локал. В противен случай <ph name="PRODUCT_OS_NAME" /> ще превключи към първата валидна стойност, посочена в правилото, или към резервен локал (който понастоящем е en-US), ако то съдържа само невалидни записи.</translation>
 <translation id="5464816904705580310">Конфигурирайте настройките за управлявани потребители.</translation>
 <translation id="546726650689747237">Забавяне преди затъмняване на екрана при работа на променлив ток</translation>
 <translation id="5469825884154817306">Блокиране на изображенията на тези сайтове</translation>
@@ -2228,7 +2220,6 @@
 
 Това правило може да се зададе само като препоръчително. Дори да преместите набор от локали най-горе в списъка, потребителите винаги ще могат да изберат за сесията си всеки локал, поддържан от <ph name="PRODUCT_OS_NAME" />.
       </translation>
-<translation id="7763311235717725977">Позволява да зададете дали на уебсайтовете е разрешено да показват изображения. Тази опция може да бъде разрешена или отказана за всички сайтове. Ако това правило е оставено незададено, ще се използва „AllowImages“ и потребителят ще може да го променя.</translation>
 <translation id="7763479091692861127"> Типовете връзки, които е разрешено да се използват за актуализации на операционната система. Съответните актуализации потенциално упражняват голямо натоварване върху връзката поради размера си и е възможно да доведат до допълнителни разходи. Затова те не са активирани по подразбиране за типове връзки, за които се смята, че са скъпи, включително понастоящем WiMax, Bluetooth и мобилни мрежи.
 
 Разпознатите идентификатори за типове връзки са „ethernet“, „wifi“, „wimax“, „bluetooth“ и „cellular“.</translation>
diff --git a/components/policy/resources/policy_templates_bn.xtb b/components/policy/resources/policy_templates_bn.xtb
index da3812f..08851e77 100644
--- a/components/policy/resources/policy_templates_bn.xtb
+++ b/components/policy/resources/policy_templates_bn.xtb
@@ -82,7 +82,6 @@
 
           স্কেল ফ্যাক্টরকে অবশ্যই ১০০% বা তার বেশি হতে হবে৷</translation>
 <translation id="131353325527891113">লগইন স্ক্রীনে ইউজারনেম দেখান</translation>
-<translation id="1325295456374328159">একজন ব্যবহারকারীর সেশনে অনুমতিপ্রাপ্ত লোকেল কনফিগার করুন</translation>
 <translation id="1327466551276625742">অফলাইন থাকাকালীন নেটওয়ার্ক কনফিগারেশন প্রম্পট সক্রিয় করে</translation>
 <translation id="1330145147221172764">অন-স্ক্রিন কীবোর্ড সক্ষম করুন</translation>
 <translation id="13356285923490863">পলিসি নাম</translation>
@@ -493,9 +492,6 @@
 
       আপনি 'সূচনার সময় ক্রিয়া'তে 'URLগুলির একটি তালিকা খুলুন' নির্বাচন না করলে 'সূচনার সময় খোলা URLগুলি'তে থাকা বিষয়বস্তু এড়ানো হয়৷</translation>
 <translation id="2327252517317514801">যে ডোমেনগুলি থেকে G Suite অ্যাক্সেস করা যাবে সেগুলি নির্দিষ্ট করুন</translation>
-<translation id="2337466621458842053"> url প্যাটার্নের একটি তালিকা যাতে নির্দিষ্ট সাইট আছে, যা ছবি প্রদর্শনকে মঞ্জুরী দিয়েছে আপনাকে সেটি সেট করতে অনুমতি দিয়েছে৷ 
-
-এই নীতি সেট না করে ছেড়ে যাওয়া হলে গ্লোবাল ডিফল্ট মান সব সাইটগুলির জন্য ব্যবহার করা হবে  যদি 'ডিফল্ট ছবি সেটিং'  নীতি সেট করা হয় তা থেকে, নয়তো ব্যবহারকারীদের ব্যক্তিগত কনফিগারেশান থেকে৷</translation>
 <translation id="2372547058085956601">সর্বজনীন সেশনের স্বয়ংক্রিয়-লগইনে বিলম্ব৷
 
 যদি |DeviceLocalAccountAutoLoginId| নীতি সেট না করা থাকে, তাহলে এই নীতি কোনো প্রভাব ফেলবে না৷ অন্যথায়:
@@ -1323,9 +1319,6 @@
       আপনি এই সেটিংটি সক্ষম বা অক্ষম করলে, ব্যবহারকারীরা এই সেটিংটি <ph name="PRODUCT_NAME" /> এ পরিবর্তন বা ওভাররাইড করতে পারে না৷
 
       যদি এই নীতিটি সেট না করে ছেড়ে দেওয়া হয়, তাহলে এটি সক্ষমিত হবে কিন্তু ব্যবহারকারী এর পরিবর্তন করতে পারবে৷</translation>
-<translation id="4525521128313814366">আপনাকে url ধরণের একটি তালিকা সেট করার মঞ্জুরি দেয় যা যেসব সাইট ছবি দেখানোর জন্য মঞ্জুরিপ্রাপ্ত নয় সেগুলিকে নির্দিষ্ট করে৷
-
-          যদি এই নীতি সেট না থাকাতে ছাড়া থাকলে সেক্ষেত্রে 'ডিফল্ট ছবি সেটিং' নীতি সেট থাকলে গ্লোবাল ডিফল্ট মান তার থেকে অথবা না থাকলে ব্যবহারকারীর ব্যক্তিগত কনফিগারেশন থেকে ব্যবহার করা হবে৷</translation>
 <translation id="4531706050939927436">Android অ্যাপ্লিকেশানগুলিকে Google Play ব্যবহার করে Google Admin কনসোল থেকে জোরপূর্বক ইনস্টল করা যায়। সেগুলি এই নীতি ব্যবহার করে না।</translation>
 <translation id="4534500438517478692">Android সীমাবদ্ধতা নাম:</translation>
 <translation id="4541530620466526913">ডিভাইস-স্থানীয় অ্যাকাউন্টগুলি</translation>
@@ -1669,9 +1662,6 @@
 <translation id="5457924070961220141">আপনাকে ডিফল্ট HTML রেন্ডেরার কনফিগার করার অনুমতি দেয় যখন <ph name="PRODUCT_FRAME_NAME" />-টি ইনস্টল থাকে৷ 
 
 যখন এই নীতিকে সেট করা ছাড়া ছেড়ে দেওয়া হয়েছে সেক্ষেত্রে ব্রাউজারকে রেন্ডেরিং এর অনুমতি দেওয়ার জন্য ডিফল্ট সেটিং ব্যবহার করা হয়, কিন্তু আপনি বিকল্প হিসেবে এটিকে ওভাররাইড করতে পারেন এবং ডিফল্ট রুপে <ph name="PRODUCT_FRAME_NAME" /> রেন্ডার HTML পৃষ্ঠা রাখতে পারেন৷</translation>
-<translation id="5459155981813668716">লোকেলগুলির কনফিগার <ph name="PRODUCT_OS_NAME" /> এ ডিসপ্লে হতে পারে।
-
-      যদি এই নীতিটি সেট করা থাকে, ব্যবহারকারী শুধুমাত্র এই নীতি দ্বারা নির্দিষ্ট লোকেলগুলির মধ্যে একটি ডিসপ্লে করতে <ph name="PRODUCT_OS_NAME" /> কনফিগার করতে পারেন। যদি এই নীতিটি সেট না করা হয় বা খালি তালিকাতে সেট করা হয়, তবে <ph name="PRODUCT_OS_NAME" /> সব সমর্থিত লোকেলে ডিসপ্লে হতে পারে। যদি এই নীতিটি একটি ভুল মানগুলির তালিকাতে সেট করা থাকে, তবে সমস্ত ভুল মান উপেক্ষা করা হবে। একজন ব্যবহারকারীকে পূর্বে কনফিগার হলে <ph name="PRODUCT_OS_NAME" /> এই নীতি দ্বারা অনুমোদিত নয় এমন একটি ভাষায় ডিসপ্লে হবে, পরের বার যখন ব্যবহারকারী সাইন-ইন করবেন তখন ডিসপ্লে লোকেলগুলি অনুমোদিত লোকেলে পাল্টানো হবে। ব্যবহারকারী যদি পছন্দসই লোকেলে কনফিগার করেন এবং এই পছন্দের লোকেলগুলির মধ্যে একটি এই নীতি দ্বারা অনুমোদিত হয়, <ph name="PRODUCT_OS_NAME" /> এই লোকেলে পাল্টে যাবে। অন্যথা, <ph name="PRODUCT_OS_NAME" /> যদি এই নীতিটিতে কেবল ভুল এন্ট্রি থাকে, এই নীতি দ্বারা নির্দিষ্ট করা প্রথম সঠিক মান বা একটি ফলব্যাক লোকেল সম্প্রতি en-US) -এ পাল্টানো হবে।</translation>
 <translation id="5464816904705580310">পরিচালিত ব্যবহারকারীদের জন্য সেটিংস কনফিগার করুন৷</translation>
 <translation id="546726650689747237">AC পাওয়ারে চলাকালীন স্ক্রীনের উজ্জ্বলতা হ্রাসে বিলম্ব</translation>
 <translation id="5469825884154817306">এই সাইটগুলিতে ছবিগুলি অবরোধ করুন</translation>
@@ -2484,9 +2474,6 @@
 
       নীতিটিকে শুধুমাত্র প্রস্তাবিত হিসেবে সেট করা যাবে। আপনি প্রস্তাবিত লোকেলের একটি সেটকে শীর্ষ নিয়ে যেতে এটি ব্যবহার করতে পারেন  কিন্তু ব্যবহারকারীদেরকে সবসময় তাদের <ph name="PRODUCT_OS_NAME" /> দ্বারা সমর্থিত যে কোনো লোকেল নির্বাচন করার মঞ্জুরি দেওয়া হয়েছে।
       </translation>
-<translation id="7763311235717725977">আপনি ওয়েবসাইটগুলি ছবিগুলি প্রদর্শনের জন্য অনুমতিপ্রাপ্ত কিনা তা সেট করার অনুমতি দেয়৷ ছবিগুলি প্রদর্শন করা সমস্ত ওয়েবসাইটের জন্য অনুমোদিত বা সমস্ত ওয়েবসাইটের জন্য অনুমোদিত হতে পারে৷
-
-          যদি এই নীতিটি সেট না থাকা হিসাবে ছেড়ে দেওয়া থাকে তাহলে, 'AllowImages' ব্যবহৃত হবে এবং ব্যবহারকারী এটি পরিবর্তন করতে সক্ষম হবে৷</translation>
 <translation id="7763479091692861127"> বিভিন্ন প্রকারের সংযোগ যা OS আপডেটের জন্য ব্যবহার করতে মঞ্জুরিপ্রাপ্ত৷ OS আপডেটগুলি তাদের আকারের কারণে সংযোগের উপর সম্ভাব্যরূপে অত্যধিক চাপ সৃষ্টি করে এবং এর জন্য অতিরিক্ত মূল্যও লাগতে পারে৷ তাই, এগুলি ডিফল্টভাবে সেইসব সংযোগ প্রকারের জন্য সক্ষমিত থাকে না যেগুলিকে ব্যয়বহুল বিবেচনা করা হয়, এই মুহূর্তে এর মধ্যে রয়েছে WiMax, ব্লুটুথ এবং Cellular৷
 
       স্বীকৃত সংযোগ প্রকার শনাক্তকারীগুলি হল "ethernet", "wifi", "wimax", "bluetooth" এবং "cellular"৷</translation>
diff --git a/components/policy/resources/policy_templates_ca.xtb b/components/policy/resources/policy_templates_ca.xtb
index 857f99f..c4a6689c 100644
--- a/components/policy/resources/policy_templates_ca.xtb
+++ b/components/policy/resources/policy_templates_ca.xtb
@@ -79,7 +79,6 @@
 
           El factor d'escala ha de ser del 100% o més.</translation>
 <translation id="131353325527891113">Mostra els noms d'usuari a la pantalla d'inici de sessió</translation>
-<translation id="1325295456374328159">Estableix les configuracions regionals permeses en una sessió d'usuari</translation>
 <translation id="1327466551276625742">Activeu la sol·licitud de configuració de la xarxa quan estigueu fora de línia.</translation>
 <translation id="1330145147221172764">Activa el teclat en pantalla</translation>
 <translation id="13356285923490863">Nom de la política</translation>
@@ -455,7 +454,6 @@
 <translation id="2309390639296060546">Configuració d'ubicació predeterminada</translation>
 <translation id="2312134445771258233">Us permet configurar les pàgines que es carreguen en iniciar. El contingut de la llista "URL que s'han d'obrir en iniciar" s'ignora tret que seleccioneu "Obre una llista d'URL" a "Acció a l'inici".</translation>
 <translation id="2327252517317514801">Defineix els dominis que tenen permís per accedir a G Suite</translation>
-<translation id="2337466621458842053">Us permet definir una llista de patrons d'URL que especifiquen els llocs que poden mostrar imatges. Si no es defineix aquesta política, s'utilitzarà el valor global predeterminat per a tots els llocs tant de la política "DefaultImagesSetting", si es defineix, com d'un altre tipus de configuració personal de l'usuari.</translation>
 <translation id="2372547058085956601">Retard d'inici de sessió automàtic de la sessió pública.
 
       Si no es defineix la política |DeviceLocalAccountAutoLoginId|, aquesta política no té cap efecte. En cas contrari:
@@ -1186,7 +1184,6 @@
       Si l'activeu o el desactiveu, els usuaris no podran canviar ni substituir aquesta configuració a <ph name="PRODUCT_NAME" />.
 
       Si no es defineix aquesta política, aquest paràmetre s'activarà, però l'usuari podrà canviar-lo.</translation>
-<translation id="4525521128313814366">Us permet definir una llista de patrons d'URL que especifiquen els llocs en què no està permès mostrar imatges. Si no es defineix aquesta política, s'utilitzarà el valor global predeterminat per a tots els llocs tant de la política "DefaultImagesSetting", si es defineix, com d'un altre tipus de configuració personal de l'usuari.</translation>
 <translation id="4531706050939927436">Es pot utilitzar Google Play des de la Consola d'administració de Google per forçar la instal·lació de les aplicacions per a Android. No utilitzen aquesta política.</translation>
 <translation id="4534500438517478692">Nom de la restricció d'Android:</translation>
 <translation id="4541530620466526913">Comptes locals del dispositiu</translation>
@@ -1459,9 +1456,6 @@
 <translation id="5447306928176905178">Activa els informes d'informació de memòria (mida de pila JS) a la pàgina (no disponible)</translation>
 <translation id="5457065417344056871">Activa el mode de convidat al navegador</translation>
 <translation id="5457924070961220141">Us permet configurar el processador HTML predeterminat quan <ph name="PRODUCT_FRAME_NAME" /> està instal·lat. La configuració predeterminada que s'utilitza quan no es defineix aquesta política és permetre que el navegador amfitrió dugui a terme la renderització, però si ho desitgeu podeu modificar-ho i fer que <ph name="PRODUCT_FRAME_NAME" /> renderitzi de manera predeterminada les pàgines HTML.</translation>
-<translation id="5459155981813668716">Estableix les configuracions regionals en què es pot mostrar <ph name="PRODUCT_OS_NAME" />.
-
-      Si aquesta política s'estableix, l'usuari només podrà configurar <ph name="PRODUCT_OS_NAME" /> perquè es mostri en una de les configuracions regionals especificades per aquesta política. Si aquesta política no s'estableix o s'estableix en una llista buida, <ph name="PRODUCT_OS_NAME" /> es podrà mostrar en totes les configuracions regionals admeses. Si aquesta política s'estableix en una llista amb valors no vàlids, tots els valors no vàlids s'ignoraran. Si un usuari ha configurat prèviament <ph name="PRODUCT_OS_NAME" /> perquè es mostri en un idioma que aquesta política no admet, la configuració regional de visualització canviarà a una configuració regional permesa la propera vegada que l'usuari iniciï la sessió. Si l'usuari ha establert una configuració regional com a preferida i aquesta política l'admet, <ph name="PRODUCT_OS_NAME" /> canviarà a aquesta configuració regional. En canvi, si aquesta política només conté entrades no vàlides, <ph name="PRODUCT_OS_NAME" /> canviarà al primer valor vàlid que especifiqui aquesta política o a una configuració regional alternativa (actualment, en-US).</translation>
 <translation id="5464816904705580310">Defineix les opcions de configuració per a usuaris gestionats.</translation>
 <translation id="546726650689747237">Retard de l'atenuació de pantalla quan s'utilitza alimentació</translation>
 <translation id="5469825884154817306">Bloqueja les imatges en aquests llocs</translation>
@@ -2205,7 +2199,6 @@
       La disposició de teclat preseleccionada serà sempre la més popular que concordi amb la configuració regional preseleccionada.
 
       Aquesta política només es pot establir com a recomanada. Podeu fer-la servir per moure una sèrie de configuracions regionals recomanades a la part superior de la llista, però els usuaris sempre poden triar per a la sessió qualsevol de les configuracions admeses a <ph name="PRODUCT_OS_NAME" />.</translation>
-<translation id="7763311235717725977">Us permet definir si els llocs web poden mostrar imatges. La visualització d'imatges es pot autoritzar o denegar per a tots els llocs web. Si aquesta política no es defineix, s'utilitzarà el paràmetre "AllowImages" i l'usuari podrà canviar-lo.</translation>
 <translation id="7763479091692861127"> Tipus de connexions que es poden utilitzar per a les actualitzacions del sistema operatiu (SO). Les actualitzacions del SO poden saturar la connexió a causa de la seva mida i poden comportar costos addicionals. Per tant, no estan activades de manera predeterminada en tipus de connexió que es consideren cares, entre les quals hi ha, en aquests moments, WiMax, Bluetooth i connexió mòbil.
 
       Els identificadors de tipus de connexió reconeguts són "ethernet", "wifi", "wimax", "bluetooth" i "xarxes mòbils".</translation>
diff --git a/components/policy/resources/policy_templates_cs.xtb b/components/policy/resources/policy_templates_cs.xtb
index 5fcabe8a..00b6293 100644
--- a/components/policy/resources/policy_templates_cs.xtb
+++ b/components/policy/resources/policy_templates_cs.xtb
@@ -78,7 +78,6 @@
 
 Hodnota prodloužení musí být 100 % nebo více.</translation>
 <translation id="131353325527891113">Zobrazit uživatelská jména na přihlašovací obrazovce</translation>
-<translation id="1325295456374328159">Nakonfigurovat povolená národní prostředí v uživatelské relaci</translation>
 <translation id="1327466551276625742">Povolit zobrazení výzvy ke konfiguraci sítě v režimu offline</translation>
 <translation id="1330145147221172764">Povolit softwarovou klávesnici</translation>
 <translation id="13356285923490863">Název zásady</translation>
@@ -443,9 +442,6 @@
 
       Pokud jste v části „Akce při spuštění“ nezvolili možnost „Otevřít seznam adres URL“, budou položky v seznamu „Adresy URL otevírané při spuštění“ ignorovány.</translation>
 <translation id="2327252517317514801">Definování domén, kterým je povolen přístup ke službám G Suite</translation>
-<translation id="2337466621458842053">Umožňuje nastavit seznam vzorů adres URL pro webové stránky, které mají povoleno zobrazovat obrázky.
-
-          Pokud zásadu nenastavíte, použije se pro všechny webové stránky globální výchozí hodnota buď ze zásady DefaultImagesSetting (pokud je nastavena), nebo z osobního nastavení uživatele.</translation>
 <translation id="2372547058085956601">Prodleva automatického přihlášení do veřejné relace.
 
       Pokud není nastavena zásada |DeviceLocalAccountAutoLoginId|, nebude mít tato zásada žádný vliv. V opačném případě platí:
@@ -1204,9 +1200,6 @@
       Pokud toto nastavení aktivujete nebo deaktivujete, uživatelé je v prohlížeči <ph name="PRODUCT_NAME" /> nebudou moci změnit ani přepsat.
 
       Pokud zásadu nenastavíte, bude tato funkce zapnuta a uživatelé budou moci nastavení změnit.</translation>
-<translation id="4525521128313814366">Umožňuje nastavit seznam vzorů adres URL webových stránek, které nemají povoleno zobrazovat obrázky.
-
-          Pokud zásadu nenastavíte, použije se pro všechny webové stránky globální výchozí hodnota buď ze zásady DefaultImagesSetting (pokud je nastavena), nebo z osobního nastavení uživatele.</translation>
 <translation id="4531706050939927436">Instalaci aplikací Android lze vynutit z administrátorské konzole pomocí Google Play. Tato zásada se na ně nevztahuje.</translation>
 <translation id="4534500438517478692">Název omezení Android:</translation>
 <translation id="4541530620466526913">Místní účty v zařízení</translation>
@@ -1501,9 +1494,6 @@
 <translation id="5457065417344056871">Povolit v prohlížeči režim hosta</translation>
 <translation id="5457924070961220141">Umožňuje nakonfigurovat výchozí modul vykreslování obsahu HTML, pokud je nainstalován plugin <ph name="PRODUCT_FRAME_NAME" />.
           Pokud není tato zásada nastavena, vykresluje obsah ve výchozím nastavení hostitelský prohlížeč, toto nastavení však můžete přepsat a namísto toho vykreslovat stránky HTML pomocí pluginu <ph name="PRODUCT_FRAME_NAME" />.</translation>
-<translation id="5459155981813668716">Konfiguruje jazyky, v nichž se systém <ph name="PRODUCT_OS_NAME" /> může zobrazovat.
-
-      Pokud je tato zásada nastavena, může uživatel nakonfigurovat zobrazení systému <ph name="PRODUCT_OS_NAME" /> v některém z jazyků uvedených v této zásadě. Pokud tato zásada není nastavena nebo je nastavena na prázdný seznam, může být systém <ph name="PRODUCT_OS_NAME" /> zobrazen ve všech podporovaných jazycích. Jestliže seznam v této zásadě bude zahrnovat neplatné hodnoty, tyto hodnoty budou ignorovány. Pokud uživatel v minulosti systém <ph name="PRODUCT_OS_NAME" /> nakonfiguroval na zobrazení v jazyce, který tato zásada nepovoluje, přepne se zobrazovaný jazyk při příštím přihlášení uživatele na povolený jazyk. Pokud uživatel nakonfiguroval preferované jazyky a některý z nich je touto zásadou povolen, přejde <ph name="PRODUCT_OS_NAME" /> na daný jazyk. Jinak <ph name="PRODUCT_OS_NAME" /> přejde na první platnou hodnotu v této zásadě, případně na záložní jazyk (aktuálně en-US), pokud tato zásada obsahuje pouze neplatné hodnoty.</translation>
 <translation id="5464816904705580310">Konfigurace nastavení pro spravované uživatele</translation>
 <translation id="546726650689747237">Prodleva snížení jasu obrazovky při napájení ze sítě</translation>
 <translation id="5469825884154817306">Blokovat obrázky na těchto stránkách</translation>
@@ -2283,9 +2273,6 @@
 
       Tuto zásadu lze nastavit pouze jako doporučenou. Zásada slouží k přesunutí několika doporučených jazyků na začátek seznamu. Uživatelé však pro svou relaci mohou vždy zvolit kterýkoli z jazyků, které systém <ph name="PRODUCT_OS_NAME" /> podporuje.
       </translation>
-<translation id="7763311235717725977">Umožňuje nastavit, zda mají webové stránky povoleno zobrazovat obrázky. Zobrazování obrázků lze buď povolit všem webovým stránkám, nebo je všem webovým stránkám zakázat.
-
-          Pokud tuto zásadu nenastavíte, bude použita zásada AllowImages a uživatelé ji budou moci změnit.</translation>
 <translation id="7763479091692861127"> Typy připojení, které lze používat pro aktualizaci operačního systému. Aktualizace operačního systému může vzhledem k objemu dat velmi zatěžovat připojení a může mít za následek dodatečné poplatky. Z tohoto důvodu jsou ve výchozím nastavení zakázány pro typy připojení, které jsou považovány za nákladné, což je v současnosti mimo jiné připojení WiMax, Bluetooth nebo mobilní připojení.
       Podporované identifikátory typu připojení jsou „ethernet“, „wifi“, „wimax“, „bluetooth“ a „cellular“.</translation>
 <translation id="7763614521440615342">Zobrazovat na stránce Nová karta návrhy obsahu</translation>
diff --git a/components/policy/resources/policy_templates_da.xtb b/components/policy/resources/policy_templates_da.xtb
index e5168ea..f83d2a9 100644
--- a/components/policy/resources/policy_templates_da.xtb
+++ b/components/policy/resources/policy_templates_da.xtb
@@ -79,7 +79,6 @@
 
           Skaleringsfaktoren skal være 100 % eller mere.</translation>
 <translation id="131353325527891113">Vis brugernavne på loginskærmen</translation>
-<translation id="1325295456374328159">Konfigurer tilladte sprog i en brugersession</translation>
 <translation id="1327466551276625742">Aktivér meddelelse om netværkskonfiguration, når du er offline</translation>
 <translation id="1330145147221172764">Aktivér skærmtastatur</translation>
 <translation id="13356285923490863">Navn på politik</translation>
@@ -463,7 +462,6 @@
 <translation id="2309390639296060546">Standardindstilling for geoplacering</translation>
 <translation id="2312134445771258233">Giver dig mulighed for at konfigurere de sider, der indlæses ved opstart. Indholdet af listen "Webadresser, der skal åbnes ved opstart" ignoreres, medmindre du vælger "Åbn en liste over webadresser" i "Handling ved opstart".</translation>
 <translation id="2327252517317514801">Definer domæner, der har adgang til G Suite</translation>
-<translation id="2337466621458842053">Giver dig mulighed for at oprette en liste med webadressemønstre, der angiver websites, hvor billedvisning tillades. Hvis denne politik ikke er angivet, anvendes den globale standardværdi for alle websites, enten fra politikken "DefaultImagesSetting", hvis den er angivet, eller fra brugerens personlige konfiguration.</translation>
 <translation id="2372547058085956601">Forsinkelse for automatisk login på offentlige sessioner.
 
       Hvis politikken |DeviceLocalAccountAutoLoginId| ikke er angivet, har den ingen effekt. Derudover:
@@ -1204,7 +1202,6 @@
       Hvis du aktiverer eller deaktiverer denne indstilling, kan brugerne ikke ændre eller tilsidesætte denne indstilling i <ph name="PRODUCT_NAME" />.
 
       Hvis denne politik ikke indstilles, bliver dette aktiveret, men brugeren vil kunne ændre det.</translation>
-<translation id="4525521128313814366">Giver dig mulighed for at oprette en liste over webadressemønstre, der angiver websites, som ikke må vise billeder. Hvis denne politik ikke angives, anvendes den globale standardværdi på alle websites, enten fra politikken "DefaultImagesSetting", hvis den er angivet, eller brugerens personlige konfiguration.</translation>
 <translation id="4531706050939927436">Android-apps kan tvinges til installation via Google Administrationskonsol ved hjælp af Google Play. De anvender ikke denne politik.</translation>
 <translation id="4534500438517478692">Navn på Android-begrænsning:</translation>
 <translation id="4541530620466526913">Enhedslokale konti</translation>
@@ -1479,9 +1476,6 @@
 <translation id="5447306928176905178">Aktiver rapportering af hukommelsesoplysninger (størrelse på JavaScript-heap) til siden. (Udfaset)</translation>
 <translation id="5457065417344056871">Aktivér delefunktion i browseren</translation>
 <translation id="5457924070961220141">Giver dig mulighed for at konfigurere standard-HTML-gengivelse, når <ph name="PRODUCT_FRAME_NAME" /> er installeret. Den standardindstilling, der anvendes, når denne politik ikke er angivet, er at lade værtsbrowseren foretage gengivelsen, men du kan vælge at tilsidesætte dette og få <ph name="PRODUCT_FRAME_NAME" /> til at gengive HTML-sider som standard.</translation>
-<translation id="5459155981813668716">Konfigurerer de sprog, som <ph name="PRODUCT_OS_NAME" /> kan vises på.
-
-      Hvis denne politik er angivet, kan brugeren kun konfigurere <ph name="PRODUCT_OS_NAME" /> til at blive vist på et af de sprog, der angives af denne politik. Hvis politikken ikke er angivet eller er angivet med en tom liste, kan <ph name="PRODUCT_OS_NAME" /> vises på alle understøttede sprog. Hvis denne politik er angivet med en liste, der indeholder ugyldige værdier, ignoreres alle ugyldige værdier. Hvis en bruger tidligere konfigurerede <ph name="PRODUCT_OS_NAME" /> til at blive vist på et sprog, der ikke tillades af denne politik, ændres visningssproget til et tilladt sprog, næste gang brugeren logger ind. Hvis brugeren har konfigureret foretrukne sprog, og et af de foretrukne sprog er tilladt af denne politik, skifter <ph name="PRODUCT_OS_NAME" /> til det pågældende sprog. Ellers skifter <ph name="PRODUCT_OS_NAME" /> til den første gyldige værdi, der er angivet af denne politik, eller til en alternativ landestandard (som i øjeblikket er en-US), hvis politikken kun indeholder ugyldige poster.</translation>
 <translation id="5464816904705580310">Konfigurer indstillingerne for administrerede brugere.</translation>
 <translation id="546726650689747237">Forsinkelse på skærmnedtoning, når strømforsyning er tilsluttet</translation>
 <translation id="5469825884154817306">Bloker billeder på disse websites</translation>
@@ -2230,9 +2224,6 @@
 
       Denne politik kan kun angives som anbefalet. Du kan bruge denne politik til at flytte en række anbefalede landestandarder op øverst på listen, men brugerne kan altid vælge en af de andre landestandarder, som understøttes af <ph name="PRODUCT_OS_NAME" />, til deres session.
       </translation>
-<translation id="7763311235717725977">Giver dig mulighed for at bestemme, om websites skal kunne vise billeder. Billedvisning kan enten være tilladt for alle websites eller nægtet for alle websites.
-
-          Hvis denne politik ikke er angivet, anvendes "AllowImages", og brugeren kan ændre den.</translation>
 <translation id="7763479091692861127"> De forbindelsestyper, der er tilladt at bruge ved OS-opdateringer. OS-opdateringer kan lægge et stort pres på forbindelsen, fordi de fylder meget, og kan forårsage yderligere omkostninger. Derfor er de som standard ikke aktiveret for forbindelsestyper, der betragtes som dyre, hvilket i øjeblikket er WiMax, Bluetooth og mobil.
 
       De genkendte forbindelsestype-id'er er "ethernet", "wifi", "wimax", "bluetooth" og "mobil".</translation>
diff --git a/components/policy/resources/policy_templates_de.xtb b/components/policy/resources/policy_templates_de.xtb
index cf4990f..5954d93 100644
--- a/components/policy/resources/policy_templates_de.xtb
+++ b/components/policy/resources/policy_templates_de.xtb
@@ -79,7 +79,6 @@
 
           Der Skalierungsfaktor muss mindestens 100 % betragen.</translation>
 <translation id="131353325527891113">Nutzernamen auf Anmeldeseite zeigen</translation>
-<translation id="1325295456374328159">In einer Nutzersitzung zulässige Sprachen konfigurieren</translation>
 <translation id="1327466551276625742">Eingabeaufforderung zur Netzwerkkonfiguration im Offlinemodus aktivieren</translation>
 <translation id="1330145147221172764">Bildschirmtastatur aktivieren</translation>
 <translation id="13356285923490863">Richtlinienname</translation>
@@ -457,7 +456,6 @@
 <translation id="2309390639296060546">Standardeinstellung für "Standortbestimmung"</translation>
 <translation id="2312134445771258233">Mit dieser Richtlinie können Sie konfigurieren, welche Seiten beim Start geladen werden. Der Inhalt der Liste "Beim Start zu öffnende URLs" wird ignoriert, sofern die Option "URL-Liste öffnen" unter "Aktion beim Start" nicht ausgewählt ist.</translation>
 <translation id="2327252517317514801">Domains definieren, die auf die G Suite zugreifen dürfen</translation>
-<translation id="2337466621458842053">Ermöglicht Ihnen die Zusammenstellung einer Liste mit URL-Mustern, die Websites angeben, denen das Anzeigen von Bildern gestattet ist. Wenn diese Richtlinie nicht konfiguriert wird, so kommt für alle Websites entweder der globale Standardwert der Richtlinie "DefaultImagesSetting", falls konfiguriert, oder der persönlichen Konfiguration des Nutzers zum Einsatz.</translation>
 <translation id="2372547058085956601">Diese Richtlinie gibt das Intervall bis zur automatischen Anmeldung in einer öffentlichen Sitzung an.
 
       Falls die Richtlinie |DeviceLocalAccountAutoLoginId| nicht festgelegt wurde, hat diese Richtlinie keine Auswirkungen. Anderenfalls gilt:
@@ -1187,7 +1185,6 @@
       Ist diese Einstellung aktiviert oder deaktiviert, können Nutzer sie in <ph name="PRODUCT_NAME" /> nicht ändern oder außer Kraft setzen.
 
       Ist die Richtlinie nicht konfiguriert, so wird die Einstellung aktiviert, wobei der Nutzer dies ändern kann.</translation>
-<translation id="4525521128313814366">Ermöglicht Ihnen die Zusammenstellung einer Liste mit URL-Mustern, die Websites angeben, denen das Anzeigen von Bildern nicht gestattet ist. Wenn diese Richtlinie nicht konfiguriert ist, kommt für alle Websites entweder der globale Standardwert der Richtlinie "DefaultImagesSetting", falls konfiguriert, oder der persönlichen Konfiguration des Nutzers zum Einsatz.</translation>
 <translation id="4531706050939927436">Die Installation von Android-Apps kann von der Google Admin-Konsole aus über Google Play erzwungen werden. Android-Apps nutzen diese Richtlinie nicht.</translation>
 <translation id="4534500438517478692">Name der Android-Einschränkung:</translation>
 <translation id="4541530620466526913">Lokale Gerätekonten</translation>
@@ -1464,9 +1461,6 @@
 <translation id="5447306928176905178">Weitergabe von Speicherinformationen (JS-Heap-Größe) an Seite aktivieren (veraltet)</translation>
 <translation id="5457065417344056871">Gastmodus im Browser aktivieren</translation>
 <translation id="5457924070961220141">Ermöglicht Ihnen die Konfiguration des Standard-HTML-Renderers, wenn <ph name="PRODUCT_FRAME_NAME" /> installiert ist. Wenn diese Richtlinie nicht konfiguriert ist, so kommt die Standardeinstellung zum Einsatz, wobei der Hostbrowser das Rendering übernimmt. Sie haben aber die Möglichkeit, dies zu ändern und <ph name="PRODUCT_FRAME_NAME" /> das Rendering der HTML-Seite übernehmen zu lassen.</translation>
-<translation id="5459155981813668716">Mit dieser Richtlinie werden die Sprachen konfiguriert, in denen <ph name="PRODUCT_OS_NAME" /> angezeigt werden kann.
-
-      Wenn diese Richtlinie festgelegt ist, kann der Nutzer <ph name="PRODUCT_OS_NAME" /> nur in einer der durch diese Richtlinie angegebenen Sprachen anzeigen lassen. Wenn diese Richtlinie nicht festgelegt ist oder auf eine leere Liste verweist, so kann <ph name="PRODUCT_OS_NAME" /> in allen unterstützten Sprachen angezeigt werden. Wenn diese Richtlinie auf eine Liste mit ungültigen Werten verweist, werden alle ungültigen Werte ignoriert. Falls ein Nutzer <ph name="PRODUCT_OS_NAME" /> zuvor so konfiguriert hat, dass es in einer Sprache angezeigt wird, die nicht durch diese Richtlinie zugelassen ist, wird die Anzeigesprache in eine zulässige Sprache geändert, wenn sich der Nutzer das nächste Mal anmeldet. Falls der Nutzer bevorzugte Sprachen konfiguriert hatte und eine der bevorzugten Sprachen durch diese Richtlinie zugelassen ist, wechselt <ph name="PRODUCT_OS_NAME" /> zu dieser Sprache. Andernfalls wechselt <ph name="PRODUCT_OS_NAME" /> zum ersten gültigen Wert, der durch diese Richtlinie angegeben ist, oder – falls diese Richtlinie nur ungültige Einträge enthält – zu einer Ersatzsprache (derzeit en-US).</translation>
 <translation id="5464816904705580310">Konfiguriert Einstellungen für verwaltete Nutzer</translation>
 <translation id="546726650689747237">Verzögerung für die Bildschirmabdunkelung im Netzbetrieb</translation>
 <translation id="5469825884154817306">Bilder auf diesen Websites blockieren</translation>
@@ -2222,7 +2216,6 @@
 
       Diese Richtlinie kann nur gemäß der Empfehlung konfiguriert werden. Mithilfe dieser Richtlinie können Sie eine Reihe empfohlener Gebietsschemas an den Anfang verschieben, Nutzer haben jedoch immer die Möglichkeit, ein beliebiges von <ph name="PRODUCT_OS_NAME" /> unterstütztes Gebietsschema für ihre Sitzung auszuwählen.
       </translation>
-<translation id="7763311235717725977">Ermöglicht Ihnen festzulegen, ob Websites Bilder anzeigen dürfen. Das Anzeigen von Bildern kann entweder allen Websites gestattet oder für alle unterbunden werden. Wenn diese Richtlinie nicht konfiguriert ist, so kommt "AllowImages" zum Einsatz, wobei der Nutzer dies ändern kann.</translation>
 <translation id="7763479091692861127"> Die Verbindungstypen, die für Betriebssystemaktualisierungen zulässig sind. Betriebssystemaktualisierungen beanspruchen die Verbindung aufgrund ihrer Größe potenziell stark und können zusätzliche Kosten verursachen. Deshalb sind sie für als kostenintensiv geltende Verbindungstypen standardmäßig nicht aktiviert. Dazu gehören derzeit beispielsweise WiMax, Bluetooth und Mobilfunkverbindungen.
 
       Zu den erkannten Verbindungstypkennungen gehören "ethernet", "wifi", "wimax", "bluetooth" und "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_el.xtb b/components/policy/resources/policy_templates_el.xtb
index 40db026..1142182 100644
--- a/components/policy/resources/policy_templates_el.xtb
+++ b/components/policy/resources/policy_templates_el.xtb
@@ -79,7 +79,6 @@
 
           Ο συντελεστής προσαρμογής πρέπει να είναι 100% ή μεγαλύτερος.</translation>
 <translation id="131353325527891113">Εμφάνιση ονομάτων χρήστη στην οθόνη σύνδεσης</translation>
-<translation id="1325295456374328159">Διαμορφώστε τις επιτρεπόμενες τοπικές ρυθμίσεις σε μια περίοδο σύνδεσης χρήστη</translation>
 <translation id="1327466551276625742">Ενεργοποίηση προτροπής διαμόρφωσης δικτύου εκτός σύνδεσης</translation>
 <translation id="1330145147221172764">Ενεργοποίηση πληκτρολογίου οθόνης</translation>
 <translation id="13356285923490863">Όνομα πολιτικής</translation>
@@ -467,9 +466,6 @@
 <translation id="2309390639296060546">Προεπιλεγμένη ρύθμιση γεωτοποθεσίας</translation>
 <translation id="2312134445771258233">Σας επιτρέπει να κάνετε διαμόρφωση των σελίδων που φορτώθηκαν κατά την εκκίνηση. Τα περιεχόμενα της λίστας "Διευθύνσεις URL οι οποίες θα ανοίγουν κατά την εκκίνηση" αγνοούνται, εκτός αν έχετε επιλέξει "Άνοιγμα μιας λίστας διευθύνσεων URL" στην "Ενέργεια κατά την εκκίνηση".</translation>
 <translation id="2327252517317514801">Καθορισμός τομέων που επιτρέπεται να έχουν πρόσβαση στο G Suite</translation>
-<translation id="2337466621458842053">Σας επιτρέπει να ρυθμίσετε μια λίστα με τα μοτίβα διευθύνσεων url που προσδιορίζουν ιστότοπους στους οποίους επιτρέπεται να προβάλλονται εικόνες.
-
-          Αν αυτή η πολιτική δεν καθοριστεί, θα χρησιμοποιηθεί η καθολική προεπιλεγμένη τιμή για όλους τους ιστότοπους είτε από την πολιτική ''DefaultImagesSetting'' εφόσον έχει οριστεί, είτε από την προσωπική διαμόρφωση του χρήστη.</translation>
 <translation id="2372547058085956601">Καθυστέρηση αυτόματης σύνδεσης της δημόσιας περιόδου σύνδεσης.
 
       Αν η πολιτική |DeviceLocalAccountAutoLoginId| δεν οριστεί, αυτή η πολιτική δεν έχει κάποια επίπτωση. Διαφορετικά:
@@ -1229,9 +1225,6 @@
       Αν ενεργοποιήσετε ή απενεργοποιήσετε αυτήν τη ρύθμιση, οι χρήστες δεν θα μπορούν να αλλάξουν ή να παρακάμψουν αυτήν τη ρύθμιση στο <ph name="PRODUCT_NAME" />.
 
       Αν αυτή η πολιτική δεν οριστεί, θα ενεργοποιηθεί αλλά ο χρήστης θα μπορεί να την αλλάξει.</translation>
-<translation id="4525521128313814366">Σας επιτρέπει να ρυθμίσετε μια λίστα με τα μοτίβα διευθύνσεων url που προσδιορίζουν ιστότοπους στους οποίους δεν επιτρέπεται να προβάλλονται εικόνες.
-
-          Αν αυτή η πολιτική δεν καθοριστεί, θα χρησιμοποιηθεί η καθολική προεπιλεγμένη τιμή για όλους τους ιστότοπους, είτε από την πολιτική 'DefaultImagesSetting', εφόσον έχει οριστεί, είτε από την προσωπική διαμόρφωση του χρήστη.</translation>
 <translation id="4531706050939927436">Μπορεί να γίνει επιβολή εγκατάστασης εφαρμογών Android από την Κονσόλα διαχειριστή Google με χρήση του Google Play. Δεν χρησιμοποιούν αυτήν την πολιτική.</translation>
 <translation id="4534500438517478692">Όνομα περιορισμού Android:</translation>
 <translation id="4541530620466526913">Τοπικοί λογαριασμοί μιας συσκευής</translation>
@@ -1530,9 +1523,6 @@
 <translation id="5457065417344056871">Ενεργοποίηση κατάστασης επισκέπτη στο πρόγραμμα περιήγησης</translation>
 <translation id="5457924070961220141">Σας επιτρέπει να διαμορφώνετε την προεπιλεγμένη λειτουργία απόδοσης HTML όταν είναι εγκατεστημένο το <ph name="PRODUCT_FRAME_NAME" />.
           Η προεπιλεγμένη ρύθμιση που χρησιμοποιείται όταν αυτή η πολιτική δεν ορίζεται είναι να επιτρέπεται στο πρόγραμμα περιήγησης του κεντρικού υπολογιστή να κάνει την απόδοση, αλλά μπορείτε προαιρετικά να την παρακάμψετε και το <ph name="PRODUCT_FRAME_NAME" /> να αποδίδει σελίδες HTML από προεπιλογή.</translation>
-<translation id="5459155981813668716">Διαμορφώνει τις τοπικές ρυθμίσεις στις οποίες μπορεί να προβάλλεται το <ph name="PRODUCT_OS_NAME" />.
-
-      Εάν αυτή η πολιτική οριστεί, ο χρήστης μπορεί να διαμορφώσει το <ph name="PRODUCT_OS_NAME" /> ούτως ώστε να προβάλλεται μόνο σε μία από τις τοπικές ρυθμίσεις που καθορίζονται από αυτήν την πολιτική. Εάν αυτή η πολιτική δεν οριστεί ή οριστεί σε μια κενή λίστα, το <ph name="PRODUCT_OS_NAME" /> μπορεί να προβληθεί σε όλες τις υποστηριζόμενες τοπικές ρυθμίσεις. Εάν αυτή η πολιτική οριστεί σε μια λίστα με μη έγκυρες τιμές, όλες οι μη έγκυρες τιμές θα αγνοηθούν. Εάν ο χρήστης διαμόρφωσε στο παρελθόν το <ph name="PRODUCT_OS_NAME" /> ούτως ώστε να προβάλλεται σε μια γλώσσα η οποία δεν επιτρέπεται από αυτήν την πολιτική, οι προβαλλόμενες τοπικές ρυθμίσεις θα αλλάξουν σε επιτρεπόμενες τοπικές ρυθμίσεις την επόμενη φορά που θα συνδεθεί ο χρήστης. Εάν ο χρήστης είχε διαμορφώσει τις προτιμώμενες τοπικές ρυθμίσεις και ένα σύνολο από τις προτιμώμενες τοπικές ρυθμίσεις επιτρέπεται από αυτήν την πολιτική, το <ph name="PRODUCT_OS_NAME" /> θα κάνει εναλλαγή σε αυτές τις τοπικές ρυθμίσεις. Διαφορετικά, το <ph name="PRODUCT_OS_NAME" /> θα κάνει εναλλαγή στην πρώτη έγκυρη τιμή που καθορίζεται από αυτήν την πολιτική ή σε κάποιο εναλλακτικό σύνολο τοπικών ρυθμίσεων (αυτήν τη στιγμή είναι en-US), εάν αυτή η πολιτική περιέχει μόνο μη έγκυρες καταχωρίσεις.</translation>
 <translation id="5464816904705580310">Διαμόρφωση ρυθμίσεων για χρήστες διαχείρισης.</translation>
 <translation id="546726650689747237">Καθυστέρηση θαμπώματος οθόνης κατά τη λειτουργία με εναλλασσόμενο ρεύμα</translation>
 <translation id="5469825884154817306">Αποκλεισμός εικόνων σε αυτούς τους ιστότοπους</translation>
@@ -2319,9 +2309,6 @@
 
       Αυτή η πολιτική μπορεί να οριστεί μόνο ως συνιστώμενη. Μπορείτε να την χρησιμοποιήσετε για τη μετακίνηση ενός συνόλου συνιστώμενων τοπικών ρυθμίσεων στην κορυφή, αλλά επιτρέπεται πάντα στους χρήστες να επιλέγουν οποιοεσδήποτε τοπικές ρυθμίσεις που υποστηρίζονται από το <ph name="PRODUCT_OS_NAME" /> για τη συνεδρία τους.
       </translation>
-<translation id="7763311235717725977">Σας επιτρέπει να ορίσετε αν επιτρέπεται η προβολή εικόνων στους ιστότοπους. Η προβολή εικόνων μπορεί είτε να επιτρέπεται είτε να απορρίπτεται για όλους τους ιστότοπους.
-
-          Αν αυτή η πολιτική δεν καθοριστεί, θα χρησιμοποιηθεί το στοιχείο ''AllowImages'' και ο χρήστης θα μπορεί να την αλλάξει.</translation>
 <translation id="7763479091692861127"> Οι τύποι των συνδέσεων που επιτρέπεται να χρησιμοποιηθούν για ενημερώσεις OS. Οι ενημερώσεις OS ενδεχομένως επιβαρύνουν τη σύνδεση εξαιτίας του μεγέθους τους και ενδεχομένως να επιφέρουν πρόσθετο κόστος. Συνεπώς, από προεπιλογή δεν είναι ενεργοποιημένες για τύπους συνδέσεων που θεωρούνται ακριβές, μεταξύ των οποίων οι συνδέσεις WiMax, Bluetooth και δικτύου κινητής τηλεφωνίας επί του παρόντος.
 
       Τα αναγνωριστικά τύπου σύνδεσης είναι "ethernet", "wifi", "wimax", "bluetooth" και "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_en-GB.xtb b/components/policy/resources/policy_templates_en-GB.xtb
index 39b14362..3100d2f 100644
--- a/components/policy/resources/policy_templates_en-GB.xtb
+++ b/components/policy/resources/policy_templates_en-GB.xtb
@@ -79,7 +79,6 @@
 
           The scale factor must be 100% or more.</translation>
 <translation id="131353325527891113">Show usernames on login screen</translation>
-<translation id="1325295456374328159">Configure the allowed locales in a user session</translation>
 <translation id="1327466551276625742">Enable network configuration prompt when offline</translation>
 <translation id="1330145147221172764">Enable on-screen keyboard</translation>
 <translation id="13356285923490863">Policy Name</translation>
@@ -475,9 +474,6 @@
 
 The contents of the list 'URLs to open at start-up' are ignored unless you select 'Open a list of URLs' in 'Action on start-up'.</translation>
 <translation id="2327252517317514801">Define domains allowed to access G Suite</translation>
-<translation id="2337466621458842053">Allows you to set a list of url patterns that specify sites which are allowed to display images.
-
-          If this policy is left unset, the global default value will be used for all sites either from the 'DefaultImagesSetting' policy, if it is set, or the user's personal configuration otherwise.</translation>
 <translation id="2372547058085956601">The public session auto-login delay.
 
       If the |DeviceLocalAccountAutoLoginId| policy is unset, this policy has no effect. Otherwise:
@@ -1248,9 +1244,6 @@
       If you enable or disable this setting, users cannot change or override this setting in <ph name="PRODUCT_NAME" />.
 
       If this policy is left not set, this will be enabled but the user will be able to change it.</translation>
-<translation id="4525521128313814366">Allows you to set a list of url patterns that specify sites which are not allowed to display images.
-
-          If this policy is left unset, the global default value will be used for all sites either from the 'DefaultImagesSetting' policy, if it is set, or the user's personal configuration otherwise.</translation>
 <translation id="4531706050939927436">Android apps can be force-installed from the Google Admin console using Google Play. They do not use this policy.</translation>
 <translation id="4534500438517478692">Android restriction name:</translation>
 <translation id="4541530620466526913">Device-local accounts</translation>
@@ -1551,9 +1544,6 @@
 <translation id="5457065417344056871">Enable guest mode in browser</translation>
 <translation id="5457924070961220141">Allows you to configure the default HTML renderer when <ph name="PRODUCT_FRAME_NAME" /> is installed.
           The default setting used when this policy is left unset is to allow the host browser do the rendering, but you can optionally override this and have <ph name="PRODUCT_FRAME_NAME" /> render HTML pages by default.</translation>
-<translation id="5459155981813668716">Configures the locales <ph name="PRODUCT_OS_NAME" /> may be displayed in.
-
-      If this policy is set, the user can only configure <ph name="PRODUCT_OS_NAME" /> to be displayed in one of the locales specified by this policy. If this policy is not set or set to an empty list, <ph name="PRODUCT_OS_NAME" /> can be displayed in all supported locales. If this policy is set to a list with invalid values, all invalid values will be ignored. If a user previously configured <ph name="PRODUCT_OS_NAME" /> to be displayed in a language that is not allowed by this policy, the display locale will be switched to an allowed locale the next time that the user signs in. If the user had configured preferred locales and one of the preferred locales is allowed by this policy, <ph name="PRODUCT_OS_NAME" /> will switch to this locale. Otherwise, <ph name="PRODUCT_OS_NAME" /> will switch to the first valid value specified by this policy, or to a fallback locale (currently en-US), if this policy only contains invalid entries.</translation>
 <translation id="5464816904705580310">Configure settings for managed users.</translation>
 <translation id="546726650689747237">Screen dim delay when running on AC power</translation>
 <translation id="5469825884154817306">Block images on these sites</translation>
@@ -2341,9 +2331,6 @@
 
       This policy can only be set as recommended. You can use this policy to move a set of recommended locales to the top but users are always allowed to choose any locale supported by <ph name="PRODUCT_OS_NAME" /> for their session.
       </translation>
-<translation id="7763311235717725977">Allows you to set whether websites are allowed to display images. Displaying images can be either allowed for all websites or denied for all websites.
-
-          If this policy is left unset, 'AllowImages' will be used and the user will be able to change it.</translation>
 <translation id="7763479091692861127"> The types of connections that are allowed to use for OS updates. OS updates potentially put heavy strain on the connection due to their size and may incur additional cost. Therefore, they are by default not enabled for connection types that are considered expensive, which include WiMax, Bluetooth and Cellular at the moment.
 
       The recognised connection type identifiers are "ethernet", "wifi", "wimax", "bluetooth" and "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_es-419.xtb b/components/policy/resources/policy_templates_es-419.xtb
index 11c8221..f023a3c 100644
--- a/components/policy/resources/policy_templates_es-419.xtb
+++ b/components/policy/resources/policy_templates_es-419.xtb
@@ -78,7 +78,6 @@
 
           El factor de escala debe ser igual o superior a 100 %.</translation>
 <translation id="131353325527891113">Mostrar los nombres de usuario en la pantalla de inicio de sesión</translation>
-<translation id="1325295456374328159">Configurar los idiomas permitidos en una sesión de usuario</translation>
 <translation id="1327466551276625742">Habilitar mensaje de configuración de red si no hay conexión</translation>
 <translation id="1330145147221172764">Habilitar el teclado en pantalla</translation>
 <translation id="13356285923490863">Nombre de la política</translation>
@@ -455,7 +454,6 @@
 <translation id="2309390639296060546">Configuración de geolocalización predeterminada</translation>
 <translation id="2312134445771258233">Te permite configurar las páginas que se cargan al iniciar. El contenido de la lista "Direcciones URL que se abrirán al iniciar" se ignora a menos que se haya seleccionado "Abrir una lista de direcciones URL en acción al iniciar".</translation>
 <translation id="2327252517317514801">Definir los dominios con permiso para acceder a G Suite</translation>
-<translation id="2337466621458842053">Te permite configurar una lista de patrones de URL que especifican los sitios a los que se les permite mostrar imágenes. Si esta política no se configura, se usará el valor predeterminado global para todos los sitios, ya sea de la política "DefaultImagesSetting", si está configurada, o de otro tipo de configuración personal del usuario.</translation>
 <translation id="2372547058085956601">Establece la demora del acceso automático a la sesión pública.
 
       Si no se establece la política |DeviceLocalAccountAutoLoginId|, esta no tendrá efecto. De lo contrario:
@@ -1190,7 +1188,6 @@
       Si habilitas o inhabilitas esta configuración, los usuarios no podrán cambiar ni anular esta configuración en <ph name="PRODUCT_NAME" />.
 
       Si esta política no se configura, se habilitará esta configuración, pero el usuario podrá cambiarla.</translation>
-<translation id="4525521128313814366">Te permite configurar una lista de patrones de URL que especifican los sitios que no están autorizados a mostrar imágenes. Si esta política no se configura, se usará el valor global predeterminado para todos los sitios ya sea de la política "DefaultImagesSetting", si está configurada, o de otro tipo de configuración personal del usuario.</translation>
 <translation id="4531706050939927436">Con Google Play, se puede forzar la instalación de apps de Android desde la Consola del administrador de Google. Estas apps no usan esta política.</translation>
 <translation id="4534500438517478692">Nombre de restricción de Android:</translation>
 <translation id="4541530620466526913">Cuentas locales del dispositivo</translation>
@@ -1462,9 +1459,6 @@
 <translation id="5447306928176905178">Habilitar el suministro de información sobre la memoria (tamaño de pila de archivos JavaScript) a las páginas (obsoleto)</translation>
 <translation id="5457065417344056871">Habilitar modo de invitado en el navegador</translation>
 <translation id="5457924070961220141">Te permite configurar el procesador HTML predeterminado cuando se instala <ph name="PRODUCT_FRAME_NAME" />. La configuración predeterminada que se usa cuando esta política no se configura es permitir que el navegador del host realice la representación, pero puedes anular esta opción y hacer que <ph name="PRODUCT_FRAME_NAME" /> muestre páginas HTML de forma predeterminada.</translation>
-<translation id="5459155981813668716">Permite configurar los idiomas en que se puede mostrar <ph name="PRODUCT_OS_NAME" />.
-
-      Si se establece esta política, el usuario solo puede configurar <ph name="PRODUCT_OS_NAME" /> para que se muestre en uno de los idiomas que especifica esta política. Si se establece con una lista vacía o no se establece, <ph name="PRODUCT_OS_NAME" /> se puede mostrar en todos los idiomas compatibles. Si se establece con una lista de valores no válidos, se ignorarán todos estos. Si un usuario configuró anteriormente <ph name="PRODUCT_OS_NAME" /> para que se mostrara en un idioma que no se permite según esta política, el idioma de visualización se cambiará a uno permitido la próxima vez que acceda el usuario. Si este configuró los idiomas preferidos y la política permite uno de ellos, <ph name="PRODUCT_OS_NAME" /> se cambiará a ese idioma. De lo contrario, <ph name="PRODUCT_OS_NAME" /> se cambiará al primer valor válido que especifica esta política o a un idioma alternativo (actualmente en-US) si esta política solo contiene entradas no válidas.</translation>
 <translation id="5464816904705580310">Permite establecer parámetros de configuración para los usuarios administrados.</translation>
 <translation id="546726650689747237">Demora de atenuación de pantalla con alimentación de CA</translation>
 <translation id="5469825884154817306">Bloquear imágenes en estos sitios</translation>
@@ -2221,7 +2215,6 @@
 
       Esta política solo se puede establecer como recomendada. Puedes utilizar esta política para colocar un conjunto de configuraciones regionales recomendadas en la parte superior, pero los usuarios pueden elegir cualquier configuración regional entre las que admite <ph name="PRODUCT_OS_NAME" /> para su sesión.
       </translation>
-<translation id="7763311235717725977">Te permite configurar si los sitios web pueden mostrar imágenes. La visualización de imágenes se puede permitir o denegar para todos los sitios web. Si esta política no se configura, se usará "AllowImages" y el usuario podrá cambiarlo.</translation>
 <translation id="7763479091692861127"> Los tipos de conexiones que se pueden utilizar para las actualizaciones del SO. Estas actualizaciones pueden constituir una carga para la conexión debido a su tamaño y podrían implicar costos adicionales. Por lo tanto, están inhabilitadas de forma predeterminada para los tipos de conexión que se consideran caros, que por el momento incluyen WiMax, Bluetooth y Celular.
 
       Los identificadores de tipos de conexión reconocidos son "ethernet", "wifi", "wimax", "bluetooth" y "celular".</translation>
diff --git a/components/policy/resources/policy_templates_es.xtb b/components/policy/resources/policy_templates_es.xtb
index 9302339..a26547c 100644
--- a/components/policy/resources/policy_templates_es.xtb
+++ b/components/policy/resources/policy_templates_es.xtb
@@ -78,7 +78,6 @@
 
           El factor de escala debe ser igual o superior al 100%.</translation>
 <translation id="131353325527891113">Mostrar los nombres de usuario en la pantalla de inicio de sesión</translation>
-<translation id="1325295456374328159">Configurar las configuraciones regionales permitidas en una sesión de usuario</translation>
 <translation id="1327466551276625742">Habilitar mensaje de configuración de red si no hay conexión</translation>
 <translation id="1330145147221172764">Habilitar teclado en pantalla</translation>
 <translation id="13356285923490863">Nombre de la política</translation>
@@ -470,9 +469,6 @@
 
       Se ignorará el contenido de la lista "URL que se deben abrir al inicio" a menos que se seleccione la opción "Abrir una lista de URLs" en la política "Acción al iniciar".</translation>
 <translation id="2327252517317514801">Definir los dominios autorizados para acceder a G Suite</translation>
-<translation id="2337466621458842053">Permite que definas una lista de patrones de URL para especificar los sitios que pueden mostrar imágenes.
-
-          Si no se establece esta política, se usará para todos los sitios el valor general predeterminado que se indique en la política DefaultImagesSetting (si se ha establecido) o el valor personalizado que haya definido el usuario (en caso contrario).</translation>
 <translation id="2372547058085956601">Permite indicar el tiempo de espera para el inicio de sesión automático en sesiones públicas.
 
       Si no se establece la política |DeviceLocalAccountAutoLoginId|, esta política no tendrá ningún efecto. En caso contrario:
@@ -1244,9 +1240,6 @@
       Independientemente de que habilites o inhabilites esta opción, los usuarios no podrán modificarla ni anularla en <ph name="PRODUCT_NAME" />.
 
       Si no se establece esta política, esta opción estará habilitada, pero el usuario podrá modificarla.</translation>
-<translation id="4525521128313814366">Permite establecer una lista de patrones de URL para especificar los sitios que no pueden mostrar imágenes.
-
-          Si no se establece esta política, se usará para todos los sitios el valor general predeterminado que se indique en la política DefaultImagesSetting (si se ha establecido) o el valor personalizado que haya definido el usuario (en caso contrario).</translation>
 <translation id="4531706050939927436">Las aplicaciones para Android se pueden instalar de manera forzada desde la consola de administración de Google usando Google Play. No utilizan esta política.</translation>
 <translation id="4534500438517478692">Nombre de restricción de Android:</translation>
 <translation id="4541530620466526913">Cuentas locales del dispositivo</translation>
@@ -1546,9 +1539,6 @@
 <translation id="5457065417344056871">Habilitar el modo invitados en el navegador</translation>
 <translation id="5457924070961220141">Permite configurar el procesador de HTML predeterminado si se ha instalado <ph name="PRODUCT_FRAME_NAME" />.
           Si no se establece esta política, se permitirá que el navegador del host muestre las páginas HTML de forma predeterminada, pero puedes anular esta opción para que <ph name="PRODUCT_FRAME_NAME" /> muestre las páginas HTML de forma predeterminada.</translation>
-<translation id="5459155981813668716">Establece las configuraciones regionales en las que puede mostrarse <ph name="PRODUCT_OS_NAME" />.
-
-      Si asigna a esta política una lista de configuraciones regionales, el usuario solo podrá mostrar <ph name="PRODUCT_OS_NAME" /> en una de esas configuraciones. Si no asigna ninguna configuración regional a esta política o le asigna una lista vacía, <ph name="PRODUCT_OS_NAME" /> se podrá mostrar en cualquier configuración admitida. Si se asigna a esta política una lista con configuraciones regionales no válidas, los valores que no sean válidos se ignorarán. Si un usuario ya había configurado <ph name="PRODUCT_OS_NAME" /> anteriormente en un idioma no permitido por esta política, la configuración regional se cambiará a otra permitida la próxima vez que el usuario inicie sesión. Si el usuario había establecido configuraciones regionales de preferencia y una de ellas está permitida por esta política, <ph name="PRODUCT_OS_NAME" /> se mostrará en dicha configuración. De lo contrario, <ph name="PRODUCT_OS_NAME" /> se cambiará a la primera configuración regional válida especificada por esta política, o bien a una alternativa (actualmente en-US) si ninguna de las entradas de la política es válida.</translation>
 <translation id="5464816904705580310">Permite establecer opciones de configuración de usuarios administrados.</translation>
 <translation id="546726650689747237">Retraso de atenuación de pantalla cuando el dispositivo está conectado a la red</translation>
 <translation id="5469825884154817306">Bloquear imágenes de estos sitios</translation>
@@ -2339,9 +2329,6 @@
 
       Esta política solo se puede configurar según lo recomendado. Puedes utilizarla para mover un conjunto de configuraciones regionales recomendadas al principio de la lista, pero los usuarios siempre pueden elegir cualquier configuración regional admitida por <ph name="PRODUCT_OS_NAME" /> para su sesión.
       </translation>
-<translation id="7763311235717725977">Permite especificar si los sitios web pueden mostrar o no imágenes. Este permiso se concede o se deniega a todos los sitios web.
-
-          Si no se establece esta política, se usará AllowImages y el usuario podrá hacer cambios.</translation>
 <translation id="7763479091692861127"> Indica los tipos de conexiones que se pueden utilizar para actualizar el sistema operativo. Estas actualizaciones pueden constituir un lastre para la conexión por su tamaño y pueden suponer costes adicionales. Por tanto, están inhabilitadas de forma predeterminada en los tipos de conexiones que se consideran más costosos, entre los que se incluyen WiMAX, Bluetooth y redes móviles.
 
       Los identificadores de tipos de conexiones reconocidos son Ethernet, Wi-Fi, WiMAX, Bluetooth y redes móviles.</translation>
diff --git a/components/policy/resources/policy_templates_et.xtb b/components/policy/resources/policy_templates_et.xtb
index 5a2a0ef2..8cdc342d 100644
--- a/components/policy/resources/policy_templates_et.xtb
+++ b/components/policy/resources/policy_templates_et.xtb
@@ -79,7 +79,6 @@
 
           Skaleerimistegur peab olema vähemalt 100%.</translation>
 <translation id="131353325527891113">Kuva kasutajanimed sisselogimiskuval</translation>
-<translation id="1325295456374328159">Kasutaja seansis lubatud lokaatide seadistamine</translation>
 <translation id="1327466551276625742">Võrguseadistuse viiba lubamine, kui seade on võrguühenduseta</translation>
 <translation id="1330145147221172764">Luba ekraanil kuvatav klaviatuur</translation>
 <translation id="13356285923490863">Reegli nimi</translation>
@@ -472,9 +471,6 @@
 <translation id="2309390639296060546">Geograafilise asukoha vaikeseade</translation>
 <translation id="2312134445771258233">Võimaldab seadistada käivitamisel avatavad lehed. Loendi „Käivitamisel avatavad URL-id” sisu eiratakse, kui te ei vali jaotises „Toiming käivitamisel” käsku „Ava URL-ide loend”.</translation>
 <translation id="2327252517317514801">G Suite'i kasutamise loaga domeenide määramine</translation>
-<translation id="2337466621458842053">Võimaldab teil määrata URL-i mustrite loendi, mis määrab saidid, millel on lubatud kujutisi kuvada.
-
-          Kui reeglit ei määrata, siis kasutatakse kõikide saitide puhul reegli „DefaultImagesSetting” globaalset vaikeväärtust, kui see on määratud, või kasutaja isiklikku konfigureerimist.</translation>
 <translation id="2372547058085956601">Avaliku seansi automaatse sisselogimise viivitus.
 
       Kui reeglit |DeviceLocalAccountAutoLoginId| ei määrata, ei ole sellel mingit mõju. Muidu on mõju järgmine.
@@ -1236,9 +1232,6 @@
       Seade lubamisel või keelamisel ei saa kasutajad seda rakenduses <ph name="PRODUCT_NAME" /> muuta ega alistada.
 
       Kui jätate selle reegli määramata, siis see lubatakse, kuid kasutaja saab seda muuta.</translation>
-<translation id="4525521128313814366">Võimaldab määrata URL-i mustrite loendi, mis määrab saidid, millel ei ole lubatud kujutisi kuvada.
-
-          Kui jätate selle reegli määramata, siis kasutatakse kõikide saitide puhul globaalset vaikeväärtust, mis pärineb reeglist „DefaultImagesSetting”, kui see on määratud, või kasutaja isiklikku konfigureerimist.</translation>
 <translation id="4531706050939927436">Androidi rakendused saab Google'i administraatorikonsoolil Google Play kaudu sundinstallida. Need ei kasuta seda reeglit.</translation>
 <translation id="4534500438517478692">Androidi piirangu nimi:</translation>
 <translation id="4541530620466526913">Seadmepõhised kontod</translation>
@@ -1536,9 +1529,6 @@
 <translation id="5457065417344056871">Külalisrežiimi lubamine brauseris</translation>
 <translation id="5457924070961220141">Võimaldab <ph name="PRODUCT_FRAME_NAME" /> installimisel seadistada HTML-i vaikerenderdaja.
           Kui jätate selle reegli määramata, siis lubatakse vaikeseadena hostbrauseril renderdada, kuid võite selle alistada ja lasta rakendusel <ph name="PRODUCT_FRAME_NAME" /> vaikimisi HTML-lehti renderdada.</translation>
-<translation id="5459155981813668716">Seadistab lokaadid, kus tohib operatsioonisüsteemi <ph name="PRODUCT_OS_NAME" /> kuvada.
-
-      Kui reegel on määratud, saab kasutaja seadistada operatsioonisüsteemi <ph name="PRODUCT_OS_NAME" /> nii, et seda tohiks kuvada ainult selle reegliga määratud lokaatides. Kui reegel on määramata või määratud on tühi loend, tohib operatsioonisüsteemi <ph name="PRODUCT_OS_NAME" /> kuvada kõikides toetatud lokaatides. Kui reegli jaoks on määratud sobimatute väärtustega loend, eiratakse kõiki sobimatuid väärtusi. Kui kasutaja oli operatsioonisüsteemis <ph name="PRODUCT_OS_NAME" /> valinud kuvatava keele, mis ei ole selle reegli kohaselt lubatud, määratakse kasutaja järgmisel sisselogimisel lubatud kuvatav lokaat. Kui kasutaja oli seadistanud eelistatud lokaadid ja üks eelistatud lokaatidest on selle reegli alusel lubatud, aktiveeritakse operatsioonisüsteemis <ph name="PRODUCT_OS_NAME" /> see lokaat. Muul juhul kasutatakse operatsioonisüsteemis <ph name="PRODUCT_OS_NAME" /> reegli esimest sobivat väärtust või varulokaati (praegu en-US), kui reegel sisaldab ainult sobimatuid kirjeid.</translation>
 <translation id="5464816904705580310">Hallatud kasutajate seadete konfigureerimine.</translation>
 <translation id="546726650689747237">Ekraani hämardamise viiteaeg võrgutoite kasutamisel</translation>
 <translation id="5469825884154817306">Blokeeri kujutised nendel saitidel</translation>
@@ -2332,7 +2322,6 @@
 
       Reegli saab määrata ainult soovitusena. Reegliga saab teisaldada soovitatud lokaadid loendi ülaossa, kuid kasutajad võivad alati seansi jaoks valida mis tahes muu lokaadi, mida operatsioonisüsteem <ph name="PRODUCT_OS_NAME" /> toetab.
       </translation>
-<translation id="7763311235717725977">Võimaldab määrata, kas veebisaitidel on lubatud kujutisi kuvada. Kujutiste kuvamise võib kõikidel veebisaitidel lubada või keelata. Kui seda reeglit ei määrata, siis kasutatakse parameetrit „AllowImages” ja kasutaja saab seda muuta.</translation>
 <translation id="7763479091692861127"> Ühendustüübid, mis on lubatud kasutamiseks OS-i värskendamiseks. OS-i värskendused võivad oma mahu tõttu panna ühendusele suure koormuse ja sellega võib kaasneda ka lisakulu. Seepärast pole need vaikimisi lubatud ühendustüüpidele, mida peetakse kalliteks ja mille hulka praegu kuuluvad WiMax, Bluetooth ja Cellular.
 
       Tunnustatud ühendustüübi identifikaatorid on „ethernet”, „wifi”, „wimax”, „bluetooth” ja „cellular”.</translation>
diff --git a/components/policy/resources/policy_templates_fa.xtb b/components/policy/resources/policy_templates_fa.xtb
index aa741ee..7b4d7595 100644
--- a/components/policy/resources/policy_templates_fa.xtb
+++ b/components/policy/resources/policy_templates_fa.xtb
@@ -74,7 +74,6 @@
 
           فاکتور اندازه‌گیری باید ۱۰۰ درصد یا بیشتر باشد.</translation>
 <translation id="131353325527891113">نام‌های کاربری در صفحه ورود به سیستم نمایش داده شود</translation>
-<translation id="1325295456374328159">پیکربندی منطقه‌های زبانی مجاز در جلسه کاربر</translation>
 <translation id="1327466551276625742">فعال کردن فرمان پیکربندی شبکه در حالت آفلاین</translation>
 <translation id="1330145147221172764">فعال کردن صفحه‌کلید روی صفحه</translation>
 <translation id="13356285923490863">نام خط‌مشی</translation>
@@ -457,7 +456,6 @@
 <translation id="2309390639296060546">تنظیمات پیش‌فرض مکان جغرافیایی</translation>
 <translation id="2312134445771258233">‏به شما اجازه می‌دهد صفحاتی را که هنگام راه‌اندازی باز می‌شوند، پیکربندی کنید. تا زمانی که شما گزینه "باز کردن یک فهرست از URL ها" را در عملکردهای راه‌اندازی انتخاب نکنید محتویات این فهرست URL فعال نمی‌شود.</translation>
 <translation id="2327252517317514801">‏تعیین دامنه‌های مجاز برای دسترسی به G Suite</translation>
-<translation id="2337466621458842053">‏‌به شما امکان می‌دهد تا لیستی از الگوهای نشانی وب برای سایت‌های مجاز جهت نمایش تصاویر را ایجاد کنید. اگر این قانون تنظیم نشود، از مقدار پیش‌‌فرض عمومی برای تمام سایت‌ها برگرفته شده از قانون "DefaultImagesSetting"، درصورتی‌که تنظیم شده باشد، یا از تنظیمات کاربر، استفاده می‌شود.</translation>
 <translation id="2372547058085956601">‏تأخیر ورود خودکار به جلسه عمومی.
 
 اگر خط‌مشی|DeviceLocalAccountAutoLoginId| تنظیم نشده باشد، این خط‌مشی بی‌اثر خواهد بود. درغیر این صورت:
@@ -1186,7 +1184,6 @@
       اگر شما این تنظیم را فعال یا غیرفعال کنید، کاربران نمی‌توانند این تنظیم را در <ph name="PRODUCT_NAME" /> تغییر دهند یا نادیده بگیرند.
 
       اگر این خط‌مشی تنظیم نشود، این مورد فعال می‌شود اما کاربر می‌تواند آن را تغییر دهد.</translation>
-<translation id="4525521128313814366">‏‌به شما امکان می‌دهد تا لیستی از الگوهای URL تعیین کنید که سایت‌های غیرمجاز جهت نمایش تصاویر را مشخص می‌کند. اگر این قانون تنظیم نشود، از مقدار پیش‌‌فرض عمومی برای تمام سایت‌ها، خواه برگرفته شده از قانون "DefaultImagesSetting"، در صورت تنظیم، یا از پیکربندی شخصی کاربر استفاده می‌شود.</translation>
 <translation id="4531706050939927436">‏ممکن است برنامه‌های Android با استفاده از Google Play به‌طور اجباری از کنسول Google Admin نصب شوند. آن‌ها از این خط‌مشی استفاده نمی‌کنند.</translation>
 <translation id="4534500438517478692">‏نام محدودیت Android:</translation>
 <translation id="4541530620466526913">حساب‌های داخل دستگاه</translation>
@@ -1461,9 +1458,6 @@
 <translation id="5447306928176905178">فعال کردن گزارش‌دهی اطلاعات حافظه (اندازه هیپ جاوااسکریپت) به صفحه (منسوخ شده)</translation>
 <translation id="5457065417344056871">فعال کردن حالت مهمان در مرورگر</translation>
 <translation id="5457924070961220141">‏به شما امکان می‌دهد تا در صورت نصب بودن <ph name="PRODUCT_FRAME_NAME" />، اجراکننده پیش‌فرض HTML را پیکربندی کنید. اگر این قانون تنظیم نشده باقی بماند، مقدار پیش‌فرض که به معنی اجازه دادن به مرورگر میزبان برای اجرا است، استفاده می‌شود، اما شما می‌توانید به صورت اختیاری این را لغو کنید و به‌طور پیش‌فرض <ph name="PRODUCT_FRAME_NAME" /> را اجراکننده صفحات HTML کنید.</translation>
-<translation id="5459155981813668716">منطقه‌های زبانی <ph name="PRODUCT_OS_NAME" /> را که ممکن است در آن‌ها نمایش داده شود، پیکربندی می‌کند.
-
-      اگر این خط‌مشی تنظیم شود، کاربر فقط می‌تواند <ph name="PRODUCT_OS_NAME" /> را طوری پیکربندی کند که در یکی از منطقه‌های زبانی مشخص‌شده توسط این خط‌مشی نمایش داده شود. اگر این خط‌مشی تنظیم نشود یا روی فهرستی خالی تنظیم شود، <ph name="PRODUCT_OS_NAME" /> می‌تواند در همه منطقه‌های زبانی پیشتیبانی‌شده نمایش داده شود. اگر این خط‌مشی روی فهرستی حاوی مقادیر نامعتبر تنظیم شود، همه مقادیر نامعتبر نادیده گرفته می‌شوند. اگرکاربری قبلاً <ph name="PRODUCT_OS_NAME" /> را طوری پیکربندی کرده باشد که در زبانی غیرمجاز توسط این خط‌مشی، نمایش داده شود، در ورود به سیستم بعدی کاربر، منطقه زبانی نمایش‌داده‌شده به منطقه زبانی مجازی تغییر می‌کند. اگر کاربر منطقه‌های زبانی ترجیحی را پیکربندی کرده باشد و یکی از منطقه‌های زبانی ترجیحی توسط این خط‌مشی مجاز شده باشد، <ph name="PRODUCT_OS_NAME" /> به آن منطقه زبانی تغییر وضعیت می‌دهد. درغیر این‌صورت، <ph name="PRODUCT_OS_NAME" /> به اولین مقدار معتبر مشخص‌شده توسط این خط‌مشی یا اگر این خط‌مشی حاوی ورودی‌های نامعتبر باشد، به منطقه‌زبانی پیش‌فرض (درحال‌حاضر انگلیسی آمریکایی) تغییر‌وضعیت می‌دهد.</translation>
 <translation id="5464816904705580310">تنظیمات کاربران مدیریت شده را پیکربندی کنید.</translation>
 <translation id="546726650689747237">تأخیر تارشدن صفحه هنگام کار با برق </translation>
 <translation id="5469825884154817306">مسدود کردن تصاویر در این سایت‌ها</translation>
@@ -2216,7 +2210,6 @@
 
       این خط مشی فقط می‌تواند به صورت پیشنهادی تنظیم شود. می‌توانید با این خط مشی مجموعه‌ای از زبان‌های پیشنهادی را به بالا منتقل کنید، اما کاربران همیشه می‌توانند هر زبانی را که توسط <ph name="PRODUCT_OS_NAME" /> پشتیبانی شده باشد، برای جلسه‌شان انتخاب کنند.
       </translation>
-<translation id="7763311235717725977">‏اجازه می‌دهد تعیین کنید که وب سایت‌ها اجازه نمایش تصویر را دارند. نمایش تصاویر می‌تواند برای تمام وب سایت‌ها مجاز یا غیرمجاز باشد. اگر این قانون تنظیم نشده باقی بماند، "AllowImages" به جای آن استفاده می‌شود و کاربر می‌تواند آن را تغییر دهد.</translation>
 <translation id="7763479091692861127">‏ انواع اتصالاتی که مجاز به استفاده از به‌روزرسانی‌های سیستم عامل هستند. به‌روزرسانی‌های سیستم عامل بار سنگینی را روی اتصال ایجاد می‌کنند چون اندازه آنها بزرگ است و ممکن است هزینه بیشتری داشته باشند. بنابراین به‌طور خودکار برای انواع اتصالی که گران باشد و در حال حاضر شامل WiMax، بلوتوث و تلفن همراه باشند، فعال نمی‌شوند.
 
       شناسه‌های نوع اتصال شناسایی شده "اترنت"، "wifi"، "wimax، "بلوتوث" و "تلفن همراه" هستند.</translation>
diff --git a/components/policy/resources/policy_templates_fi.xtb b/components/policy/resources/policy_templates_fi.xtb
index 5168af24..9fd7082 100644
--- a/components/policy/resources/policy_templates_fi.xtb
+++ b/components/policy/resources/policy_templates_fi.xtb
@@ -79,7 +79,6 @@
 
           Skaalauskertoimen on oltava vähintään 100 %.</translation>
 <translation id="131353325527891113">Näytä käyttäjänimet kirjautumisruudulla</translation>
-<translation id="1325295456374328159">Määritä käyttökerran hyväksytyt kieli- ja maa-asetukset</translation>
 <translation id="1327466551276625742">Ota käyttöön verkon määrityskehote offline-tilassa</translation>
 <translation id="1330145147221172764">Ota ruutunäppäimistö käyttöön</translation>
 <translation id="13356285923490863">Käytännön nimi</translation>
@@ -462,7 +461,6 @@
 <translation id="2309390639296060546">Maantieteellisen sijainnin oletusasetus</translation>
 <translation id="2312134445771258233">Voit määrittää käynnistettäessä avattavat sivut. Käynnistettäessä avattavat sivut -luettelo ohitetaan, jos et valitse Toiminto käynnistettäessä -asetukseksi vaihtoehtoa Avaa seuraavat sivut:.</translation>
 <translation id="2327252517317514801">Määritä verkkotunnukset, joilla on G Suiten käyttöoikeus</translation>
-<translation id="2337466621458842053">Voit määrittää luettelon URL-malleja, joissa määritetään sivustot, jotka saavat näyttää kuvia. Jos tätä käytäntöä ei ole määritetty, kaikille sivustoille käytetään joko DefaultImagesSetting-käytännön yleistä oletusarvoa, jos se on asetettu, tai käyttäjän henkilökohtaisia määrityksiä.</translation>
 <translation id="2372547058085956601">Julkisen istunnon automaattisen kirjautumisen viive.
 
       Jos |DeviceLocalAccountAutoLoginId|-käytäntöä ei ole määritetty, käytännöllä ei ole vaikutusta. Muutoin:
@@ -1198,7 +1196,6 @@
       Jos tälle asetukselle määritetään jokin arvo, käyttäjät eivät voi muuttaa tai vaihtaa asetusta tuotteessa <ph name="PRODUCT_NAME" />.
 
       Jos tätä käytäntöä ei määritetä, se on käytössä, mutta käyttäjät voivat muuttaa sitä.</translation>
-<translation id="4525521128313814366">Voit määrittää luettelon URL-malleja, joissa määritetään sivustot, jotka eivät saa näyttää kuvia. Jos tätä käytäntöä ei ole määritetty, kaikille sivustoille käytetään joko DefaultImagesSetting-käytännön yleistä oletusarvoa, jos se on asetettu, tai käyttäjän henkilökohtaisia määrityksiä.</translation>
 <translation id="4531706050939927436">Android-sovellusten asennus voidaan pakottaa Google-hallintakonsolista Google Playn avulla. Ne eivät käytä tätä käytäntöä.</translation>
 <translation id="4534500438517478692">Android-rajoituksen nimi:</translation>
 <translation id="4541530620466526913">Laitteeseen lisätyt tilit</translation>
@@ -1474,9 +1471,6 @@
 <translation id="5447306928176905178">Ota käyttöön muistitietojen ilmoittaminen (JS-pinon koko) sivulle (vanhentunut)</translation>
 <translation id="5457065417344056871">Ota vierastila käyttöön selaimessa</translation>
 <translation id="5457924070961220141">Voit määrittää oletus-HTML-hahmontajan, kun <ph name="PRODUCT_FRAME_NAME" /> on asennettu. Oletusasetusta käytetään, jos tätä käytäntöä ei ole määritetty. Tällöin isäntäselain suorittaa hahmonnuksen, mutta voit ohittaa asetuksen ja asettaa tuotteen <ph name="PRODUCT_FRAME_NAME" /> hahmontamaan HTML-sivut oletuksena.</translation>
-<translation id="5459155981813668716">Määrittää kieli- ja maa-asetukset, joilla <ph name="PRODUCT_OS_NAME" /> voidaan näyttää
-
-      Jos tämä käytäntö on määritetty, <ph name="PRODUCT_OS_NAME" /> voidaan määrittää näkymään ainoastaan jollakin tässä käytännössä ilmoitetulla kielellä. Jos tätä käytäntöä ei ole määritetty tai sen arvoksi on määritetty tyhjä luettelo, <ph name="PRODUCT_OS_NAME" /> voidaan näyttää kaikilla tuetuilla kielillä. Jos käytännön arvoksi on määritetty luettelo, jonka arvot ovat virheellisiä, kaikki virheelliset arvot ohitetaan. Jos <ph name="PRODUCT_OS_NAME" /> on aiemmin määritetty näkymään kielellä, jota käytäntö ei salli, näytettävä kieli vaihdetaan sallittuun kieleen seuraavalla sisäänkirjautumiskerralla. Jos jokin käyttäjän määrittämistä kielistä sallitaan tässä käytännössä, <ph name="PRODUCT_OS_NAME" /> vaihtaa tähän kieleen. Muussa tapauksessa <ph name="PRODUCT_OS_NAME" /> vaihtaa käytännön ensimmäiseen kelvollisen arvoon tai varakieleen (tällä hetkellä Yhdysvaltain englantiin), jos käytännössä on virheellisiä merkintöjä.</translation>
 <translation id="5464816904705580310">Määritä hallinnoitujen käyttäjien asetukset.</translation>
 <translation id="546726650689747237">Ruudun himmennyksen viive käytettäessä laitetta verkkovirralla</translation>
 <translation id="5469825884154817306">Estä kuvat näissä sivustoissa</translation>
@@ -2226,7 +2220,6 @@
 
       Tämä käytäntö voidaan asettaa vain suositukseksi. Käytännön avulla suositellut kielet voidaan näyttää listan alussa, mutta käyttäjä voi aina valita käyttökertaa varten minkä tahansa kielen, jota <ph name="PRODUCT_OS_NAME" /> tukee.
       </translation>
-<translation id="7763311235717725977">Voit määrittää, saavatko sivustot näyttää kuvia. Kuvien näyttäminen voidaan sallia kaikille sivustoille tai kieltää kaikilta sivustoilta. Jos tätä käytäntöä ei ole määritetty, AllowImages-asetusta käytetään, ja käyttäjä voi muuttaa asetusta.</translation>
 <translation id="7763479091692861127"> Yhteystyypit, joilla voidaan suorittaa käyttöjärjestelmäpäivityksiä. Käyttöjärjestelmäpäivitykset saattavat kuormittaa yhteyttä niiden koon vuoksi, ja tiedonsiirrosta voidaan periä lisämaksuja. Järjestelmäpäivityksiä ei voi tällä hetkellä oletuksena suorittaa kalliilla yhteystyypeillä, kuten WiMax, Bluetooth ja Cellular.
 
       Tunnistettuja yhteystyypin tunnuksia ovat ethernet, wifi, wimax, bluetooth ja cellular.</translation>
diff --git a/components/policy/resources/policy_templates_fil.xtb b/components/policy/resources/policy_templates_fil.xtb
index 2061c37..5e0358f 100644
--- a/components/policy/resources/policy_templates_fil.xtb
+++ b/components/policy/resources/policy_templates_fil.xtb
@@ -79,7 +79,6 @@
 
           Dapat nasa 100% o higit pa ang scale factor.</translation>
 <translation id="131353325527891113">Ipakita ang mga username sa screen ng pag-login</translation>
-<translation id="1325295456374328159">I-configure ang mga pinapayagang lokal sa isang session ng user</translation>
 <translation id="1327466551276625742">I-enable ang prompt ng configuration ng network kapag offline</translation>
 <translation id="1330145147221172764">I-enable ang on-screen na keyboard</translation>
 <translation id="13356285923490863">Pangalan ng Patakaran</translation>
@@ -471,9 +470,6 @@
 <translation id="2309390639296060546">Default na setting ng geolocation</translation>
 <translation id="2312134445771258233">Pinapayagan kang i-configure ang mga pahina na na-load sa startup. Ang mga nilalaman ng listahan ng 'Mga URL upang buksan sa startup' ay binabalewala maliban kung piliin mo ang 'Magbukas ng listahan ng mga URL' sa 'Pagkilos sa startup'.</translation>
 <translation id="2327252517317514801">Tumutukoy sa mga domain na pinapayagang i-access ang G Suite</translation>
-<translation id="2337466621458842053">Binibigyang-daan kang magtakda ng isang listahan ng mga pattern ng url  na tumutukoy sa mga site na pinapayagang magpakita ng mga larawan.
-
-          Kung hinayaang hindi nakatakda ang patakarang ito gagamitin ang global na default na halaga para sa lahat ng site mula sa patakarang 'DefaultImagesSetting' kung nakatakda ito, o kung hindi man, ang personal na configuration ng user.</translation>
 <translation id="2372547058085956601">Delay ng awtomatikong pag-log in sa pampublikong session.
 
       Kung hindi nakatakda ang patakaran ng |DeviceLocalAccountAutoLoginId|, walang bisa ang patakarang ito. Kung hindi:
@@ -1237,9 +1233,6 @@
       Kung pinagana o hindi mo pinagana ang setting na ito, hindi magagawang baguhin o i-override ng mga user ang setting na ito sa <ph name="PRODUCT_NAME" />.
 
       Kung hinayaang hindi nakatakda ang patakarang ito, papaganahin ito ngunit mababago ito ng user.</translation>
-<translation id="4525521128313814366">Binibigyang-daan kang magtakda ng isang listahan ng mga pattern ng url na tumutukoy sa mga site na hindi pinapayagang magpakita ng mga larawan.
-
-          Kung hinayaang hindi nakatakda ang patakarang ito gagamitin ang global na default na halaga para sa lahat ng site mula sa patakarang 'DefaultImagesSetting' kung pinagana, o kung hindi man ay sa personal na configuration ng user.</translation>
 <translation id="4531706050939927436">Maaaring puwersahang i-install ang mga Android app mula sa Google Admin console gamit ang Google Play. Hindi ginagamit ng mga ito ang patakarang ito.</translation>
 <translation id="4534500438517478692">Pinaghihigpitang pangalan ng Android:</translation>
 <translation id="4541530620466526913">Mga account na lokal sa device</translation>
@@ -1535,9 +1528,6 @@
 <translation id="5457065417344056871">I-enable ang guest mode sa browser</translation>
 <translation id="5457924070961220141">Binibigyang-daan kang i-configure ang default na taga-render ng HTML kapag naka-install ang <ph name="PRODUCT_FRAME_NAME" />.
           Ang default na setting na ginagamit kapag hinayaang hindi nakatakda ang patakarang ito ay ang pagpayag sa browser ng host na gawin ang pag-render, ngunit maaari mo itong i-override at ipa-render sa <ph name="PRODUCT_FRAME_NAME" /> ang mga pahina ng HTML bilang default.</translation>
-<translation id="5459155981813668716">Kino-configure ang mga lokal kung saan maaaring ipakita ang <ph name="PRODUCT_OS_NAME" />.
-
-      Kung itatakda ang patakarang ito, mako-configure lang ng user ang <ph name="PRODUCT_OS_NAME" /> na ipakita sa isa sa mga lokal na tinutukoy sa patakarang ito. Kung hindi itatakda ang patakarang ito o kung itatakda ito sa isang listahang walang laman, maaaring ipakita ang <ph name="PRODUCT_OS_NAME" /> sa lahat ng sinusuportahang lokal. Kung itatakda ang patakarang ito sa isang listahang may mga invalid na value, babalewalain ang lahat ng invalid na value. Kung na-configure dati ng isang user ang <ph name="PRODUCT_OS_NAME" /> na ipakita sa isang wikang hindi pinapayagan ng patakarang ito, malilipat sa isang pinapayagang lokal ang lokal na pinagpapakitaan sa susunod na mag-sign in ang user. Kung na-configure ng user ang mga piniling lokal at pinapayagan ng patakarang ito ang isa sa mga piniling lokal, lilipat ang <ph name="PRODUCT_OS_NAME" /> sa lokal na ito. Kung hindi naman, lilipat ang <ph name="PRODUCT_OS_NAME" /> sa unang valid na value na tinutukoy sa patakarang ito, o sa isang alternatibong lokal (kasalukuyang en-US), kung naglalaman lang ang patakarang ito ng mga invalid na entry.</translation>
 <translation id="5464816904705580310">I-configure ang mga setting para sa mga pinapamahalaang user.</translation>
 <translation id="546726650689747237">Delay ng pag-dim ng screen kapag tumatakbo habang nakasaksak sa kuryente</translation>
 <translation id="5469825884154817306">I-block ang mga larawan sa mga site na ito</translation>
@@ -2331,9 +2321,6 @@
 
       Maaari lang itakda ang patakarang ito tulad ng inirerekomenda. Magagamit mo ang patakarang ito upang maglipat ng hanay ng mga inirerekomendang lokal sa itaas, ngunit maaaring pumili anumang oras ang mga user ng anumang lokal na sinusuportahan ng <ph name="PRODUCT_OS_NAME" /> para sa kanilang session.
       </translation>
-<translation id="7763311235717725977">Binibigyang-daan kang itakda kung pinapayagan o hindi ang mga website na magpakita ng mga larawan. Maaaring payagan para sa lahat ng website o tanggihan para sa lahat ng website ang pagpapakita ng mga larawan.
-
-          Kung hinayaang hindi nakatakda ang patakarang ito, gagamitin ang 'AllowImages' at magagawa ng user na baguhin ito.</translation>
 <translation id="7763479091692861127"> Ang mga uri ng koneksyon na pinapayagang gamitin para sa mga pag-update sa OS. Potensyal na nakakapagpabagal ng koneksyon ang mga pag-update sa OS dahil sa laki ng mga ito at maaari itong makaipon ng karagdagang gastusin. Samakatuwid, hindi naka-enable ang mga ito bilang default para sa mga uri ng koneksyon na itinuturing na mahal, na kinabibilangan ng WiMax, Bluetooth at Cellular sa ngayon.
 
       Ang mga kilalang identifier ng uri ng koneksyon ay "ethernet," "wifi," "wimax," "bluetooth" at "cellular."</translation>
diff --git a/components/policy/resources/policy_templates_fr.xtb b/components/policy/resources/policy_templates_fr.xtb
index 9800e06..81ca07fa 100644
--- a/components/policy/resources/policy_templates_fr.xtb
+++ b/components/policy/resources/policy_templates_fr.xtb
@@ -79,7 +79,6 @@
 
           Ce facteur doit être de 100 % ou plus.</translation>
 <translation id="131353325527891113">Afficher les noms d'utilisateur sur l'écran de connexion</translation>
-<translation id="1325295456374328159">Configurer les paramètres régionaux autorisés dans une session utilisateur</translation>
 <translation id="1327466551276625742">Activer l'invite de configuration réseau lorsque l'utilisateur n'est pas connecté</translation>
 <translation id="1330145147221172764">Activer le clavier à l'écran</translation>
 <translation id="13356285923490863">Nom de stratégie</translation>
@@ -483,9 +482,6 @@
 
       Le contenu de la liste "URL à ouvrir au démarrage" est ignoré, sauf si vous sélectionnez "Ouvrir les pages suivantes" dans "Action au démarrage".</translation>
 <translation id="2327252517317514801">Définir les domaines autorisés à accéder à G Suite</translation>
-<translation id="2337466621458842053">Permet de définir une liste de formats d'URL spécifiant les sites qui sont autorisés à afficher des images. 
-
-Si cette règle n'est pas configurée, la valeur par défaut globale est utilisée pour tous les sites à partir de la règle "DefaultImagesSetting" si elle est configurée, ou à défaut, à partir de la configuration personnelle de l'utilisateur.</translation>
 <translation id="2372547058085956601">Détermine le délai de connexion automatique à une session publique.
 
       Si la règle |DeviceLocalAccountAutoLoginId| n'est pas définie, elle n'a aucune incidence.
@@ -1257,9 +1253,6 @@
             Dans les deux cas, les utilisateurs ne peuvent pas le modifier, ni le remplacer dans <ph name="PRODUCT_NAME" />.
 
             Si cette règle n'est pas configurée, ce paramètre est activé, mais l'utilisateur est en mesure de le modifier.</translation>
-<translation id="4525521128313814366">Permet de définir une liste de formats d'URL spécifiant les sites qui ne sont pas autorisés à afficher des images. 
-
-Si cette règle n'est pas configurée, la valeur par défaut globale est utilisée pour tous les sites à partir de la règle "DefaultImagesSetting" si elle est configurée, ou à défaut, à partir de la configuration personnelle de l'utilisateur.</translation>
 <translation id="4531706050939927436">L'installation des applications Android peut être forcée depuis la Console d'administration Google via Google Play. Elles n'utilisent pas cette règle.</translation>
 <translation id="4534500438517478692">Nom de la restriction Android :</translation>
 <translation id="4541530620466526913">Comptes locaux de l'appareil</translation>
@@ -1560,9 +1553,6 @@
 <translation id="5457924070961220141">Permet de configurer le moteur de rendu HTML par défaut lorsque <ph name="PRODUCT_FRAME_NAME" /> est installé. 
 
 Lorsque cette règle n'est pas configurée, le paramètre par défaut utilisé consiste à permettre au navigateur d'accueil d'effectuer le rendu. Mais vous avez la possibilité de remplacer ce paramètre et de demander que les pages HTML soient affichées par <ph name="PRODUCT_FRAME_NAME" /> par défaut.</translation>
-<translation id="5459155981813668716">Configure les langues dans lesquelles <ph name="PRODUCT_OS_NAME" /> peut s'afficher.
-
-      Si cette règle est définie, l'utilisateur ne peut configurer l'affichage de <ph name="PRODUCT_OS_NAME" /> que dans l'une des langues définies par cette règle. Si cette règle n'est pas définie ou si elle est définie sur une liste vide, <ph name="PRODUCT_OS_NAME" /> peut s'afficher dans toutes les langues compatibles. Si la règle est définie sur une liste contenant des valeurs non valides, toutes les valeurs non valides sont ignorées. Si un utilisateur a précédemment configuré l'affichage de <ph name="PRODUCT_OS_NAME" /> dans une langue qui n'est pas autorisée par cette règle, la langue d'affichage basculera sur une langue autorisée la prochaine fois que l'utilisateur de connectera. Si l'utilisateur a configuré des langues préférées et que l'une d'entre elles est autorisée par cette règle, <ph name="PRODUCT_OS_NAME" /> s'affiche dans cette langue. Sinon, <ph name="PRODUCT_OS_NAME" /> s'affiche dans la langue définie par la première valeur valide spécifiée par cette règle, ou dans une langue de remplacement (actuellement, en-US), si cette règle contient uniquement des entrées non valides.</translation>
 <translation id="5464816904705580310">Configurer les paramètres des utilisateurs gérés</translation>
 <translation id="546726650689747237">Délai d'assombrissement de l'écran (secteur)</translation>
 <translation id="5469825884154817306">Bloquer les images sur ces sites</translation>
@@ -2357,9 +2347,6 @@
 
       Cette règle permet uniquement de définir des langues recommandées. Vous pouvez l'utiliser pour placer un ensemble de langues recommandées en haut de la liste, mais les utilisateurs auront toujours la possibilité de choisir n'importe quelle langue compatible avec <ph name="PRODUCT_OS_NAME" /> pour leur session.
       </translation>
-<translation id="7763311235717725977">Permet de déterminer si les sites Web sont autorisés à afficher les images. L'affichage des images peut être soit autorisé, soit refusé pour tous les sites. 
-
-Si cette règle n'est pas configurée, la règle "AllowImages" est utilisée, et l'utilisateur est  en mesure de la modifier.</translation>
 <translation id="7763479091692861127"> Types de connexions autorisés pour les mises à jour du système d'exploitation. En raison de leur taille, les mises à jour du système d'exploitation peuvent considérablement ralentir la connexion et impliquent parfois des frais supplémentaires. C'est pourquoi elles ne sont pas activées par défaut pour les types de connexion jugés onéreux, tels que WiMax, Bluetooth et Cellulaire.
 
       Les identifiants des types de connexion reconnus sont "ethernet", "wifi", "wimax", "bluetooth" et "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_gu.xtb b/components/policy/resources/policy_templates_gu.xtb
index d4f12c2..1a198d3 100644
--- a/components/policy/resources/policy_templates_gu.xtb
+++ b/components/policy/resources/policy_templates_gu.xtb
@@ -492,9 +492,6 @@
 
       સૂચિ 'સ્ટાર્ટઅપ પર ખોલવા માટેના URLs' ની સામગ્રીને અવગણવામાં આવે છે જ્યાં સુધી તમે 'સ્ટાર્ટઅપ પર ક્રિયા'' માં "URLs ની સૂચિ ખોલો" ને પસંદ કરતા નથી. </translation>
 <translation id="2327252517317514801">G Suiteને ઍક્સેસ કરવા માટે મંજૂર થયેલા ડોમેન વ્યાખ્યાયિત કરો</translation>
-<translation id="2337466621458842053">તમને url દાખલાની સૂચિ સેટ કરવા દે છે જે તે સાઇટ્સનો ઉલ્લેખ કરે છે કે જે છબીઓ પ્રદર્શિત કરવા માટે અનુમત છે.
-
-          જો આ નીતિ સેટ કર્યા વિના છોડેલી છે, તો વૈશ્વિક ડિફૉલ્ટ મૂલ્ય બધી સાઇટ્સ માટે ઉપયોગમાં લેવાશે 'DefaultImagesSetting' નીતિમાંથી જો તે સેટ કરેલી હોય તો અથવા તો વપરાશકર્તાની વ્યક્તિગત ગોઠવણીમાંથી.</translation>
 <translation id="2372547058085956601">સાર્વજનિક સત્ર સ્વતઃ-લોગિન વિલંબ.
 
       જો |DeviceLocalAccountAutoLoginId| નીતિ સેટ કરેલી નથી, તો આ નીતિ પર કોઈ અસર થતી નથી. અન્યથા:
@@ -1351,9 +1348,6 @@
       જો તમે આ સેટિંગ સક્ષમ અથવા અક્ષમ કરો છો, તો વપરાશકર્તાઓ આ સેટિંગને <ph name="PRODUCT_NAME" /> માં બદલી અથવા ઓવરરાઇડ કરી શકશે નહીં.
 
       જો આ નીતિને સેટ કર્યા વિના છોડી હોય, તો આ સક્ષમ થશે પણ વપરાશકર્તાઓ તેને બદલવા માટે સક્ષમ રહેશે.</translation>
-<translation id="4525521128313814366">તમને url દાખલાની સૂચિ સેટ કરવા દે છે જે તે સાઇટ્સનો ઉલ્લેખ કરે છે કે જે છબીઓ પ્રદર્શિત કરવા માટે અનુમત નથી.
-
-          જો આ નીતિ સેટ કરવાની બાકી રહે છે, તો વૈશ્વિક ડિફૉલ્ટ મૂલ્ય બધી સાઇટ્સ માટે ઉપયોગમાં લેવાશે 'DefaultImagesSetting' નીતિમાંથી જો તે સેટ કરેલી છે અથવા તો વપરાશકર્તાની વ્યક્તિગત ગોઠવણીમાંથી.</translation>
 <translation id="4531706050939927436">Google Play નો ઉપયોગ કરીને Google Admin console પરથી Android અ‍ૅપ્લિકેશનો દબાણપૂર્વક ઇન્સ્ટૉલ કરવામાં આવી શકે છે. તે આ નીતિનો ઉપયોગ કરતાં નથી.</translation>
 <translation id="4534500438517478692">Android પ્રતિબંધ નામ:</translation>
 <translation id="4541530620466526913">ઉપકરણ-સ્થાનિક એકાઉન્ટ્સ</translation>
@@ -2522,9 +2516,6 @@
 
       આ નીતિ ભલામણ કરાયા પ્રમાણે જ સેટ કરી શકાય છે. તમે આ નીતિનો ઉપયોગ ભલામણ કરાયેલ લોકેલ્સના સેટને ટોચ પર ખસેડવા માટે કરી શકો છો પરંતુ વપરાશકર્તાઓને તેમના સત્ર માટે <ph name="PRODUCT_OS_NAME" /> દ્વારા સમર્થિત કોઈપણ લોકેલને પસંદ કરવાની મંજૂરી હંમેશા હોય છે.
       </translation>
-<translation id="7763311235717725977">વેબસાઇટ્સને છબીઓ પ્રદર્શિત કરવાની મંજૂરી આપવી કે નહીં તે સેટ કરવાની મંજૂરી આપે છે. છબીઓને પ્રદર્શિત કરવું અથવા તો તમામ વેબસાઇટ્સ માટે મંજૂર કરી શકાય છે અથવા તો તમામ વેબસાઇટ્સ માટે નકારી શકાય છે.
-
-          જો નીતિ સેટ કર્યા વિના છોડેલી છે, તો 'AllowImages' નો ઉપયોગ કરવામાં આવશે અને વપરાશકર્તા તેને બદલી શકશે.</translation>
 <translation id="7763479091692861127"> કનેક્શન્સના પ્રકારો કે જેની OS અપડેટ્સ માટે ઉપયોગ કરવાની મંજૂરી આપેલી છે. OS અપડેટ્સ સંભવિત રૂપે તેમના કદનાં લીધે કનેક્શન પર ભારે દબાણ આપે છે અને તે અતિરિક્ત શુલ્ક વસૂલી શકે છે. એટલા માટે, તેને ખર્ચાળ માનવામાં આવતા કનેક્શન પ્રકારો માટે ડિફોલ્ટ રૂપે સક્ષમ કરવામાં આવતા નથી, જેમાં આ પળે WiMax, Bluetooth અને Cellular શામેલ છે.
 
       ઓળખાયેલ કનેક્શન પ્રકાર ઓળખકર્તાઓ "ઇથરનેટ", "wifi", "wimax", "bluetooth" અને "cellular" છે.</translation>
diff --git a/components/policy/resources/policy_templates_hi.xtb b/components/policy/resources/policy_templates_hi.xtb
index 0dd901d..2fc75a7 100644
--- a/components/policy/resources/policy_templates_hi.xtb
+++ b/components/policy/resources/policy_templates_hi.xtb
@@ -79,7 +79,6 @@
 
           मापन कारक 100% या अधिक होना चाहिए.</translation>
 <translation id="131353325527891113">प्रवेश स्क्रीन पर उपयोगकर्ता नाम दिखाएं</translation>
-<translation id="1325295456374328159">किसी उपयोगकर्ता सत्र में मंज़ूर की गई स्थान-भाषाएं कॉन्फ़िगर करें</translation>
 <translation id="1327466551276625742">ऑफ़लाइन होने पर नेटवर्क कॉन्फ़िगरेशन संकेत को सक्षम करें</translation>
 <translation id="1330145147221172764">ऑन-स्क्रीन कीबोर्ड सक्षम करें</translation>
 <translation id="13356285923490863">नीति का नाम</translation>
@@ -465,9 +464,6 @@
 
       जब तक आप 'स्टार्टअप पर क्रिया' में 'URL की कोई सूची खोलें' का चयन नहीं करते हैं, तब तक 'स्टार्टअप पर खोले जाने वाले URL' की सूची की सामग्री पर ध्यान नहीं दिया जाएगा.</translation>
 <translation id="2327252517317514801">G Suite एक्सेस करने की अनुमति वाले डोमेन तय करें</translation>
-<translation id="2337466621458842053">आपको उन url प्रतिमानों की एक सूची सेट करने देती है जो उन साइटों को निर्दिष्ट करते हैं जिन्‍हें चित्र प्रदर्शित करने की अनुमति है.
-
-          यदि यह नीति सेट किए बिना छोड़ दी गई हो तो सभी साइटों के लिए वैश्विक डिफ़ॉल्‍ट मान का उपयोग या तो 'DefaultImagesSetting' नीति के सेट होने पर उससे, या अन्‍यथा उपयोगकर्ता के व्‍यक्तिगत कॉन्‍फ़‍िगरेशन से उपयोग किया की जाएगी.</translation>
 <translation id="2372547058085956601">सार्वजनिक सत्र स्वत:-प्रवेश विलंब.
 
       यदि |DeviceLocalAccountAutoLoginId| नीति अनसेट होती है, तो इस नीति का कोई प्रभाव नहीं पड़ता. अन्यथा:
@@ -1235,9 +1231,6 @@
       यदि आप इस सेटिंग को सक्षम या अक्षम करते हैं, तो उपयोगकर्ता <ph name="PRODUCT_NAME" /> में इस सेटिंग को बदल नहीं सकते या ओवरराइड नहीं कर सकते.
 
       यदि इस नीति को सेट किए बिना छोड़ दिया जाता है, तो इसे सक्षम किया जाएगा लेकिन उपयोगकर्ता इसे बदल नहीं सकेगा.</translation>
-<translation id="4525521128313814366">आपको उन url प्रतिमानों की एक सूची सेट करने देती है जो उन साइटों को निर्दिष्ट करते हैं जिन्‍हें चित्र प्रदर्शित करने की अनुमति है.
-
-          यदि यह नीति सेट किए बिना छोड़ दी गई हो तो सभी साइटों के लिए वैश्विक डिफ़ॉल्‍ट मान का उपयोग या तो 'DefaultImagesSetting' नीति के सेट होने पर उससे, या अन्‍यथा उपयोगकर्ता के व्‍यक्तिगत कॉन्‍फ़‍िगरेशन से किया जाएगा.</translation>
 <translation id="4531706050939927436">Google Play का उपयोग करके, Google Admin console की सहमति से Android ऐप्लिकेशन बलपूर्वक इंस्टॉल किए जा सकते हैं. वे इस नीति का उपयोग नहीं करते हैं.</translation>
 <translation id="4534500438517478692">Android प्रतिबंध का नाम:</translation>
 <translation id="4541530620466526913">डिवाइस-स्थानीय खाते</translation>
@@ -1530,9 +1523,6 @@
 <translation id="5447306928176905178">मेमोरी जानकारी (JS हीप आकार) को पेज पर रिपोर्ट करना सक्षम करें (बहिष्कृत)</translation>
 <translation id="5457065417344056871">ब्राउज़र में मेहमान मोड सक्षम करना</translation>
 <translation id="5457924070961220141">आपको डिफ़ॉल्ट HTML रेंडरर कॉन्फ़िगर करने देती है जब <ph name="PRODUCT_FRAME_NAME" /> इंस्टॉल हो. जब इस नीति को सेट किए बिना छोड़ दिया जाता है तो होस्ट ब्राउज़र को रेंडरिंग की अनुमति देने के लिए डिफ़ॉल्ट सेटिंग का उपयोग किया जाता है, लेकिन आप वैकल्पिक रूप से इसे ओवरराइड कर सकते हैं और डिफ़ॉल्ट रूप से <ph name="PRODUCT_FRAME_NAME" /> को HTML पेज रेंडर करने दे सकते हैं.</translation>
-<translation id="5459155981813668716">वे स्थान-भाषाएं कॉन्फ़िगर करती है जिनमें <ph name="PRODUCT_OS_NAME" /> दिखाया जा सकता है.
-
-      अगर यह नीति सेट हो, तो उपयोगकर्ता <ph name="PRODUCT_OS_NAME" /> को सिर्फ़ इस नीति की बताई गई स्थान-भाषाओं में से किसी एक में दिखाए जाने के लिए कॉन्फ़िगर कर सकता है. अगर यह नीति सेट नहीं हो या किसी खाली सूची पर सेट हो, तो <ph name="PRODUCT_OS_NAME" /> को काम करने वाली सभी स्थान-भाषाओं में दिखाया जा सकता है. अगर यह नीति गलत मानों वाली किसी सूची पर सेट हो, तो सभी गलत मानों को अनदेखा कर दिया जाएगा. अगर किसी उपयोगकर्ता ने <ph name="PRODUCT_OS_NAME" /> को पहले किसी ऐसी भाषा में दिखाए जाने के लिए कॉन्फ़िगर किया है जिसे यह नीति मंज़ूरी नहीं देती है, तो दिखाई जाने वाली स्थान-भाषा अगली बार उपयोगकर्ता के साइन इन करने पर मंज़ूरी दी गई स्थान-भाषा में बदल जाएगी. अगर उपयोगकर्ता ने पसंदीदा स्थान-भाषाएं कॉन्फ़िगर की थीं और पसंदीदा स्थान-भाषाओं में से किसी एक को इस नीति ने मंज़ूरी दी है, तो <ph name="PRODUCT_OS_NAME" /> इस स्थान-भाषा में बदल जाएगा. अगर ऐसा नहीं होता, तो <ph name="PRODUCT_OS_NAME" /> इस नीति के बताए गए पहले सही मान में बदल जाएगा या अगर इस नीति में सिर्फ़ गलत प्रविष्टियां ही हों तो वह किसी फ़ॉलबैक स्थान-भाषा (फ़िलहाल en-US) में बदल जाएगा.</translation>
 <translation id="5464816904705580310">प्रबंधित उपयोगकर्ताओं की सेटिंग कॉन्फ़िगर करें.</translation>
 <translation id="546726650689747237">AC पावर पर चलते समय स्क्रीन मंद विलंब</translation>
 <translation id="5469825884154817306">इन साइटों पर चित्र अवरुद्ध करें</translation>
@@ -2312,7 +2302,6 @@
 
       यह पॉलिसी केवल अनुशंसित के रूप में ही सेट की जा सकती है. आप इस पॉलिसी का उपयोग अनुशंसित भाषाओं के सेट को शीर्ष पर ले जाने के लिए कर सकते हैं लेकिन उपयोगकर्ताओं को अपने सत्र के लिए हमेशा ही <ph name="PRODUCT_OS_NAME" /> द्वारा समर्थित किसी भी भाषा का उपयोग करने की अनुमति होती है.
       </translation>
-<translation id="7763311235717725977">आपको यह सेट करने देती है कि वेबसाइटों को चित्र प्रदर्शित करने की अनुमति है या नहीं. चित्र प्रदर्शित करना, सभी वेबसाइटों के लिए स्‍वीकृत या अस्‍वीकृत हो सकता है. यदि इस नीति को सेट किए बिना छोड़ दिया जाता है, तो 'AllowImages' का उपयोग किया जाएगा और उपयोगकर्ता इसे बदल सकेंगे.</translation>
 <translation id="7763479091692861127"> OS अपडेट के लिए अनुमति प्राप्त कनेक्शन के प्रकार. OS अपडेट अपने आकार के कारण संभावित रूप से कनेक्शन पर अत्यधिक भार डालते हैं और इसके कारण अतिरिक्त शुल्क लग सकते हैं. इसीलिए, उन्हें महंगे माने जाने वाले कनेक्शन प्रकारों जैसे WiMax, Bluetooth और कभी-कभी सेल्युलर के लिए डिफ़ॉल्ट रूप से सक्षम नहीं किया जाता है.
 
       मान्यता प्राप्त कनेक्शन प्रकार पहचानकर्ता हैं "इथरनेट", "wifi", "wimax", "bluetooth" और "सेल्युलर".</translation>
diff --git a/components/policy/resources/policy_templates_hr.xtb b/components/policy/resources/policy_templates_hr.xtb
index a1b8752..870dee6 100644
--- a/components/policy/resources/policy_templates_hr.xtb
+++ b/components/policy/resources/policy_templates_hr.xtb
@@ -79,7 +79,6 @@
 
           Faktor skaliranja mora biti 100% ili više.</translation>
 <translation id="131353325527891113">Prikaži korisnička imena na zaslonu prijave</translation>
-<translation id="1325295456374328159">Konfiguriraj dopuštene jezike u korisničkoj sesiji</translation>
 <translation id="1327466551276625742">Omogući odzivnu poruku za konfiguraciju mreže tijekom izvanmrežnog rada</translation>
 <translation id="1330145147221172764">Omogući tipkovnicu na zaslonu</translation>
 <translation id="13356285923490863">Naziv pravila</translation>
@@ -465,7 +464,6 @@
 <translation id="2309390639296060546">Zadana postavka zemljopisnog položaja</translation>
 <translation id="2312134445771258233">Omogućuje konfiguriranje stranica koje se učitavaju prilikom pokretanja. Sadržaj popisa "URL-ovi za otvaranje prilikom pokretanja" zanemaruje se, osim ako odaberete "Otvori popis URL-ova" pod "Radnje prilikom pokretanja".</translation>
 <translation id="2327252517317514801">Definira domene kojima je dopušten pristup G Suiteu</translation>
-<translation id="2337466621458842053">Omogućuje postavljanje popisa uzoraka URL-ova koji određuju web-lokacije koje smiju prikazivati slike. Ako ovo pravilo nije postavljeno, upotrebljavat će se globalna zadana vrijednost za sve web-lokacije iz pravila "DefaultImagesSetting" ako je postavljeno, odnosno iz osobne konfiguracije korisnika ako nije.</translation>
 <translation id="2372547058085956601">Odgoda automatske prijave u javnu sesiju.
 
       Ako nije postavljeno pravilo |DeviceLocalAccountAutoLoginId|, ovo se pravilo neće primjenjivati. U suprotnom:
@@ -1197,7 +1195,6 @@
       Ako omogućite ili onemogućite ovu postavku, korisnici neće moći promijeniti niti poništiti ovu postavku na usluzi <ph name="PRODUCT_NAME" />.
 
       Ako ovo pravilo nije postavljeno, bit će omogućeno, ali će ga korisnici moći promijeniti.</translation>
-<translation id="4525521128313814366">Omogućuje postavljanje popisa uzoraka URL-ova koji određuju web-lokacije koje ne smiju prikazivati slike. Ako se ovo pravilo ne postavi, upotrebljavat će se globalna zadana vrijednost za sve web-lokacije iz pravila "DefaultImagesSetting" ako je postavljeno, odnosno iz osobne konfiguracije korisnika ako nije.</translation>
 <translation id="4531706050939927436">Instaliranje Android aplikacija može se nametnuti s konzole Google Admina putem Google Playa. One ne upotrebljavaju to pravilo.</translation>
 <translation id="4534500438517478692">Naziv ograničenja za Android:</translation>
 <translation id="4541530620466526913">Lokalni računi na uređaju</translation>
@@ -1479,9 +1476,6 @@
 <translation id="5447306928176905178">Omogući prijavljivanje informacija o memoriji (ukupna veličina JS-a) na stranici (zastarjelo)</translation>
 <translation id="5457065417344056871">Omogućivanje načina rada za goste u pregledniku</translation>
 <translation id="5457924070961220141">Omogućuje konfiguriranje zadanog HTML prikazivača kada je instaliran okvir <ph name="PRODUCT_FRAME_NAME" />. Ako ovo pravilo nije postavljeno, zadana je postavka da prikazivanje obavlja preglednik hosta, ali to po izboru možete poništiti i postaviti da okvir <ph name="PRODUCT_FRAME_NAME" /> prikazuje HTML stranice prema zadanim postavkama.</translation>
-<translation id="5459155981813668716">Konfigurira jezike na kojima se <ph name="PRODUCT_OS_NAME" /> može prikazivati.
-
-      Ako se to pravilo postavi, korisnik može konfigurirati da se <ph name="PRODUCT_OS_NAME" /> prikazuje samo na jednom od jezika navedenih ovim pravilom. Ako se to pravilo ne postavi ili se postavi na prazan popis, moguće je prikazivati <ph name="PRODUCT_OS_NAME" /> na svim podržanim jezicima. Ako se to pravilo postavi na popis s nevažećim vrijednostima, sve će se nevažeće vrijednosti zanemariti. Ako je korisnik prethodno konfigurirao da se <ph name="PRODUCT_OS_NAME" /> prikazuje na jeziku koji nije dopušten ovim pravilom, jezik prikaza prebacit će se na dopušteni jezik sljedeći put kada se korisnik prijavi. Ako je korisnik konfigurirao preferirane jezike i jedan od njih dopušten je ovim pravilom, <ph name="PRODUCT_OS_NAME" /> prelazi na taj jezik. U suprotnom, <ph name="PRODUCT_OS_NAME" /> prelazi na prvu važeću vrijednost navedenu tim pravilom ili na zamjenski jezik (trenutačno en-US), ako pravilo sadrži samo nevažeće unose.</translation>
 <translation id="5464816904705580310">Konfiguriranje postavki za upravljane korisnike.</translation>
 <translation id="546726650689747237">Odgoda zatamnjenja zaslona za vrijeme napajanja izmjeničnom strujom</translation>
 <translation id="5469825884154817306">Blokiraj slike na ovim web-lokacijama</translation>
@@ -2226,7 +2220,6 @@
 
       To se pravilo može postaviti samo kao preporučeno. Tim pravilom možete premjestiti skup preporučenih jezika na vrh popisa, ali korisnici za svoju sesiju uvijek mogu sami odabrati bilo koji jezik koji <ph name="PRODUCT_OS_NAME" /> podržava.
       </translation>
-<translation id="7763311235717725977">Omogućuje da postavite smiju li web-lokacije prikazivati slike. Prikazivanje slika može biti dopušteno za sve web-lokacije ili odbijeno za sve web-lokacije. Ako se ovo pravilo ne postavi, upotrebljavat će se pravilo "AllowImages", a korisnici će to moći promijeniti.</translation>
 <translation id="7763479091692861127"> Vrste veza putem kojih su dopuštena ažuriranja OS-a. Ažuriranja OS-a zbog svoje veličine potencijalno jako opterećuju vezu i mogu uzrokovati dodatne troškove. Stoga prema zadanim postavkama nisu omogućena za vrste veza koje se smatraju skupima, a to su trenutačno WiMax, Bluetooth i mobilne veze.
 
       Prepoznati identifikatori vrste veze jesu "ethernet", "wifi", "wimax", "bluetooth" i "mobilna".</translation>
diff --git a/components/policy/resources/policy_templates_hu.xtb b/components/policy/resources/policy_templates_hu.xtb
index 7f09881..c31ef2b 100644
--- a/components/policy/resources/policy_templates_hu.xtb
+++ b/components/policy/resources/policy_templates_hu.xtb
@@ -79,7 +79,6 @@
 
           A skálázási tényezőnek 100%-nak vagy többnek kell lennie.</translation>
 <translation id="131353325527891113">Felhasználónevek megjelenítése a bejelentkezési képernyőn</translation>
-<translation id="1325295456374328159">A felhasználói munkamenetben engedélyezett nyelvek konfigurálása</translation>
 <translation id="1327466551276625742">Hálózati konfigurációs értesítés offline állapotban való megjelenítésének engedélyezése</translation>
 <translation id="1330145147221172764">Képernyő-billentyűzet engedélyezése</translation>
 <translation id="13356285923490863">A szabály neve</translation>
@@ -463,7 +462,6 @@
 <translation id="2309390639296060546">Helymeghatározás alapértelmezett beállítása</translation>
 <translation id="2312134445771258233">Lehetővé teszi az induláskor betöltött lapok beállítását. Az "Indításkor betöltendő URL-ek" listájának tartalmát figyelmen kívül hagyja, hacsak a "Teendő indításkor" részben nem az "URL-ek listájának megnyitása" lehetőséget választja.</translation>
 <translation id="2327252517317514801">Meghatározza, hogy mely domainek férhetnek hozzá a G Suite szolgáltatáshoz</translation>
-<translation id="2337466621458842053">Lehetővé teszi az olyan webhelyeket meghatározó URL-minták listájának összeállítását, amelyek esetében engedélyezett a képek megjelenítése. Ha ez a házirend beállítatlanul marad, akkor a globális alapértelmezett érték kerül felhasználásra valamennyi webhelyre vonatkozóan; vagy -- ha be van állítva -- a "DefaultImagesSetting" házirendből, vagy pedig a felhasználó személyes konfigurációjából.</translation>
 <translation id="2372547058085956601">A nyilvános munkamenet automatikus bejelentkezési késleltetése.
 
       Ha a |DeviceLocalAccountAutoLoginId| házirend nincs beállítva, akkor nincs semmilyen hatása. Máskülönben:
@@ -1193,7 +1191,6 @@
       Ha engedélyezi vagy letiltja ezt a beállítást, a felhasználók nem módosíthatják és nem írhatják felül ezt a beállítást a következőben: <ph name="PRODUCT_NAME" />.
 
       Ha a házirend konfigurálatlanul marad, akkor a rendszer engedélyezi azt, de a felhasználó módosíthatja.</translation>
-<translation id="4525521128313814366">Lehetővé teszi, hogy megadja az URL-minták egy olyan listáját, amely meghatározza, mely webhelyek nem jeleníthetnek meg képeket. Ha a házirend konfigurálatlanul marad, akkor a rendszer a "DefaultImagesSetting" házirend globális alapértelmezett értékét használja (ha az be van állítva), vagy egyéb esetben a felhasználó saját személyes beállítását.</translation>
 <translation id="4531706050939927436">Az Android-alkalmazások a Google Play segítségével kényszerítetten telepíthetők a Google Felügyeleti Konzolról. Nem használják ezt a házirendet.</translation>
 <translation id="4534500438517478692">Android-korlátozás neve:</translation>
 <translation id="4541530620466526913">Eszköz helyi fiókjai</translation>
@@ -1469,9 +1466,6 @@
 <translation id="5447306928176905178">A memóriával kapcsolatos információk jelentésének engedélyezése (JS-halomméret) az oldal számára (elavult)</translation>
 <translation id="5457065417344056871">Vendég mód engedélyezése a böngészőben</translation>
 <translation id="5457924070961220141">Lehetővé teszi az alapértelmezett HTML-megjelenítő konfigurálását, ha a(z) <ph name="PRODUCT_FRAME_NAME" /> telepítve van. Ha a házirend beállítatlanul marad, akkor az alapértelmezett beállítás az, hogy a gazdagép böngészője végzi a megjelenítést, de a felhasználó ezt opcionálisan felülbírálhatja, és megjelenítheti a HTML oldalakat alapértelmezés szerint a(z) <ph name="PRODUCT_FRAME_NAME" /> segítségével.</translation>
-<translation id="5459155981813668716">Konfigurálja a nyelveket, amelyeken a <ph name="PRODUCT_OS_NAME" /> megjeleníthető.
-
-      Ha beállítja a házirendet, a felhasználó kizárólag a házirend által megadott nyelvek egyikén használhatja a <ph name="PRODUCT_OS_NAME" /> böngészőt. Ha a házirend nincs beállítva, vagy ha üres listára van állítva, akkor a <ph name="PRODUCT_OS_NAME" /> az összes támogatott nyelven megjeleníthető. Ha a házirend érvénytelen értékeket tartalmazó listára van állítva, a böngésző figyelmen kívül hagyja az összes érvénytelen értéket. Ha a felhasználó korábban olyan nyelvre állította be a <ph name="PRODUCT_OS_NAME" /> böngészőt, amelyet a házirend nem engedélyez, akkor a megjelenítési nyelv valamelyik engedélyezett nyelvre változik a felhasználó következő bejelentkezésekor. Ha a felhasználó megadott előnyben részesített nyelveket, és ezen előnyben részesített nyelvek egyikét engedélyezi a házirend, akkor a <ph name="PRODUCT_OS_NAME" /> az adott nyelvre vált. Máskülönben a <ph name="PRODUCT_OS_NAME" /> a házirend által megadott első érvényes értékre, illetve – amennyiben a házirend csak érvénytelen bejegyzéseket tartalmaz – a tartalék nyelvi beállításra (jelenleg en-US) vált.</translation>
 <translation id="5464816904705580310">Felügyelt felhasználók beállításainak konfigurálása.</translation>
 <translation id="546726650689747237">Képernyő elsötétítésének késleltetése hálózati áramról való működés során</translation>
 <translation id="5469825884154817306">Képek letiltása ezeken az webhelyeken</translation>
@@ -2226,7 +2220,6 @@
 
       Ezt a házirendet csak ajánlottként lehet beállítani. A házirend használatával áthelyezheti a javasolt nyelv- és országkódok egy készletét a lista tetejére, de a felhasználók bármikor kiválaszthatják a <ph name="PRODUCT_OS_NAME" /> által támogatott nyelv- és országkódok bármelyikét a munkamenetükhöz.
       </translation>
-<translation id="7763311235717725977">Lehetővé teszi annak meghatározását, hogy a webhelyek számára engedélyezett-e a képek megjelenítése. A képek megjelenítését engedélyezheti vagy tilthatja minden webhely számára. Ha ez a házirend beállítatlanul marad, akkor a rendszer az "AllowImages" értéket használja, és ezt a felhasználó módosíthatja.</translation>
 <translation id="7763479091692861127"> Az operációs rendszer frissítéseihez használható kapcsolattípusok. Előfordulhat, hogy az operációs rendszer frissítései a méretük miatt nagyon megterhelik a kapcsolatot, és esetlegesen további költségeket eredményezhetnek. Ezért alapértelmezés szerint nincsenek engedélyezve a drágának tartott kapcsolattípusok, amelyek jelenleg a WiMax-, Bluetooth- és mobilkapcsolatokat jelentik.
 
       A felismert kapcsolattípus-azonosítók a következők: Ethernet, Wi-Fi, WiMax, Bluetooth és mobil.</translation>
diff --git a/components/policy/resources/policy_templates_id.xtb b/components/policy/resources/policy_templates_id.xtb
index 6a6dfd83..dadda54 100644
--- a/components/policy/resources/policy_templates_id.xtb
+++ b/components/policy/resources/policy_templates_id.xtb
@@ -79,7 +79,6 @@
 
           Faktor skala harus 100% atau lebih.</translation>
 <translation id="131353325527891113">Tampilkan nama pengguna pada layar masuk</translation>
-<translation id="1325295456374328159">Konfigurasi lokal yang diizinkan dalam sesi pengguna</translation>
 <translation id="1327466551276625742">Aktifkan permintaan konfigurasi jaringan saat offline</translation>
 <translation id="1330145147221172764">Aktifkan keyboard di layar</translation>
 <translation id="13356285923490863">Nama Kebijakan</translation>
@@ -455,7 +454,6 @@
 <translation id="2309390639296060546">Setelan geolokasi default</translation>
 <translation id="2312134445771258233">Memungkinkan Anda mengonfigurasi halaman yang dimuat saat permulaan. Isi daftar 'URL yang dibuka saat permulaan' diabaikan kecuali jika Anda memilih 'Buka daftar URL' dalam 'Tindakan saat permulaan'.</translation>
 <translation id="2327252517317514801">Menentukan domain yang diizinkan untuk mengakses G Suite</translation>
-<translation id="2337466621458842053">Memungkinkan Anda menyetel daftar pola url yang menentukan situs yang diizinkan untuk menampilkan gambar. Jika kebijakan ini dibiarkan tanpa disetel, nilai global default akan digunakan untuk semua situs, baik dari kebijakan 'DefaultImagesSetting', jika disetel, maupun konfigurasi pribadi pengguna.</translation>
 <translation id="2372547058085956601">Penundaan masuk otomatis sesi publik.
 
       Jika kebijakan |DeviceLocalAccountAutoLoginId| tidak disetel, kebijakan ini tidak akan berpengaruh.
@@ -1193,7 +1191,6 @@
       Jika Anda mengaktifkan atau menonaktifkan setelan ini, pengguna tidak akan dapat mengubah atau mengganti setelan ini di <ph name="PRODUCT_NAME" />.
 
       Jika kebijakan ini dibiarkan tidak disetel, kebijakan ini akan diaktifkan namun pengguna akan dapat mengubahnya.</translation>
-<translation id="4525521128313814366">Memungkinkan Anda menyetel daftar pola URL yang menentukan situs yang tidak diizinkan untuk menampilkan gambar. Jika kebijakan ini tidak disetel, nilai global default akan digunakan untuk semua situs, baik dari kebijakan 'DefaultImagesSetting', jika disetel, atau konfigurasi pribadi pengguna.</translation>
 <translation id="4531706050939927436">Aplikasi Android dapat dipasang paksa dari konsol Google Admin menggunakan Google Play. Aplikasi Android tidak menggunakan kebijakan ini.</translation>
 <translation id="4534500438517478692">Nama pembatasan Android:</translation>
 <translation id="4541530620466526913">Akun lokal perangkat</translation>
@@ -1469,9 +1466,6 @@
 <translation id="5447306928176905178">Aktifkan pelaporan info memori (JS heap size) ke halaman (dipensiunkan)</translation>
 <translation id="5457065417344056871">Mengaktifkan mode tamu dalam browser</translation>
 <translation id="5457924070961220141">Memungkinkan Anda mengonfigurasi perender HTML default saat <ph name="PRODUCT_FRAME_NAME" /> dipasang. Setelan default yang digunakan ketika kebijakan ini tidak disetel adalah mengizinkan browser host melakukan rendering, tetapi Anda dapat menimpanya secara opsional dan membiarkan <ph name="PRODUCT_FRAME_NAME" /> merender halaman HTML secara default.</translation>
-<translation id="5459155981813668716">Mengonfigurasi lokal yang digunakan untuk menampilkan <ph name="PRODUCT_OS_NAME" />.
-
-      Jika kebijakan ini ditetapkan, pengguna hanya dapat mengonfigurasi <ph name="PRODUCT_OS_NAME" /> untuk ditampilkan di salah satu lokal yang ditentukan oleh kebijakan tersebut. Jika kebijakan ini tidak ditetapkan atau ditetapkan ke daftar kosong, <ph name="PRODUCT_OS_NAME" /> dapat ditampilkan di semua lokal yang didukung. Jika kebijakan ini ditetapkan ke daftar yang memuat nilai yang tidak valid, maka semua nilai yang tidak valid akan diabaikan. Jika sebelumnya pengguna telah mengonfigurasi <ph name="PRODUCT_OS_NAME" /> untuk ditampilkan dalam bahasa yang tidak diizinkan oleh kebijakan ini, lokal tampilan akan dialihkan ke lokal yang diizinkan saat berikutnya pengguna login. Jika pengguna telah mengonfigurasi beberapa lokal pilihan, dan salah satu lokal pilihan itu diizinkan oleh kebijakan ini, maka <ph name="PRODUCT_OS_NAME" /> akan dialihkan ke lokal tersebut. Jika tidak, <ph name="PRODUCT_OS_NAME" /> akan dialihkan ke nilai valid pertama yang ditentukan oleh kebijakan ini, atau ke lokal fallback (saat ini en-US), jika kebijakan ini hanya memuat entri yang tidak valid.</translation>
 <translation id="5464816904705580310">Mengonfigurasi setelan untuk pengguna yang dikelola.</translation>
 <translation id="546726650689747237">Penundaan peredupan layar saat menggunakan daya AC</translation>
 <translation id="5469825884154817306">Cekal gambar pada situs ini</translation>
@@ -2225,7 +2219,6 @@
 
       Kebijakan ini hanya dapat disetel sebagai yang disarankan. Anda tidak dapat menggunakan kebijakan ini untuk memindahkan rangkaian bahasa yang disarankan ke atas, namun pengguna selalu diizinkan untuk memilih bahasa apa pun yang didukung oleh <ph name="PRODUCT_OS_NAME" /> untuk sesi mereka.
       </translation>
-<translation id="7763311235717725977">Memungkinkan Anda menyetel apakah situs diizinkan untuk menampilkan gambar. Menampilkan gambar dapat diizinkan untuk semua situs web atau ditolak untuk semua situs web. Jika kebijakan ini dibiarkan tidak disetel, 'AllowImages' akan digunakan dan pengguna dapat mengubahnya.</translation>
 <translation id="7763479091692861127"> Jenis sambungan yang diizinkan penggunaannya untuk pembaruan OS. Pembaruan OS berpotensi memberikan beban berat pada koneksi Internet karena ukurannya dan mungkin mengakibatkan biaya tambahan. Oleh karena itu, koneksi secara default tidak aktif untuk jenis koneksi yang dianggap mahal, yang meliputi WiMax, Bluetooth, dan Seluler untuk saat ini.
 
       Pengenal jenis koneksi yang diketahui saat ini adalah "ethernet", "wifi", "wimax", "bluetooth", dan "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_it.xtb b/components/policy/resources/policy_templates_it.xtb
index 6416f4b..171b9ff 100644
--- a/components/policy/resources/policy_templates_it.xtb
+++ b/components/policy/resources/policy_templates_it.xtb
@@ -76,7 +76,6 @@
 
 Il fattore di regolazione minimo deve essere 100%.</translation>
 <translation id="131353325527891113">Mostra nomi utente nella schermata di accesso</translation>
-<translation id="1325295456374328159">Configura le lingue consentite in una sessione utente</translation>
 <translation id="1327466551276625742">Attivazione richiesta di configurazione della rete offline</translation>
 <translation id="1330145147221172764">Attiva tastiera sullo schermo</translation>
 <translation id="13356285923490863">Nome norma</translation>
@@ -446,7 +445,6 @@
 <translation id="2309390639296060546">Impostazione di geolocalizzazione predefinita</translation>
 <translation id="2312134445771258233">Consente di configurare le pagine che vengono caricate all'avvio. I contenuti dell'elenco "Pagine da aprire all'avvio" vengono ignorati a meno che non selezioni "Apri un elenco di URL" in "Azione all'avvio".</translation>
 <translation id="2327252517317514801">Definisci i domini autorizzati ad accedere a G Suite</translation>
-<translation id="2337466621458842053">Consente di impostare un elenco di pattern URL che specificano i siti in cui è consentita la visualizzazione di immagini. Se questa norma non viene impostata, per tutti i siti verrà utilizzato il valore predefinito globale della norma "DefaultImagesSetting", se è impostata, oppure verrà utilizzata la configurazione personale dell'utente.</translation>
 <translation id="2372547058085956601">Il ritardo prima dell'accesso automatico alla sessione pubblica.
 
       Se non è impostata, la norma |DeviceLocalAccountAutoLoginId| non ha effetto. In caso contrario:
@@ -1167,7 +1165,6 @@
 Se questa impostazione viene attivata o disattivata, gli utenti non potranno modificarla o sostituirla in <ph name="PRODUCT_NAME" />.
 
 Se questa norma non viene impostata, l'impostazione verrà attivata ma gli utenti potranno modificarla.</translation>
-<translation id="4525521128313814366">Consente di impostare un elenco di pattern URL che specificano i siti in cui non è consentita la visualizzazione di immagini. Se questa norma non viene impostata, per tutti i siti verrà utilizzato il valore predefinito globale della norma "DefaultImagesSetting", se è impostata, oppure verrà utilizzata la configurazione personale dell'utente.</translation>
 <translation id="4531706050939927436">L'installazione di app Android può essere imposta dalla Console d'amministrazione Google tramite Google Play. Questa norma non viene utilizzata.</translation>
 <translation id="4534500438517478692">Nome della limitazione di Android:</translation>
 <translation id="4541530620466526913">Account del dispositivo</translation>
@@ -1440,9 +1437,6 @@
 <translation id="5447306928176905178">Attiva le informazioni relative ai rapporti sulla memoria (dimensioni heap JS) per la pagina (obsoleto)</translation>
 <translation id="5457065417344056871">Attiva modalità ospite nel browser</translation>
 <translation id="5457924070961220141">Consente di configurare il renderer HTML predefinito se <ph name="PRODUCT_FRAME_NAME" /> è installato. Se questa norma non viene impostata, per impostazione predefinita il rendering viene eseguito dal browser host; tuttavia, in alternativa, puoi sostituire tale impostazione e consentire che l'esecuzione del rendering delle pagine HTML venga eseguita, per impostazione predefinita, da <ph name="PRODUCT_FRAME_NAME" />.</translation>
-<translation id="5459155981813668716">Consente di configurare le lingue di visualizzazione consentite per <ph name="PRODUCT_OS_NAME" />.
-
-      Se questa norma viene impostata, l'utente potrà configurare soltanto una delle lingue di visualizzazione di <ph name="PRODUCT_OS_NAME" /> specificate da questa norma. Se la norma non viene impostata o viene impostato un elenco vuoto, <ph name="PRODUCT_OS_NAME" /> potrà essere visualizzato in tutte le lingue supportate. Se per questa norma viene impostato un elenco contenente valori non validi, tutti i valori non validi verranno ignorati. Se un utente aveva precedentemente configurato una lingua di visualizzazione di <ph name="PRODUCT_OS_NAME" /> non consentita da questa norma, all'accesso successivo la lingua di visualizzazione verrà sostituita con una lingua consentita. Se l'utente aveva configurato delle lingue preferite e una di queste è consentita da questa norma, in <ph name="PRODUCT_OS_NAME" /> verrà usata tale lingua. In caso contrario, in <ph name="PRODUCT_OS_NAME" /> verrà usato il primo valore valido specificato in questo norma oppure, se la norma contiene soltanto voci non valide, verrà usata una lingua di fallback (attualmente en-US).</translation>
 <translation id="5464816904705580310">Configurazione delle impostazioni per gli utenti gestiti.</translation>
 <translation id="546726650689747237">Ritardo oscuramento schermo in caso di utilizzo di CA</translation>
 <translation id="5469825884154817306">Blocca immagini su questi siti</translation>
@@ -2182,7 +2176,6 @@
 
       Questa norma può essere impostata solo come consigliata. È possibile utilizzare questa norma per spostare un set di impostazioni internazionali consigliate nella parte superiore, ma gli utenti possono sempre scegliere una qualsiasi impostazione internazionale supportata da <ph name="PRODUCT_OS_NAME" /> per la sessione.
       </translation>
-<translation id="7763311235717725977">Permette di stabilire se consentire o meno la visualizzazione delle immagini nei siti web. La visualizzazione delle immagini può essere consentita o negata per tutti i siti web. Se questa norma non viene impostata, verrà utilizzato il valore "AllowImages", che potrà essere modificato dagli utenti.</translation>
 <translation id="7763479091692861127"> I tipi di connessioni utilizzabili per aggiornamenti del sistema operativo. Gli aggiornamenti del sistema operativo possono mettere a dura prova la connessione a causa delle loro dimensioni e potrebbero generare costi aggiuntivi. Pertanto, per impostazione predefinita non sono abilitati per i tipi di connessione che sono considerati costosi, fra cui WiMax, Bluetooth e cellulare, al momento.
 
       Gli identificatori dei tipi di connessione riconosciuti sono "ethernet", "wifi", "wimax", "bluetooth" e "cellulare".</translation>
diff --git a/components/policy/resources/policy_templates_iw.xtb b/components/policy/resources/policy_templates_iw.xtb
index f979770..f692ad7 100644
--- a/components/policy/resources/policy_templates_iw.xtb
+++ b/components/policy/resources/policy_templates_iw.xtb
@@ -78,7 +78,6 @@
 
           גורם קנה המידה חייב להיות לפחות 100%.</translation>
 <translation id="131353325527891113">הצג שמות משתמש במסך הכניסה</translation>
-<translation id="1325295456374328159">הגדרת השילובים המותרים של שפה ואזור בסשן של משתמש</translation>
 <translation id="1327466551276625742">הפעל בקשה לתצורת רשת במצב לא מקוון</translation>
 <translation id="1330145147221172764">הפעל מקלדת על המסך</translation>
 <translation id="13356285923490863">שם מדיניות</translation>
@@ -457,7 +456,6 @@
 <translation id="2309390639296060546">הגדרת ברירת מחדל של מיקום גיאוגרפי</translation>
 <translation id="2312134445771258233">המדיניות מאפשרת לך להגדיר את הדפים הנטענים בעת ההפעלה. המערכת מתעלמת מתוכן הרשימה 'כתובות אתר לפתיחה בעת ההפעלה' אלא אם כן בחרת באפשרות 'פתח רשימה של כתובות אתר' ב'פעולה בעת ההפעלה'.</translation>
 <translation id="2327252517317514801">‏הגדרת דומיינים שמורשים לגשת אל G Suite</translation>
-<translation id="2337466621458842053">‏מאפשר לך להגדיר רשימה של דפוסי כתובות אתר המפרטת אתרים עם אישור להציג תמונות. אם מדיניות זו לא הוגדרה, המערכת תשתמש בערך ברירת המחדל הכללי עבור כל האתרים לפי המדיניות 'DefaultImagesSetting' במקרה שהוגדרה, או לפי התצורה האישית שקבע המשתמש במקרה שלא הוגדרה.</translation>
 <translation id="2372547058085956601">‏ההשהיה של התחברות אוטומטית לפעילות ציבורית באתר.
 
       אם המדיניות |DeviceLocalAccountAutoLoginId| לא הוגדרה, המדיניות הזו לא חלה. אחרת:
@@ -1190,7 +1188,6 @@
 אם תפעיל או תשבית את ההגדרה הזו, המשתמשים לא יכולים לשנות או לעקוף אותה ב-<ph name="PRODUCT_NAME" />.
 
 אם המדיניות הזו לא מוגדרת, היא תופעל, אך המשתמש יוכל לשנות זאת.</translation>
-<translation id="4525521128313814366">‏מאפשר לך להגדיר רשימה של דפוסי כתובות אתר המפרטת אתרים עם אישור להציג תמונות. אם מדיניות זו לא הוגדרה, המערכת תשתמש בערך ברירת המחדל הכללי עבור כל האתרים לפי המדיניות 'DefaultImagesSetting' במקרה שהוגדרה, או לפי התצורה האישית שקבע המשתמש במקרה שלא הוגדרה.</translation>
 <translation id="4531706050939927436">‏אפשר להשתמש ב-Google Play כדי לאלץ התקנה של אפליקציות Android דרך ממשק Google למנהלי מערכות. הן לא משתמשות במדיניות הזו.</translation>
 <translation id="4534500438517478692">‏שם ההגבלה של Android:</translation>
 <translation id="4541530620466526913">חשבונות מקומיים במכשיר</translation>
@@ -1461,9 +1458,6 @@
 <translation id="5447306928176905178">‏הפעלת דיווח של פרטי זיכרון (גודל ערימה של JS) לדף (יצא משימוש)</translation>
 <translation id="5457065417344056871">הפעלת מצב אורח בדפדפן</translation>
 <translation id="5457924070961220141">‏מאפשר לך להגדיר את מאפשר HTML המוגדר כברירת מחדל כאשר <ph name="PRODUCT_FRAME_NAME" /> מותקן. נעשה שימוש בהגדרת ברירת מחדל זו כאשר המדיניות שאינה מוגדרת היא לאפשר לדפדפן המארח לבצע את ההפעלה, אך תוכל באופן אופציונלי לבטל זאת וש-<ph name="PRODUCT_FRAME_NAME" /> יאפשר דפי HTML כברירת מחדל.</translation>
-<translation id="5459155981813668716">‏מגדירה את שילובי השפה והאזור שבהם אפשר להציג את <ph name="PRODUCT_OS_NAME" />.
-
-      אם המדיניות הזו מוגדרת, המשתמש יכול להציג את <ph name="PRODUCT_OS_NAME" /> רק באחד משילובי השפה והאזור שצוינו במדיניות הזו. אם המדיניות הזו לא מוגדרת או אם היא הוגדרה בעזרת רשימה ריקה, אפשר להציג את <ph name="PRODUCT_OS_NAME" /> בכל השילובים הנתמכים של שפה ואזור. אם המדיניות הזו מוגדרת בעזרת רשימה שמכילה ערכים לא חוקיים, המערכת תתעלם מהערכים הלא חוקיים. אם משתמש הגדיר קודם לכן את האפשרות להציג את <ph name="PRODUCT_OS_NAME" /> בשפה שאינה מורשית במדיניות הזו, שילוב השפה והאזור ישתנה לשילוב מורשה בפעם הבאה שהמשתמש ייכנס לחשבון. אם המשתמש הגדיר שילובים מועדפים של שפה ואזור, ואחד מהשילובים המועדפים מורשה במדיניות הזו, <ph name="PRODUCT_OS_NAME" /> יעבור אליו. אחרת, <ph name="PRODUCT_OS_NAME" /> יעבור אל הערך החוקי הראשון שצוין במדיניות הזו. אם המדיניות הזו מכילה רק ערכים לא חוקיים, ייעשה שימוש בשילוב גיבוי של שפה ואזור (נכון לעכשיו, en-US).</translation>
 <translation id="5464816904705580310">קבע הגדרות עבור משתמשים מנוהלים.</translation>
 <translation id="546726650689747237">השהיה של עמעום מסך בזמן שימוש בשקע חשמל</translation>
 <translation id="5469825884154817306">חסום תמונות באתרים אלה</translation>
@@ -2214,7 +2208,6 @@
 
       אפשר להגדיר את המדיניות הזו רק כפי שהומלץ. תוכל להשתמש במדיניות כדי להעביר קבוצת מקומות מומלצים לראש הרשימה, אבל המשתמשים תמיד יכולים לבחור כל מקום שנתמך על ידי <ph name="PRODUCT_OS_NAME" /> להפעלה שלהם.
       </translation>
-<translation id="7763311235717725977">‏מאפשר לך לקבוע אם מותר לאתרים להציג תמונות. ניתן להציג תמונות עבור כל האתרים או לבטל אפשרות זאת עבור כל האתרים. אם לא הגדרת מדיניות זו, המערכת תשתמש ב'AllowImages' והמשתמש יוכל לשנות זאת.</translation>
 <translation id="7763479091692861127">‏ סוגי חיבורים המותרים לשימוש עבור עדכוני מערכת ההפעלה. עדכוני מערכת ההפעלה עלולים להכביד על החיבור בשל גודלם וייתכן שהם יהיו כרוכים בתשלום נוסף. לכן, כברירת מחדל, הם אינם פעילים עבור סוגי החיבורים הנחשבים יקרים, הכוללים Bluetooth‏, WiMax וסלולרי, בשלב זה. 
 
       מזהי סוגי החיבור המוכרים הם "Ethernet"‏, "WiFi"‏, "WiMAX"‏, "Bluetooth" ו"סלולרי".</translation>
diff --git a/components/policy/resources/policy_templates_ja.xtb b/components/policy/resources/policy_templates_ja.xtb
index 2c50fe1a..d591661 100644
--- a/components/policy/resources/policy_templates_ja.xtb
+++ b/components/policy/resources/policy_templates_ja.xtb
@@ -78,7 +78,6 @@
 
           倍率は 100% 以上に設定する必要があります。</translation>
 <translation id="131353325527891113">ログイン画面でユーザー名を表示する</translation>
-<translation id="1325295456374328159">ユーザー セッションで許可する言語 / 地域を設定する</translation>
 <translation id="1327466551276625742">オフライン時のネットワーク設定メッセージの表示を有効にする</translation>
 <translation id="1330145147221172764">画面キーボードを有効にする</translation>
 <translation id="13356285923490863">ポリシー名</translation>
@@ -458,7 +457,6 @@
 <translation id="2309390639296060546">デフォルトの位置情報設定</translation>
 <translation id="2312134445771258233">起動時に読み込まれるページを設定できます。[起動時の操作] の [URL のリストを開く] を選択しない場合、[起動時に開く URL] リストのコンテンツは無視されます。</translation>
 <translation id="2327252517317514801">G Suite へのアクセスを許可するドメインを定義する</translation>
-<translation id="2337466621458842053">画像を表示できるサイトを指定する url パターンのリストを設定できます。このポリシーが未設定の場合、グローバルのデフォルト値がすべてのサイトで使用されます。グローバルのデフォルト値は「DefaultImagesSetting」ポリシーの値か、この値が未設定の場合はユーザーの個人設定の値です。</translation>
 <translation id="2372547058085956601">公開セッションに自動ログインするまでの時間です。
 
       |DeviceLocalAccountAutoLoginId| ポリシーが設定されていない場合、このポリシーは無効です。それ以外の場合は、以下のようになります:
@@ -1193,7 +1191,6 @@
       この設定を有効または無効にすると、ユーザーは <ph name="PRODUCT_NAME" /> でこの設定の変更やオーバーライドができなくなります。
 
       このポリシーが未設定の場合は有効になりますが、ユーザーはこの設定を変更できます。</translation>
-<translation id="4525521128313814366">画像表示を許可しないサイトを指定する URL パターンのリストを設定できます。このポリシーが未設定の場合、グローバルのデフォルト値がすべてのサイトで使用されます。グローバルのデフォルト値は「DefaultImagesSetting」ポリシーの値か、この値が未設定の場合はユーザーの個人設定の値です。</translation>
 <translation id="4531706050939927436">Android アプリを強制的にインストールするには、Google 管理コンソールで Google Play からのインストールを指定します。Android アプリでこのポリシーは使用されません。</translation>
 <translation id="4534500438517478692">Android の制限名:</translation>
 <translation id="4541530620466526913">デバイスのローカル アカウント</translation>
@@ -1469,9 +1466,6 @@
 <translation id="5447306928176905178">メモリ情報(JavaScript のヒープ サイズ)がページに報告されるようにする(サポート終了)</translation>
 <translation id="5457065417344056871">ブラウザでゲストモードを有効にする</translation>
 <translation id="5457924070961220141"><ph name="PRODUCT_FRAME_NAME" /> がインストールされている場合、デフォルトの HTML レンダラを設定できます。このポリシーが未設定の場合はデフォルトの設定が使用されホスト ブラウザがレンダリングを実行しますが、この設定をオーバーライドしてデフォルトで <ph name="PRODUCT_FRAME_NAME" /> に HTML ページのレンダリングを実行させることもできます。</translation>
-<translation id="5459155981813668716"><ph name="PRODUCT_OS_NAME" /> を表示する言語 / 地域を設定します。
-
-      このポリシーが設定されている場合、ユーザーはこのポリシーで指定された言語 / 地域でのみ <ph name="PRODUCT_OS_NAME" /> を表示できます。このポリシーが設定されていない場合や空のリストが指定されている場合は、サポートされるどの言語 / 地域でも <ph name="PRODUCT_OS_NAME" /> を表示できます。このポリシーで指定されたリストに無効な値が含まれる場合、これらの無効な値はすべて無視されます。ユーザーがこのポリシーで許可されない言語で <ph name="PRODUCT_OS_NAME" /> を表示するようすでに設定している場合は、次回のログイン時に許可されている言語 / 地域に切り替えられます。ユーザーが優先する言語 / 地域を指定していて、そのいずれかがこのポリシーで許可されている場合、<ph name="PRODUCT_OS_NAME" /> はその言語 / 地域に切り替えられます。それ以外の場合、<ph name="PRODUCT_OS_NAME" /> はこのポリシーで指定された最初の有効な言語 / 地域に切り替えられ、有効な値が指定されていない場合は代替の言語 / 地域(現在は「en-US」)に切り替えられます。</translation>
 <translation id="5464816904705580310">管理対象ユーザーの設定を行います。</translation>
 <translation id="546726650689747237">画面が暗くなるまでの時間(AC 電源での実行時)</translation>
 <translation id="5469825884154817306">これらのサイトの画像をブロックする</translation>
@@ -2225,7 +2219,6 @@
 
       このポリシーについては推奨設定しかできません。このポリシーを使って、推奨言語 / 地域を最上位に移動することはできますが、ユーザーはセッションで <ph name="PRODUCT_OS_NAME" /> でサポートされた言語 / 地域しか使用することはできません。
       </translation>
-<translation id="7763311235717725977">ウェブサイトで画像の表示を許可するかどうかを設定できます。画像の表示をすべてのウェブサイトで許可するか、すべてのウェブサイトで拒否するかのどちらかを設定できます。このポリシーが未設定の場合、「AllowImages」が使用され、ユーザーはこの設定を変更できます。</translation>
 <translation id="7763479091692861127"> OS アップデートに使用できる接続のタイプです。OS アップデートは、サイズが大きいために接続に大きな負担がかかり、余分な費用が発生する可能性があります。そのため、デフォルトでは現在、WiMax、Bluetooth、携帯通信など費用が高くなる接続タイプは利用できません。
 
       認識される接続タイプ ID は「ethernet」、「wifi」、「wimax」、「bluetooth」、「cellular」です。</translation>
diff --git a/components/policy/resources/policy_templates_kn.xtb b/components/policy/resources/policy_templates_kn.xtb
index 375416a2..b785e9b 100644
--- a/components/policy/resources/policy_templates_kn.xtb
+++ b/components/policy/resources/policy_templates_kn.xtb
@@ -77,7 +77,6 @@
 
           ಸ್ಕೇಲ್ ಅಂಶವು 100% ಅಥವಾ ಹೆಚ್ಚಾಗಿರಬೇಕು.</translation>
 <translation id="131353325527891113">ಲಾಗಿನ್ ಪರದೆಯಲ್ಲಿ ಬಳಕೆದಾರಹೆಸರುಗಳನ್ನು ತೋರಿಸಿ</translation>
-<translation id="1325295456374328159">ಬಳಕೆದಾರರ ಸೆಶನ್‌ನಲ್ಲಿ ಅನುಮತಿಸಲಾದ ಸ್ಥಳೀಯ ಭಾಷೆಗಳನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿ</translation>
 <translation id="1327466551276625742">ಆಫ್‌ಲೈನ್‌ನಲ್ಲಿರುವಾಗ ನೆಟ್‌ವರ್ಕ್ ಕಾನ್ಫಿಗರೇಶನ್‌ ಪ್ರಾಂಪ್ಟ್ ಸಕ್ರಿಯಗೊಳಿಸಿ</translation>
 <translation id="1330145147221172764">ಆನ್‌-ಸ್ಕ್ರೀನ್‌ ಕೀಬೋರ್ಡ್ ಸಕ್ರಿಯಗೊಳಿಸು</translation>
 <translation id="13356285923490863">ನೀತಿಯ ಹೆಸರು</translation>
@@ -489,7 +488,6 @@
 
       ನೀವು 'ಪ್ರಾರಂಭಗೊಳ್ಳುವಾಗ ಕ್ರಿಯೆ' ಯಲ್ಲಿನ 'URLಗಳ ಪಟ್ಟಿಯನ್ನು ತೆರೆ' ಅನ್ನು ನೀವು ಆಯ್ಕೆಮಾಡದ ಹೊರತು 'ಪ್ರಾರಂಭಗೊಂಡಾಗ ತೆರೆಯಬೇಕಾದ URLಗಳ' ಪಟ್ಟಿಯ ವಿಷಯಗಳನ್ನು ನಿರ್ಲಕ್ಷಿಸಲಾಗುವುದು.</translation>
 <translation id="2327252517317514801">G Suite ಪ್ರವೇಶಿಸಲು ಅನುಮತಿಸಲಾದ ಡೊಮೇನ್‌ಗಳನ್ನು ವಿವರಿಸಿ</translation>
-<translation id="2337466621458842053">ಚಿತ್ರಗಳನ್ನು ಪ್ರದರ್ಶಿಸಲು ಅನುಮತಿಸುವ ನಿರ್ದಿಷ್ಟ ಸೈಟ್‌ಗಳ url ಪ್ರಕಾರ ಪಟ್ಟಿಯನ್ನು ರಚಿಸಲು ನಿಮಗೆ ಅವಕಾಶ ನೀಡುತ್ತದೆ. ಈ ನೀತಿಯನ್ನು ಹೊಂದಿಸದೇ ಬಿಟ್ಟರೆ, ಒಂದೋ 'DefaultImagesSetting' ನೀತಿ (ಒಂದು ವೇಳೆ ಅದನ್ನು ಹೊಂದಿಸಿದಲ್ಲಿ) ಇಲ್ಲವೇ ಬಳಕೆದಾರರ ವೈಯಕ್ತಿಕ ಕಾನ್ಫಿಗರೇಶನ್‌ ಮೂಲಕ ಜಾಗತಿಕ ಮೌಲ್ಯವನ್ನು ಎಲ್ಲಾ ಸೈಟ್‌ಗಳಲ್ಲಿ ಬಳಸಲಾಗುತ್ತದೆ.</translation>
 <translation id="2372547058085956601">ಸಾರ್ವಜನಿಕ ಸೆಷನ್ ಸ್ವಯಂ-ಲಾಗಿನ್ ವಿಳಂಬ.
 
          |DeviceLocalAccountAutoLoginId| ನೀತಿಯನ್ನು ಹೊಂದಿಸದೇ ಇದ್ದಲ್ಲಿ, ಈ ನೀತಿಯು ಯಾವುದೇ ಪರಿಣಾಮವನ್ನು ಹೊಂದಿರುವುದಿಲ್ಲ. ಇಲ್ಲದಿದ್ದರೆ:
@@ -1280,7 +1278,6 @@
    ಈ ಸೆಟ್ಟಿಂಗ್ ಅನ್ನು ನೀವು ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿದಲ್ಲಿ, ಹುಡುಕಾಟ ಸಲಹೆಗಳನ್ನು ಎಂದಿಗೂ ಬಳಸಲಾಗುವುದಿಲ್ಲ. 
   ಈ ಸೆಟ್ಟಿಂಗ್ ಅನ್ನು ನೀವು ಸಕ್ರಿಯ ಅಥವಾ ನಿಷ್ಕ್ರಿಯಗೊಳಿಸಿದಲ್ಲಿ, <ph name="PRODUCT_NAME" /> ನಲ್ಲಿ ಬಳಕೆದಾರರು ಈ ಸೆಟ್ಟಿಂಗ್ ಅನ್ನು ಬದಲಾಯಿಸುವುದಿಲ್ಲ ಅಥವಾ ಅತಿಕ್ರಮಿಸಲಾಗುವುದಿಲ್ಲ. 
   ಈ ನೀತಿಯನ್ನು ಹೊಂದಿಸದೆ ಬಿಟ್ಟರೆ, ಇದನ್ನು ಸಕ್ರಿಯಗೊಳಿಸಲಾಗುತ್ತದೆ ಆದರೆ ಬಳಕೆದಾರರಿಗೆ ಇದನ್ನು ಬದಲಾಯಿಸಲು ಸಾಧ್ಯವಾಗುತ್ತದೆ.</translation>
-<translation id="4525521128313814366">ಚಿತ್ರಗಳನ್ನು ಪ್ರದರ್ಶಿಸಲು ಅನುಮತಿಸದೇ ಇರುವಂತಹ ನಿರ್ದಿಷ್ಟ ಸೈಟ್‌ಗಳ url ನಮೂನೆಗಳ ಪಟ್ಟಿಯನ್ನು ಹೊಂದಿಸಲು ನಿಮಗೆ ಅನುಮತಿಸುತ್ತದೆ. ಈ ನೀತಿಯನ್ನು ಹೊಂದಿಸದೆ ಬಿಟ್ಟರೆ ಎಲ್ಲ ಸೈಟ್‌ಗಳಿಗಾಗಿ ಜಾಗತಿಕ ಮೌಲ್ಯವನ್ನು 'DefaultImagesSetting' ನೀತಿಯು ಹೊಂದಿಸಿದಲ್ಲಿ ಅಥವಾ ಬಳಕೆದಾರರ ವೈಯಕ್ತಿಕ ಕಾನ್ಫಿಗರೇಶನ್‌ನಿಂದ ಬಳಸಲಾಗುತ್ತದೆ.</translation>
 <translation id="4531706050939927436">Google Play ಬಳಸಿಕೊಂಡು Android ಅಪ್ಲಿಕೇಶನ್‌ಗಳನ್ನು Google Admin ಕನ್ಸೋಲ್‌ನಿಂದ ಬಲವಂತವಾಗಿ ಸ್ಥಾಪಿಸಬಹುದು. ಅವುಗಳು ಈ ನೀತಿಯನ್ನು ಬಳಸುವುದಿಲ್ಲ.</translation>
 <translation id="4534500438517478692">Android ನಿರ್ಬಂಧನೆ ಹೆಸರು:</translation>
 <translation id="4541530620466526913">ಸಾಧನದ-ಸ್ಥಳೀಯ ಖಾತೆಗಳು</translation>
@@ -1587,9 +1584,6 @@
 <translation id="5447306928176905178">ಮೆಮೊರಿ ಮಾಹಿತಿಯನ್ನು (JS ಹೀಪ್‌ ಗಾತ್ರ) ಪುಟಕ್ಕೆ (ಅಸಮ್ಮತಿಸುವಿಕೆ) ವರದಿ ಮಾಡುವಿಕೆಗೆ ಸಕ್ರಿಯಗೊಳಿಸಿ</translation>
 <translation id="5457065417344056871">ಬ್ರೌಸರ್‌ನಲ್ಲಿ ಅತಿಥಿ ಮೋಡ್ ಸಕ್ರಿಯಗೊಳಿಸಿ</translation>
 <translation id="5457924070961220141"><ph name="PRODUCT_FRAME_NAME" /> ಅನ್ನು ಸ್ಥಾಪಿಸಿದಾಗ ಡಿಫಾಲ್ಟ್ HTML ರೆಂಡರರ್ ಅನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಲು ನಿಮಗೆ ಅನುಮತಿಸುತ್ತದೆ. ರೆಂಡರಿಂಗ್‌ಗಾಗಿ ಹೋಸ್ಟ್ ಬ್ರೌಸರ್ ಅನ್ನು ಅನುಮತಿಸಲು ಈ ನೀತಿಯನ್ನು ಹೊಂದಿಸದೆ ಬಿಟ್ಟಿದ್ದರೆ ಡೀಫಾಲ್ ಸೆಟ್ಟಿಂಗ್ ಅನ್ನು ಬಳಸಲಾಗುತ್ತದೆ, ಆದರೆ ನೀವು ಐಚ್ಛಿಕವಾಗಿ ಇದನ್ನು ಅತಿಕ್ರಮಿಸಬಹುದಾಗಿದೆ ಮತ್ತು ಡಿಫಾಲ್ಟ್ ಆಗಿ HTML ಪುಟಗಳನ್ನು <ph name="PRODUCT_FRAME_NAME" /> ರೆಂಡರ್ ಮಾಡುವಂತೆ ಮಾಡಬಹುದಾಗಿದೆ.</translation>
-<translation id="5459155981813668716"><ph name="PRODUCT_OS_NAME" /> ಅನ್ನು ಪ್ರದರ್ಶಿಸಬಹುದಾದ ಸ್ಥಳೀಯ ಭಾಷೆಗಳನ್ನು ಕಾನ್ಫಿಗರ್‌ ಮಾಡುತ್ತದೆ.
-
-ಈ ಕಾರ್ಯನೀತಿಯನ್ನು ಹೊಂದಿಸಿದಲ್ಲಿ, ಬಳಕೆದಾರರು ಈ ಕಾರ್ಯನೀತಿಯು ನಿರ್ದಿಷ್ಟಪಡಿಸಿದ ಯಾವುದೇ ಒಂದು ಸ್ಥಳೀಯ ಭಾಷೆಯಲ್ಲಿ ಮಾತ್ರ <ph name="PRODUCT_OS_NAME" /> ಅನ್ನು ಪ್ರದರ್ಶಿಸುವಂತೆ ಕಾನ್ಫಿಗರ್ ಮಾಡಬಹುದು. ಈ ಕಾರ್ಯನೀತಿಯನ್ನು ಹೊಂದಿಸದೇ ಬಿಟ್ಟರೆ ಅಥವಾ ಖಾಲಿ ಪಟ್ಟಿಗೆ ಹೊಂದಿಸಿದರೆ, <ph name="PRODUCT_OS_NAME" /> ಅನ್ನು ಎಲ್ಲಾ ಬೆಂಬಲಿತ ಸ್ಥಳೀಯ ಭಾಷೆಗಳಲ್ಲಿ ಪ್ರದರ್ಶಿಸಬಹುದು. ಈ ಕಾರ್ಯನೀತಿಯನ್ನು ಅಮಾನ್ಯ ಮೌಲ್ಯಗಳನ್ನು ಹೊಂದಿರುವ ಪಟ್ಟಿಗೆ ಹೊಂದಿಸಿದರೆ, ಎಲ್ಲಾ ಅಮಾನ್ಯ ಮೌಲ್ಯಗಳನ್ನು ನಿರ್ಲಕ್ಷಿಸಲಾಗುವುದು. ಈ ಕಾರ್ಯನೀತಿಯು ಅನುಮತಿಸದ ಭಾಷೆಯಲ್ಲಿ <ph name="PRODUCT_OS_NAME" /> ಅನ್ನು ಪ್ರದರ್ಶಿಸುವಂತೆ ಬಳಕೆದಾರರು ಈ ಹಿಂದೆಯೇ ಕಾನ್ಫಿಗರ್ ಮಾಡಿದ್ದರೆ, ಮುಂದಿನ ಬಾರಿ ಬಳಕೆದಾರರು ಸೈನ್ ಇನ್ ಮಾಡಿದಾಗ ಪ್ರದರ್ಶನ ಭಾಷೆಯನ್ನು ಅನುಮತಿಸಲಾದ ಸ್ಥಳೀಯ ಭಾಷೆಗೆ ಬದಲಾಯಿಸಲಾಗುತ್ತದೆ. ಬಳಕೆದಾರರು ಆದ್ಯತೆಯ ಸ್ಥಳೀಯ ಭಾಷೆಗಳನ್ನು ಕಾನ್ಫಿಗರ್‌ ಮಾಡಿದ್ದರೆ ಮತ್ತು ಅದರಲ್ಲಿರುವ ಒಂದು ಆದ್ಯತೆಯ ಸ್ಥಳೀಯ ಭಾಷೆಯನ್ನು ಈ ಕಾರ್ಯನೀತಿಯು ಅನುಮತಿಸಿದರೆ, <ph name="PRODUCT_OS_NAME" /> ಈ ಸ್ಥಳೀಯ ಭಾಷೆಗೆ ಬದಲಾಗುತ್ತದೆ. ಇಲ್ಲದಿದ್ದರೆ, ಈ ಕಾರ್ಯನೀತಿಯಲ್ಲಿ ನಿರ್ದಿಷ್ಟಪಡಿಸಿದ ಮೊದಲ ಮೌಲ್ಯಕ್ಕೆ <ph name="PRODUCT_OS_NAME" /> ಬದಲಾಗುತ್ತದೆ, ಈ ಕಾರ್ಯನೀತಿಯು ಅಮಾನ್ಯ ಮೌಲ್ಯಗಳನ್ನು ಮಾತ್ರ ಹೊಂದಿದ್ದರೆ, ಅದು ಪರ್ಯಾಯ ಸ್ಥಳೀಯ ಭಾಷೆಗೆ (ಪ್ರಸ್ತುತ en-US) ಬದಲಾಗುತ್ತದೆ.</translation>
 <translation id="5464816904705580310">ನಿರ್ವಹಿಸಲಾದ ಬಳಕೆದಾರರಿಗಾಗಿ ಸೆಟ್ಟಿಂಗ್‌ಗಳನ್ನು ಕಾನ್ಫಿಗರ್ ಮಾಡಿ.</translation>
 <translation id="546726650689747237">AC ಪವರ್‌ನಲ್ಲಿ ಪರದೆ ಮಂದವಾಗುವಿಕೆ ವಿಳಂಬವಾಗುತ್ತದೆ</translation>
 <translation id="5469825884154817306">ಈ ಸೈಟ್‌ಗಳಲ್ಲಿ ಚಿತ್ರಗಳನ್ನು ನಿರ್ಬಂಧಿಸಿ</translation>
@@ -2389,7 +2383,6 @@
 
       ನೀತಿಯನ್ನು ಶಿಫಾರಸು ಮಾಡಿರುವುದಾಗಿ ಮಾತ್ರ ಹೊಂದಿಸಬಹುದು. ಈ ನೀತಿಯನ್ನು ನೀವು ಶಿಫಾರಸು ಮಾಡಿದ ಸ್ಥಳಗಳ ಗುಂಪನ್ನು ಮೇಲ್ಭಾಗಕ್ಕೆ ಸರಿಸಲು ಬಳಸಬಹುದು, ಆದರೆ ಬಳಕೆದಾರರಿಗೆ ಯಾವಾಗಲೂ ಅವರ ಸೆಶನ್‌ಗೆ <ph name="PRODUCT_OS_NAME" /> ಬೆಂಬಲಿಸುವ ಯಾವುದೇ ಸ್ಥಳವನ್ನು ಆರಿಸಿಕೊಳ್ಳಲು ಅನುಮತಿಸಲಾಗುತ್ತದೆ.
       </translation>
-<translation id="7763311235717725977">ಚಿತ್ರಗಳನ್ನು ಪ್ರದರ್ಶಿಸಲು ಅನುಮತಿಸಲಾದ ವೆಬ್‌ಸೈಟ್‌ಗಳಲ್ಲಿ ಹೊಂದಿಸಲು ನಿಮಗೆ ಅನುಮತಿಸುತ್ತದೆ. ಪ್ರದರ್ಶನವಾಗುತ್ತಿರುವ ಚಿತ್ರಗಳನ್ನು ಎಲ್ಲ ವೆಬ್‌ಸೈಟ್‌ಗಳಿಗಾಗಿ ಅನುಮತಿಸಬಹುದಾಗಿದೆ ಅಥವಾ ಎಲ್ಲ ವೆಬ್‌ಸೈಟ್‌ಗಳಿಗಾಗಿ ನಿರಾಕರಿಸಬಹುದಾಗಿದೆ. ಈ ನೀತಿಯನ್ನು ಹೊಂದಿಸದೇ ಬಿಟ್ಟರೆ, 'AllowImages' ಅನ್ನು ಬಳಸಲಾಗುವುದು ಮತ್ತು ಇದನ್ನು ಬದಲಾಯಿಸಲು ಬಳಕೆದಾರನಿಗೆ ಸಾಧ್ಯವಾಗುವುದು.</translation>
 <translation id="7763479091692861127"> OS ಅಪ್‌ಡೇಟ್‌ಗಳನ್ನು ಬಳಸಲು ಅನುಮತಿಸುವಂತಹ ಸಂಪರ್ಕಗಳ ಪ್ರಕಾರಗಳು. OS ಅಪ್‌ಡೇಟ್‌ಗಳು ಅದರ ಗಾತ್ರ ಮತ್ತು ಹೆಚ್ಚುವರಿ ವೆಚ್ಚವನ್ನುಂಟು ಮಾಡಬಹುದಾದ ಕಾರಣದಿಂದಾಗಿ ಸಂಪರ್ಕಿಸಲು ಸಂಭವನೀಯವಾಗಿ ಹೆಚ್ಚಿನ ಒತ್ತಡವನ್ನು ಹೇರುತ್ತದೆ. ಆದ್ದರಿಂದ, WiMax, ಬ್ಲೂಟೂತ್ ಮತ್ತು ಆ ಕ್ಷಣದಲ್ಲಿ ಸೆಲ್ಯುಲಾರ್ ಸೇರಿದಂತೆ ದುಬಾರಿ ಎಂದು ಪರಿಗಣಿಸಲಾದ ಸಂಪರ್ಕ ಪ್ರಕಾರಕ್ಕಾಗಿ ಡಿಫಾಲ್ಟ್ ಆಗಿ ಸಕ್ರಿಯಗೊಳಿಸಲಾಗಲಿಲ್ಲ.
 
      ಅಂಗೀಕರಿಸಲಾದ ಸಂಪರ್ಕ ಪ್ರಕಾರ ಗುರುತಿಸುವಿಕೆಗಳು ಎಂದರೆ "ethernet", "wifi", "wimax", "ಬ್ಲೂಟೂತ್" ಮತ್ತು "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_ko.xtb b/components/policy/resources/policy_templates_ko.xtb
index 78a3196c..d262001 100644
--- a/components/policy/resources/policy_templates_ko.xtb
+++ b/components/policy/resources/policy_templates_ko.xtb
@@ -79,7 +79,6 @@
 
           배율은 100% 이상이어야 합니다.</translation>
 <translation id="131353325527891113">로그인 화면에 사용자 이름 표시</translation>
-<translation id="1325295456374328159">사용자 세션에서 허용되는 언어 구성</translation>
 <translation id="1327466551276625742">오프라인일 때 네트워크 설정 프롬프트를 사용하도록 설정</translation>
 <translation id="1330145147221172764">터치 키보드 사용</translation>
 <translation id="13356285923490863">정책 이름</translation>
@@ -473,9 +472,6 @@
 <translation id="2309390639296060546">기본 위치정보 설정</translation>
 <translation id="2312134445771258233">시작 시 로드되는 페이지를 설정할 수 있습니다. '시작 시 동작'에서 'URL 목록 열기'를 선택하지 않으면 '시작 시 열리는 URL' 목록의 콘텐츠는 무시됩니다.</translation>
 <translation id="2327252517317514801">G Suite에 액세스할 수 있게 허용된 도메인 정의</translation>
-<translation id="2337466621458842053">이미지 표시가 허용되는 사이트를 지정하는 URL 패턴 목록을 설정할 수 있습니다.
-
-          이 정책을 설정하지 않은 경우 'DefaultImagesSetting' 정책이 설정되면 해당 정책의, 그렇지 않으면 사용자 개인 설정의 전체 기본값이 모든 사이트에서 사용됩니다.</translation>
 <translation id="2372547058085956601">공개 세션 자동 로그인 지연
 
       |DeviceLocalAccountAutoLoginId| 정책을 설정하지 않은 경우 이 정책은 적용되지 않습니다. 또는:
@@ -1240,9 +1236,6 @@
       이 설정을 사용하거나 사용 중지하면 사용자가 <ph name="PRODUCT_NAME" />에서 이 설정을 변경하거나 무시할 수 없습니다.
 
       이 정책이 설정되어 있지 않으면 사용하도록 설정되며 사용자가 설정을 변경할 수 있습니다.</translation>
-<translation id="4525521128313814366">이미지 표시가 허용되지 않는 사이트를 지정하는 URL 패턴 목록을 설정할 수 있습니다.
-
-          이 정책을 설정하지 않은 경우 'DefaultImagesSetting' 정책이 설정되면 해당 정책의, 그렇지 않으면 사용자 개인 설정의 전체 기본값이 모든 사이트에서 사용됩니다.</translation>
 <translation id="4531706050939927436">Google Play를 사용해 Google 관리 콘솔에서 Android 앱을 강제 설치할 수 있습니다. Android 앱은 이 정책을 사용하지 않습니다.</translation>
 <translation id="4534500438517478692">Android 제한 이름:</translation>
 <translation id="4541530620466526913">기기 로컬 계정</translation>
@@ -1539,9 +1532,6 @@
 <translation id="5457065417344056871">브라우저에서 게스트 모드 사용</translation>
 <translation id="5457924070961220141"><ph name="PRODUCT_FRAME_NAME" />이(가) 설치되면 기본 HTML 렌더러를 설정할 수 있습니다.
           이 정책을 설정하지 않으면 기본 설정에 따라 호스트 브라우저가 렌더링을 수행하지만, 이 설정을 무시하고 기본적으로 <ph name="PRODUCT_FRAME_NAME" />에서 HTML 페이지를 렌더링하도록 할 수 있습니다.</translation>
-<translation id="5459155981813668716"><ph name="PRODUCT_OS_NAME" />의 표시 언어를 구성합니다.
-
-      이 정책이 설정되면 사용자는 이 정책에서 지정된 언어 중 하나로만 <ph name="PRODUCT_OS_NAME" />이(가) 표시되도록 구성할 수 있습니다. 이 정책이 설정되지 않거나 빈 목록으로 설정될 경우 <ph name="PRODUCT_OS_NAME" />이(가) 지원되는 모든 언어로 표시될 수 있습니다. 이 정책이 잘못된 값을 포함하는 목록으로 설정될 경우 모든 잘못된 값은 무시됩니다. 사용자가 이전에 <ph name="PRODUCT_OS_NAME" />이(가) 이 정책에서 허용되지 않는 언어로 표시되도록 구성한 경우 다음번에 사용자가 로그인하면 표시 언어가 허용되는 언어로 전환됩니다. 사용자가 기본 언어를 구성했으며 기본 언어 중 하나가 이 정책에서 허용되는 경우 <ph name="PRODUCT_OS_NAME" />이(가) 이 언어로 전환됩니다. 그렇지 않은 경우 <ph name="PRODUCT_OS_NAME" />이(가) 이 정책에서 지정된 첫 번째 유효한 값으로 전환되거나, 이 정책에 잘못된 값만 있는 경우 대체 언어(현재 en-US)로 전환됩니다.</translation>
 <translation id="5464816904705580310">관리 사용자에 대한 설정 구성</translation>
 <translation id="546726650689747237">AC 전원으로 실행할 때 화면 어둡게 하기 지연</translation>
 <translation id="5469825884154817306">이 사이트의 이미지 차단</translation>
@@ -2333,9 +2323,6 @@
 
       이 정책은 추천으로만 설정할 수 있습니다. 이 정책을 사용하여 추천 언어 모음을 상단으로 이동할 수 있지만, 사용자는 언제든지 자신의 세션에서 <ph name="PRODUCT_OS_NAME" />이(가) 지원하는 언어 중에 선택할 수 있습니다.
       </translation>
-<translation id="7763311235717725977">웹사이트에서 이미지를 표시하도록 허용할지 여부를 설정할 수 있습니다. 이미지 표시는 모든 웹사이트에서 허용 또는 거부하도록 할 수 있습니다.
-
-          이 정책을 설정하지 않은 경우 'AllowImages'가 사용되며 사용자가 설정을 변경할 수 있습니다.</translation>
 <translation id="7763479091692861127"> OS 업데이트에 사용할 수 있는 연결 유형입니다. OS 업데이트는 용량이 크고 부가 비용이 발생할 수 있기 때문에 잠재적으로 연결 네트워크에 부담이 됩니다. 따라서 비용이 부담스러운 연결 유형(예: WiMax, Bluetooth 및 Cellular)은 현재 기본적으로 사용하지 않도록 설정합니다.
 
       인식할 수 있는 연결 유형 식별자는 'ethernet', 'wifi', 'wimax', 'bluetooth' 및 'cellular'입니다.</translation>
diff --git a/components/policy/resources/policy_templates_lt.xtb b/components/policy/resources/policy_templates_lt.xtb
index 88bf9d7e..b62f628f 100644
--- a/components/policy/resources/policy_templates_lt.xtb
+++ b/components/policy/resources/policy_templates_lt.xtb
@@ -79,7 +79,6 @@
 
           Skalės mastelio faktorius turi būti 100 proc. arba daugiau.</translation>
 <translation id="131353325527891113">Rodyti naudotojų vardus prisijungimo ekrane</translation>
-<translation id="1325295456374328159">Naudotojo sesijoje leidžiamų lokalių konfigūravimas</translation>
 <translation id="1327466551276625742">Įgalinti tinklo konfigūracijos raginimą, kai esate neprisijungę</translation>
 <translation id="1330145147221172764">Įgalinti ekrano klaviatūrą</translation>
 <translation id="13356285923490863">Politikos pavadinimas</translation>
@@ -475,9 +474,6 @@
 
       Jei skiltyje „Veiksmai paleidžiant“ nepasirinksite „Atidaryti URL sąrašą“, sąrašo „Paleidžiant atidaromi URL“ turinio bus nepaisoma.</translation>
 <translation id="2327252517317514801">Nurodomi domenai, kuriems leidžiama pasiekti „G Suite“</translation>
-<translation id="2337466621458842053">Leidžiama nustatyti URL šablonų, nurodančių svetaines, kuriose leidžiama pateikti vaizdų, sąrašą.
-
-          Nenustačius šios politikos, visose svetainėse naudojama visuotinė numatytoji vertė iš politikos „Numatytasis vaizdų nustatymas“ (jei nustatyta) ar naudotojo asmeninės konfigūracijos.</translation>
 <translation id="2372547058085956601">Viešos sesijos automatinio prisijungimo delsa.
 
       Jei nenustatyta |DeviceLocalAccountAutoLoginId| politika, ji negalioja. Kiti atvejai:
@@ -1248,9 +1244,6 @@
       Jei įgalinate šį nustatymą arba jo neleidžiate, naudotojai negali jo pakeisti ar panaikinti „<ph name="PRODUCT_NAME" />“.
 
       Nenustačius šios politikos, tai bus įgalinta, bet naudotojas galės tai pakeisti.</translation>
-<translation id="4525521128313814366">Leidžiama nustatyti URL šablonų, nurodančių svetaines, kuriose neleidžiama pateikti vaizdų, sąrašą.
-
-          Nenustačius šios politikos, visose svetainėse naudojama visuotinė numatytoji vertė iš politikos „Numatytasis vaizdų nustatymas“ (jei nustatyta) ar naudotojo asmeninės konfigūracijos.</translation>
 <translation id="4531706050939927436">„Android“ programas galima priverstinai įdiegti iš „Google Admin Console“ naudojant „Google Play“. Jose ši politika nenaudojama.</translation>
 <translation id="4534500438517478692">„Android“ ribojimo pavadinimas:</translation>
 <translation id="4541530620466526913">Vietinės įrenginio paskyros</translation>
@@ -1550,9 +1543,6 @@
 <translation id="5457065417344056871">Svečio režimo įgalinimas naršyklėje</translation>
 <translation id="5457924070961220141">Leidžiama konfigūruoti numatytąją HTML pateikimo programą, kai įdiegta „<ph name="PRODUCT_FRAME_NAME" />“.
           Numatytasis nustatymas, kuris naudojamas, kai ši politika nenustatyta, – leisti prieglobos naršyklei atlikti pateikimo veiksmus. Bet galite tai pakeisti ir nustatyti „<ph name="PRODUCT_FRAME_NAME" />“ pagal numatytuosius nustatymus pateikti HTML puslapius.</translation>
-<translation id="5459155981813668716">Konfigūruojamos lokalės, kuriose galima pateikti „<ph name="PRODUCT_OS_NAME" />“.
-
-      Jei ši politika nustatyta, naudotojas gali konfigūruoti, kad „<ph name="PRODUCT_OS_NAME" />“ būtų pateikta tik vienoje iš lokalių, nurodytų pagal šią politiką. Jei ši politika nenustatyta arba nustatyta kaip tuščias sąrašas, „<ph name="PRODUCT_OS_NAME" />“ galima pateikti visose palaikomose lokalėse. Jei ši politika nustatyta kaip sąrašas su netinkamomis vertėmis, visų netinkamų verčių nepaisoma. Jei naudotojas anksčiau sukonfigūravo, kad „<ph name="PRODUCT_OS_NAME" />“ būtų pateikta pagal šią politiką neleidžiama kalba, pateikimo lokalė bus perjungta į leidžiamą lokalę kitą kartą naudotojui prisijungus. Jei naudotojas sukonfigūravo pageidaujamas lokales ir viena iš pageidaujamų lokalių leidžiama pagal šią politiką, „<ph name="PRODUCT_OS_NAME" />“ bus perjungta į šią lokalę. Priešingu atveju „<ph name="PRODUCT_OS_NAME" />“ bus taikoma pagal šią politiką nustatyta pirmoji tinkama vertė arba bus perjungta į atsarginę lokalę (šiuo metu „en-US“), jei šioje politikoje yra tik netinkami įrašai.</translation>
 <translation id="5464816904705580310">Konfigūruojami tvarkomų naudotojų paskyrų nustatymai.</translation>
 <translation id="546726650689747237">Ekrano pritemdymo delsa, kai naudojama kintamosios srovės energija</translation>
 <translation id="5469825884154817306">Blokuoti vaizdus šiose svetainėse</translation>
@@ -2343,9 +2333,6 @@
 
       Šią politiką galima nustatyti tik kaip rekomenduojamą. Galite naudoti šią politiką, kad perkeltumėte rekomenduojamų lokalių rinkinį į viršų, bet naudotojams visada leidžiama sesijai pasirinkti bet kurią „<ph name="PRODUCT_OS_NAME" />“ palaikomą lokalę.
       </translation>
-<translation id="7763311235717725977">Leidžiama nustatyti, ar svetainėse galima pateikti vaizdų. Vaizdų pateikimas gali būti leidžiamas arba neleidžiamas visose svetainėse.
-
-          Nenustačius šios politikos, bus naudojama „Leisti vaizdus“ ir naudotojas (-a) galės tai pakeisti.</translation>
 <translation id="7763479091692861127"> Ryšių, leidžiamų naudoti OS naujiniams, tipai. OS naujiniai potencialiai apsunkina ryšį dėl savo dydžio, todėl gali būti taikomi papildomi mokesčiai. Taigi pagal numatytuosius nustatymus jie nėra įgalinti brangiais laikomiems ryšių tipams, įskaitant šiuo metu naudojamus „WiMax“, „Bluetooth“ ir „Cellular“.
 
       Atpažįstami ryšio tipo identifikatoriai yra „ethernet“, „wifi“, „wimax“, „bluetooth“ ir „cellular“.</translation>
diff --git a/components/policy/resources/policy_templates_lv.xtb b/components/policy/resources/policy_templates_lv.xtb
index ba8b828b..e31849627 100644
--- a/components/policy/resources/policy_templates_lv.xtb
+++ b/components/policy/resources/policy_templates_lv.xtb
@@ -79,7 +79,6 @@
 
           Maiņas faktoram ir jābūt vismaz 100%.</translation>
 <translation id="131353325527891113">Rādīt lietotājvārdus pieteikšanās ekrānā</translation>
-<translation id="1325295456374328159">Konfigurē lietotāja sesijā atļautās lokalizācijas</translation>
 <translation id="1327466551276625742">Iespējot tīkla konfigurācijas uzvedni, kad dators darbojas bezsaistes režīmā</translation>
 <translation id="1330145147221172764">Iespējot ekrāna tastatūru</translation>
 <translation id="13356285923490863">Politikas nosaukums</translation>
@@ -476,9 +475,6 @@
 
       Saraksta vietrāžu URL, kas jāatver startēšanas brīdī, saturs tiek ignorēts, ja vien iestatījumam Darbība startēšanas brīdī tiek atlasīts iestatījums Atvērt URL sarakstu.</translation>
 <translation id="2327252517317514801">Definē domēnus, kuri var piekļūt G Suite pakalpojumiem</translation>
-<translation id="2337466621458842053">Ļauj iestatīt URL rakstu sarakstu, kurā ir norādītas vietnes, kurām ir atļauts attēlot attēlus.
-
-          Ja šī politika nav iestatīta, visām vietnēm tiks izmantota globālā noklusējuma vērtība no politikas DefaultImagesSetting (ja tā ir iestatīta) vai pretējā gadījumā no lietotāja personīgās konfigurācijas.</translation>
 <translation id="2372547058085956601">Aizkave līdz automātiskajai piekļuvei publiskajai sesijai.
 
       Ja politikas |DeviceLocalAccountAutoLoginId| vērtība nav iestatīta, šī politika nedarbojas. Pretējā gadījumā ir spēkā tālāk minētais.
@@ -1244,9 +1240,6 @@
       Ja šis iestatījums ir iespējots vai atspējots, lietotāji nevar mainīt vai ignorēt šo iestatījumu produktā <ph name="PRODUCT_NAME" />.
 
       Ja šī politika nav iestatīta, tā tiks iespējota, taču lietotājs to varēs mainīt.</translation>
-<translation id="4525521128313814366">Ļauj iestatīt URL rakstu sarakstu, kurā ir norādītas vietnes, kurām nav atļauts attēlot attēlus.
-
-          Ja šī politika nav iestatīta, visām vietnēm tiks izmantota globālā noklusējuma vērtība no politikas DefaultImagesSetting (ja tā ir iestatīta) vai pretējā gadījumā no lietotāja personīgās konfigurācijas.</translation>
 <translation id="4531706050939927436">Android lietotnes var instalēt piespiedu kārtā no Google Admin console, izmantojot Google Play. Lietotnes neizmanto šo politiku.</translation>
 <translation id="4534500438517478692">Android ierobežojuma nosaukums:</translation>
 <translation id="4541530620466526913">Ierīces lokālie konti</translation>
@@ -1548,9 +1541,6 @@
 <translation id="5457065417344056871">Viesa režīma iespējošana pārlūkā</translation>
 <translation id="5457924070961220141">Ļauj konfigurēt noklusējuma HTML renderētāju, ja ir instalēts <ph name="PRODUCT_FRAME_NAME" />.
           Ja šī politika nav iestatīta, pēc noklusējuma renderēšanu ir atļauts veikt saimniekdatora pārlūkam, bet šo vērtību pēc izvēles var ignorēt un likt, lai HTML lapu renderēšanu pēc noklusējuma veiktu <ph name="PRODUCT_FRAME_NAME" /> .</translation>
-<translation id="5459155981813668716">Konfigurē operētājsistēmas <ph name="PRODUCT_OS_NAME" /> attēlojuma lokalizācijas.
-
-      Ja šī politika ir iestatīta, lietotājs var konfigurēt operētājsistēmas <ph name="PRODUCT_OS_NAME" /> attēlošanu tikai šajā politikā norādītajās lokalizācijās. Ja šī politika nav iestatīta vai tai ir iestatīts tukšs saraksts, operētājsistēma <ph name="PRODUCT_OS_NAME" /> var tikt attēlota visās atbalstītajās lokalizācijās. Ja politikai iestatītajā sarakstā ir nederīgas vērtības, tās tiks ignorētas. Ja lietotājs iepriekš konfigurēja operētājsistēmas <ph name="PRODUCT_OS_NAME" /> attēlošanu lokalizācijā, kas šajā politikā nav atļauta, nākamajā lietotāja pierakstīšanās reizē lokalizācija tiks mainīta uz politikā atļautu lokalizāciju. Ja lietotājs iepriekš konfigurēja vēlamās lokalizācijas un viena no vēlamajām lokalizācijām ir atļauta šajā politikā, operētājsistēmā <ph name="PRODUCT_OS_NAME" /> tiks izmantota attiecīgā lokalizācija. Ja vēlamā lokalizācija nav iestatīta, operētājsistēmā <ph name="PRODUCT_OS_NAME" /> tika izmantota pirmā derīgā politikā norādītā vērtība vai atkāpšanās lokalizācija (šobrīd “en-US”), ja politikā ir norādītas nederīgas vērtības.</translation>
 <translation id="5464816904705580310">Konfigurē iestatījumus pārvaldītajiem lietotājiem.</translation>
 <translation id="546726650689747237">Aizkave līdz ekrāna aptumšošanai, ja ierīce darbojas ar maiņstrāvu</translation>
 <translation id="5469825884154817306">Bloķē attēlus šajās vietnēs</translation>
@@ -2337,9 +2327,6 @@
 
       Šo politiku var iestatīt tikai kā ieteiktu. Varat izmantot šo politiku, lai pārvietotu ieteiktu lokalizāciju kopu uz saraksta augšdaļu, taču lietotājiem vienmēr ir atļauts izvēlēties jebkuru lokalizāciju, kas tiek atbalstīta sesijai operētājsistēmā <ph name="PRODUCT_OS_NAME" />.
       </translation>
-<translation id="7763311235717725977">Ļauj iestatīt, vai vietnēm ir atļauts attēlot attēlus. Attēlu attēlošana var tikt atļauta visām vietnēm vai noraidīta visām vietnēm.
-
-          Ja šī politika nav iestatīta, tiks lietota politika AllowImages un lietotājs to varēs mainīt.</translation>
 <translation id="7763479091692861127"> Savienojumu veidi, kurus ir atļauts izmantot OS atjauninājumiem. OS atjauninājumi var ievērojami noslogot savienojumu sava lieluma dēļ, kā arī var radīt papildu izmaksas. Šī iemesla dēļ pēc noklusējuma tie nav iespējoti tiem savienojumu veidiem, kas tiek uzskatīti par dārgiem, tostarp WiMax, Bluetooth un mobilajam savienojumam (pašlaik).
 
       Atpazītie savienojumu veidu identifikatori ir “ethernet”, “wifi”, “wimax”, “bluetooth” un “cellular”.</translation>
diff --git a/components/policy/resources/policy_templates_ml.xtb b/components/policy/resources/policy_templates_ml.xtb
index e138ac9..eba8258 100644
--- a/components/policy/resources/policy_templates_ml.xtb
+++ b/components/policy/resources/policy_templates_ml.xtb
@@ -83,7 +83,6 @@
 
           സൂചിക ഘടകം 100 ശതമാനമോ അതിനുമുകളിലോ ആയിരിക്കണം.</translation>
 <translation id="131353325527891113">ലോഗിൻ സ്‌ക്രീനിൽ ഉപയോക്തൃനാമങ്ങൾ കാണിക്കുക</translation>
-<translation id="1325295456374328159">അനുവദിച്ചിട്ടുള്ള ഭാഷകൾ, ഒരു ഉപയോക്തൃ സെഷനിൽ കോൺഫിഗർ ചെയ്യുക</translation>
 <translation id="1327466551276625742">ഓഫ്‌ലൈനിലായിരിക്കുമ്പോൾ നെറ്റ്‌വർക്ക് കോൺഫിഗറേഷൻ ആവശ്യപ്പെടൽ പ്രവർത്തനക്ഷമമാക്കുക</translation>
 <translation id="1330145147221172764">ഓൺ-സ്‌ക്രീൻ കീബോർഡ് പ്രവർത്തനക്ഷമമാക്കുക</translation>
 <translation id="13356285923490863">നയത്തിന്‍റെ പേര്‌</translation>
@@ -538,9 +537,6 @@
 
       ‘തുടക്കത്തിലെ പ്രവര്‍ത്തി’ എന്നതിലെ ‘URL-കളുടെ ഒരു ലിസ്റ്റ് തുറക്കുക’ എന്നത് നിങ്ങള്‍ തെരഞ്ഞെടുത്തിട്ടില്ലെങ്കില്‍, ‘തുടക്കത്തില്‍ തുറക്കാനുള്ള URL-കള്‍’ എന്ന ലിസ്റ്റിലെ ഉള്ളടക്കം അവഗണിക്കപ്പെടുന്നു.</translation>
 <translation id="2327252517317514801">G Suite ആക്‌സസ്സ് ചെയ്യാൻ അനുവദിക്കപ്പെട്ട ഡൊമെയ്‌നുകൾ നിർവ്വചിക്കുക</translation>
-<translation id="2337466621458842053">ഇമേജുകൾ പ്രദർശിപ്പിക്കാൻ അനുവദിച്ചിരിക്കുന്ന സൈറ്റുകളെ നിർദ്ദേശിക്കുന്ന url പാറ്റേണുകളുടെ ഒരു ലിസ്റ്റ് സജ്ജമാക്കാൻ നിങ്ങളെ അനുവദിക്കുന്നു.
-
-          ഈ നയം സജ്ജീകരിക്കാത്ത നിലയിലാണെങ്കിൽ ആഗോള സ്ഥിരസ്ഥിതി മൂല്യം, അത് സജ്ജമാക്കിയ 'DefaultImagesSetting' നയത്തിൽ നിന്നോ അതല്ലെങ്കിൽ ഉപയോക്താവിന്റെ സ്വകാര്യ കോൺഫിഗറേഷനിൽ നിന്നോ ഉള്ള എല്ലാ സൈറ്റുകൾക്കായും ഉപയോഗിക്കപ്പെടുന്നതാണ്.</translation>
 <translation id="2372547058085956601">എല്ലാവർക്കുമുള്ള സെഷൻ യാന്ത്രിക-ലോഗിൻ കാലതാമസം.
 
       |DeviceLocalAccountAutoLoginId| നയം സജ്ജമാക്കിയിട്ടില്ലെങ്കിൽ, ഈ നയം ഫലത്തിൽ വരില്ല. അല്ലെങ്കിൽ:
@@ -1406,9 +1402,6 @@
       നിങ്ങൾ ഈ ക്രമീകരണം പ്രവർത്തനക്ഷമമാക്കുകയോ പ്രവർത്തനരഹിതമാക്കുകയോ ചെയ്യുകയാണെങ്കിൽ, ഉപയോക്താവിന് <ph name="PRODUCT_NAME" />-ൽ ക്രമീകരണം മാറ്റാനോ അസാധുവാക്കാനോ കഴിയില്ല.
 
       ഈ നയം സജ്ജമാക്കാത്ത നിലയിലാണെങ്കിൽ, ഇത് പ്രവർത്തനക്ഷമമാകുമെങ്കിലും ഉപയോക്താവിന് അത് മറ്റാൻ കഴിയും.</translation>
-<translation id="4525521128313814366">ഇമേജുകൾ പ്രദർശിപ്പിക്കാൻ അനുവദിക്കാത്ത സൈറ്റുകളെ വ്യക്തമാക്കുന്ന url പാറ്റേണുകളുടെ ഒരു ലിസ്റ്റ് സജ്ജമാക്കാൻ നിങ്ങളെ അനുവദിക്കുന്നു.
-
-          ഈ നയം സജ്ജീകരിക്കാത്ത നിലയിലാണെങ്കിൽ, ആഗോള സ്ഥിരസ്ഥിതി മൂല്യത്തെ അത് സജ്ജീകരിച്ച 'DefaultImagesSetting' നയത്തിലെയോ ഉപയോക്താവിന്റെ സ്വകാര്യ കോൺഫിഗറേഷനിൽ നിന്നുള്ളതോ ആയ എല്ലാ സൈറ്റുകളിലും ഉപയോഗിക്കുന്നതാണ്.</translation>
 <translation id="4531706050939927436">Google Play ഉപയോഗിച്ച് Google Admin കൺസോളിൽ നിന്ന് Android ആപ്‌സുകളെ നിർബന്ധിതമായി ഇൻസ്‌റ്റാൾ ചെയ്‌തേക്കാം. അവ ഈ നയം ഉപയോഗിക്കുന്നില്ല.</translation>
 <translation id="4534500438517478692">Android നിയന്ത്രണ പേര്:</translation>
 <translation id="4541530620466526913">ഉപകരണ-പ്രാദേശിക അക്കൗണ്ടുകൾ</translation>
@@ -1747,9 +1740,6 @@
 <translation id="5457065417344056871">ബ്രൗസറിൽ അതിഥിമോഡ് പ്രവർത്തനക്ഷമമാക്കുക</translation>
 <translation id="5457924070961220141"><ph name="PRODUCT_FRAME_NAME" /> ഇൻസ്റ്റാൾ ചെയ്യുമ്പോൾ സ്ഥിരസ്ഥിതി HTML റെൻഡറർ കോൺഫിഗർ ചെയ്യാൻ നിങ്ങളെ അനുവദിക്കുന്നു.
           ഈ നയം സജ്ജമാക്കാതെ ഹോസ്റ്റ് ബ്രൗസറിന് റെൻഡറിംഗ് നടത്താൻ അനുവദിക്കുമ്പോൾ സ്ഥിരസ്ഥിതി ക്രമീകരണം ഉപയോഗിക്കപ്പെടും, പക്ഷെ നിങ്ങൾക്കിത് ഓപ്‌ഷണലായി മറികടക്കാനാകും, കൂടാതെ സ്ഥിരസ്ഥിതിയായി <ph name="PRODUCT_FRAME_NAME" /> റെൻഡർ HTML പേജുകൾ ഉണ്ടാകും.</translation>
-<translation id="5459155981813668716"><ph name="PRODUCT_OS_NAME" /> പ്രദർശിപ്പിച്ചേക്കാവുന്ന ഭാഷകൾ കോൺഫിഗർ ചെയ്യുന്നു.
-
-      ഈ നയം സജ്ജീകരിച്ചിട്ടുണ്ടെങ്കിൽ, ഈ നയത്തിൽ വ്യക്തമാക്കിയിട്ടുള്ള ഭാഷകളിൽ ഒരെണ്ണത്തിൽ <ph name="PRODUCT_OS_NAME" /> ദൃശ്യമാകുന്ന തരത്തിൽ മാത്രമേ ഉപയോക്താവിന് കോൺഫിഗർ ചെയ്യാനാകൂ. ഈ നയം സജ്ജീകരിച്ചിട്ടില്ലെങ്കിലോ ഒരു ശൂന്യ ലിസ്റ്റിലേക്ക് സജ്ജീകരിച്ചിരിക്കുന്നുവെങ്കിലോ, പിന്തുണയ്ക്കപ്പെടുന്ന എല്ലാ ഭാഷകളിലും <ph name="PRODUCT_OS_NAME" /> ദൃശ്യമാകും. സാധുതയില്ലാത്ത മൂല്യങ്ങളുള്ള ഒരു ലിസ്റ്റിലേക്ക് ഈ നയം സജ്ജീകരിച്ചിട്ടുണ്ടെങ്കിൽ, സാധുതയില്ലാത്ത എല്ലാ മൂല്യങ്ങളും അവഗണിക്കപ്പെടും. ഈ നയം അനുവദിക്കാത്ത ഒരു ഭാഷയിൽ പ്രദർശിപ്പിക്കപ്പെടുന്ന തരത്തിൽ മുമ്പൊരു ഉപയോക്താവ് <ph name="PRODUCT_OS_NAME" /> കോൺഫിഗർ ചെയ്തിട്ടുണ്ടെങ്കിൽ, അടുത്ത തവണ ഉപയോക്താവ് സൈൻ ഇൻ ചെയ്യുമ്പോൾ, അനുവദിക്കപ്പെടുന്ന ഒരു ഭാഷയിലേക്ക് പ്രദർശന ഭാഷ സ്വിച്ച് ചെയ്യപ്പെടും. ഉപയോക്താവ് ഇഷ്ടപ്പെട്ട ഭാഷകൾ കോൺഫിഗർ ചെയ്തിരിക്കുകയും ഈ നയം ഇഷ്ടപ്പെട്ട ഭാഷകളിലൊന്ന് അനുവദിക്കുകയും ചെയ്യുമ്പോൾ, ഈ ഭാഷയിലേക്ക് <ph name="PRODUCT_OS_NAME" /> സ്വിച്ച് ചെയ്യും. അല്ലെങ്കിൽ, ഈ നയം വ്യക്തമാക്കിയിട്ടുള്ള ആദ്യത്തെ സാധുതയുള്ള മൂല്യത്തിലേക്ക് <ph name="PRODUCT_OS_NAME" /> സ്വിച്ച് ചെയ്യും, ഈ നയത്തിൽ സാധുതയില്ലാത്ത എൻട്രികൾ മാത്രമാണ് ഉള്ളതെങ്കിൽ, ഒരു ഫാൾബാക്ക് ഭാഷയിലേക്ക് (നിലവിൽ en-US) സ്വിച്ച് ചെയ്യും.</translation>
 <translation id="5464816904705580310">നിയന്ത്രിത ഉപയോക്താക്കൾക്കുള്ള കോൺഫിഗർ ക്രമീകരണങ്ങൾ.</translation>
 <translation id="546726650689747237">AC പവറിൽ പ്രവർത്തിക്കുമ്പോൾ സ്‌ക്രീൻ തെളിച്ചം കുറയുന്നതിന്റെ കാലതാമസം</translation>
 <translation id="5469825884154817306">ഈ സൈറ്റുകളില്‍ ഇമേജ് തടയുക</translation>
@@ -2612,9 +2602,6 @@
 
       ഈ നയം ശുപാർശ ചെയ്‌തതായി സജ്ജമാക്കാൻ മാത്രമേ കഴിയൂ. നിങ്ങൾക്ക് ഒരു കൂട്ടം ശുപാർശ ചെയ്‌ത ലൊക്കേലുകളെ മുകളിലേക്ക് നീക്കുന്നതിന് ഈ നയം ഉപയോഗിക്കാം എന്നാൽ <ph name="PRODUCT_OS_NAME" /> മുഖേന അവരുടെ സെഷനുവേണ്ടി പിന്തുണച്ച ഏത് ലൊക്കേലും തിരഞ്ഞെടുക്കാൻ ഉപയോക്താക്കളെ എപ്പോഴും അനുവദിച്ചിട്ടുണ്ട്.
       </translation>
-<translation id="7763311235717725977">വെബ്‌സൈറ്റുകളെ ഇമേജുകൾ പ്രദർശിപ്പിക്കാൻ അനുവദിക്കണമോ എന്ന് സജ്ജീകരിക്കാൻ നിങ്ങളെ അനുവദിക്കുന്നു. പ്രദർശിപ്പിക്കുന്ന ഇമേജുകൾ എല്ലാ വെബ്‌സൈറ്റുകൾക്കും അനുവദിച്ചിട്ടുള്ളതോ നിരസിച്ചിട്ടുള്ളതോ ആയിരിക്കാം.
-
-          ഈ നയം സജ്ജീകരിക്കാത്ത നിലയിലാണെങ്കിൽ, ഉപയോക്താക്കൾക്ക് മാറ്റാൻ കഴിയുന്ന വിധത്തിൽ 'AllowImages' ഉപയോഗിക്കുന്നതാണ്.</translation>
 <translation id="7763479091692861127"> OS അപ്‌ഡേറ്റുകൾ ഉപയോഗിക്കുന്നതിന് അനുവദനീയമായ കണക്ഷൻ തരങ്ങൾ. OS അപ്‌ഡേറ്റുകൾ അവയുടെ വലുപ്പം കാരണം കണക്ഷനിൽ വളരെയധികം ബുദ്ധിമുട്ട് ഉണ്ടാക്കുകയും അധിക നിരക്ക് ഈടാക്കുന്നതിന് കാരണമായേക്കുകയും ചെയ്യാം. അതിനാൽ ഇപ്പോൾ WiMax, Bluetooth, Cellular എന്നിവ ഉൾപ്പെടുന്ന ചെലവേറിയ കണക്ഷൻ തരങ്ങളായി പരിഗണിക്കുന്നവ ഡിഫോൾട്ടായി പ്രാപ്‌തമാക്കില്ല.
 
       "ethernet", "wifi", "wimax", "bluetooth", "cellular" എന്നിവയാണ് അംഗീകൃത കണക്ഷൻ തര ഐഡന്റിഫയറുകൾ.</translation>
diff --git a/components/policy/resources/policy_templates_mr.xtb b/components/policy/resources/policy_templates_mr.xtb
index 6b65fcc2..08f06ae 100644
--- a/components/policy/resources/policy_templates_mr.xtb
+++ b/components/policy/resources/policy_templates_mr.xtb
@@ -83,7 +83,6 @@
 
           स्केल घटक 100% किंवा अधिक असणे आवश्यक आहे.</translation>
 <translation id="131353325527891113">लॉगिन स्क्रीनवर वापरकर्तानावे दर्शवा</translation>
-<translation id="1325295456374328159">वापरकर्ता सेशनमधील अनुमती असलेली लोकॅल कॉन्फिगर करा</translation>
 <translation id="1327466551276625742">ऑफलाइन असताना नेटवर्क कॉन्‍फिगरेशन सूचना सक्षम करा</translation>
 <translation id="1330145147221172764">ऑन-स्क्रीन कीबोर्ड सक्षम करा</translation>
 <translation id="13356285923490863">धोरणाचे नाव</translation>
@@ -505,8 +504,6 @@
 
       जोपर्यंत आपण ‘स्टार्टअप वर क्रिया करा’ मध्ये ‘URL ची सूची उघडा’ निवडत नाही तोपर्यंत ‘स्टार्टअपवर उघडण्यासाठी URL’ च्या सूचीची सामग्री दुर्लक्षित केली जाते.</translation>
 <translation id="2327252517317514801">G Suite अॅक्‍सेस करण्‍यासाठी अनुमत डोमेन निर्धारित करा</translation>
-<translation id="2337466621458842053">इमेज प्रदर्शित करण्‍याची अनुमती असलेल्या साइट्स निर्दिष्‍ट करणार्‍या url नमुन्यांची सूची सेट करण्‍याची आपल्याला अनुमती देते.
-हे धोरण सेट न करता सोडल्यास सर्व साइटसाठी सर्वंकष डीफॉल्ट मूल्य हे सेट केले असल्यास 'डीफॉल्ट इमेज सेटिंग' धोरण, ‍किंवा अन्यथा वापरकर्त्याचे वैयक्तिक कॉन्फिगरेशन वापरले जाईल.</translation>
 <translation id="2372547058085956601">सार्वजनिक सत्र स्वयं-लॉग इन विलंब.
 
       |DeviceLocalAccountAutoLoginId| धोरण सेट केले नसल्यास, या धोरणाचा प्रभाव पडणार नाही. अन्यथा:
@@ -1375,9 +1372,6 @@
       आपण हे सेटिंग सक्षम किंवा अक्षम केल्यास, <ph name="PRODUCT_NAME" /> मध्‍ये वापरकर्ते हे सेटिंग बदलू किंवा अधिलिखित करु शकत नाहीत.
 
       हे धोरण सेट न करता सोडल्यास, हे सक्षम केले जाईल परंतु वापरकर्ता हे बदलण्‍यास सक्षम असेल.</translation>
-<translation id="4525521128313814366">इमेज प्रदर्शित करण्‍याची अनुमती नसलेल्या साइट निर्दिष्‍ट करणार्‍या url नमुन्यांची सूची सेट करण्‍याची आपल्याला अनुमती देते.
-
-          हे धोरण सेट न करता सोडल्यास सर्व साइटसाठी सर्वंकष डीफॉल्ट मूल्य हे सेट केले असल्यास 'डीफॉल्ट इमेज सेटिंग' धोरण, ‍किंवा अन्यथा वापरकर्त्याचे वैयक्तिक कॉन्फिगरेशन वापरले जाईल.</translation>
 <translation id="4531706050939927436">Google Play वापरून प्रशासक कन्सोल मधून Android अॅप्स सक्तीने-इंस्टॉल केले जाऊ शकतात. ते या धोरणाचा वापर करीत नाही.</translation>
 <translation id="4534500438517478692">Android प्रतिबंध नाव:</translation>
 <translation id="4541530620466526913">डिव्हाइस-स्थानिक खाती</translation>
@@ -1716,9 +1710,6 @@
 <translation id="5457065417344056871">ब्राउझर मधील अतिथी मोड सक्षम करा</translation>
 <translation id="5457924070961220141"><ph name="PRODUCT_FRAME_NAME" /> स्‍थापन केले जाते तेव्हा डीफॉल्ट HTML प्रस्तुतकर्ता कॉन्‍फिगर करण्‍याची आपल्याला अनुमती देते.
 हे धोरण सेट न करता सोडल्यास डीफॉल्ट सेटिंग वापरण्‍यात येते ती होस्ट ब्राउझरला प्रस्तुतीची अनुमती देण्‍यासाठी, परंतु आपण वैकल्पिकपणे हे अधिलिखित करुन आणि <ph name="PRODUCT_FRAME_NAME" /> मध्‍ये HTML पृष्‍ठे डीफॉल्ट म्हणून प्रस्तुत करुन घेऊ शकता.</translation>
-<translation id="5459155981813668716">ज्यांमध्ये <ph name="PRODUCT_OS_NAME" /> दाखवले असू शकते ती लोकॅल कॉन्फिगर करते.
-
-      हे धोरण सेट केलेले असल्यास, या धोरणाने निर्दिष्ट केलेल्या एका लोकॅलमध्ये दाखवले जाण्यासाठी वापरकर्ता फक्त <ph name="PRODUCT_OS_NAME" /> कॉन्फिगर करू शकतो. हे धोरण सेट केलेले नसल्यास किंवा रिकाम्या सूचीवर सेट केलेले असल्यास, <ph name="PRODUCT_OS_NAME" /> सर्व सपोर्ट असलेल्या लोकॅलमध्ये दाखवले जाऊ शकते. हे धोरण अवैध मूल्ये असलेल्या सूचीवर सेट केलेले असल्यास, सर्व अवैध मूल्यांकडे दुर्लक्ष केले जाईल. वापरकर्त्याने याआधी या धोरणाने अनुमती न दिलेल्या भाषेत <ph name="PRODUCT_OS_NAME" /> दाखवले जाण्यासाठी सेट केलेले असल्यास, वापरकर्त्याने पुढच्या वेळी साइन इन केल्यावर डिस्प्ले लोकॅल अनुमती असलेल्या लोकॅलवर स्विच केले जाईल. वापरकर्त्याने प्राधान्य दिलेली लोकॅल कॉन्फिगर केली असल्यास आणि त्यांपैकी एका लोकॅलला या धोरणाने अनुमती दिली असल्यास, <ph name="PRODUCT_OS_NAME" /> या लोकॅलवर स्विच होईल. अन्यथा, <ph name="PRODUCT_OS_NAME" /> या धोरणाने निर्दिष्ट केलेल्या पहिल्या वैध मूल्यावर किंवा या धोरणामध्ये फक्त अवैध प्रविष्ट्या असल्यास, फॉलबॅक लोकॅल (सध्या en-US) वर स्विच होईल.</translation>
 <translation id="5464816904705580310">व्यवस्थापित केलेल्या वापरकर्त्यांसाठी सेटिंग्ज कॉन्फिगर करा.</translation>
 <translation id="546726650689747237"> AC उर्जेवर चालताना स्क्रीन अंधुक विलंब</translation>
 <translation id="5469825884154817306">या साइटवरील इमेज अवरोधित करा</translation>
@@ -2555,8 +2546,6 @@
 
       हे धोरण केवळ शिफारस केलेले म्हणून सेट केले जाऊ शकते. आपण या धोरणाचा वापर शिफारस केलेल्या भाषांचा संच शीर्षस्थानी हलविण्‍यासाठी करू शकता परंतु वापरकर्त्यांना त्यांच्या सत्रासाठी <ph name="PRODUCT_OS_NAME" /> द्वारे समर्थित असलेली कोणतीही भाषा निवडण्‍याची नेहमी अनुमती असते.
       </translation>
-<translation id="7763311235717725977">आपल्याला वेबसाइटना इमेज प्रदर्शित करण्‍याची अनुमती आहे की नाही ते सेट करण्‍याची अनुमती देते. इमेज प्रदर्शित करण्‍यासाठी सर्व वेबसाइटना अनुमती देता येते किंवा सर्व वेबसाइटना नाकारण्‍यात येते. 
-धोरण सेट न केल्यास, ''इमेजंना अनुमती द्या'' वापरण्‍यात येईल आणि वापरकर्त्यास ते बदलता येईल.</translation>
 <translation id="7763479091692861127"> OS च्या अपडेट वापरण्यास अनुमती असलेल्या कनेक्शनचे प्रकार. OS अपडेट संभाव्यतः त्यांच्या आकारामुळे कनेक्शनवर प्रचंड ताण देतात आणि जास्तीचा खर्च येऊ शकतो. तथापि, खर्चिक म्हणून विचारात घेतलेल्या कनेक्शन प्रकारांसाठी डीफॉल्टनुसार सक्षम नसतात, ज्यात त्यावेळी WiMax, Bluetooth आणि Cellular समाविष्ट असते.
 
       मान्य कनेक्शन प्रकार अभिज्ञापक "ethernet", "wifi", "wimax", "bluetooth" आणि "cellular" हे आहेत.</translation>
diff --git a/components/policy/resources/policy_templates_ms.xtb b/components/policy/resources/policy_templates_ms.xtb
index 917773e..a3c53133 100644
--- a/components/policy/resources/policy_templates_ms.xtb
+++ b/components/policy/resources/policy_templates_ms.xtb
@@ -79,7 +79,6 @@
 
           Faktor skala mestilah 100% atau lebih.</translation>
 <translation id="131353325527891113">Paparkan nama pengguna pada skrin log masuk</translation>
-<translation id="1325295456374328159">Konfigurasikan tempat peristiwa yang dibenarkan dalam sesi pengguna</translation>
 <translation id="1327466551276625742">Dayakan gesaan konfigurasi rangkaian apabila di luar talian</translation>
 <translation id="1330145147221172764">Dayakan papan kekunci pada skrin</translation>
 <translation id="13356285923490863">Nama Dasar</translation>
@@ -475,9 +474,6 @@
 
       Kandungan senarai 'URL untuk dibuka semasa permulaan' diabaikan melainkan anda memilih 'Buka senarai URL' dalam 'Tindakan pada permulaan'.</translation>
 <translation id="2327252517317514801">Tentukan domain yang dibenarkan untuk mengakses G Suite</translation>
-<translation id="2337466621458842053">Membolehkan anda menetapkan senarai corak url yang menentukan tapak mana yang dibenarkan untuk memaparkan imej.
-
-          Jika dasar ini dibiarkan tanpa ditetapkan, nilai lalai global akan digunakan untuk semua tapak sama ada dari dasar 'DefaultImagesSetting' jika dasar ini ditetapkan atau konfigurasi peribadi pengguna tersebut jika sebaliknya.</translation>
 <translation id="2372547058085956601">Kelewatan log masuk automatik sesi terbuka.
 
       Jika dasar |DeviceLocalAccountAutoLoginId| tidak ditetapkan, dasar ini tidak mempunyai sebarang kesan. Jika tidak:
@@ -1245,9 +1241,6 @@
       Jika anda mendayakan atau melumpuhkan tetapan ini, pengguna tidak dapat mengubah atau mengatasi tetapan ini dalam <ph name="PRODUCT_NAME" />.
 
       Jika dasar ini dibiarkan tanpa ditetapkan, tetapan ini akan didayakan tetapi pengguna akan boleh mengubahnya.</translation>
-<translation id="4525521128313814366">Membolehkan anda menetapkan senarai corak url yang menentukan tapak mana yang tidak dibenarkan untuk memaparkan imej.
-
-          Jika dasar ini dibiarkan tanpa ditetapkan, nilai lalai global akan digunakan untuk semua tapak sama ada dari dasar 'DefaultImagesSetting' jika dasar ini ditetapkan atau konfigurasi peribadi pengguna tersebut jika sebaliknya.</translation>
 <translation id="4531706050939927436">Apl Android boleh dipaksa pasang daripada konsol Google Admin menggunakan Google Play. Apl itu tidak menggunakan dasar ini.</translation>
 <translation id="4534500438517478692">Nama sekatan Android:</translation>
 <translation id="4541530620466526913">Akaun setempat peranti</translation>
@@ -1543,9 +1536,6 @@
 <translation id="5457065417344056871">Dayakan mod tetamu dalam penyemak imbas</translation>
 <translation id="5457924070961220141">Membenarkan anda mengkonfigurasi pemapar HTML lalai apabila <ph name="PRODUCT_FRAME_NAME" /> dipasang.
           Tetapan lalai yang gunakan apabila dasar ini dibiarkan tanpa ditetapkan ialah untuk membenarkan penyemak imbas hos membuat paparan, tetapi anda boleh memilih untuk mengatasi hal ini dan membenarkan <ph name="PRODUCT_FRAME_NAME" /> memaparkan halaman HTML secara lalai.</translation>
-<translation id="5459155981813668716">Mengkonfigurasi tempat peristiwa yang mungkin memaparkan <ph name="PRODUCT_OS_NAME" />.
-
-      Jika dasar ini ditetapkan, pengguna hanya boleh mengkonfigurasi <ph name="PRODUCT_OS_NAME" /> untuk dipaparkan dalam salah satu tempat peristiwa yang ditentukan oleh dasar ini. Jika dasar ini tidak ditetapkan atau ditetapkan pada senarai kosong, <ph name="PRODUCT_OS_NAME" /> boleh dipaparkan dalam semua tempat peristiwa yang disokong. Jika dasar ini ditetapkan pada senarai yang mempunyai nilai yang tidak sah, semua nilai yang tidak sah akan diabaikan. Jika pengguna mengkonfigurasi <ph name="PRODUCT_OS_NAME" /> sebelum ini untuk dipaparkan dalam bahasa yang tidak dibenarkan oleh dasar ini, tempat peristiwa yang dipaparkan akan ditukar kepada tempat peristiwa yang dibenarkan apabila pengguna mengelog masuk pada masa akan datang. Jika pengguna telah mengkonfigurasi tempat peristiwa pilihan dan salah satu tempat peristiwa pilihan itu dibenarkan oleh dasar ini, <ph name="PRODUCT_OS_NAME" /> akan bertukar kepada tempat peristiwa ini. Jika tidak, <ph name="PRODUCT_OS_NAME" /> akan bertukar kepada nilai pertama yang sah yang ditentukan oleh dasar ini atau bertukar kepada tempat peristiwa sebelumnya (pada masa ini en-US), jika dasar ini hanya mengandungi masukan yang tidak sah.</translation>
 <translation id="5464816904705580310">Konfigurasikan tetapan untuk pengguna terurus.</translation>
 <translation id="546726650689747237">Kelewatan pemalapan skrin apabila dijalankan dengan kuasa AC</translation>
 <translation id="5469825884154817306">Sekat imej pada tapak ini</translation>
@@ -2337,9 +2327,6 @@
 
       Dasar ini hanya boleh ditetapkan sebagai disyorkan. Anda boleh menggunakan dasar ini untuk mengalihkan satu set penempatan yang disyorkan ke bahagian atas tetapi para pengguna sentiasa dibenarkan memilih sebarang penempatan yang disokong oleh <ph name="PRODUCT_OS_NAME" /> untuk sesi mereka.
       </translation>
-<translation id="7763311235717725977">Membenarkan anda menetapkan sama ada laman web yang dibenarkan untuk memaparkan imej. Memaparkan imej boleh dibenarkan untuk semua laman web atau dinafikan untuk semua laman web.
-
-          Jika dasar ini dibiarkan tanpa ditetapkan, 'AllowImages' yang akan digunakan dan pengguna akan dapat mengubahnya.</translation>
 <translation id="7763479091692861127"> Jenis sambungan yang dibenarkan untuk digunakan bagi kemas kini OS. Kemas kini OS mungkin akan membebankan sambungan disebabkan oleh saiznya dan boleh menyebabkan kos tambahan. Oleh itu, kemas kini ini tidak didayakan secara lalai untuk jenis sambungan yang dianggap mahal, yang merangkumi WiMax, Bluetooth dan Selular pada masa ini.
 
       Pengecam jenis sambungan yang diperakui ialah "ethernet", "wifi", "wimax", "bluetooth" dan "selular".</translation>
diff --git a/components/policy/resources/policy_templates_nl.xtb b/components/policy/resources/policy_templates_nl.xtb
index 46baadf..65f9ab9 100644
--- a/components/policy/resources/policy_templates_nl.xtb
+++ b/components/policy/resources/policy_templates_nl.xtb
@@ -78,7 +78,6 @@
 
           De schaalfactor moet 100% of meer zijn.</translation>
 <translation id="131353325527891113">Gebruikersnamen weergeven in het aanmeldscherm</translation>
-<translation id="1325295456374328159">Instellen welke talen zijn toegestaan in een gebruikerssessie</translation>
 <translation id="1327466551276625742">Prompt voor netwerkconfiguratie inschakelen als je offline bent</translation>
 <translation id="1330145147221172764">Schermtoetsenbord inschakelen</translation>
 <translation id="13356285923490863">Naam van beleid</translation>
@@ -120,7 +119,7 @@
       Als de instelling wordt gewijzigd terwijl de gebruiker is ingelogd bij een sessie met meerdere profielen, worden alle gebruikers in de sessie gecontroleerd op basis van hun overeenkomstige instellingen. De sessie wordt gesloten als een van de gebruikers niet langer deel mag uitmaken van de sessie.
 
       Als dit beleid niet wordt ingesteld, is de standaardwaarde 'MultiProfileUserBehaviorMustBePrimary' van toepassing op gebruikers die op ondernemingsniveau worden beheerd en wordt 'MultiProfileUserBehaviorUnrestricted' gebruikt voor niet-beheerde gebruikers.</translation>
-<translation id="1465619815762735808">Klikken om te spelen</translation>
+<translation id="1465619815762735808">Klikken om af te spelen</translation>
 <translation id="1466133662354365542">Hiermee wordt de functie Automatisch aanvullen van <ph name="PRODUCT_NAME" /> ingeschakeld en wordt gebruikers toegestaan creditcard- of adresgegevens automatisch in te vullen op webformulieren aan de hand van eerder opgeslagen gegevens.
 
       Als je deze instelling uitschakelt, worden er nooit creditcardgegevens voorgesteld of ingevuld door Automatisch aanvullen. Er worden ook geen aanvullende creditcardgegevens opgeslagen die de gebruiker mogelijk verzendt terwijl hij browst op internet.
@@ -460,9 +459,6 @@
 
       De content van de lijst 'URL's die worden geopend bij starten' wordt genegeerd, tenzij je 'Een lijst met URL's openen' selecteert bij 'Actie bij starten'.</translation>
 <translation id="2327252517317514801">Domeinen definiëren voor toegang tot G Suite</translation>
-<translation id="2337466621458842053">Hiermee kun je een lijst URL-patronen instellen waarmee sites worden gespecificeerd waarop afbeeldingen kunnen worden weergegeven.
-
-          Als dit beleid niet is ingesteld, wordt de algemene standaardwaarde gebruikt voor alle sites op basis van het beleid 'DefaultImagesSetting' (als dit is ingesteld) of anders op basis van de configuratie van de gebruiker.</translation>
 <translation id="2372547058085956601">De vertraging voor automatisch inloggen bij de openbare sessie.
 
       Als het beleid |DeviceLocalAccountAutoLoginId| niet is ingesteld, heeft dit beleid geen effect. Anders:
@@ -1232,9 +1228,6 @@
       Als je deze instelling in- of uitschakelt, kunnen gebruikers de instelling niet aanpassen of negeren in <ph name="PRODUCT_NAME" />.
 
       Als dit beleid niet wordt ingesteld, wordt dit ingeschakeld maar kan de gebruiker dit wijzigen.</translation>
-<translation id="4525521128313814366">Hiermee kun je een lijst URL-patronen instellen waarmee sites worden gespecificeerd waarop geen afbeeldingen kunnen worden weergegeven.
-
-          Als dit beleid niet is ingesteld, wordt de algemene standaardwaarde gebruikt voor alle sites op basis van het beleid 'DefaultImagesSetting' (als dit is ingesteld) of anders op basis van de configuratie van de gebruiker.</translation>
 <translation id="4531706050939927436">De installatie van Android-apps kan via de Google Beheerdersconsole worden afgedwongen door gebruik te maken van Google Play. Deze apps gebruiken dit beleid niet.</translation>
 <translation id="4534500438517478692">Naam Android-beperking:</translation>
 <translation id="4541530620466526913">Lokale accounts op apparaat</translation>
@@ -1529,9 +1522,6 @@
 <translation id="5457065417344056871">De gastmodus inschakelen in browser</translation>
 <translation id="5457924070961220141">Hiermee kun je de standaard HTML-renderer configureren wanneer <ph name="PRODUCT_FRAME_NAME" /> is geïnstalleerd.
           De standaardinstelling die wordt gebruikt wanneer dit beleid niet wordt ingesteld, wordt gebruikt om de hostbrowser de rendering te laten regelen, maar je kunt dit naar wens aanpassen en <ph name="PRODUCT_FRAME_NAME" /> HTML-pagina's standaard laten renderen.</translation>
-<translation id="5459155981813668716">Hiermee wordt ingesteld in welke talen <ph name="PRODUCT_OS_NAME" /> wordt weergegeven.
-
-      Als dit beleid is ingesteld, kan de gebruiker alleen instellen dat <ph name="PRODUCT_OS_NAME" /> wordt weergegeven in een van de talen die is opgenomen in dit beleid. Als dit beleid niet is ingesteld of is ingesteld op een lege lijst, kan <ph name="PRODUCT_OS_NAME" /> worden weergegeven in alle ondersteunde talen. Als dit beleid is ingesteld op een lijst met ongeldige waarden, worden alle ongeldige waarden genegeerd. Als een gebruiker al eerder had ingesteld dat <ph name="PRODUCT_OS_NAME" /> wordt weergegeven in een bepaalde taal die niet is toegestaan door dit beleid, wordt de weergavetaal (op het moment dat de gebruiker inlogt) ingesteld op een taal die wel is toegestaan. Als de gebruiker voorkeurstalen had ingesteld en een van de voorkeurstalen is toegestaan door dit beleid, schakelt <ph name="PRODUCT_OS_NAME" /> over naar deze taal. Als de gebruiker geen voorkeurstalen had ingesteld, schakelt <ph name="PRODUCT_OS_NAME" /> over naar de eerste geldige waarde die door het beleid is bepaald, of anders naar de standaardtaal (momenteel en-US) als het beleid alleen ongeldige talen bevat.</translation>
 <translation id="5464816904705580310">Hiermee configureer je instellingen voor beheerde gebruikers.</translation>
 <translation id="546726650689747237">Vertraging van dimmen van scherm wanneer op netstroom wordt gewerkt</translation>
 <translation id="5469825884154817306">Afbeeldingen blokkeren op deze sites</translation>
@@ -2314,9 +2304,6 @@
 
       Dit beleid kan alleen worden ingesteld als aanbevolen. Je kunt dit beleid gebruiken om een aantal aanbevolen talen naar het bovenste deel van de lijst te verplaatsen, maar gebruikers kunnen altijd de gewenste taal die door <ph name="PRODUCT_OS_NAME" /> wordt ondersteund voor hun sessie kiezen.
       </translation>
-<translation id="7763311235717725977">Hiermee kun je instellen of het websites is toegestaan afbeeldingen weer te geven. Het weergeven van afbeeldingen kan worden toegestaan voor alle websites of worden geweigerd voor alle websites.
-
-          Als dit beleid niet wordt ingesteld, wordt 'AllowImages' gebruikt en kan dit door de gebruiker worden gewijzigd.</translation>
 <translation id="7763479091692861127"> De verbindingstypen die mogen worden gebruikt voor updates voor het besturingssysteem. Updates voor het besturingssysteem kunnen de verbinding zwaar belasten door hun grootte en kunnen extra kosten tot gevolg hebben. Updates voor het besturingssysteem zijn daarom standaard uitgeschakeld voor dure verbindingstypen. Dit omvat momenteel de verbindingstypen WiMax, Bluetooth en Mobiel.
 
       De herkende verbindingstypen zijn 'ethernet', 'wifi', 'wimax', 'bluetooth' en 'mobiel'.</translation>
diff --git a/components/policy/resources/policy_templates_no.xtb b/components/policy/resources/policy_templates_no.xtb
index d6a7876..b600517 100644
--- a/components/policy/resources/policy_templates_no.xtb
+++ b/components/policy/resources/policy_templates_no.xtb
@@ -79,7 +79,6 @@
 
           Skaleringsfaktoren må være 100 % eller mer.</translation>
 <translation id="131353325527891113">Vis brukernavn på påloggingssiden</translation>
-<translation id="1325295456374328159">Konfigurer tillatte lokaliteter i brukerøkter</translation>
 <translation id="1327466551276625742">Aktiver melding om nettverkskonfigurasjon når du er uten nett.</translation>
 <translation id="1330145147221172764">Slå på skjermtastaturet</translation>
 <translation id="13356285923490863">Navn på retningslinje</translation>
@@ -470,7 +469,6 @@
 <translation id="2309390639296060546">Standardinnstilling for geoposisjonering</translation>
 <translation id="2312134445771258233">Lar deg konfigurere sidene som lastes inn ved oppstart. Innholdet i listen «Nettadresser som skal åpnes ved oppstart» ignoreres, med mindre du velger «Åpne en liste over nettadresser» i «Handling ved oppstart».</translation>
 <translation id="2327252517317514801">Spesifiser hvilke domener som har tilgang til G Suite</translation>
-<translation id="2337466621458842053">Gjør at du kan angi en liste over nettadressemønstre for nettsteder som kan vise bilder. Hvis denne retningslinjen ikke angis, blir den globale standardverdien brukt for alle nettsteder, enten fra retningslinjen DefaultImagesSetting hvis den er angitt, eller fra brukerens egen konfigurasjon hvis nevnte retningslinje ikke er angitt.</translation>
 <translation id="2372547058085956601">Tid før automatisk pålogging til offentlig økt.
 
       Hvis |DeviceLocalAccountAutoLoginId|-innstillingen ikke er angitt, har dette ingen effekt. Ellers:
@@ -1221,7 +1219,6 @@
       Hvis du aktiverer eller deaktiverer denne innstillingen, kan ikke brukeren endre eller overstyre denne innstillingen i <ph name="PRODUCT_NAME" />.
 
       Hvis denne retningslinjen ikke angis, aktiveres den, men brukeren kan endre på dette.</translation>
-<translation id="4525521128313814366">Gjør at du kan angi en liste over nettadressemønstre som spesifiserer nettsteder som ikke får vise bilder. Hvis denne retningslinjen ikke angis, brukes den globale standardverdien for alle nettsteder, enten fra retningslinjen DefaultImagesSetting, eller fra brukerens egne retningslinjer hvis den nevnte retningslinjen ikke er angitt.</translation>
 <translation id="4531706050939927436">Android-apper kan tvangsinstalleres fra Google Administrasjonskonsoll ved hjelp av Google Play. De bruker ikke denne regelen.</translation>
 <translation id="4534500438517478692">Navnet på Android-begrensningen:</translation>
 <translation id="4541530620466526913">Lokale kontoer på enheten</translation>
@@ -1513,9 +1510,6 @@
 <translation id="5457065417344056871">Slå på gjestemodus i nettleseren</translation>
 <translation id="5457924070961220141">Gjør at du kan konfigurere standard HTML-gjengivelsen når <ph name="PRODUCT_FRAME_NAME" /> er installert.
           Standardinnstillingen som brukes når denne retningslinjen er angitt, er for å tillate vertstjeneren å foreta gjengivelsen, men du kan velge å overstyre dette sånn at <ph name="PRODUCT_FRAME_NAME" /> som standard gjengir HTML-sider.</translation>
-<translation id="5459155981813668716">Konfigurerer hvilke lokaliteter <ph name="PRODUCT_OS_NAME" /> kan vises i.
-
-      Hvis denne regelen er angitt, kan brukeren bare konfigurere <ph name="PRODUCT_OS_NAME" /> til å vises i en av lokalitetene som er angitt av denne regelen. Hvis regelen ikke er angitt eller er angitt med en tom liste, kan <ph name="PRODUCT_OS_NAME" /> vises i alle lokalitetene som støttes. Hvis regelen er angitt med en liste med ugyldige verdier, ignoreres alle de ugyldige verdiene. Hvis en bruker tidligere konfigurerte <ph name="PRODUCT_OS_NAME" /> til å bli vist på et språk som ikke tillates av denne regelen, byttes den viste lokaliteten til en tillatt lokalitet neste gang brukeren logger på. Hvis brukeren har konfigurert foretrukne lokaliteter og en av de foretrukne lokalitetene tillates av denne regelen, bytter <ph name="PRODUCT_OS_NAME" /> til denne lokaliteten. Ellers bytter <ph name="PRODUCT_OS_NAME" /> til den første gyldige verdien angitt av denne regelen eller til en reservelokalitet (en-US) hvis denne regelen bare inneholder ugyldige oppføringer.</translation>
 <translation id="5464816904705580310">Konfigurer innstillinger for administrerte brukere.</translation>
 <translation id="546726650689747237">Forsinkelse for lysdemping på skjermen når enheten kjører på vekselstrøm</translation>
 <translation id="5469825884154817306">Blokkér bilder på disse nettstedene</translation>
@@ -2302,9 +2296,6 @@
 
       Denne regelen kan bare angis som en anbefaling. Du kan bruke denne regelen til å flytte et sett med anbefalte lokaliteter til toppen, men brukerne kan alltid velge en hvilken som helst lokalitet som støttes av <ph name="PRODUCT_OS_NAME" />, når de starter økten.
       </translation>
-<translation id="7763311235717725977">Gjør at du kan angi om nettsteder kan vise bilder. Bildevisning kan enten tillates for alle nettsteder, eller nektes for alle nettsteder.
-
-          Hvis denne retningslinjen ikke angis, brukes AllowImages, og brukeren kan endre dette.</translation>
 <translation id="7763479091692861127"> Tilkoblingstypene som tillates for oppdateringer av operativsystem. Oppdateringer av operativsystem legger potensielt beslag på store deler av kapasiteten som følge av at de er omfattende operasjoner, og det kan påløpe ekstra kostnader. Derfor er slike oppdateringer som standard ikke slått på for tilkoblingstyper som anses som kostbare, herunder WiMax, Bluetooth og mobilnettverk.
 
       Identifikatorene som gjenkjennes for tilkoblingstyper er "ethernet", "wifi", "wimax", "bluetooth" og "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_pl.xtb b/components/policy/resources/policy_templates_pl.xtb
index 398d22b..54d3881c 100644
--- a/components/policy/resources/policy_templates_pl.xtb
+++ b/components/policy/resources/policy_templates_pl.xtb
@@ -77,7 +77,6 @@
 
           Współczynnik skalowania musi wynosić co najmniej 100%.</translation>
 <translation id="131353325527891113">Pokaż nazwy użytkowników na ekranie logowania</translation>
-<translation id="1325295456374328159">Skonfiguruj dozwolone języki sesji użytkownika</translation>
 <translation id="1327466551276625742">Włącza pytanie o konfigurację sieci wyświetlane w trybie offline</translation>
 <translation id="1330145147221172764">Włącz klawiaturę ekranową</translation>
 <translation id="13356285923490863">Nazwa zasady</translation>
@@ -462,7 +461,6 @@
 <translation id="2309390639296060546">Domyślne ustawienie geolokalizacji</translation>
 <translation id="2312134445771258233">Umożliwia skonfigurowanie stron wczytywanych po uruchomieniu. Zawartość listy „Adresy URL otwierane po uruchomieniu” jest ignorowana, chyba że wybierzesz opcję „Otwórz adresy URL z listy” w ustawieniu „Działanie po uruchomieniu”.</translation>
 <translation id="2327252517317514801">Zdefiniuj domeny, które będą mogły uzyskiwać dostęp do G Suite</translation>
-<translation id="2337466621458842053">Umożliwia skonfigurowanie listy wzorcowych URL-i określających witryny, w których mogą być wyświetlane obrazy. Jeśli ta zasada nie zostanie skonfigurowana, dla wszystkich witryn będzie używana globalna wartość domyślna pochodząca z zasady „DefaultImagesSettings” (jeśli została skonfigurowana) lub z osobistej konfiguracji użytkownika.</translation>
 <translation id="2372547058085956601">Opóźnienie automatycznego logowania się do sesji publicznej.
 
       Jeśli zasada |DeviceLocalAccountAutoLoginId| nie jest ustawiona, ta zasada nie daje żadnych rezultatów. W przeciwnym razie:
@@ -1192,7 +1190,6 @@
       Jeśli to ustawienie jest włączone lub wyłączone, użytkownicy nie mogą go zmienić ani zastąpić w <ph name="PRODUCT_NAME" />.
 
       W przypadku nieskonfigurowania tej zasady ustawienie zostanie włączone, ale użytkownik będzie mógł to zmienić.</translation>
-<translation id="4525521128313814366">Pozwala na ustawienie listy wzorcowych URL-i, które określają witryny mogące wyświetlać obrazy. Jeśli ta zasada nie zostanie skonfigurowana, dla wszystkich witryn będzie używana globalna wartość domyślna pochodząca z zasady „DefaultImagesSettings” (jeśli została skonfigurowana) lub z osobistej konfiguracji użytkownika.</translation>
 <translation id="4531706050939927436">Instalację aplikacji na Androida można wymusić za pomocą konsoli Google Admin przy użyciu Google Play. Ta zasada ich nie dotyczy.</translation>
 <translation id="4534500438517478692">Nazwa ograniczenia w Androidzie:</translation>
 <translation id="4541530620466526913">Lokalne konta na urządzeniu</translation>
@@ -1463,9 +1460,6 @@
 <translation id="5447306928176905178">Włącz raportowanie informacji o pamięci (rozmiar stosu pamięci JS) do strony (opcja wycofana)</translation>
 <translation id="5457065417344056871">Włącz tryb gościa w przeglądarce</translation>
 <translation id="5457924070961220141">Umożliwia skonfigurowanie domyślnego mechanizmu renderowania HTML po zainstalowaniu wtyczki <ph name="PRODUCT_FRAME_NAME" />. Ustawieniem domyślnym, stosowanym w przypadku nieskonfigurowania tej zasady, jest zezwolenie przeglądarce hosta na wykonywanie renderowania, jednak możesz opcjonalnie zastąpić to ustawienie, tak aby strony HTML były domyślnie renderowane przez wtyczkę <ph name="PRODUCT_FRAME_NAME" />.</translation>
-<translation id="5459155981813668716">Określa języki, w których można wyświetlać <ph name="PRODUCT_OS_NAME" />.
-
-      Jeśli ta zasada jest skonfigurowana, użytkownik może skonfigurować wyświetlanie <ph name="PRODUCT_OS_NAME" /> tylko w jednym z języków określonych w tej zasadzie. Jeśli zasada jest nieskonfigurowana lub jest ustawiona na pustą listę, <ph name="PRODUCT_OS_NAME" /> można wyświetlać we wszystkich obsługiwanych językach. Jeśli ustawiona lista zawiera nieprawidłowe wartości, będą one ignorowane. Jeśli użytkownik wcześniej skonfigurował wyświetlanie <ph name="PRODUCT_OS_NAME" /> w języku niedozwolonym przez tę zasadę, język wyświetlania zostanie przełączony na dozwolony po następnym zalogowaniu się użytkownika. Jeśli użytkownik skonfigurował preferowane języki i jeden z nich jest dozwolony przez tę zasadę, <ph name="PRODUCT_OS_NAME" /> przełączy się na ten język. W przeciwnym razie <ph name="PRODUCT_OS_NAME" /> przełączy się na język odpowiadający pierwszej prawidłowej wartości z listy, a jeśli lista zawiera same nieprawidłowe wartości – na język zastępczy (obecnie en-US).</translation>
 <translation id="5464816904705580310">Konfiguruj ustawienia dla zarządzanych użytkowników.</translation>
 <translation id="546726650689747237">Opóźnienie przyciemnienia ekranu przy zasilaniu sieciowym</translation>
 <translation id="5469825884154817306">Blokuj grafiki w tych witrynach</translation>
@@ -2209,7 +2203,6 @@
 
       Tę zasadę możesz ustawić tylko jako zalecaną. Za jej pomocą możesz przenieść zalecane języki na początek, ale użytkownicy zawsze mogą wybrać dla swojej sesji publicznej dowolny język obsługiwany w <ph name="PRODUCT_OS_NAME" />.
       </translation>
-<translation id="7763311235717725977">Pozwala określić, czy witryny mogą wyświetlać obrazy. Pokazywanie obrazów może być włączone lub wyłączone dla wszystkich witryn. Jeśli ta zasada nie będzie skonfigurowana, zostanie użyta zasada „AllowImages” i użytkownik będzie mógł zmienić to ustawienie.</translation>
 <translation id="7763479091692861127"> Typy połączeń, które mogą być używane do aktualizowania systemu operacyjnego. Z powodu swojego rozmiaru aktualizacje te silnie wykorzystują połączenie, co może skutkować dodatkowymi kosztami. Dlatego domyślnie są wyłączone w przypadku połączeń uznanych za „kosztowne”, czyli aktualnie dla WiMax, Bluetooth i komórek.
 
       Rozpoznawane identyfikatory typów połączeń to  „ethernet”, „wifi”, „wimax”, „bluetooth” i „cellular”.</translation>
diff --git a/components/policy/resources/policy_templates_pt-BR.xtb b/components/policy/resources/policy_templates_pt-BR.xtb
index f44240f..96c46db 100644
--- a/components/policy/resources/policy_templates_pt-BR.xtb
+++ b/components/policy/resources/policy_templates_pt-BR.xtb
@@ -75,7 +75,6 @@
 
           O fator de escala deve ser de 100% ou mais.</translation>
 <translation id="131353325527891113">Mostrar nomes de usuário na tela de login</translation>
-<translation id="1325295456374328159">Configura as localidades permitidas em uma sessão de usuário</translation>
 <translation id="1327466551276625742">Ativar prompt de configuração de rede quando estiver off-line</translation>
 <translation id="1330145147221172764">Ativar o teclado na tela</translation>
 <translation id="13356285923490863">Nome da política</translation>
@@ -459,7 +458,6 @@
 <translation id="2309390639296060546">Configuração padrão de geolocalização</translation>
 <translation id="2312134445771258233">Permite configurar as páginas que são carregadas na inicialização. O conteúdo da lista "URLs que devem ser abertos na inicialização" é ignorado, a menos que você selecione "Abrir uma lista de URLs" em "Ação na inicialização".</translation>
 <translation id="2327252517317514801">Definir os domínios autorizados a acessar o G Suite</translation>
-<translation id="2337466621458842053">Permite que você defina uma lista de padrões URL para especificar os sites autorizados a exibir imagens. Se esta política for deixada sem definição, o valor padrão global será utilizado para todos os sites a partir da política "DefaultImagesSetting", caso esta tenha sido definida, ou a partir das configurações pessoais do usuário, caso não tenha sido definida.</translation>
 <translation id="2372547058085956601">O período de espera para login automático na sessão pública.
 
       Se a política |DeviceLocalAccountAutoLoginId| não for definida, não terá efeito algum. Caso contrário:
@@ -1189,7 +1187,6 @@
       Se ativar ou desativar esta configuração, os usuários não poderão alterar nem substituí-la no <ph name="PRODUCT_NAME" />.
 
       Se esta política for deixada sem definição, esta configuração será ativada, podendo ser modificada pelo usuário.</translation>
-<translation id="4525521128313814366">Permite que você defina uma lista de padrões de URL que especificam sites sem permissão para exibir imagens. Se esta política for deixada sem definição, o valor padrão global será utilizado para todos os sites a partir da política "DefaultJavaScriptSetting", caso esta tenha sido definida, ou a partir das configurações pessoais do usuário, caso não tenha sido definida.</translation>
 <translation id="4531706050939927436">Os apps Android podem ser instalados forçadamente a partir do Google Admin Console usando o Google Play. Eles não usam esta política.</translation>
 <translation id="4534500438517478692">Nome de restrição Android:</translation>
 <translation id="4541530620466526913">Contas locais de dispositivo</translation>
@@ -1460,9 +1457,6 @@
 <translation id="5447306928176905178">Ativar relatórios de informação de memória (JS tamanho da pilha) para a página (obsoleta)</translation>
 <translation id="5457065417344056871">Ativar o modo visitante no navegador</translation>
 <translation id="5457924070961220141">Permite configurar o processador HTML padrão quando <ph name="PRODUCT_FRAME_NAME" /> estiver instalado. A configuração padrão utilizada quando esta política é deixada sem definição é permitir que o navegador host faça o processamento, mas você pode, opcionalmente, substituí-la para que <ph name="PRODUCT_FRAME_NAME" /> processe as páginas HTML por padrão.</translation>
-<translation id="5459155981813668716">Configura as localidades em que o <ph name="PRODUCT_OS_NAME" /> pode ser exibido.
-
-      Se esta política for definida, o usuário só poderá configurar o <ph name="PRODUCT_OS_NAME" /> para ser exibido em uma das localidades especificadas pela política. Se não for definida ou se for definida como uma lista vazia, o <ph name="PRODUCT_OS_NAME" /> poderá ser exibido em todas as localidades compatíveis. Se esta política for definida como uma lista com valores inválidos, todos os valores inválidos serão ignorados. Se um usuário tiver configurado o <ph name="PRODUCT_OS_NAME" /> anteriormente para ser exibido em um idioma que não seja permitido por esta política, a localidade de exibição será alternada para uma permitida, na próxima vez que o usuário fizer login. Se o usuário tiver configurado localidades preferidas, e uma delas for permitida por esta política, o <ph name="PRODUCT_OS_NAME" /> será alternado para essa localidade. Caso contrário, o <ph name="PRODUCT_OS_NAME" /> passará para o primeiro valor válido especificado por esta política ou para uma localidade substituta (atualmente inglês dos Estados Unidos) se a política incluir apenas entradas inválidas.</translation>
 <translation id="5464816904705580310">Definir configurações para usuários gerenciados.</translation>
 <translation id="546726650689747237">Intervalo de escurecimento da tela no funcionamento com alimentação CA</translation>
 <translation id="5469825884154817306">Bloquear imagens nestes sites</translation>
@@ -2215,7 +2209,6 @@
 
       Esta política só pode ser configurada como recomendada. Você pode usá-la para mover um conjunto de localidades recomendadas para o topo, mas os usuários têm permissão para escolher qualquer localidade compatível com o <ph name="PRODUCT_OS_NAME" /> para a sessão deles.
       </translation>
-<translation id="7763311235717725977">Permite que você defina quais websites estão autorizados a exibir imagens. A exibição de imagens pode ser permitida ou negada para todos os websites. Se esta política for deixada sem definição, "AllowImages" será utlizada, mas pode ser modificada pelo usuário.</translation>
 <translation id="7763479091692861127"> Os tipos de conexão que podem ser usados para atualizações do sistema operacional. As atualizações do sistema operacional podem colocar grande pressão sobre a conexão, devido a seu tamanho, e poderão incorrer em custos adicionais. Portanto, por padrão, não são ativadas para tipos de conexão considerados dispendiosos, o que inclui WiMax, Bluetooth, WiMax e Cellular, no momento.
 
       Os identificadores de tipos de conexão reconhecidos são "ethernet", "wifi", "WiMAX", "bluetooth" e "celular".</translation>
diff --git a/components/policy/resources/policy_templates_pt-PT.xtb b/components/policy/resources/policy_templates_pt-PT.xtb
index eb3637a2..3f8477c 100644
--- a/components/policy/resources/policy_templates_pt-PT.xtb
+++ b/components/policy/resources/policy_templates_pt-PT.xtb
@@ -79,7 +79,6 @@
 
           O fator de escala deve ser de 100% ou mais.</translation>
 <translation id="131353325527891113">Mostrar nomes de utilizador no ecrã de início de sessão</translation>
-<translation id="1325295456374328159">Configurar os locais permitidos numa sessão de utilizador.</translation>
 <translation id="1327466551276625742">Ativar o pedido de configuração da rede quando estiver offline</translation>
 <translation id="1330145147221172764">Ativar o teclado no ecrã</translation>
 <translation id="13356285923490863">Nome da Política</translation>
@@ -471,7 +470,6 @@
 <translation id="2309390639296060546">Definição de geolocalização predefinida</translation>
 <translation id="2312134445771258233">Permite-lhe configurar as páginas que são carregadas no arranque. O conteúdo da lista "URLs a abrir no aranque" é ignorado, a menos que selecione "Abrir uma lista de URLs" em "Ação no arranque".</translation>
 <translation id="2327252517317514801">Definir domínios com permissão para aceder ao G Suite</translation>
-<translation id="2337466621458842053">Permite definir uma lista de padrões de URL que especificam os Web sites autorizados a apresentar imagens. Se esta política não for definida, será utilizado o valor global predefinido para todos os Web sites, seja a partir da política "DefaultImagesSetting", caso esteja definida, ou a partir da configuração pessoal do utilizador.</translation>
 <translation id="2372547058085956601">O atraso do início automático da sessão pública.
 
       Se a política |DeviceLocalAccountAutoLoginId| não estiver definida, esta política não tem efeito. Se não for esse o caso:
@@ -1206,7 +1204,6 @@
       Se ativar ou desativar esta definição, os utilizadores não a poderão alterar ou substituir no <ph name="PRODUCT_NAME" />.
 
       Se deixar esta política por definir, a definição será ativada mas o utilizador poderá alterá-la.</translation>
-<translation id="4525521128313814366">Permite definir uma lista de padrões de URL que especificam os Web sites não autorizados a apresentar imagens. Se esta política não for definida, será utilizado o valor global predefinido para todos os Web sites, seja a partir da política "DefaultImagesSetting", caso esteja definida, ou a partir da configuração pessoal do utilizador.</translation>
 <translation id="4531706050939927436">As aplicações Android podem ser instaladas à força a partir da Consola do gestor do Google através do Google Play. Essas aplicações não utilizam esta política.</translation>
 <translation id="4534500438517478692">Nome de restrição Android:</translation>
 <translation id="4541530620466526913">Contas locais do dispositivo</translation>
@@ -1482,9 +1479,6 @@
 <translation id="5447306928176905178">Ativar informações de memória de relatórios (tamanho da área dinâmica para dados JS) para a página (descontinuado)</translation>
 <translation id="5457065417344056871">Ativar o modo convidado no navegador</translation>
 <translation id="5457924070961220141">Permite configurar o processador de HTML predefinido quando o <ph name="PRODUCT_FRAME_NAME" /> é instalado. Se esta política não for definida, será utilizada a predefinição para permitir que o processamento seja efetuado pelo navegador anfitrião. Opcionalmente, pode substituir esta definição e configurar o <ph name="PRODUCT_FRAME_NAME" /> para processar páginas HTML por predefinição.</translation>
-<translation id="5459155981813668716">Configura os locais em que o <ph name="PRODUCT_OS_NAME" /> pode ser apresentado.
-
-      Se esta política estiver definida, o utilizador pode configurar a apresentação do <ph name="PRODUCT_OS_NAME" /> apenas num dos idiomas especificados por esta política. Se esta política não for definida ou for definida com uma lista vazia, o <ph name="PRODUCT_OS_NAME" /> pode ser apresentado em todos os idiomas compatíveis. Se esta política estiver definida com uma lista com valores inválidos, os mesmos serão ignorados. Se um utilizador configurou o <ph name="PRODUCT_OS_NAME" /> anteriormente de forma a ser apresentado num idioma não permitido por esta política, o idioma da apresentação será alterado para um permitido da próxima vez que o utilizador iniciar sessão. Se o utilizador tiver configurado idiomas preferidos e um destes for permitido por esta política, o <ph name="PRODUCT_OS_NAME" /> mudará para esse idioma. Caso contrário, o <ph name="PRODUCT_OS_NAME" /> mudará para o primeiro valor válido especificado por esta política ou para um idioma alternativo (atualmente, en-US), se esta política incluir apenas entradas inválidas.</translation>
 <translation id="5464816904705580310">Configura definições para utilizadores geridos.</translation>
 <translation id="546726650689747237">Atraso do escurecimento do ecrã quando o dispositivo está ligado à eletricidade</translation>
 <translation id="5469825884154817306">Bloquear imagens nesses sites</translation>
@@ -2238,7 +2232,6 @@
 
       Esta política apenas pode ser definida como recomendada. Pode utilizá-la para mover um conjunto de locais recomendados para a parte superior, mas os utilizadores podem sempre escolher qualquer local suportado pelo <ph name="PRODUCT_OS_NAME" /> para a respetiva sessão.
       </translation>
-<translation id="7763311235717725977">Permite definir se os Web sites estão ou não autorizados a apresentar imagens. A apresentação de imagens pode ser autorizada para todos os Web sites ou negada para todos os Web sites. Se esta política não for definida, será utilizada a definição "AllowImages" e o utilizador poderá alterá-la.</translation>
 <translation id="7763479091692861127"> Os tipos de ligação permitidos para utilização em atualizações do SO. As atualizações do SO podem sobrecarregar a ligação devido ao seu tamanho, o que pode implicar custos adicionais. Por conseguinte, por predefinição, não estão ativadas para tipos de ligação considerados caros, nomeadamente WiMax, Bluetooth e Celular.
 
       Os identificadores dos tipos de ligação reconhecidos são "ethernet", "wifi", "wimax", "bluetooth" e "celular".</translation>
diff --git a/components/policy/resources/policy_templates_ro.xtb b/components/policy/resources/policy_templates_ro.xtb
index 72f813c..9de7771 100644
--- a/components/policy/resources/policy_templates_ro.xtb
+++ b/components/policy/resources/policy_templates_ro.xtb
@@ -79,7 +79,6 @@
 
           Acesta trebuie să fie de minimum 100 %.</translation>
 <translation id="131353325527891113">Afișați numele de utilizator pe ecranul de conectare</translation>
-<translation id="1325295456374328159">Configurează codurile locale permise într-o sesiune a utilizatorului</translation>
 <translation id="1327466551276625742">Activați solicitarea privind configurația rețelei, în modul offline</translation>
 <translation id="1330145147221172764">Activați tastatura pe ecran</translation>
 <translation id="13356285923490863">Numele politicii</translation>
@@ -466,7 +465,6 @@
 
       Conținutul listei „Adrese URL care se deschid la pornire” este ignorat, cu excepția cazului în care selectezi „Deschide o listă cu adrese URL” în „Acțiune la pornire”.</translation>
 <translation id="2327252517317514801">Definește domeniile care au permisiunea să acceseze G Suite</translation>
-<translation id="2337466621458842053">Vă permite să setați o listă de modele pentru adresele URL care specifică site-urile care au permisiunea să afișeze imagini. Dacă această politică rămâne nesetată, valoarea prestabilită la nivel global va fi folosită pentru toate site-urile, fie din politica „DefaultImagesSetting”, în cazul în care politica este setată, fie din configurația personală a utilizatorului, în caz contrar.</translation>
 <translation id="2372547058085956601">Stabilește intervalul de inactivitate până la conectarea automată la o sesiune publică.
 
       Dacă setarea politicii |DeviceLocalAccountAutoLoginId| este anulată, aceasta nu mai are efect. În caz contrar:
@@ -1207,7 +1205,6 @@
       Dacă activați sau dezactivați această setare, utilizatorii nu o pot modifica sau anula în <ph name="PRODUCT_NAME" />.
 
       Dacă această politică nu este setată, această setare va fi activată, dar utilizatorul va putea să o schimbe.</translation>
-<translation id="4525521128313814366">Vă permite să setați o listă de modele pentru adresele URL ce specifică site-urile care nu au permisiunea de a afișa imagini. Dacă această politică rămâne nesetată, valoarea prestabilită la nivel global va fi folosită pentru toate site-urile, fie din politica „DefaultImagesSetting”, în cazul în care politica este setată, fie din configurația personală a utilizatorului, în caz contrar.</translation>
 <translation id="4531706050939927436">Aplicațiile Android pot fi instalate forțat din consola Google Admin folosind Google Play. Acestea nu folosesc politica.</translation>
 <translation id="4534500438517478692">Numele restricției Android:</translation>
 <translation id="4541530620466526913">Conturi locale de pe gadget</translation>
@@ -1487,9 +1484,6 @@
 <translation id="5447306928176905178">Activați raportarea informațiilor privind memoria (dimensiunea de heap JavaScript) în pagină (s-a renunțat la dezvoltare)</translation>
 <translation id="5457065417344056871">Activează modul pentru invitați în browser</translation>
 <translation id="5457924070961220141">Vă permite să configurați motorul de redare HTML prestabilit atunci când <ph name="PRODUCT_FRAME_NAME" /> este instalat. Setarea prestabilită este să permiteți browserului gazdă să efectueze redarea, dar opțional o puteți anula, pentru ca <ph name="PRODUCT_FRAME_NAME" /> să redea paginile HTML în mod prestabilit.</translation>
-<translation id="5459155981813668716">Configurează limbile în care poate fi afișat <ph name="PRODUCT_OS_NAME" />.
-
-      Dacă această politică este configurată, utilizatorul poate să configureze afișarea <ph name="PRODUCT_OS_NAME" /> numai într-una dintre limbile specificate de această politică. Dacă această politică nu este configurată sau dacă este configurată la o listă necompletată, <ph name="PRODUCT_OS_NAME" /> poate fi afișat în toate limbile acceptate. Dacă această politică este configurată la o listă cu valori nevalide, toate valorile nevalide vor fi ignorate. Dacă un utilizator a configurat anterior afișarea <ph name="PRODUCT_OS_NAME" /> într-o limbă care nu este permisă de această politică, limba de afișare va fi înlocuită cu o limbă permisă la următoarea conectare a utilizatorului. Dacă utilizatorul a configurat limbile preferate și una dintre ele este permisă de această politică, <ph name="PRODUCT_OS_NAME" /> va comuta la limba respectivă. În caz contrar, <ph name="PRODUCT_OS_NAME" /> va comuta la prima valoare validă specificată de această politică sau la o limbă alternativă (în prezent, en-US), în cazul în care politica nu conține decât intrări nevalide.</translation>
 <translation id="5464816904705580310">Configurați setările pentru utilizatorii gestionați.</translation>
 <translation id="546726650689747237">Interval până la reducerea luminozității ecranului la funcționarea pe c.a.</translation>
 <translation id="5469825884154817306">Blochează imagini de pe aceste site-uri</translation>
@@ -2242,7 +2236,6 @@
 
       Această politică poate fi setată numai ca recomandare. Poți să folosești această politică pentru a muta un set de limbi recomandate în partea de sus a listei, însă utilizatorii vor avea întotdeauna posibilitatea să aleagă pentru sesiunea lor orice limbă acceptată de <ph name="PRODUCT_OS_NAME" />.
       </translation>
-<translation id="7763311235717725977">Vă permite să setați dacă site-urile au permisiunea de a afișa imagini. Afișarea imaginilor poate fi permisă sau interzisă în bloc pentru toate site-urile web. Dacă această politică este nesetată, va fi utilizată „AllowImages”, iar utilizatorul o va putea schimba.</translation>
 <translation id="7763479091692861127"> Tipurile de conexiune care pot fi utilizate pentru actualizările sistemului de operare. Din cauza dimensiunii lor, actualizările sistemului de operare pot suprasolicita conexiunea și pot genera costuri suplimentare. Prin urmare, în mod prestabilit, acestea nu sunt activate pentru tipurile de conexiune considerate scumpe, printre care se numără în prezent conexiunile WiMax, cele prin Bluetooth și cele prin rețele mobile.
 
       Identificatorii recunoscuți pentru tipurile de conexiune sunt „ethernet”, „wifi”, „wimax”, „bluetooth” și „cellular”.</translation>
diff --git a/components/policy/resources/policy_templates_ru.xtb b/components/policy/resources/policy_templates_ru.xtb
index 001b570..4bad941c 100644
--- a/components/policy/resources/policy_templates_ru.xtb
+++ b/components/policy/resources/policy_templates_ru.xtb
@@ -77,7 +77,6 @@
 
           Значение коэффициента должно составлять не менее 100%.</translation>
 <translation id="131353325527891113">Показать имена пользователей на экране входа</translation>
-<translation id="1325295456374328159">Настроить языки для сеанса пользователя</translation>
 <translation id="1327466551276625742">При отсутствии подключения показывать запрос на настройку сети</translation>
 <translation id="1330145147221172764">Включить экранную клавиатуру</translation>
 <translation id="13356285923490863">Название правила</translation>
@@ -445,7 +444,6 @@
 <translation id="2309390639296060546">Настройка географического положения по умолчанию</translation>
 <translation id="2312134445771258233">Позволяет настраивать страницы, загружаемые при запуске. Содержание списка "URL, открываемые при запуске" игнорируется, если в разделе "Действие при запуске" параметр "Открыть список URL" не установлен.</translation>
 <translation id="2327252517317514801">Определение доменов с правом доступа к G Suite</translation>
-<translation id="2337466621458842053">Задает список шаблонов URL для сайтов, на которых разрешено показывать изображения. Если это правило не настроено, для всех сайтов используется глобальное значение по умолчанию на основе правила DefaultImagesSetting (если оно настроено, в противном случае – на основе пользовательской конфигурации).</translation>
 <translation id="2372547058085956601">Задержка автоматического входа во время сеанса общего доступа.
 
       Если не задано правило |DeviceLocalAccountAutoLoginId|, данное правило не действует. В противном случае:
@@ -1176,7 +1174,6 @@
 Когда этот параметр включен или отключен, пользователи не могут изменить его значение в <ph name="PRODUCT_NAME" />.
 
 Если значение параметра не задано, предложения отображаются, но пользователи могут самостоятельно отключить их.</translation>
-<translation id="4525521128313814366">Задает список шаблонов URL для сайтов, на которых разрешено показывать изображения. Если это правило не настроено, для всех сайтов используется глобальное значение по умолчанию на основе правила DefaultImagesSetting (если оно настроено, в противном случае – на основе пользовательской конфигурации).</translation>
 <translation id="4531706050939927436">Приложения Android можно принудительно установить через консоль администратора Google, скачав их из Google Play. Это правило приложениями не используется.</translation>
 <translation id="4534500438517478692">Название ограничения для Android:</translation>
 <translation id="4541530620466526913">Локальные аккаунты</translation>
@@ -1450,9 +1447,6 @@
 <translation id="5447306928176905178">Передавать на страницу информацию об использовании памяти JavaScript (устарело)</translation>
 <translation id="5457065417344056871">Включает гостевой режим в браузере</translation>
 <translation id="5457924070961220141">Позволяет настроить средство обработки HTML по умолчанию при установке <ph name="PRODUCT_FRAME_NAME" />. Если это правило не настроено, по умолчанию обработку выполняет браузер хоста, но это значение можно переопределить, и тогда обработку HTML-страниц по умолчанию выполняет <ph name="PRODUCT_FRAME_NAME" />.</translation>
-<translation id="5459155981813668716">Устанавливает региональные настройки для <ph name="PRODUCT_OS_NAME" />.
-
-      Если это правило настроено, пользователи могут задать для <ph name="PRODUCT_OS_NAME" /> только один из указанных в нем языков. Если правило не настроено или задан пустой список, в <ph name="PRODUCT_OS_NAME" /> могут использоваться все поддерживаемые языки. Если в списке правила указаны недействительные значения, они не будут учитываться. Если для <ph name="PRODUCT_OS_NAME" /> были заданы региональные настройки, запрещенные этим правилом, язык будет изменен на разрешенный при следующем входе в систему. Если указаны предпочитаемые языки и один из них разрешен в этом правиле, <ph name="PRODUCT_OS_NAME" /> будет запускаться на этом языке. В ином случае в <ph name="PRODUCT_OS_NAME" /> будет использоваться первое допустимое значение из этого правила или резервный язык (в настоящее время это en-US), если правило содержит только недопустимые значения.</translation>
 <translation id="5464816904705580310">Настройки управляемых профилей.</translation>
 <translation id="546726650689747237">Задержка затемнения экрана при работе от сети</translation>
 <translation id="5469825884154817306">Блокировать изображения на этих сайтах</translation>
@@ -2199,7 +2193,6 @@
 
       Это правило можно использовать только как рекомендованное. Даже если вы переместите некоторые настройки наверх списка, пользователи смогут выбрать любые региональные настройки, поддерживаемые <ph name="PRODUCT_OS_NAME" />.
       </translation>
-<translation id="7763311235717725977">Определяет, отображаются ли рисунки на сайтах. Их показ можно разрешить или запретить для всех сайтов. Если это правило не настроено, применяется правило AllowImages и пользователи смогут самостоятельно изменить его значение.</translation>
 <translation id="7763479091692861127"> Типы подключений, которые разрешается использовать для скачивания обновлений ОС. Из-за большого размера файлов скачивание может перегружать соединение и требовать дополнительных расходов. Поэтому передача через сети с высокой стоимостью трафика, такие как WiMAX, Bluetooth и сеть сотовой связи, по умолчанию отключена.
 
       Поддерживаются следующие типы подключений: ethernet, wifi, wimax, bluetooth и cellular.</translation>
diff --git a/components/policy/resources/policy_templates_sk.xtb b/components/policy/resources/policy_templates_sk.xtb
index c588660..94705a0 100644
--- a/components/policy/resources/policy_templates_sk.xtb
+++ b/components/policy/resources/policy_templates_sk.xtb
@@ -78,7 +78,6 @@
 
           Škálovací faktor musí mať hodnotu aspoň 100 %.</translation>
 <translation id="131353325527891113">Zobraziť používateľské mená na prihlasovacej obrazovke</translation>
-<translation id="1325295456374328159">Konfigurovanie povolených miestnych nastavení v relácii používateľa</translation>
 <translation id="1327466551276625742">Povolenie výzvy na konfiguráciu siete v režime offline</translation>
 <translation id="1330145147221172764">Zobraziť klávesnicu na obrazovke</translation>
 <translation id="13356285923490863">Názov pravidla</translation>
@@ -451,9 +450,6 @@
 <translation id="2309390639296060546">Predvolené nastavenie geolokácie</translation>
 <translation id="2312134445771258233">Umožňuje konfigurovať stránky, ktoré sa načítavajú pri spustení. Ak ste v časti „Akcie pri spustení“ nezvolili možnosť „Otvoriť zoznam webových adries“, položky v zozname „Webové adresy otvárané pri spustení“ sa ignorujú.</translation>
 <translation id="2327252517317514801">Definovať domény s povoleným prístupom do služby G Suite</translation>
-<translation id="2337466621458842053">Umožňuje nastaviť zoznam vzorov webových adries určujúcich webové stránky, na ktorých sa môžu zobrazovať obrázky.
-
-          Ak toto pravidlo ponecháte nenastavené, použije sa v prípade všetkých webových stránok globálna predvolená hodnota buď z pravidla „DefaultImagesSetting“ (ak je nastavené), alebo z osobnej konfigurácie používateľa.</translation>
 <translation id="2372547058085956601">Oneskorenie automatického prihlásenia do verejnej relácie.
 
       Ak nie je nastavené pravidlo |DeviceLocalAccountAutoLoginId|, nebude mať toto pravidlo žiadny vplyv. V opačnom prípade platí:
@@ -1221,9 +1217,6 @@
       Ak toto nastavenie povolíte alebo zakážete, používatelia ho v prehliadači <ph name="PRODUCT_NAME" /> nebudú môcť zmeniť ani prepísať.
 
       Ak toto pravidlo ponecháte nenastavené, povolí sa, no používateľ ho bude môcť zmeniť.</translation>
-<translation id="4525521128313814366">Umožňuje nastaviť zoznam vzorov webových adries určujúcich webové stránky, ktoré nemôžu zobrazovať obrázky.
-
-          Ak toto pravidlo ponecháte nenastavené, použije sa v prípade všetkých webových stránok globálna predvolená hodnota buď z pravidla „DefaultImagesSetting“ (ak je nastavené), alebo z osobnej konfigurácie používateľa.</translation>
 <translation id="4531706050939927436">Inštaláciu aplikácií pre Android je možné vynútiť v Správcovskej konzole Google prostredníctvom služby Google Play. Aplikácie pre Android toto pravidlo nepoužívajú.</translation>
 <translation id="4534500438517478692">Názov obmedzenia systému Android:</translation>
 <translation id="4541530620466526913">Miestne účty na zariadení</translation>
@@ -1521,9 +1514,6 @@
 <translation id="5457065417344056871">Povoliť v prehliadači režim pre hostí</translation>
 <translation id="5457924070961220141">Umožňuje konfigurovať vykresľovací modul HTML, keď je nainštalovaný doplnok <ph name="PRODUCT_FRAME_NAME" />.
           V predvolenom nastavení, ktoré sa používa v prípade, ak je toto pravidlo ponechané nenastavené, môže vykresľovanie vykonávať hostiteľský prehliadač. Toto nastavenie však môžete prepísať a namiesto toho vykresľovať stránky HTML pomocou doplnku <ph name="PRODUCT_FRAME_NAME" />.</translation>
-<translation id="5459155981813668716">Konfiguruje miestne nastavenia, v ktorých sa <ph name="PRODUCT_OS_NAME" /> môže zobrazovať.
-
-      Ak toto pravidlo nastavíte, používateľ môže nakonfigurovať iba to, aby sa <ph name="PRODUCT_OS_NAME" /> zobrazoval v jednom z miestnych nastavení špecifikovaných týmto pravidlom. Ak toto pravidlo nenastavíte alebo ho nastavíte na prázdny zoznam, <ph name="PRODUCT_OS_NAME" /> sa môže zobrazovať vo všetkých podporovaných miestnych nastaveniach. Ak pravidlo nastavíte na zoznam s neplatnými hodnotami, všetky neplatné hodnoty sa budú ignorovať. Ak používateľ predtým nakonfiguroval, aby sa <ph name="PRODUCT_OS_NAME" /> zobrazoval v jazyku, ktorý toto pravidlo nepovoľuje, pri najbližšom prihlásení používateľa sa zobrazené miestne nastavenie prepne na povolené miestne nastavenie. Ak používateľ nakonfiguroval preferované miestne nastavenia a jedno z týchto nastavení je povolené týmto pravidlom, <ph name="PRODUCT_OS_NAME" /> sa prepne na toto miestne nastavenie. V opačnom prípade sa <ph name="PRODUCT_OS_NAME" /> prepne na prvú platnú hodnotu špecifikovanú týmto pravidlom alebo na záložné miestne nastavenie (aktuálne en-US), ak pravidlo obsahuje iba neplatné záznamy.</translation>
 <translation id="5464816904705580310">Umožňuje nakonfigurovať nastavenia pre spravovaných používateľov.</translation>
 <translation id="546726650689747237">Oneskorenie zníženia jasu obrazovky pri používaní napájacieho zdroja</translation>
 <translation id="5469825884154817306">Blokovať obrázky na týchto weboch</translation>
@@ -2315,9 +2305,6 @@
 
       Toto pravidlo môžete nastaviť iba ako odporúčané. Pomocou tohto pravidla môžete presúvať skupinu odporúčaných miestnych nastavení na začiatok, ale používatelia si budú môcť pre svoju reláciu vždy vybrať ľubovoľné miestne nastavenie, ktoré <ph name="PRODUCT_OS_NAME" /> podporuje.
       </translation>
-<translation id="7763311235717725977">Umožňuje vám nastaviť, či môžu webové stránky zobrazovať obrázky. Zobrazovanie obrázkov môže byť buď pre všetky webové stránky umožnené, alebo pre všetky webové stránky zamietnuté.
-
-          Ak toto pravidlo ponecháte nenastavené, použije sa pravidlo „AllowImages“ a používateľ ho bude môcť zmeniť.</translation>
 <translation id="7763479091692861127"> Typy pripojení, ktoré je možné používať na aktualizáciu operačného systému. Aktualizácie operačného systému môžu vzhľadom na objem dát významne zaťažovať pripojenie a môžu tak zvýšiť vaše poplatky. Predvolene preto nie sú povolené pre typy pripojení, ktoré sú považované za finančne nákladné, ako sú momentálne pripojenia WiMax, Bluetooth a mobilné pripojenie.
 
       Medzi uznávané identifikátory typov pripojení patria "ethernet", "wifi", "wimax", "bluetooth" a "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_sl.xtb b/components/policy/resources/policy_templates_sl.xtb
index 0dc718ac..957604fb 100644
--- a/components/policy/resources/policy_templates_sl.xtb
+++ b/components/policy/resources/policy_templates_sl.xtb
@@ -79,7 +79,6 @@
 
 Vrednost prilagoditve mora biti 100 % ali več.</translation>
 <translation id="131353325527891113">Pokaži uporabniška imena na zaslonu za prijavo</translation>
-<translation id="1325295456374328159">Konfiguriranje dovoljenih jezikov v uporabniški seji</translation>
 <translation id="1327466551276625742">Omogočanje poziva za konfiguracijo omrežja v stanju brez povezave</translation>
 <translation id="1330145147221172764">Omogoči zaslonsko tipkovnico</translation>
 <translation id="13356285923490863">Ime pravilnika</translation>
@@ -475,9 +474,6 @@
 
       Vsebina seznama »URL-ji, ki naj se odprejo ob zagonu« se prezre, razen če v možnosti »Dejanje ob zagonu« izberete »Odpri seznam URL-jev«.</translation>
 <translation id="2327252517317514801">Opredelitev domen, ki smejo dostopati do storitve G Suite</translation>
-<translation id="2337466621458842053">Omogoča nastavitev seznama vzorcev URL-jev, s katerim se določijo, ki lahko prikazujejo slike.
-
-          Če ta pravilnik ni nastavljen, bo za vsa spletna mesta uporabljena splošna privzeta vrednost iz pravilnika »DefaultImagesSetting«, kadar je ta nastavljen, ali iz uporabnikove osebne konfiguracije, kadar pravilnik »DefaultImagesSetting« ni nastavljen.</translation>
 <translation id="2372547058085956601">Zamik samodejne prijave v javno sejo.
 
       Če pravilnik |DeviceLocalAccountAutoLoginId| ni nastavljen, se ne uporablja. V nasprotnem primeru:
@@ -1248,9 +1244,6 @@
       Če to nastavitev omogočite ali onemogočite, jo uporabniki v brskalniku <ph name="PRODUCT_NAME" /> ne bodo mogli spremeniti ali preglasiti.
 
      Če ta pravilnik ni nastavljen, bo to omogočeno, vendar bo lahko uporabnik to spremenil.</translation>
-<translation id="4525521128313814366">Omogoča nastavitev seznama vzorcev URL-jev, s katerim so določena spletna mesta, ki jim ni dovoljeno prikazovati slik.
-
-          Če ta pravilnik ni nastavljen, bo za vsa spletna mesta uporabljena splošna privzeta vrednost iz pravilnika »DefaultImagesSetting«, kadar je ta nastavljen, ali iz uporabnikove osebne konfiguracije, kadar pravilnik »DefaultImagesSetting« ni nastavljen.</translation>
 <translation id="4531706050939927436">Aplikacije za Android je mogoče vsiljeno namestiti iz konzole Admin console z Googlom Play, ki tega pravilnika ne uporabljata.</translation>
 <translation id="4534500438517478692">Ime omejitve za Android:</translation>
 <translation id="4541530620466526913">Lokalni računi za napravo</translation>
@@ -1549,9 +1542,6 @@
 <translation id="5457065417344056871">Omogočanje načina za goste v brskalniku</translation>
 <translation id="5457924070961220141">Omogoča nastavitev privzetega upodabljalnika HTML, ko je <ph name="PRODUCT_FRAME_NAME" /> nameščen.
           Če ta pravilnik ni nastavljen, je gostiteljskemu brskalniku upodabljanje privzeto dovoljeno, vendar lahko po želji to preglasite in določite, da bo <ph name="PRODUCT_FRAME_NAME" /> privzeto upodabljal strani HTML.</translation>
-<translation id="5459155981813668716">Konfigurira jezike, v katerih je lahko prikazan <ph name="PRODUCT_OS_NAME" />.
-
-      Če je ta pravilnik nastavljen, lahko uporabnik konfigurira <ph name="PRODUCT_OS_NAME" /> za prikaz samo v enem od jezikov, ki jih določa ta pravilnik. Če ta pravilnik ni nastavljen ali je nastavljen na prazen seznam, je <ph name="PRODUCT_OS_NAME" /> lahko prikazan v vseh podprtih jezikih. Če je ta pravilnik nastavljen na seznam z neveljavnimi vrednostmi, bodo vse neveljavne vrednosti prezrte. Če je uporabnik <ph name="PRODUCT_OS_NAME" /> v preteklosti konfiguriral za prikaz v jeziku, ki ga ta pravilnik ne dovoljuje, bo jezik prikaza preklopljen v dovoljen jezik, ko se uporabnik naslednjič prijavi. Če je uporabnik konfiguriral prednostne jezike in enega izmed njih dovoljuje ta pravilnik, bo <ph name="PRODUCT_OS_NAME" /> preklopil v ta jezik. V nasprotnem primeru bo <ph name="PRODUCT_OS_NAME" /> preklopil na prvo veljavno vrednost, ki jo določa ta pravilnik, ali rezervni jezik (trenutno je to ameriška angleščina, en-US), če ta pravilnik vsebuje samo neveljavne vnose.</translation>
 <translation id="5464816904705580310">Konfiguriranje nastavitev za upravljane uporabnike.</translation>
 <translation id="546726650689747237">Časovni zamik zatemnitve zaslona ob napajanju iz električnega omrežja</translation>
 <translation id="5469825884154817306">Blokiranje slik na teh mestih</translation>
@@ -2343,9 +2333,6 @@
 
       Ta pravilnik je mogoče nastaviti samo kot priporočen. Z njim lahko skupino priporočenih jezikov premaknete na vrh, vendar je uporabnikom za njihovo sejo vedno dovoljeno izbrati kateri koli jezik, ki ga podpira operacijski sistem <ph name="PRODUCT_OS_NAME" />.
       </translation>
-<translation id="7763311235717725977">Omogoča nastavitev, ali lahko spletna mesta prikazujejo slike. Prikazovanje slik je lahko dovoljeno ali zavrnjeno za vsa spletna mesta.
-
-          Če ta pravilnik ni nastavljen, bo uporabljen pravilnik »AllowImages« in uporabnik ga bo lahko spremenil.</translation>
 <translation id="7763479091692861127"> Vrste povezav, ki so dovoljene za uporabo za posodobitve operacijskega sistema. Posodobitve operacijskega sistema lahko zaradi svoje velikosti zelo obremenijo povezavo in lahko prinesejo dodatne stroške. Zato trenutno niso omogočene za vrste povezave, ki štejejo za drage; trenutno so to WiMax, Bluetooth in prenos podatkov v mobilnem omrežju.
 
       Prepoznani identifikatorji vrste povezav so »ethernet«, »wifi«, »wimax«, »bluetooth« in »cellular«.</translation>
diff --git a/components/policy/resources/policy_templates_sr.xtb b/components/policy/resources/policy_templates_sr.xtb
index 0820133..97952ca 100644
--- a/components/policy/resources/policy_templates_sr.xtb
+++ b/components/policy/resources/policy_templates_sr.xtb
@@ -79,7 +79,6 @@
 
           Фактор промена мора да буде 100% или више.</translation>
 <translation id="131353325527891113">Приказивање корисничких имена на екрану за пријављивање</translation>
-<translation id="1325295456374328159">Конфигуришу дозвољене локалитете у корисничкој сесији</translation>
 <translation id="1327466551276625742">Омогући упит за конфигурацију мреже у офлајн режиму</translation>
 <translation id="1330145147221172764">Омогући тастатуру на екрану</translation>
 <translation id="13356285923490863">Назив смерница</translation>
@@ -472,9 +471,6 @@
 <translation id="2309390639296060546">Подразумевано подешавање географског лоцирања</translation>
 <translation id="2312134445771258233">Омогућава вам да конфигуришете странице које се учитавају при покретању. Садржај листе „URL адресе које треба отворити при покретању“ се занемарује, осим ако не изаберете „Отвори листу URL адреса“ у оквиру ставке „Радња при покретању“.</translation>
 <translation id="2327252517317514801">Дефинишу домене којима је дозвољено да приступају G Suite-у</translation>
-<translation id="2337466621458842053">Омогућава вам да подесите листу образаца URL адреса који наводе сајтове којима је дозвољено да приказују слике.
-
-          Ако ове смернице нису подешене, за све сајтове ће се користити глобална подразумевана вредност из смерница „DefaultImagesSetting“, уколико су оне подешене, а ако нису, из личне конфигурације корисника.</translation>
 <translation id="2372547058085956601">Време до аутоматског пријављивања у јавну сесију.
 
       Ако смернице |DeviceLocalAccountAutoLoginId| нису подешене, ове смернице немају никаквог утицаја. У супротном:
@@ -1239,9 +1235,6 @@
       Ако омогућите или онемогућите ово подешавање, корисници не могу да промене или замене ово подешавање у <ph name="PRODUCT_NAME" />-у.
 
       Ако ове смернице не буду подешене, ово ће бити омогућено, али корисник ће моћи то да промени.</translation>
-<translation id="4525521128313814366">Омогућава вам да подесите листу образаца URL адреса који наводе сајтове којима није дозвољено да приказују слике.
-
-          Ако ове смернице нису подешене, за све сајтове ће се користити глобална подразумевана вредност из смерница „DefaultImagesSetting“, уколико су оне подешене, а ако нису, из личне конфигурације корисника.</translation>
 <translation id="4531706050939927436">Android апликације могу принудно да се инсталирају на конзоли Google Admin преко Google Play-а. Оне не користе ове смернице.</translation>
 <translation id="4534500438517478692">Назив Android ограничења:</translation>
 <translation id="4541530620466526913">Локални налози на уређају</translation>
@@ -1539,9 +1532,6 @@
 <translation id="5457065417344056871">Омогући режим госта у прегледачу</translation>
 <translation id="5457924070961220141">Омогућава вам да конфигуришете подразумевани HTML приказивач када је <ph name="PRODUCT_FRAME_NAME" /> инсталиран.
           Подразумевано подешавање када ове смернице нису подешене је да се прегледачу хоста дозволи приказивање, али можете опционално да ово замените и да <ph name="PRODUCT_FRAME_NAME" /> подразумевано приказује HTML странице.</translation>
-<translation id="5459155981813668716">Конфигуришу локалитете на којима <ph name="PRODUCT_OS_NAME" /> може да се приказује.
-
-      Ако подесите ове смернице, корисник може да конфигурише <ph name="PRODUCT_OS_NAME" /> само тако да се приказује на једном од локалитета који наводе ове смернице. Ако не подесите ове смернице или их подесите на празну листу, <ph name="PRODUCT_OS_NAME" /> може да се приказује на свим подржаним локалитетима. Ако подесите ове смернице на листу са неважећим вредностима, све неважеће вредности се игноришу. Ако је корисник претходно конфигурисао <ph name="PRODUCT_OS_NAME" /> тако да се приказује на језику који ове смернице не дозвољавају, локалитет приказа ће бити промењен у дозвољени локалитет када се корисник следећи пут пријави. Ако је корисник конфигурисао жељене локалитете и ако ове смернице дозвољавају један од њих, <ph name="PRODUCT_OS_NAME" /> се пребацује на тај локалитет. У супротном, <ph name="PRODUCT_OS_NAME" /> се пребацује на прву важећу вредност коју наводе ове смернице или на резервни локалитет (тренутно је то en-US) ако ове смернице садрже само неважеће локалитете.</translation>
 <translation id="5464816904705580310">Конфигуришите подешавања за кориснике којима се управља.</translation>
 <translation id="546726650689747237">Време до затамњивања екрана када је уређај прикључен на струју</translation>
 <translation id="5469825884154817306">Блокирај слике на овим сајтовима</translation>
@@ -2326,9 +2316,6 @@
 
       Ове смернице могу да се подесе само као препоручене. Можете да их користите да бисте преместили скуп препоручених локалитета на врх, али корисницима је увек дозвољено да за сесију изаберу било који локалитет који <ph name="PRODUCT_OS_NAME" /> подржава.
       </translation>
-<translation id="7763311235717725977">Омогућава вам да подесите да ли је сајтовима дозвољено да приказују слике. Приказивање слика може да буде дозвољено или забрањено за све веб-сајтове.
-
-          Ако ове смернице нису подешене, користиће се смернице „AllowImages“ и корисник ће моћи то да промени.</translation>
 <translation id="7763479091692861127"> Типови веза који могу да се користе за ажурирања ОС-а. Ажурирања ОС-а могу потенцијално да оптерете везу због величине и изазову додатне трошкове. У складу са тим, она подразумевано нису омогућена за типове веза који се сматрају скупим, а који тренутно обухватају WiMax, Bluetooth и мобилне мреже.
 
       Идентификатори препознатих типова веза су „ethernet“, „wifi“, „wimax“, „bluetooth“ и „cellular“.</translation>
diff --git a/components/policy/resources/policy_templates_sv.xtb b/components/policy/resources/policy_templates_sv.xtb
index 6783dc9..8e79ae0 100644
--- a/components/policy/resources/policy_templates_sv.xtb
+++ b/components/policy/resources/policy_templates_sv.xtb
@@ -79,7 +79,6 @@
 
           Skalningsfaktorn måste vara 100 % eller mer.</translation>
 <translation id="131353325527891113">Visa användarnamn på inloggningsskärmen</translation>
-<translation id="1325295456374328159">Konfigurera de tillåtna språkkoderna i en användarsession</translation>
 <translation id="1327466551276625742">Aktivera uppmaning att konfigurera nätverk om enheten är offline</translation>
 <translation id="1330145147221172764">Aktivera skärmtangentbordet</translation>
 <translation id="13356285923490863">Policynamn</translation>
@@ -474,9 +473,6 @@
 
       Innehållet på listan "Webbadresser att öppna vid start" ignoreras om du inte väljer "Öppna följande sidor" i "Vid start".</translation>
 <translation id="2327252517317514801">Ange vilka domäner som ska ha tillgång till G Suite</translation>
-<translation id="2337466621458842053">Policyn gör att du kan ställa in en lista med adressmönster som anger webbplatser som får visa bilder.
-
-          Om den här policyn inte ställs in används det globala standardvärdet för alla webbplatser, antingen från policyn DefaultImagesSetting om den är inställd, eller från användarens personliga konfiguration om den inte är det.</translation>
 <translation id="2372547058085956601">Fördröjningen av den automatiska inloggningen till en offentlig session.
 
       Om policyn |DeviceLocalAccountAutoLoginId| inte har angetts har inte policyn någon effekt. I annat fall:
@@ -1247,9 +1243,6 @@
       Om du aktiverar eller inaktiverar inställningen kan användarna inte ändra eller åsidosätta inställningen i <ph name="PRODUCT_NAME" />.
 
       Om policyn inte anges är inställningen aktiverad men kan ändras av användaren.</translation>
-<translation id="4525521128313814366">Policyn gör att du kan ställa in en lista med adressmönster som anger webbplatser som får visa bilder.
-
-          Om den här policyn inte ställs in används det globala standardvärdet för alla webbplatser, antingen från policyn DefaultImagesSetting om den är inställd, eller från användarens personliga konfiguration om den inte är det.</translation>
 <translation id="4531706050939927436">Android-appar kan tvångsinstalleras via Googles Administratörskonsol med Google Play. Den här principen gäller inte för dem.</translation>
 <translation id="4534500438517478692">Namn på Android-begränsning:</translation>
 <translation id="4541530620466526913">Lokala konton på enheten</translation>
@@ -1549,9 +1542,6 @@
 <translation id="5457065417344056871">Använda gästläget i webbläsaren</translation>
 <translation id="5457924070961220141">Policyn gör att du kan konfigurera standardrenderare för HTML när <ph name="PRODUCT_FRAME_NAME" /> installeras.
           Standardinställningen som används om policyn inte ställs in är att tillåta att värdwebbläsaren utför renderingen, men du kan åsidosätta detta och låta <ph name="PRODUCT_FRAME_NAME" /> rendera HTML-sidor som standard.</translation>
-<translation id="5459155981813668716">Konfigurerar de språkkoder som <ph name="PRODUCT_OS_NAME" /> kan visas i.
-
-      Om principen används kan användare endast ställa in <ph name="PRODUCT_OS_NAME" /> på att visas i någon av de språkkoder som anges i denna princip. Om principen inte används eller om en tom lista anges för principen kan <ph name="PRODUCT_OS_NAME" /> visas i alla språkkoder som stöds. Om en lista med ogiltiga värden anges för principen ignoreras alla värden. Om en användare tidigare har ställt in <ph name="PRODUCT_OS_NAME" /> på att visas i en språkkod som inte tillåts i denna princip byts den visade språkkoden ut mot en tillåten språkkoden nästa gång användaren loggar in. Om användaren har konfigurerat föredragna språkkoder och en av de föredragna språkkoderna tillåts i denna princip ändras <ph name="PRODUCT_OS_NAME" /> till denna språkkod. I annat fall ändras <ph name="PRODUCT_OS_NAME" /> till det första giltiga värdet i denna princip eller till en alternativ språkkod (för närvarande en-US) om principen endast innehåller ogiltiga värden.</translation>
 <translation id="5464816904705580310">Konfigurera inställningar för hanterade användare.</translation>
 <translation id="546726650689747237">Skärmdämpningstid när enheten är ansluten till elnätet</translation>
 <translation id="5469825884154817306">Blockera bilder på dessa webbplatser</translation>
@@ -2343,9 +2333,6 @@
 
       Den här principen kan endast ställas in som rekommenderad. Du kan använda principen för att flytta flera rekommenderade språkkoder högst upp, men användare kan alltid välja en språkkod som stöds av <ph name="PRODUCT_OS_NAME" /> för sessionen.
       </translation>
-<translation id="7763311235717725977">Policyn gör att du kan ställa in om webbplatser får visa bilder. Bildvisning kan tillåtas för alla webbplatser eller nekas för alla webbplatser.
-
-          Om du inte ställer in policyn används AllowImages och inställningen kan ändras av användaren.</translation>
 <translation id="7763479091692861127"> De typer av anslutningar som är tillåtna att använda uppdateringar av operativsystem. Uppdateringar av operativsystem belastar anslutningen hårt på grund av dess storlek och kan medföra extra kostnader. Därför är de inte aktiverade som standard för anslutningstyper som anses vara dyra. Det gäller bland annat WiMax, Bluetooth och Cellular.
 
       Identifierarna för giltiga anslutningstyper är ”ethernet”, ”wifi”, ”wimax”, ”bluetooth” och ”cellular”.</translation>
diff --git a/components/policy/resources/policy_templates_sw.xtb b/components/policy/resources/policy_templates_sw.xtb
index 93645e9..72a09cbda 100644
--- a/components/policy/resources/policy_templates_sw.xtb
+++ b/components/policy/resources/policy_templates_sw.xtb
@@ -78,7 +78,6 @@
 
 Mfumo wa kipimo lazima uwe 100% au zaidi.</translation>
 <translation id="131353325527891113">Onyesha majina ya watumiaji kwenye skrini ya kuingia</translation>
-<translation id="1325295456374328159">Weka mipangilio ya lugha zinazoruhusiwa katika kipindi cha mtumiaji</translation>
 <translation id="1327466551276625742">Washa ombi la usanidi wa mtandao inapokuwa nje ya mtandao</translation>
 <translation id="1330145147221172764">Washa kibodi ya skrini</translation>
 <translation id="13356285923490863">Jina la Sera</translation>
@@ -458,9 +457,6 @@
 
       Maudhui ya orodha ya  'URL za kufungua mwanzoni' zinapuuzwa isipokuwa uchague 'Fungua orodha ya URL katika 'Kitendo cha mwanzo'.</translation>
 <translation id="2327252517317514801">Bainisha vikoa vinavyoruhusiwa kufikia G Suite</translation>
-<translation id="2337466621458842053">Inakuruhusu kuweka orodha ya ruwaza za url zinazobainisha tovuti zinazoruhusiwa kuonyesha picha.
-
-         Ikiwa sera hii itaachwa bila thamani chaguo msingi yote itatumiwa kwa tovuti zote kutoka kwenye sera ya 'DefaultImageSetting' ikiwa imewekwa, au vinginevyo usanidi binafsi wa mtumiaji.</translation>
 <translation id="2372547058085956601">Ucheleweshwaji wa kuingia kiotomatiki katika kipindi cha umma.
 
       Sera ya |DeviceLocalAccountAutoLoginId| ikiondolewa, sera hii haina athari. Vinginevyo:
@@ -1223,9 +1219,6 @@
       Ukiwasha au kufunga mpangilio huu, watumiaji hawawezi kubadilisha au kufuta mpangilio huu katika <ph name="PRODUCT_NAME" />.
 
       Ikiwa sera hii itaachwa bila kuwekwa, hii itawezeshwa lakini mtumiaji ataweza kuibadilisha.</translation>
-<translation id="4525521128313814366">Inakuruhusu kuweka orodha ya ruwaza za url ambazo zinabainisha tovuti ambazo haziruhusiwi kuonyesha picha.
-
-          Ikiwa sera hii itasalia kama haijawekwa thamani chaguo msingi ya ulimwenguni itatumiwa aidha kutoka kwenye sera ya 'DefaultImagesSetting' ikiwa imewekwa, au vinginevyo usanidi binafsi wa mtumiaji.</translation>
 <translation id="4531706050939927436">Programu za Android zinaweza kusakinishwa kwa lazima kutoka kwenye Google Admin console kwa kutumia Google Play. Hazitumii sera hii.</translation>
 <translation id="4534500438517478692">Jina la vikwazo la Android:</translation>
 <translation id="4541530620466526913">Akaunti za kifaa cha karibu nawe</translation>
@@ -1520,9 +1513,6 @@
 <translation id="5457065417344056871">Washa matumizi ya wageni katika kivinjari</translation>
 <translation id="5457924070961220141">Inakuruhusu kusanidi kitoaji cha HTML chaguo msingi wakati <ph name="PRODUCT_FRAME_NAME" /> imesakinishwa.
           Mpangilio chaguo msingi unaotumiwa wakati sera hii inasalia kama haijawekwa ni kuruhusu kivinjari kipangishaji kutekeleza uonyeshaji, lakini unaweza kufuta kwa hiari hii na uwe na kurasa za kionyeshi <ph name="PRODUCT_FRAME_NAME" /> cha HTML kwa chaguo msingi.</translation>
-<translation id="5459155981813668716">Huweka mipangilio ya lugha ambayo <ph name="PRODUCT_OS_NAME" /> inaweza kutumiwa nayo. 
-
-      Sera hii ikiwekwa, mtumiaji anaweza kuweka mipangilio ya <ph name="PRODUCT_OS_NAME" /> ili itumike katika lugha zinazobainishwa na sera hii. Sera hii isipowekwa au ikiwekwa kwenye orodha tupu, <ph name="PRODUCT_OS_NAME" /> inaweza kutumika katika lugha zote zinazotumiwa. Sera ikiwekwa kuwa orodha yenye thamani zisizo sahihi, thamani zote zisizo sahihi hazitatumiwa. Kama mtumiaji alikuwa ameweka mipangilio ya <ph name="PRODUCT_OS_NAME" /> hapo awali kutumika katika lugha ambayo hairuhusiwi na sera hii, lugha inayotumiwa itabadilishwa iwe lugha inayoruhusiwa wakati unaofuata mtumiaji atakapoingia katika akaunti. Ikiwa mtumiaji alikuwa ameweka lugha anazopendelea na mojawapo ya lugha alizopendelea inaruhusiwa na sera hii, <ph name="PRODUCT_OS_NAME" /> itabadili itumie lugha hii. Vinginevyo, <ph name="PRODUCT_OS_NAME" /> itabadili itumie thamani sahihi ya kwanza inayobainishwa au lugha ya mfumo (kwa sasa ni Kiingereza cha Marekani), kama sera hii ina ingizo zisizo sahihi pekee.</translation>
 <translation id="5464816904705580310">Sanidi mipangilio ya watumiaji waliodhibitiwa.</translation>
 <translation id="546726650689747237">Ufifili wa skrini unachelewesha wakati wa kuendesha kwa nishati ya AC</translation>
 <translation id="5469825884154817306">Zuia picha katika tovuti hizi</translation>
@@ -2305,9 +2295,6 @@
 
       Sera hii inaweza tu kuwekwa kama ilivyopendekezwa. Unaweza kutumia sera hii kuhamisha seti ya lugha zilizopendekezwa hadi upande wa juu lakini watumiaji wanaruhusiwa kuchagua lugha inayotumika kwenye <ph name="PRODUCT_OS_NAME" /> kwa kipindi chao wakati wowote.
       </translation>
-<translation id="7763311235717725977">Inakuruhusu kuweka iwapo tovuti zinaruhusiwa kuonyesha picha. Kuonyesha picha kunaweza kuwa kwa tovuti zote au kukataliwa kwa tovuti zote.
-
-          Ikiwa sera hii itasalia kama haijawekwa, 'AllowImages' zitatumiwa na mtumiaji ataweza kuibadilisha.</translation>
 <translation id="7763479091692861127"> Aina za miunganisho zinazoruhusiwa kutumia sasisho za Mfumo wa Uendeshaji. Sasisho za Mfumo wa Uendeshaji zinaweza kuweka vichujo vizito kwenye muunganisho kwa sababu ya ukubwa wavyo na huenda vikasababisha gharama ya ziada. Kwa hivyo, haviwashwi kwa chaguo msingi kwa aina za miunganisho zinazoonekana kuwa ghali, zinazojumuisha WiMax, Bluetooth na Simu ya Mkononi kwa wakati huu.
 
       Vitambulisho vinavyotambuliwa vya aina vya muunganisho ni "ethaneti", "wifi", "wimax", "bluetooth"  na "simu ya mkononi".</translation>
diff --git a/components/policy/resources/policy_templates_ta.xtb b/components/policy/resources/policy_templates_ta.xtb
index 6dddeae..e9f3ae5e 100644
--- a/components/policy/resources/policy_templates_ta.xtb
+++ b/components/policy/resources/policy_templates_ta.xtb
@@ -74,7 +74,6 @@
 
           அளவு காரணி 100% அல்லது அதற்கு அதிகமாக இருக்க வேண்டும்.</translation>
 <translation id="131353325527891113">உள்நுழைவு திரையில் பயனர்பெயர்களைக் காண்பி</translation>
-<translation id="1325295456374328159">பயனர் அமர்வில் அனுமதிக்கப்படும் மொழிகளை உள்ளமைக்கவும்</translation>
 <translation id="1327466551276625742">ஆஃப்லைனில் இருக்கும்போது பிணைய உள்ளமைவுத் தூண்டலை இயக்கு</translation>
 <translation id="1330145147221172764">திரை விசைப்பலகை இயக்கு</translation>
 <translation id="13356285923490863">கொள்கைப் பெயர்</translation>
@@ -440,7 +439,6 @@
 
       'தொடக்கத்தின்போதான செயல்' என்பதில் 'URLகளின் பட்டியலைத் திற' என்பதை நீங்கள் தேர்ந்தெடுக்காவிடால், 'தொடக்கத்தின்போது திறக்க வேண்டிய URLகள்' பட்டியலில் உள்ள உள்ளடக்கம் புறக்கணிக்கப்படும்.</translation>
 <translation id="2327252517317514801">G Suiteஐ அணுகுவதற்கு அனுமதிக்கப்படும் டொமைன்களைக் குறிப்பிடவும்</translation>
-<translation id="2337466621458842053">படங்களைக் காட்சிப்படுத்த அனுமதிக்கப்படும் தளங்களைக் குறிப்பிட URL அமைப்புகளின் பட்டியலை நீங்கள் அமைக்க அனுமதிக்கிறது. இந்தக் கொள்கை அமைக்கப்படாமல் இருந்தால், 'DefaultImagesSetting' கொள்கை அமைக்கப்பட்டு இருந்தால் அல்லது பயனரின் தனிப்பட்ட உள்ளமைப்புகளில் இருந்து ஒட்டுமொத்த இயல்புநிலை மதிப்பானது எல்லா தளங்களுக்கும் பயன்படுத்தப்படும்.</translation>
 <translation id="2372547058085956601">பொது அமர்வின் தானியங்கு-உள்நுழைவு தாமதம்.
 
       |DeviceLocalAccountAutoLoginId| கொள்கை அமைக்கப்படவில்லை எனில், இந்தக் கொள்கை எந்த விளைவையும் ஏற்படுத்தாது. இல்லையெனில்:
@@ -1179,7 +1177,6 @@
       நீங்கள் இந்த அமைப்பை இயக்கினால் அல்லது முடக்கினால், பயனர்கள் இந்த அமைப்பை <ph name="PRODUCT_NAME" /> இல் மாற்றவோ அல்லது மேலெழுதவோ முடியாது.
 
       இந்தக் கொள்கையை அமைக்காமல் விட்டால், இந்த அமைப்பு இயக்கப்படும். ஆனால் பயனர் அதை மாற்ற முடியும்.</translation>
-<translation id="4525521128313814366">படங்களைக் காண்பிக்க அனுமதிக்காத, தளங்களைக் குறிப்பிடும் url வகைகளின் பட்டியலை அமைக்க உங்களை அனுமதிக்கிறது. இந்தக் கொள்கையை அமைக்காமல் விட்டால், ஒட்டுமொத்த இயல்புநிலை மதிப்பானது, 'DefaultImagesSetting' கொள்கையை அமைத்திருந்தால் அதிலிருந்து அல்லது பயனரின் தனிப்பட்ட உள்ளமைவில் இருந்து எல்லா தளங்களுக்கும் பயன்படுத்தப்படும்.</translation>
 <translation id="4531706050939927436">Google Playஐப் பயன்படுத்தும் Google Admin கன்சோலில் இருந்து Android பயன்பாடுகள் கட்டாயமாக நிறுவப்படலாம். அவை இந்தக் கொள்கையைப் பயன்படுத்தாது.</translation>
 <translation id="4534500438517478692">Android கட்டுப்பாட்டுப் பெயர்:</translation>
 <translation id="4541530620466526913">சாதன-அகக் கணக்குகள்</translation>
@@ -1456,9 +1453,6 @@
 <translation id="5447306928176905178">பக்கத்திற்கு (நீக்கப்பட்டது) நினைவகத் தகவலை அறிக்கையிடுவதை (JS ஹீப் அளவு) இயக்கு</translation>
 <translation id="5457065417344056871">உலாவியில் விருந்தினர் பயன்முறையை இயக்கும்</translation>
 <translation id="5457924070961220141"><ph name="PRODUCT_FRAME_NAME" /> நிறுவியிருக்கும்போது, இயல்புநிலை HTML தொகுத்தலை உள்ளமைக்க உங்களை அனுமதிக்கிறது. தொகுத்தலுக்கு ஹோஸ்ட் உலாவியை அனுமதிக்க, இந்தக் கொள்கை அமைக்காமல் விலகியிருக்கும்போது, இயல்புநிலை அமைப்பு பயன்படுத்தப்படுகிறது. ஆனால், நீங்கள் இதை மேலெழுதலாம், இயல்புநிலை மூலம் <ph name="PRODUCT_FRAME_NAME" /> தொகுப்பு HTML பக்கங்களைப் பெறலாம்.</translation>
-<translation id="5459155981813668716"><ph name="PRODUCT_OS_NAME" /> இல் காட்டப்படக்கூடிய மொழிகளை உள்ளமைக்கிறது.
-
-இந்தக் கொள்கை அமைக்கப்பட்டால், பயனரால் இந்தக் கொள்கையில் குறிப்பிடப்படும் மொழிகளில் ஒன்றில் மட்டுமே <ph name="PRODUCT_OS_NAME" />ஐக் காட்டும்படி உள்ளமைக்க முடியும். இந்தக் கொள்கை அமைக்கப்படவில்லை என்றாலோ அல்லது வெற்றுப் பட்டியலாக அமைக்கப்பட்டாலோ, ஆதரிக்கப்படும் எல்லா மொழிகளிலும் <ph name="PRODUCT_OS_NAME" />ஐக் காட்ட முடியும். இந்தக் கொள்கையானது தவறான மதிப்புகளைக் கொண்ட பட்டியலாக அமைக்கப்பட்டால், எல்லா தவறான மதிப்புகளும் புறக்கணிக்கப்படும். இந்தக் கொள்கை அனுமதிக்காத மொழியில் <ph name="PRODUCT_OS_NAME" />ஐக் காட்டும்படி ஏற்கனவே பயனர் உள்ளமைத்திருந்தால், அடுத்தமுறை பயனர் உள்நுழையும் போது, காட்டப்படும் மொழியானது அனுமதிக்கப்படும் மொழிக்கு மாறும். விருப்ப மொழிகளை பயனர் உள்ளமைத்திருந்து, அந்த விருப்ப மொழிகளில் ஒன்று இந்தக் கொள்கையால் அனுமதிக்கப்பட்டால், அந்த மொழிக்கு <ph name="PRODUCT_OS_NAME" /> மாறும். இல்லையெனில், இந்தக் கொள்கையால் குறிப்பிடப்படும் சரியான முதல் மதிப்பில் <ph name="PRODUCT_OS_NAME" /> காட்டப்படும் அல்லது இந்தக் கொள்கையில் தவறான உள்ளீடுகள் மட்டுமே இருந்தால், இயல்பு மொழியில் (தற்சமயம் en-US) காட்டப்படும்.</translation>
 <translation id="5464816904705580310">நிர்வகிக்கப்படும் பயனர்களுக்கான அமைப்புகளை உள்ளமை.</translation>
 <translation id="546726650689747237">AC சக்தியில் இயங்கும்போது திரை மங்கல் தாமதமாகும்</translation>
 <translation id="5469825884154817306">இந்த தளங்களில் படங்களை தடு</translation>
@@ -2204,7 +2198,6 @@
 
       இந்தக் கொள்கையை பரிந்துரைக்கப்பட்டதாக மட்டுமே அமைக்க முடியும். இந்தக் கொள்கையைப் பயன்படுத்தி பரிந்துரைக்கப்பட்ட மொழிகளின் தொகுப்பை மேல்பகுதிக்கு நகர்த்தலாம் ஆனால் பயனர்கள் தங்கள் அமர்வுக்கு <ph name="PRODUCT_OS_NAME" /> ஆதரிக்கும் எந்த மொழியையும் தேர்வுசெய்ய எப்போதும் அனுமதிக்கப்படுவார்கள்.
       </translation>
-<translation id="7763311235717725977">வலைத்தளங்கள் படங்களை காண்பிக்க அனுமதிக்கப்படலாமா என்பதை அமைத்திட உங்களை அனுமதிக்கிறது. படங்களை காண்பித்தல், எல்லா வலைத்தளங்களுக்கும் அனுமதிக்கப்படலாம் அல்லது எல்லா வலைத்தளங்களுக்கும் தடுக்கப்படலாம். இந்தக் கொள்கை அமைக்கப்படாமல் இருந்தால், 'AllowImages' என்பது பயன்படுத்தப்படும் மேலும் பயனர் அதை மாற்ற முடியும்.</translation>
 <translation id="7763479091692861127"> OS புதுப்பிப்புகளுக்குப் பயன்படுத்த அனுமதிக்கப்பட்ட இணைப்புகளின் வகைகளாகும்.  OS புதுப்பிப்புகள் தனது அளவின் காரணமாக அதிக சுமையை இணைப்புகளின் மேல் ஏற்படுத்தும், மேலும் கூடுதல் கட்டணங்களையும் ஏற்படுத்தும். இதனால், விலை அதிகமான இணைப்பு வகைகளாகக் கருதப்படும் WiMax, Bluetooth மற்றும் Cellular உள்ளிட்ட இணைப்பு வகைகளுக்கு இயல்புநிலையில் இயக்கப்படாது.
 
       "ethernet", "wifi", "wimax", "bluetooth" மற்றும் "cellular" ஆகியவை அங்கீகரிக்கப்பட்ட இணைப்பு வகை அடையாளங்காட்டிகளாகும்.</translation>
diff --git a/components/policy/resources/policy_templates_te.xtb b/components/policy/resources/policy_templates_te.xtb
index f3b7fb3..11ea41f 100644
--- a/components/policy/resources/policy_templates_te.xtb
+++ b/components/policy/resources/policy_templates_te.xtb
@@ -84,7 +84,6 @@
 
           లెక్కింపు కారకం తప్పనిసరిగా 100% లేదా అంతకంటే ఎక్కువగా ఉండాలి.</translation>
 <translation id="131353325527891113">లాగిన్ స్క్రీన్‌లో వినియోగదారు పేర్లను చూపు</translation>
-<translation id="1325295456374328159">వినియోగదారు సెషన్‌లో అనుమతించాల్సిన లొకేల్‌లను కాన్ఫిగర్ చేయండి</translation>
 <translation id="1327466551276625742">ఆఫ్‌లైన్‌లో ఉన్నప్పుడు నెట్‌వర్క్ కాన్ఫిగరేషన్ ప్రాంప్ట్‌ను ప్రారంభించండి</translation>
 <translation id="1330145147221172764">స్క్రీన్‌లో కీబోర్డ్‌ను ప్రారంభించండి</translation>
 <translation id="13356285923490863">విధానం పేరు</translation>
@@ -528,7 +527,6 @@
 
 ' లో 'URLల జాబితాని తెరువు' ఎంచుకునే వరకు 'స్టార్ట్‌అప్‌లో తెరవడానికి URLల' యొక్క కంటెంట్ జాబితా విస్మించబడుతుంది.</translation>
 <translation id="2327252517317514801">G Suite యాక్సెస్ చేయడానికి అనుమతించే డొమైన్‌లను నిర్వచించండి</translation>
-<translation id="2337466621458842053">చిత్రాలను ప్రదర్శించడానికి అనుమతించబడే సైట్‌లను పేర్కొనే url నమూనాల జాబితాను సెట్ చేయడానికి మిమ్మల్ని అనుమతిస్తుంది. ఈ విధానాన్ని సెట్ చేయకుండా వదిలిపెడితే, సెట్ చేయబడి ఉంటే 'DefaultImagesSetting' విధానం నుండి అన్ని సైట్‌లకు సార్వజనీన డిఫాల్ట్ విలువ లేదా వినియోగదారు వ్యక్తిగత కాన్ఫిగరేషన్ నుండి ఉపయోగించబడుతుంది.</translation>
 <translation id="2372547058085956601">పబ్లిక్ సెషన్ స్వీయ లాగిన్ ఆలస్యం.
 
       |DeviceLocalAccountAutoLoginId| విధానాన్ని సెట్ చేయకపోతే, ఈ విధానం ప్రభావాన్ని కలిగి ఉండదు. అయితే:
@@ -1363,7 +1361,6 @@
       మీరు ఈ సెట్టింగ్‌ను ప్రారంభించినా లేదా నిలిపివేసినా, ఈ సెట్టింగ్‌ను <ph name="PRODUCT_NAME" />లో వినియోగదారులు మార్చలేరు లేదా భర్తీ చేయలేరు.
 
       ఈ విధానాన్ని సెట్ చేయకుండా వదిలేస్తే, ఇది ప్రారంభించబడుతుంది కానీ వినియోగదారు దీన్ని మార్చగలరు.</translation>
-<translation id="4525521128313814366">చిత్రాలను ప్రదర్శించడానికి అనుమతించని సైట్‌లను పేర్కొనే url నమూనాల జాబితాను సెట్ చేయడానికి మిమ్మల్ని అనుమతిస్తుంది. ఈ విధానం సెట్ చేయకుండా వదిలి పెడితే అన్ని సైట్‌లకు సార్వజనీన డిఫాల్ట్ విలువ ఇది సెట్ చేయబడి ఉంటే 'DefaultImagesSetting' విధానం నుండి లేదా  చేయబడకపోతే వినియోగదారు వ్యక్తిగత కాన్ఫిగరేషన్ నుండి ఉపయోగించబడుతుంది.</translation>
 <translation id="4531706050939927436">Android అనువర్తనాలు Google Playని ఉపయోగించి Google నిర్వాహక కన్సోల్ నుండి నిర్బంధంగా ఇన్‌స్టాల్ చేయబడతాయి. అవి ఈ విధానాన్ని ఉపయోగించవు.</translation>
 <translation id="4534500438517478692">Android నియంత్రణ పేరు:</translation>
 <translation id="4541530620466526913">పరికర-స్థానిక ఖాతాలు</translation>
@@ -1681,9 +1678,6 @@
 <translation id="5447306928176905178">మెమరీ సమాచారాన్ని (JS అత్యధిక పరిమాణం) పేజీకి నివేదించడాన్ని ప్రారంభించండి (నిలిపివేయబడింది)</translation>
 <translation id="5457065417344056871">బ్రౌజర్‌లో అతిథి మోడ్‌ను ప్రారంభిస్తుంది</translation>
 <translation id="5457924070961220141"><ph name="PRODUCT_FRAME_NAME" /> ఇన్‌స్టాల్ చేసినప్పుడు, అమలు అయ్యే డిఫాల్ట్ HTMLను కాన్ఫిగర్ చేయడానికి మిమ్మల్ని అనుమతిస్తుంది. ఈ విధానం హోస్ట్ బ్రౌజర్ బట్వాడా చేయడానికి అనుమతించేలా సెట్ చేయకుండా వదలివేస్తే డిఫాల్ట్ సెట్టింగ్ ఉపయోగించబడుతుంది, కానీ మీరు దీన్ని ఐచ్ఛికంగా భర్తీచేయవచ్చు మరియు <ph name="PRODUCT_FRAME_NAME" /> HTML పేజీలను డిఫాల్ట్‌గా అమలు చేస్తుంది.</translation>
-<translation id="5459155981813668716"><ph name="PRODUCT_OS_NAME" /> ప్రదర్శితమయ్యే లొకేల్‌లను కాన్ఫిగర్ చేస్తుంది.
-
-      ఈ విధానాన్ని సెట్ చేస్తే, వినియోగదారు <ph name="PRODUCT_OS_NAME" />ని ఈ విధానంలో పేర్కొన్న లొకేల్‌లలో ఒకదానిలో మాత్రమే ప్రదర్శితమయ్యేలా కాన్ఫిగర్ చేయగలరు. ఒకవేళ ఈ విధానాన్ని సెట్ చేయకపోతే లేదా ఖాళీ జాబితాకు సెట్ చేస్తే, అన్ని మద్దతు గల లొకేల్‌లలో <ph name="PRODUCT_OS_NAME" />ని ప్రదర్శించవచ్చు. ఈ విధానాన్ని చెల్లని విలువలు కలిగిన జాబితాకు సెట్ చేస్తే, చెల్లని విలువలన్నీ విస్మరించబడతాయి. ఒకవేళ వినియోగదారు మునుపు ఈ విధానంలో అనుమతించని భాషలో <ph name="PRODUCT_OS_NAME" /> ప్రదర్శితమయ్యేలా కాన్ఫిగర్ చేసి ఉంటే, వినియోగదారు సైన్ చేసే తర్వాతిసారి, ప్రదర్శన లొకేల్ అన్నది అనుమతించబడే లొకేల్‌కు మార్చబడుతుంది. ఒకవేళ వినియోగదారు ప్రాధాన్య లొకేల్‌లను కాన్ఫిగర్ చేసుకుని ఉంటే మరియు ఆ ప్రాధాన్య లొకేల్‌లలో ఏదైనా ఈ విధానంలో అనుమతించినది అయితే, <ph name="PRODUCT_OS_NAME" /> ఆ లొకేల్‌కు మార్చబడుతుంది. లేదంటే, <ph name="PRODUCT_OS_NAME" /> ఈ విధానం ప్రకారం పేర్కొన్న మొదటి చెల్లుబాటు విలువకు మార్చబడుతుంది లేదా ఈ విధానం కేవలం చెల్లని నమోదులను మాత్రమే కలిగి ఉండేట్లయితే, ఫాల్‌బ్యాక్ లొకేల్ (ప్రస్తుతం en-US)కు మార్చబడుతుంది.</translation>
 <translation id="5464816904705580310">నిర్వహించబడే వినియోగదారుల కోసం సెట్టింగ్‌లను కాన్ఫిగర్ చేయండి.</translation>
 <translation id="546726650689747237">AC శక్తితో అమలవుతున్నప్పుడు స్క్రీన్‌ మసక ఆలస్యం</translation>
 <translation id="5469825884154817306">ఈ సైట్‌లలో చిత్రాలని బ్లాక్ చెయ్యి</translation>
@@ -2514,7 +2508,6 @@
 
       ఈ విధానాన్ని సిఫార్సు చేస్తున్నట్లుగా మాత్రమే సెట్ చేయవచ్చు. మీరు సిఫార్సు చేసే లొకేల్‌ల సెట్‌ను ఎగువకు తరలించడానికి ఈ విధానాన్ని ఉపయోగించవచ్చు, కానీ వినియోగదారులు ఎల్లప్పుడూ వారి సెషన్ కోసం <ph name="PRODUCT_OS_NAME" /> మద్దతు ఉన్న ఏ లొకేల్‌ను ఎంచుకోవడానికి అయినా అనుమతించబడతారు.
       </translation>
-<translation id="7763311235717725977">వెబ్‌సైట్‌లు చిత్రాలను ప్రదర్శించడానికి అనుమతించాలో, లేదో సెట్ చేయడానికి మిమ్మల్ని అనుమతిస్తుంది. చిత్రాలను ప్రదర్శించడం అనేది అన్ని వెబ్‌సైట్‌ల కోసం అనుమతించవచ్చు లేదా నిరాకరించవచ్చు. ఈ విధానాన్న సెట్ చేయకుండా వదిలివేస్తే, 'AllowImages' ఉపయోగించబడుతుంది మరియు వినియోగదారు దీన్ని మార్చగలుగుతారు.</translation>
 <translation id="7763479091692861127"> OS నవీకరణల కోసం ఉపయోగించడానికి అనుమతించబడిన కనెక్షన్‌ల రకాలు. OS నవీకరణలు వాటి పరిమాణం కారణంగా కనెక్షన్‌‌పై సంభావ్యంగా తీవ్ర ఒత్తిడిని ఉంచుతాయి మరియు అదనపు ఖర్చు కావచ్చు. అందువలన, ప్రస్తుతం ఇవి డిఫాల్ట్‌గా WiMax, Bluetooth మరియు Cellular వంటి ఖరీదైనవిగా భావించే కనెక్షన్‌ల రకాల కోసం ప్రారంభించబడదు.
 
       "ethernet", "wifi", "wimax", "bluetooth" మరియు "cellular" గుర్తింపు పొందిన కనెక్షన్ రకం ఐడెంటిఫైయర్‌‌లు.</translation>
diff --git a/components/policy/resources/policy_templates_th.xtb b/components/policy/resources/policy_templates_th.xtb
index 7e3d33a..f13639b5 100644
--- a/components/policy/resources/policy_templates_th.xtb
+++ b/components/policy/resources/policy_templates_th.xtb
@@ -79,7 +79,6 @@
 
           แฟกเตอร์การปรับระดับต้องเป็น 100% หรือมากกว่า</translation>
 <translation id="131353325527891113">แสดงชื่อผู้ใช้บนหน้าจอการลงชื่อเข้าใช้</translation>
-<translation id="1325295456374328159">กำหนดค่าภาษาที่อนุญาตในเซสชันของผู้ใช้</translation>
 <translation id="1327466551276625742">เปิดใช้พรอมต์การกำหนดค่าเครือข่ายเมื่อออฟไลน์</translation>
 <translation id="1330145147221172764">เปิดใช้แป้นพิมพ์บนหน้าจอ</translation>
 <translation id="13356285923490863">ชื่อนโยบาย</translation>
@@ -456,7 +455,6 @@
 <translation id="2309390639296060546">การตั้งค่าตำแหน่งทางภูมิศาสตร์เริ่มต้น</translation>
 <translation id="2312134445771258233">ช่วยให้คุณกำหนดค่าหน้าเว็บที่จะโหลดเมื่อเริ่มต้นใช้งาน เนื้อหาของรายการ "URL ที่จะเปิดเมื่อเริ่มต้นใช้งาน" จะถูกข้ามไปจนกว่าคุณจะเลือก "เปิดรายการ URL" ใน "การดำเนินการเมื่อเริ่มต้นใช้งาน"</translation>
 <translation id="2327252517317514801">กำหนดโดเมนที่อนุญาตให้เข้าถึง G Suite</translation>
-<translation id="2337466621458842053">ช่วยให้คุณกำหนดรายการของรูปแบบ URL ที่ระบุไซต์ที่ได้รับอนุญาตให้แสดงภาพ หากนโยบายนี้ไม่ได้ตั้งค่าไว้ จะใช้ค่าเริ่มต้นทั่วไปสำหรับไซต์ทั้งหมด ทั้งจากนโยบาย "DefaultImagesSetting" หากมีการตั้งค่าไว้ หรือจากการกำหนดค่าส่วนบุคคลของผู้ใช้เอง</translation>
 <translation id="2372547058085956601">การลงชื่อเข้าใช้อัตโนมัติสู่เซสชันสาธารณะล่าช้า
 
       หากไม่มีการตั้งค่านโยบาย |DeviceLocalAccountAutoLoginId| นโยบายนี้จะไม่มีผลใดๆ ในทางกลับกัน
@@ -1184,7 +1182,6 @@
       หากคุณเปิดหรือปิดใช้งานการตั้งค่านี้ ผู้ใช้จะไม่สามารถเปลี่ยนหรือแทนที่การตั้งค่านี้ได้ใน <ph name="PRODUCT_NAME" />
 
       หากนโยบายนี้ไม่มีการตั้งค่าไว้ จะมีการเปิดใช้งานแต่ผู้ใช้สามารถจะเปลี่ยนแปลงได้</translation>
-<translation id="4525521128313814366">ช่วยให้คุณกำหนดรายการของรูปแบบ URL ที่ระบุไซต์ที่ไม่ได้รับอนุญาตให้แสดงภาพ หากนโยบายนี้ไม่ได้ตั้งค่าไว้ จะใช้ค่าเริ่มต้นทั่วไปสำหรับไซต์ทั้งหมด ทั้งจากนโยบาย "DefaultImagesSetting" หากมีการตั้งค่าไว้ หรือจากการกำหนดค่าส่วนบุคคลของผู้ใช้เอง</translation>
 <translation id="4531706050939927436">สามารถบังคับการติดตั้งแอป Android ได้จากคอนโซล Google Admin ผ่าน Google Play แอปดังกล่าวไม่ได้ใช้นโยบายนี้</translation>
 <translation id="4534500438517478692">ชื่อการจำกัด Android:</translation>
 <translation id="4541530620466526913">บัญชีภายในอุปกรณ์</translation>
@@ -1460,9 +1457,6 @@
 <translation id="5447306928176905178">เปิดการรายงานข้อมูลหน่วยความจำ (JS ขนาดใหญ่) บนหน้า (กำหนดให้เลิกใช้แล้ว)</translation>
 <translation id="5457065417344056871">เปิดใช้โหมดผู้มาเยือนในเบราว์เซอร์</translation>
 <translation id="5457924070961220141">ช่วยให้คุณสามารถกำหนดค่าตัวแสดงผล HTML เริ่มต้นเมื่อทำการติดตั้ง <ph name="PRODUCT_FRAME_NAME" /> การตั้งค่าเริ่มต้นที่ใช้เมื่อไม่มีการตั้งค่านโยบายนี้คือการอนุญาตให้เบราว์เซอร์ของโฮสต์ทำการแสดงผล แต่คุณสามารถเลือกที่จะแทนที่การตั้งค่านี้และทำให้ <ph name="PRODUCT_FRAME_NAME" /> แสดงหน้า HTML โดยค่าเริ่มต้น</translation>
-<translation id="5459155981813668716">กำหนดค่าภาษาที่ <ph name="PRODUCT_OS_NAME" /> แสดงได้
-
-      หากตั้งค่านโยบายนี้ ผู้ใช้จะสามารถกำหนดค่าให้ <ph name="PRODUCT_OS_NAME" /> แสดงในภาษาที่ระบุไว้ในนโยบายนี้เท่านั้น หากไม่ได้ตั้งค่านโยบายนี้หรือตั้งค่าเป็นรายการว่างเปล่า <ph name="PRODUCT_OS_NAME" /> จะแสดงได้ในทุกภาษาที่รองรับ หากตั้งค่านโยบายเป็นรายการที่มีค่าที่ไม่ถูกต้อง ระบบจะเพิกเฉยต่อค่าที่ไม่ถูกต้องทั้งหมด หากผู้ใช้เคยกำหนดค่า <ph name="PRODUCT_OS_NAME" /> ให้แสดงในภาษาที่นโยบายนี้ไม่อนุญาต ระบบจะเปลี่ยนภาษาที่แสดงเป็นภาษาที่อนุญาตในครั้งถัดไปที่ผู้ใช้ลงชื่อเข้าใช้ หากเคยกำหนดค่าภาษาที่ต้องการและนโยบายอนุญาตภาษาที่ต้องการ <ph name="PRODUCT_OS_NAME" /> จะเปลี่ยนไปใช้ภาษานี้ มิเช่นนั้น <ph name="PRODUCT_OS_NAME" /> จะเปลี่ยนไปใช้ค่าที่ถูกต้องค่าแรกที่นโยบายระบุไว้หรือเปลี่ยนไปใช้ภาษาสำรอง (ซึ่งตอนนี้คือ en-US) หากนโยบายนี้มีแต่รายการที่ไม่ถูกต้อง</translation>
 <translation id="5464816904705580310">กำหนดการตั้งค่าสำหรับผู้ใช้ที่ได้รับการจัดการ</translation>
 <translation id="546726650689747237">ระยะหน่วงเวลาการหรี่แสงหน้าจอเมื่อทำงานโดยใช้ไฟ AC</translation>
 <translation id="5469825884154817306">ปิดกั้นภาพบนไซต์เหล่านี้</translation>
@@ -2221,7 +2215,6 @@
 
       นโยบายนี้สามารถตั้งค่าตามที่แนะนำเท่านั้น คุณสามารถใช้นโยบายนี้ในการย้ายชุดภาษาที่แนะนำไปที่ด้านบนสุด แต่ผู้ใช้จะสามารถเลือกภาษาใดก็ได้ที่ <ph name="PRODUCT_OS_NAME" /> สนับสนุนสำหรับการเข้าชมของตนได้เสมอ
       </translation>
-<translation id="7763311235717725977">ช่วยให้คุณกำหนดได้ว่าเว็บไซต์จะได้รับอนุญาตให้แสดงภาพหรือไม่ โดยสามารถจะอนุญาตให้มีการแสดงภาพสำหรับเว็บไซต์ทั้งหมดหรือปฏิเสธสำหรับเว็บไซต์ทั้งหมดก็ได้ หากนโยบายนี้ไม่มีการตั้งค่าไว้ จะมีการใช้ "AllowImages" และผู้ใช้สามารถจะเปลี่ยนแปลงได้</translation>
 <translation id="7763479091692861127"> ประเภทของการเชื่อมต่อที่ได้รับอนุญาตให้ใช้สำหรับการอัปเดตระบบปฏิบัติการ การอัปเดตระบบปฏิบัติการทำให้การเชื่อมต่อต้องทำงานหนักมากเนื่องจากขนาดของการอัปเดตและอาจทำให้มีค่าใช้จ่ายเพิ่มเติม ดังนั้น การอัปเดตระบบดังกล่าวจะไม่ถูกเปิดใช้โดยค่าเริ่มต้นสำหรับประเภทการเชื่อมต่อที่มีราคาแพง ซึ่งรวมถึง WiMax, บลูทูธ และการเชื่อมต่อมือถือในปัจจุบัน
 
       ตัวระบุประเภทการเชื่อมต่อที่เป็นที่รู้จักกันได้แก่ "อีเทอร์เน็ต", "Wi-Fi", "WiMax", "บลูทูธ" และ "การเชื่อมต่อมือถือ"</translation>
diff --git a/components/policy/resources/policy_templates_tr.xtb b/components/policy/resources/policy_templates_tr.xtb
index 7a676d1..11003c9 100644
--- a/components/policy/resources/policy_templates_tr.xtb
+++ b/components/policy/resources/policy_templates_tr.xtb
@@ -80,7 +80,6 @@
 
           Ölçekleme faktörü %100 veya üzeri olmalıdır.</translation>
 <translation id="131353325527891113">Kullanıcı adlarını giriş ekranında göster</translation>
-<translation id="1325295456374328159">Kullanıcı oturumunda izin verilen yerel ayarları yapılandır</translation>
 <translation id="1327466551276625742">Çevrimdışı iken ağ yapılandırma istemini etkinleştir</translation>
 <translation id="1330145147221172764">Ekran klavyesini etkinleştir</translation>
 <translation id="13356285923490863">Politika Adı</translation>
@@ -470,9 +469,6 @@
 <translation id="2309390639296060546">Varsayılan coğrafi konum ayarı</translation>
 <translation id="2312134445771258233">Başlangıçta yüklenen sayfaları yapılandırmanıza olanak verir. 'Başlangıçtaki işlem' içinde 'URL listesi aç'ı seçmediğiniz sürece 'Başlangıçta açılan URL'ler' listesinin içeriği göz ardı edilir.</translation>
 <translation id="2327252517317514801">G Suite'e erişmesine izin verilen alan adlarını tanımla</translation>
-<translation id="2337466621458842053">Resimleri görüntülemelerine izin verilen sitelerin belirtildiği bir URL kalıpları listesini ayarlamanıza olanak tanır.
-
-          Bu politika ayarlanmadan bırakılırsa, 'DefaultImagesSetting' politikası ayarlandıysa buradaki değer, aksi takdirde kullanıcının kişisel yapılandırması tüm siteler için genel varsayılan değer olarak kullanılır.</translation>
 <translation id="2372547058085956601">Herkese açık oturum otomatik giriş gecikmesi.
 
       |DeviceLocalAccountAutoLoginId| politikası ayarlanmadıysa, bu politikanın etkisi olmaz. Aksi halde:
@@ -1232,9 +1228,6 @@
       Bu ayarı etkinleştirir veya devre dışı bırakırsanız, kullanıcılar <ph name="PRODUCT_NAME" /> uygulamasında bu ayarı değiştiremez veya geçersiz kılamaz.
 
       Bu politika ayarlanmadan bırakılırsa, bu özellik etkinleştirilir ancak kullanıcı tarafından da değiştirilebilir.</translation>
-<translation id="4525521128313814366">Resimleri görüntülemelerine izin verilmeyen sitelerin belirtildiği bir URL kalıpları listesini ayarlamanıza olanak tanır.
-
-          Bu politika ayarlanmadan bırakılırsa, 'DefaultImagesSetting' politikası ayarlandıysa buradaki değer, aksi takdirde kullanıcının kişisel yapılandırması tüm siteler için genel varsayılan değer olarak kullanılır.</translation>
 <translation id="4531706050939927436">Android uygulamaları, Google Play kullanılarak Google Yönetici Konsolu'ndan zorunlu şekilde yüklenebilir. Söz konusu uygulamalar bu politikayı kullanmaz.</translation>
 <translation id="4534500438517478692">Android kısıtlama adı:</translation>
 <translation id="4541530620466526913">Cihaz-yerel hesaplar</translation>
@@ -1530,9 +1523,6 @@
 <translation id="5457065417344056871">Tarayıcıda misafir modunu etkinleştir</translation>
 <translation id="5457924070961220141"><ph name="PRODUCT_FRAME_NAME" /> yüklendiğinde varsayılan HTML oluşturucusunu yapılandırabilmenizi sağlar.
           Bu politika ayarlanmadan bırakılırsa kullanılan varsayılan ayar, oluşturma işlemini ana makine tarayıcısının yapmasına izin vermektir, ancak isteğe bağlı olarak bu ayarı geçersiz kılabilir ve HTML sayfalarını oluşturma işleminin varsayılan olarak <ph name="PRODUCT_FRAME_NAME" /> tarafından yapılmasını sağlayabilirsiniz.</translation>
-<translation id="5459155981813668716"><ph name="PRODUCT_OS_NAME" /> ürününün görüntülenebileceği yerel ayarları yapılandırır.
-
-      Bu politika ayarlanırsa kullanıcı, <ph name="PRODUCT_OS_NAME" /> ürününü yalnızca bu politikada belirtilen yerel ayarların birinde görüntülenecek şekilde yapılandırabilir. Bu politika ayarlanmazsa veya boş bir listeye ayarlanırsa <ph name="PRODUCT_OS_NAME" />, desteklenen tüm yerel ayarlarda görüntülenebilir. Bu politika geçersiz değerler içeren bir listeye ayarlanırsa tüm geçersiz değerler yoksayılır. Bir kullanıcı daha önce <ph name="PRODUCT_OS_NAME" /> ürününü bu politika tarafından izin verilmeyen bir dilde görüntülenecek şekilde yapılandırmışsa, kullanıcı tekrar oturum açtığında görüntüleme yerel ayarı izin verilen bir yerel ayarla değiştirilir. Kullanıcı tercih edilen yerel ayarları yapılandırdıysa ve bu politika, tercih edilen yerel ayarlardan birine izin veriyorsa <ph name="PRODUCT_OS_NAME" />, bu yerel ayara geçiş yapar. Aksi halde, <ph name="PRODUCT_OS_NAME" /> bu politika tarafından belirtilen geçerli değere veya bu politika yalnızca geçersiz girişler içerirse bir yedek yerel ayara (şu anda en-US) geçiş yapar.</translation>
 <translation id="5464816904705580310">Yönetilen kullanıcılar için ayarları yapılandırın.</translation>
 <translation id="546726650689747237">AC güçle çalışırken ekran karartma gecikmesi</translation>
 <translation id="5469825884154817306">Bu sitelerdeki resimleri engelle</translation>
@@ -2321,9 +2311,6 @@
 
       Bu politika ancak öneri olarak ayarlanabilir. Önerilen yerel ayarları en üste taşımak için bu politikayı kullanabilirsiniz, ancak kullanıcıların oturumları için <ph name="PRODUCT_OS_NAME" /> tarafından desteklenen herhangi bir yerel ayarı seçmesine her zaman izin verilir.
       </translation>
-<translation id="7763311235717725977">Web sitelerinin resimleri görüntülemelerine izin verilip verilmeyeceğini ayarlamanıza olanak tanır. Resimlerin görüntülenmesine tüm web siteleri için izin verilebilir veya bu işlev tüm web siteleri için reddedilebilir.
-
-          Bu politika ayarlanmadan bırakılırsa, 'AllowImages' politikası kullanılır ve kullanıcı bunu değiştirebilir.</translation>
 <translation id="7763479091692861127"> İşletim sistemi güncellemeleri için kullanılmasına izin verilen bağlantı türleri. İşletim sistemi güncellemeleri, boyutları nedeniyle muhtemelen bağlantı üzerine ağır yük getirir ve ek maliyete neden olabilir. Bu nedenle, aralarında WiMax, Bluetooth ve Hücresel bağlantıların da yer aldığı, pahalı kabul edilen bağlantı türleri için şu anda varsayılan olarak etkin değildir.
 
       Tanınan bağlantı türü tanıtıcıları şunlardır: "ethernet", "wifi", "wimax", "bluetooth" ve "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_uk.xtb b/components/policy/resources/policy_templates_uk.xtb
index 054215d..843c1afe 100644
--- a/components/policy/resources/policy_templates_uk.xtb
+++ b/components/policy/resources/policy_templates_uk.xtb
@@ -79,7 +79,6 @@
 
           Коефіцієнт масштабування має становити 100% або більше.</translation>
 <translation id="131353325527891113">Показувати імена користувачів на екрані входу</translation>
-<translation id="1325295456374328159">Налаштовує дозволені мови в сеансі користувача</translation>
 <translation id="1327466551276625742">Вмикати запит на конфігурацію мережі в режимі офлайн</translation>
 <translation id="1330145147221172764">Увімкнути екранну клавіатуру</translation>
 <translation id="13356285923490863">Назва правила</translation>
@@ -465,7 +464,6 @@
 <translation id="2309390639296060546">Налаштування географічного місцезнаходження за умовчанням</translation>
 <translation id="2312134445771258233">Дозволяє налаштовувати сторінки, які завантажуються під час запуску. Вміст списку "URL-адреси для відкривання під час запуску" ігнорується, якщо в політиці "Дія під час запуску" не вибрано параметр "Відкривати список URL-адрес".</translation>
 <translation id="2327252517317514801">Визначати домени з доступом до G Suite</translation>
-<translation id="2337466621458842053">Дозволяє налаштовувати список шаблонів URL-адрес, що визначають сайти, яким дозволено показувати зображення. Якщо це правило не встановлено, для всіх сайтів використовується загальне значення за умовчанням – з правила "DefaultImagesSetting" (якщо його встановлено) або з особистих налаштувань користувача.</translation>
 <translation id="2372547058085956601">Затримка автоматичного входу загальнодоступного сеансу.
 
       Якщо правило |DeviceLocalAccountAutoLoginId| не встановлено, це правило не діє. В інших випадках:
@@ -1197,7 +1195,6 @@
       Якщо цей параметр увімкнено чи вимкнено, користувачі не можуть змінювати чи замінювати його в  <ph name="PRODUCT_NAME" />.
 
       Якщо це правило не встановлено, цей параметр буде ввімкено, але користувач може його змінювати.</translation>
-<translation id="4525521128313814366">Дозволяє налаштовувати список шаблонів URL-адрес, що визначають сайти, яким заборонено показувати зображення. Якщо це правило не встановлено, для всіх сайтів використовується загальне значення за умовчанням – з правила "DefaultImagesSetting" (якщо його встановлено) або з особистих налаштувань користувача.</translation>
 <translation id="4531706050939927436">Додатки Android можна примусово встановити з консолі адміністратора Google через Google Play. Вони не використовують це правило.</translation>
 <translation id="4534500438517478692">Назва обмеження для Android:</translation>
 <translation id="4541530620466526913">Локальні облікові записи в пристрої</translation>
@@ -1473,9 +1470,6 @@
 <translation id="5447306928176905178">Увімкнути повідомлення з інформацією про пам’ять (розмір динамічної пам’яті JavaScript) для сторінки (не рекомендується)</translation>
 <translation id="5457065417344056871">Увімкнути режим гостя у веб-переглядачі</translation>
 <translation id="5457924070961220141">Дозволяє налаштовувати засіб відтворення сторінок HTML за умовчанням, якщо встановлено <ph name="PRODUCT_FRAME_NAME" />. Якщо це правило не встановлено, використовується налаштування за умовчанням, яке дозволяє веб-переглядачу хосту відтворювати сторінки. Це можна змінити та відтворювати сторінки HTML за допомогою <ph name="PRODUCT_FRAME_NAME" /> за умовчанням.</translation>
-<translation id="5459155981813668716">Налаштовує мови, якими може відображатися <ph name="PRODUCT_OS_NAME" />.
-
-     Якщо це правило налаштовано, у <ph name="PRODUCT_OS_NAME" /> може використовуватися лише одна мова з указаних у ньому. Якщо це правило не налаштовано або для нього вказано порожній список, <ph name="PRODUCT_OS_NAME" /> може відображатися всіма підтримуваними мовами. Якщо для цього правила вказано список із недійсними значеннями, усі вони ігноруватимуться. Якщо користувач раніше налаштував у <ph name="PRODUCT_OS_NAME" /> мову, що забороняється цим правилом, під час наступного входу її буде змінено на дозволену. Якщо користувач вказав бажані мови й одна з них дозволена цим правилом, <ph name="PRODUCT_OS_NAME" /> використовуватиме її. В іншому випадку в <ph name="PRODUCT_OS_NAME" /> застосовуватиметься перше дійсне значення, указане в цьому правилі, або вихідна мова (наразі en-US), якщо правило містить лише недійсні значення.</translation>
 <translation id="5464816904705580310">Налаштувати параметри для керованих користувачів.</translation>
 <translation id="546726650689747237">Затримка затемнення екрана, коли використовується живлення від мережі</translation>
 <translation id="5469825884154817306">Блокувати зображення на цих сайтах</translation>
@@ -2222,7 +2216,6 @@
 
       Це правило може бути лише рекомендованим. Ви можете скористатися ним, щоб показувати набір рекомендованих мов угорі списку, однак користувачі завжди зможуть вибрати для свого сеансу іншу мову, яка підтримується в <ph name="PRODUCT_OS_NAME" />.
       </translation>
-<translation id="7763311235717725977">Дозволяє вказувати, чи можуть веб-сайти показувати зображення. Показ зображень можна дозволити чи заборонити для всіх веб-сайтів. Якщо це правило не встановлено, використовується правило "AllowImages", і користувач може змінювати це налаштування.</translation>
 <translation id="7763479091692861127"> Типи з’єднань, які можуть використовуватися для оновлення операційної системи. Оновлення ОС потенційно створює велике навантаження для з’єднання через свій розмір. Також може стягуватися додаткова плата. Тому їх не ввімкнено за умовчанням для тих типів з’єднань, які вважаються дорогими, і до яких зараз належать WiMax, Bluetooth та Cellular.
 
       Визнані ідентифікатори типів з’єднань: "ethernet", "wifi", "wimax", "bluetooth" і "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_vi.xtb b/components/policy/resources/policy_templates_vi.xtb
index d2e5c8f..5e4f79b 100644
--- a/components/policy/resources/policy_templates_vi.xtb
+++ b/components/policy/resources/policy_templates_vi.xtb
@@ -79,7 +79,6 @@
 
           Hệ số tỷ lệ phải từ 100% trở lên.</translation>
 <translation id="131353325527891113">Hiển thị tên người dùng trên màn hình đăng nhập</translation>
-<translation id="1325295456374328159">Định cấu hình ngôn ngữ được phép trong phiên người dùng</translation>
 <translation id="1327466551276625742">Bật lời nhắc về cấu hình mạng khi ngoại tuyến</translation>
 <translation id="1330145147221172764">Bật bàn phím ảo</translation>
 <translation id="13356285923490863">Tên chính sách</translation>
@@ -474,9 +473,6 @@
 <translation id="2309390639296060546">Cài đặt vị trí địa lý mặc định</translation>
 <translation id="2312134445771258233">Cho phép bạn định cấu hình các trang được tải khi khởi động. Nội dung của danh sách 'Các URL được mở khi khởi động' bị bỏ qua trừ khi bạn chọn 'Mở danh sách các URL' trong' Tác vụ khi khởi động'.</translation>
 <translation id="2327252517317514801">Xác định miền được phép truy cập vào G Suite</translation>
-<translation id="2337466621458842053">Cho phép bạn thiết lập danh sách các mẫu url chỉ định những trang web được phép hiển thị hình ảnh.
-
-          Nếu không thiết lập chính sách này, giá trị mặc định chung từ chính sách 'DefaultImagesSetting' nếu chính sách này được thiết lập hoặc từ cấu hình cá nhân của người dùng sẽ được sử dụng cho tất cả các trang web.</translation>
 <translation id="2372547058085956601">Thời gian chờ trước khi tự động đăng nhập vào phiên công khai.
 
       Nếu chính sách |DeviceLocalAccountAutoLoginId| không được đặt, chính sách này sẽ không có hiệu lực. Ngược lại:
@@ -1239,9 +1235,6 @@
       Nếu bạn bật hoặc tắt cài đặt này, người dùng sẽ không thể thay đổi hoặc ghi đè cài đặt này trong <ph name="PRODUCT_NAME" />.
 
       Nếu chính sách này không được đặt, cài đặt này sẽ được bật nhưng người dùng có thể thay đổi cài đặt này.</translation>
-<translation id="4525521128313814366">Cho phép bạn thiết lập danh sách các mẫu url chỉ định những trang web không được phép hiển thị hình ảnh.
-
-          Nếu không thiết lập chính sách này, giá trị mặc định chung từ chính sách 'DefaultImagesSetting' nếu chính sách này được thiết lập hoặc từ cấu hình cá nhân của người dùng sẽ được sử dụng cho tất cả các trang web.</translation>
 <translation id="4531706050939927436">Các ứng dụng Android có thể bị buộc cài đặt từ Bảng điều khiển dành cho quản trị viên của Google bằng Google Play. Các ứng dụng đó không sử dụng chính sách này.</translation>
 <translation id="4534500438517478692">Tên giới hạn Android:</translation>
 <translation id="4541530620466526913">Tài khoản trong thiết bị</translation>
@@ -1541,9 +1534,6 @@
 <translation id="5457065417344056871">Bật chế độ khách trong trình duyệt</translation>
 <translation id="5457924070961220141">Cho phép bạn định cấu hình trình kết xuất HTML mặc định khi  <ph name="PRODUCT_FRAME_NAME" /> được cài đặt.
           Cài đặt mặc định, được sử dụng khi không thiết lập chính sách này, cho phép trình duyệt chính thực hiện chức năng hiển thị nhưng bạn có thể tùy chọn ghi đè cài đặt này và yêu cầu  <ph name="PRODUCT_FRAME_NAME" /> hiển thị các trang HTML theo mặc định.</translation>
-<translation id="5459155981813668716">Định cấu hình các ngôn ngữ có thể hiển thị trong <ph name="PRODUCT_OS_NAME" />.
-
-      Nếu đặt chính sách này thì người dùng chỉ có thể định cấu hình hiển thị <ph name="PRODUCT_OS_NAME" /> bằng một trong các ngôn ngữ mà chính sách này chỉ định. Nếu không đặt hoặc đặt chính sách này thành một danh sách trống thì có thể hiển thị <ph name="PRODUCT_OS_NAME" /> bằng tất cả các ngôn ngữ được hỗ trợ. Nếu đặt chính sách này thành một danh sách gồm các giá trị không hợp lệ thì tất cả các giá trị không hợp lệ sẽ bị bỏ qua. Nếu trước đây người dùng đã định cấu hình hiển thị <ph name="PRODUCT_OS_NAME" /> bằng một ngôn ngữ không được chính sách này cho phép thì ngôn ngữ hiển thị sẽ được chuyển thành ngôn ngữ được phép trong lần tiếp theo người dùng đăng nhập. Nếu người dùng đã định cấu hình các ngôn ngữ ưu tiên và chính sách này cho phép sử dụng một trong các ngôn ngữ ưu tiên đó thì <ph name="PRODUCT_OS_NAME" /> sẽ chuyển sang ngôn ngữ đó. Nếu không, <ph name="PRODUCT_OS_NAME" /> sẽ chuyển về giá trị hợp lệ đầu tiên được chính sách này chỉ định hoặc chuyển về ngôn ngữ dự phòng (hiện đang là en-US), khi chính sách này chỉ chứa các mục không hợp lệ.</translation>
 <translation id="5464816904705580310">Định cấu hình cài đặt cho người dùng được quản lý.</translation>
 <translation id="546726650689747237">Độ trễ mờ màn hình khi chạy trên nguồn AC</translation>
 <translation id="5469825884154817306">Chặn hình ảnh trên các trang web này</translation>
@@ -2321,9 +2311,6 @@
 
       Chính sách này chỉ có thể được đặt thành đề xuất. Bạn có thể sử dụng chính sách này để di chuyển một nhóm ngôn ngữ được đề xuất lên trên cùng nhưng người dùng luôn được phép chọn bất kỳ ngôn ngữ nào mà <ph name="PRODUCT_OS_NAME" /> hỗ trợ đối với phiên của họ.
       </translation>
-<translation id="7763311235717725977">Cho phép bạn đặt liệu các trang web có được phép hiển thị hình ảnh hay không. Bạn có thể cho phép hoặc từ chối hiển thị hình ảnh đối với tất cả các trang web.
-
-          Nếu không thiết lập chính sách này, 'AllowImages' sẽ được sử dụng và người dùng có thể thay đổi cài đặt này.</translation>
 <translation id="7763479091692861127"> Các loại kết nối được phép sử dụng cho cập nhật hệ điều hành. Các cập nhật hệ điều hành có khả năng gây quá tải cho kết nối do kích thước của chúng và có thể phải chịu thêm phí. Do đó, theo mặc định chúng không được bật cho các loại kết nối hiện được xem là đắt đỏ, gồm có WiMax, Bluetooth và kết nối di động.
 
       Các mã định danh loại kết nối được nhận dạng là "ethernet", "wifi", "wimax", "bluetooth" và "cellular".</translation>
diff --git a/components/policy/resources/policy_templates_zh-CN.xtb b/components/policy/resources/policy_templates_zh-CN.xtb
index c9f4d0c..1fd1ba6 100644
--- a/components/policy/resources/policy_templates_zh-CN.xtb
+++ b/components/policy/resources/policy_templates_zh-CN.xtb
@@ -78,7 +78,6 @@
 
           调整因子不得小于 100%。</translation>
 <translation id="131353325527891113">在登录屏幕上显示用户名</translation>
-<translation id="1325295456374328159">配置可在用户会话中使用的语言区域</translation>
 <translation id="1327466551276625742">离线时,弹出网络配置提示</translation>
 <translation id="1330145147221172764">启用屏幕键盘</translation>
 <translation id="13356285923490863">政策名称</translation>
@@ -432,7 +431,6 @@
 <translation id="2309390639296060546">默认地理位置设置</translation>
 <translation id="2312134445771258233">允许您配置在启动时加载的页面。除非您在“启动时的操作”中选择“打开网址列表”,否则系统会忽略“启动时打开的网址”列表中的内容。</translation>
 <translation id="2327252517317514801">指定可访问 G Suite 的网域</translation>
-<translation id="2337466621458842053">可让您设置网址格式的列表,这些网址格式用于指定允许显示图片的网站。在未设置此政策的情况下,如果设置了“DefaultImagesSetting”政策,那么将对该政策中的所有网站使用全局默认值,否则将对用户个人配置中的所有网站使用全局默认值。</translation>
 <translation id="2372547058085956601">公用自助终端自动登录延迟。
 
       如果未设置 |DeviceLocalAccountAutoLoginId| 政策,则此政策不会生效。否则:
@@ -1156,7 +1154,6 @@
       如果您启用或停用了此设置,用户就无法在 <ph name="PRODUCT_NAME" /> 中更改或替换此设置。
 
       如果未设置此政策,系统就会启用此设置,不过用户也可以更改此设置。</translation>
-<translation id="4525521128313814366">可让您设置网址格式的列表,这些网址格式用于指定不允许显示图片的网站。在未设置此政策的情况下,如果设置了“DefaultImagesSetting”政策,那么将对该政策中的所有网站使用全局默认值,否则将对用户个人配置中的所有网站使用全局默认值。</translation>
 <translation id="4531706050939927436">您可以通过 Google Play 从 Google 管理控制台中强制安装 Android 应用。这些应用不会使用此政策。</translation>
 <translation id="4534500438517478692">Android 限制名称:</translation>
 <translation id="4541530620466526913">设备本地帐号</translation>
@@ -1428,9 +1425,6 @@
 <translation id="5447306928176905178">向网页报告内存信息(JS堆内存大小)(已停止使用)</translation>
 <translation id="5457065417344056871">在浏览器中启用访客模式</translation>
 <translation id="5457924070961220141">可让您在安装 <ph name="PRODUCT_FRAME_NAME" />时配置默认 HTML 呈现器。如果未设置此政策,则使用默认设置,即允许托管浏览器进行呈现。不过您可以视情况替换此设置,让 <ph name="PRODUCT_FRAME_NAME" />默认呈现 HTML 网页。</translation>
-<translation id="5459155981813668716">配置 <ph name="PRODUCT_OS_NAME" />可以使用哪些语言区域进行显示。
-
-      如果已设置此政策,则用户只能将 <ph name="PRODUCT_OS_NAME" />配置为使用此政策中指定的语言区域之一进行显示。如果此政策设为空列表或未设置,则 <ph name="PRODUCT_OS_NAME" />可以使用所有受支持的语言区域进行显示。如果此政策设为一个包含无效值的列表,则系统会忽略所有无效值。如果用户曾将 <ph name="PRODUCT_OS_NAME" />配置为使用此政策所不允许的某种语言进行显示,那么当用户下次登录时,相应的显示语言区域将会切换到所允许的某种语言区域。如果用户已配置了首选语言区域,并且此政策允许其中的某一种首选语言区域,<ph name="PRODUCT_OS_NAME" />将会切换到此语言区域。否则,<ph name="PRODUCT_OS_NAME" />将会切换到此政策中指定的第一个有效值;如果此政策所含的条目都无效,就会切换到后备语言区域(目前为 en-US)。</translation>
 <translation id="5464816904705580310">为托管用户配置设置。</translation>
 <translation id="546726650689747237">使用交流电源供电时的屏幕变暗延迟时间</translation>
 <translation id="5469825884154817306">在这些网站上阻止图片</translation>
@@ -2174,7 +2168,6 @@
 
       此政策只能设置为建议性质。您可以使用此政策将一些建议的语言区域移至顶部,但用户始终可以为其会话选择 <ph name="PRODUCT_OS_NAME" />支持的任何语言区域。
       </translation>
-<translation id="7763311235717725977">可让您设置是否允许网站显示图片。可以针对所有网站允许或拒绝显示图片。如果未设置此政策,系统将使用“AllowImages”并允许用户更改此设置。</translation>
 <translation id="7763479091692861127"> 可用于操作系统更新的连接类型。由于操作系统更新较大,因此可能会增加连接的负荷,还可能会产生额外费用。因此在默认情况下,系统不会针对公认的昂贵连接类型(目前包括 WiMax、蓝牙和移动网络)启用操作系统更新。
 
       已识别的连接类型标识符包括“以太网”、“Wi-Fi”、“WiMax”、“蓝牙”和“移动”网络。</translation>
diff --git a/components/policy/resources/policy_templates_zh-TW.xtb b/components/policy/resources/policy_templates_zh-TW.xtb
index d5d36dc..27caa13 100644
--- a/components/policy/resources/policy_templates_zh-TW.xtb
+++ b/components/policy/resources/policy_templates_zh-TW.xtb
@@ -79,7 +79,6 @@
 
           比例因數必須為 100% 以上的值。</translation>
 <translation id="131353325527891113">在登入畫面中顯示使用者名稱</translation>
-<translation id="1325295456374328159">設定可在使用者工作階段中使用的語言代碼</translation>
 <translation id="1327466551276625742">離線時啟用網路設定提示</translation>
 <translation id="1330145147221172764">啟用螢幕小鍵盤</translation>
 <translation id="13356285923490863">政策名稱</translation>
@@ -462,7 +461,6 @@
 <translation id="2309390639296060546">預設地理位置設定</translation>
 <translation id="2312134445771258233">允許你設定起始時載入的網頁。系統會略過 [起始時開啟的網址] 網頁清單內容,除非你在 [起始動作] 中選取 [開啟網址清單]。</translation>
 <translation id="2327252517317514801">定義可存取 G Suite 的網域</translation>
-<translation id="2337466621458842053">允許你設定網址模式清單,指定可以顯示圖片的網站。如果未設定這項政策,系統會從「DefaultImagesSetting」政策 (如果有設定的話) 或使用者的個人設定,將通用預設值套用至所有網站。</translation>
 <translation id="2372547058085956601">公開工作階段自動登入延遲時間。
 
       如果未設定 |DeviceLocalAccountAutoLoginId| 政策,這項政策不會生效。否則:
@@ -1195,7 +1193,6 @@
       不論你啟用或停用這項設定,使用者都無法變更或覆寫 <ph name="PRODUCT_NAME" /> 中的這項設定。
 
       如果你未設定這項政策,系統會使用這項設定,不過使用者可以加以變更。</translation>
-<translation id="4525521128313814366">允許你設定網址模式清單,指定不可以展示圖片的網站。如果未設定這項政策,系統會從「DefaultImagesSetting」政策 (如果有設定的話) 或使用者的個人設定,將通用預設值套用至所有網站。</translation>
 <translation id="4531706050939927436">你可以在 Google 管理控制台中使用 Google Play 強制安裝 Android 應用程式 (不會使用這項政策)。</translation>
 <translation id="4534500438517478692">Android 限制名稱:</translation>
 <translation id="4541530620466526913">裝置本機帳戶</translation>
@@ -1471,9 +1468,6 @@
 <translation id="5447306928176905178">在網頁上回報記憶體資訊 (JavaScript 堆積大小) (已不適用)</translation>
 <translation id="5457065417344056871">在瀏覽器中啟用訪客模式</translation>
 <translation id="5457924070961220141">允許你在安裝「<ph name="PRODUCT_FRAME_NAME" />」之後,設定預設的 HTML 轉譯器。如果未設定這項政策,系統就會使用預設設定,允許主機瀏覽器進行轉譯,但是你可以覆寫這項預設,改由「<ph name="PRODUCT_FRAME_NAME" />」轉譯 HTML 網頁。</translation>
-<translation id="5459155981813668716">控制 <ph name="PRODUCT_OS_NAME" />顯示語言的語言代碼。
-
-      如果設定這項政策,使用者就只能將 <ph name="PRODUCT_OS_NAME" />的顯示語言設為這項政策指定的其中一個語言代碼。如果未設定這項政策,或是設定了空白清單,則可將 <ph name="PRODUCT_OS_NAME" />的顯示語言設為任一支援的語言代碼。如果將這項政策設為有效值清單,所有無效的值都會遭到忽略。如果使用者先前設定的 <ph name="PRODUCT_OS_NAME" />顯示語言不是這項政策所允許的值,當使用者下次登入時,顯示語言代碼將切換成允許的語言代碼。如果使用者已設定偏好的語言代碼,而其中一個偏好的語言代碼是這項政策所允許的值,<ph name="PRODUCT_OS_NAME" />將改用該語言代碼。否則,<ph name="PRODUCT_OS_NAME" />將改用這項政策指定的第一個有效值,或是在這項政策指定的值均無效時改用備用語言代碼 (目前為 en-US)。</translation>
 <translation id="5464816904705580310">為管理化環境下的使用者調整設定。</translation>
 <translation id="546726650689747237">在 AC 供電環境下執行時的螢幕調暗延遲時間</translation>
 <translation id="5469825884154817306">封鎖這些網站的圖片</translation>
@@ -2225,7 +2219,6 @@
 
       這項政策只能設為建議性質。您可以使用這項政策讓一些建議的語言代碼顯示在頂端,但使用者一律可以為工作階段選擇 <ph name="PRODUCT_OS_NAME" /> 支援的任何語言代碼。
       </translation>
-<translation id="7763311235717725977">允許你設定是否要讓網站顯示圖片。你可以允許或禁止所有網站顯示圖片。如果未設定這項政策,系統會使用「AllowImages」,不過使用者可以變更設定。</translation>
 <translation id="7763479091692861127"> 允許用來進行作業系統更新的連線類型。由於作業系統更新檔案較大,可能會對連線流量造成沉重負荷,同時也可能讓使用者必須支付額外費用,因此當使用者使用較昂貴的連線類型 (目前包括 WiMax、藍牙和行動網路) 時,預設情況並不允許進行作業系統更新。
 
       系統可識別的連線類型識別碼包括「ethernet」、「wifi」、「wimax」、「bluetooth」和「cellular」。</translation>
diff --git a/components/pref_registry/pref_registry_syncable.cc b/components/pref_registry/pref_registry_syncable.cc
index f00f0c6..f458cf7f 100644
--- a/components/pref_registry/pref_registry_syncable.cc
+++ b/components/pref_registry/pref_registry_syncable.cc
@@ -48,4 +48,14 @@
   return registry;
 }
 
+void PrefRegistrySyncable::WhitelistLateRegistrationPrefForSync(
+    const std::string& pref_name) {
+  sync_unknown_prefs_whitelist_.insert(pref_name);
+}
+
+bool PrefRegistrySyncable::IsWhitelistedLateRegistrationPref(
+    const std::string& path) const {
+  return sync_unknown_prefs_whitelist_.count(path) != 0;
+}
+
 }  // namespace user_prefs
diff --git a/components/pref_registry/pref_registry_syncable.h b/components/pref_registry/pref_registry_syncable.h
index 7eef955..d8e7c457 100644
--- a/components/pref_registry/pref_registry_syncable.h
+++ b/components/pref_registry/pref_registry_syncable.h
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 
+#include <set>
 #include <string>
 
 #include "base/callback.h"
@@ -73,6 +74,16 @@
   // store.
   scoped_refptr<PrefRegistrySyncable> ForkForIncognito();
 
+  // Adds a the preference with name |pref_name| to the whitelist of prefs which
+  // will be synced even before they got registered. Note that it's still
+  // illegal to read or write a whitelisted preference via the PrefService
+  // before its registration.
+  void WhitelistLateRegistrationPrefForSync(const std::string& pref_name);
+
+  // Checks weather the preference with name |path| is on the whitelist of
+  // sync-supported prefs before registration.
+  bool IsWhitelistedLateRegistrationPref(const std::string& path) const;
+
  private:
   ~PrefRegistrySyncable() override;
 
@@ -82,6 +93,7 @@
                         uint32_t flags) override;
 
   SyncableRegistrationCallback callback_;
+  std::set<std::string> sync_unknown_prefs_whitelist_;
 
   DISALLOW_COPY_AND_ASSIGN(PrefRegistrySyncable);
 };
diff --git a/components/prefs/pref_service.cc b/components/prefs/pref_service.cc
index 7254d0b..f9d2e67 100644
--- a/components/prefs/pref_service.cc
+++ b/components/prefs/pref_service.cc
@@ -68,9 +68,9 @@
     bool async)
     : pref_notifier_(std::move(pref_notifier)),
       pref_value_store_(std::move(pref_value_store)),
-      pref_registry_(std::move(pref_registry)),
       user_pref_store_(std::move(user_prefs)),
-      read_error_callback_(std::move(read_error_callback)) {
+      read_error_callback_(std::move(read_error_callback)),
+      pref_registry_(std::move(pref_registry)) {
   pref_notifier_->SetPrefService(this);
 
   DCHECK(pref_registry_);
diff --git a/components/prefs/pref_service.h b/components/prefs/pref_service.h
index 3952552..1da3854 100644
--- a/components/prefs/pref_service.h
+++ b/components/prefs/pref_service.h
@@ -354,8 +354,6 @@
   // this PrefService. Subclasses may access it for unit testing.
   const std::unique_ptr<PrefValueStore> pref_value_store_;
 
-  const scoped_refptr<PrefRegistry> pref_registry_;
-
   // Pref Stores and profile that we passed to the PrefValueStore.
   const scoped_refptr<PersistentPrefStore> user_pref_store_;
 
@@ -431,6 +429,8 @@
   // actually get the value.).
   const base::Value* GetPreferenceValue(const std::string& path) const;
 
+  const scoped_refptr<PrefRegistry> pref_registry_;
+
   // Local cache of registered Preference objects. The pref_registry_
   // is authoritative with respect to what the types and default values
   // of registered preferences are.
diff --git a/components/strings/components_strings_es.xtb b/components/strings/components_strings_es.xtb
index e4c6d4c..156209ff 100644
--- a/components/strings/components_strings_es.xtb
+++ b/components/strings/components_strings_es.xtb
@@ -300,7 +300,7 @@
 <translation id="3010559122411665027">Entrada de lista "<ph name="ENTRY_INDEX" />": <ph name="ERROR" /></translation>
 <translation id="301521992641321250">Bloqueado automáticamente</translation>
 <translation id="3024663005179499861">Tipo de política incorrecto</translation>
-<translation id="3037605927509011580">¡Oh, no!</translation>
+<translation id="3037605927509011580">¡Vaya!</translation>
 <translation id="3041612393474885105">Datos del certificado</translation>
 <translation id="3063697135517575841">Chrome no ha podido confirmar tu tarjeta en este momento. Vuelve a intentarlo más tarde.</translation>
 <translation id="3064966200440839136">Saldrás del modo incógnito para realizar un pago en una aplicación externa. ¿Quieres continuar?</translation>
diff --git a/components/strings/components_strings_sk.xtb b/components/strings/components_strings_sk.xtb
index 28d3615..d840d055 100644
--- a/components/strings/components_strings_sk.xtb
+++ b/components/strings/components_strings_sk.xtb
@@ -245,7 +245,7 @@
 <translation id="2653659639078652383">Odoslať</translation>
 <translation id="2666117266261740852">Zavrite ostatné karty alebo aplikácie</translation>
 <translation id="2674170444375937751">Naozaj chcete odstrániť tieto stránky zo svojej histórie?</translation>
-<translation id="2677748264148917807">Opustiť</translation>
+<translation id="2677748264148917807">Odísť</translation>
 <translation id="2699302886720511147">Akceptované karty</translation>
 <translation id="2702801445560668637">Čitateľský zoznam</translation>
 <translation id="2704283930420550640">Hodnota nezodpovedá formátu.</translation>
@@ -561,7 +561,7 @@
 <translation id="4923417429809017348">Táto stránka bola preložená z neznámeho jazyka do jazyka <ph name="LANGUAGE_LANGUAGE" /></translation>
 <translation id="4923459931733593730">Platba</translation>
 <translation id="4926049483395192435">Musí byť určená.</translation>
-<translation id="4926159001844873046">Web <ph name="SITE" /> hovorí</translation>
+<translation id="4926159001844873046">Správa z webu <ph name="SITE" /></translation>
 <translation id="4926340098269537727"><ph name="ACTIVE_MATCH" />/<ph name="TOTAL_MATCHCOUNT" /></translation>
 <translation id="495170559598752135">Akcie</translation>
 <translation id="4958444002117714549">Rozbaliť zoznam</translation>
@@ -951,7 +951,7 @@
 <translation id="782886543891417279">Sieť Wi‑Fi (<ph name="WIFI_NAME" />), ktorú používate, môže vyžadovať, aby ste navštívili jej prihlasovaciu stránku</translation>
 <translation id="785549533363645510">Nie ste však neviditeľný/-á. Prejdením do režimu inkognito neskryjete svoje prehliadanie pred zamestnávateľom, poskytovateľom internetových služieb ani pred navštívenými webmi.</translation>
 <translation id="7855695075675558090"><ph name="TOTAL_LABEL" /> <ph name="FORMATTED_TOTAL_AMOUNT" /> <ph name="CURRENCY_CODE" /></translation>
-<translation id="7862185352068345852">Opustiť web?</translation>
+<translation id="7862185352068345852">Chcete odísť z tohto webu?</translation>
 <translation id="7878176543348854470">Debetné a predplatené karty sú akceptované.</translation>
 <translation id="7878562273885520351">Vaše heslo mohlo byť napadnuté</translation>
 <translation id="7887683347370398519">Skontrolujte svoj kód CVC a skúste to znova</translation>
diff --git a/components/subresource_filter/core/common/BUILD.gn b/components/subresource_filter/core/common/BUILD.gn
index c56add3..046c009 100644
--- a/components/subresource_filter/core/common/BUILD.gn
+++ b/components/subresource_filter/core/common/BUILD.gn
@@ -2,6 +2,8 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+import("//testing/libfuzzer/fuzzer_test.gni")
+
 static_library("common") {
   sources = [
     "activation_decision.h",
@@ -82,3 +84,15 @@
     "//url",
   ]
 }
+
+fuzzer_test("indexed_ruleset_fuzzer") {
+  sources = [
+    "indexed_ruleset_fuzzer.cc",
+  ]
+  deps = [
+    ":common",
+    "//base",
+    "//base/test:test_support",
+    "//url",
+  ]
+}
diff --git a/components/subresource_filter/core/common/indexed_ruleset_fuzzer.cc b/components/subresource_filter/core/common/indexed_ruleset_fuzzer.cc
new file mode 100644
index 0000000..b2fc071
--- /dev/null
+++ b/components/subresource_filter/core/common/indexed_ruleset_fuzzer.cc
@@ -0,0 +1,58 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/subresource_filter/core/common/indexed_ruleset.h"
+
+#include <string>
+
+#include "base/at_exit.h"
+#include "base/i18n/icu_util.h"
+#include "base/strings/string_piece.h"
+#include "base/test/fuzzed_data_provider.h"
+#include "components/subresource_filter/core/common/first_party_origin.h"
+#include "components/url_pattern_index/url_pattern_index.h"
+#include "url/gurl.h"
+#include "url/origin.h"
+
+struct TestCase {
+  TestCase() { CHECK(base::i18n::InitializeICU()); }
+  base::AtExitManager at_exit_manager;
+};
+
+TestCase* test_case = new TestCase();
+
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
+  base::FuzzedDataProvider fuzzed_data(data, size);
+
+  // Split the input into two sections, the URL to check, and the ruleset
+  // itself.
+  std::string url_string = fuzzed_data.ConsumeRandomLengthString(1024);
+  const GURL url_to_check = GURL(url_string);
+
+  // Error out early if the URL isn't valid, since we early-return in the
+  // IndexedRulesetMatcher pretty early if this is the case.
+  if (!url_to_check.is_valid())
+    return 0;
+
+  const std::string remaining_bytes = fuzzed_data.ConsumeRemainingBytes();
+  const uint8_t* remaining_data =
+      reinterpret_cast<const uint8_t*>(remaining_bytes.data());
+  if (!subresource_filter::IndexedRulesetMatcher::Verify(
+          remaining_data, remaining_bytes.size())) {
+    return 0;
+  }
+
+  subresource_filter::IndexedRulesetMatcher matcher(remaining_data,
+                                                    remaining_bytes.size());
+  // TODO(csharrison): Consider fuzzing things like the parent origin, the
+  // activation type, and the element type.
+  matcher.ShouldDisableFilteringForDocument(
+      url_to_check, url::Origin(),
+      url_pattern_index::proto::ACTIVATION_TYPE_DOCUMENT);
+  matcher.ShouldDisallowResourceLoad(
+      url_to_check, subresource_filter::FirstPartyOrigin(url::Origin()),
+      url_pattern_index::proto::ELEMENT_TYPE_SCRIPT,
+      false /* disable_generic_rules */);
+  return 0;
+}
diff --git a/components/sync_preferences/BUILD.gn b/components/sync_preferences/BUILD.gn
index 49ca951..e55d6b6 100644
--- a/components/sync_preferences/BUILD.gn
+++ b/components/sync_preferences/BUILD.gn
@@ -17,6 +17,8 @@
     "synced_pref_change_registrar.cc",
     "synced_pref_change_registrar.h",
     "synced_pref_observer.h",
+    "unknown_user_pref_accessor.cc",
+    "unknown_user_pref_accessor.h",
   ]
 
   deps = [
@@ -61,6 +63,7 @@
   deps = [
     ":sync_preferences",
     ":test_support",
+    "//base/test:test_support",
     "//components/pref_registry",
     "//components/prefs",
     "//components/prefs:test_support",
diff --git a/components/sync_preferences/pref_model_associator.cc b/components/sync_preferences/pref_model_associator.cc
index 2aeff8d..c08ac5b5 100644
--- a/components/sync_preferences/pref_model_associator.cc
+++ b/components/sync_preferences/pref_model_associator.cc
@@ -15,8 +15,10 @@
 #include "base/location.h"
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
+#include "base/metrics/histogram_macros.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/values.h"
+#include "components/prefs/persistent_pref_store.h"
 #include "components/prefs/pref_service.h"
 #include "components/sync/model/sync_change.h"
 #include "components/sync/model/sync_error_factory.h"
@@ -24,6 +26,7 @@
 #include "components/sync/protocol/sync.pb.h"
 #include "components/sync_preferences/pref_model_associator_client.h"
 #include "components/sync_preferences/pref_service_syncable.h"
+#include "components/sync_preferences/synced_pref_observer.h"
 
 using syncer::PREFERENCES;
 using syncer::PRIORITY_PREFERENCES;
@@ -58,12 +61,9 @@
 
 PrefModelAssociator::PrefModelAssociator(
     const PrefModelAssociatorClient* client,
-    syncer::ModelType type)
-    : models_associated_(false),
-      processing_syncer_changes_(false),
-      pref_service_(nullptr),
-      type_(type),
-      client_(client) {
+    syncer::ModelType type,
+    UnknownUserPrefAccessor* accessor)
+    : pref_accessor_(accessor), type_(type), client_(client) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   DCHECK(type_ == PREFERENCES || type_ == PRIORITY_PREFERENCES);
 }
@@ -79,8 +79,15 @@
     const syncer::SyncData& sync_pref,
     const std::string& pref_name,
     syncer::SyncChangeList* sync_changes) {
-  const base::Value* user_pref_value =
-      pref_service_->GetUserPrefValue(pref_name);
+  UnknownUserPrefAccessor::PreferenceState local_pref_state =
+      pref_accessor_->GetPreferenceState(pref_name);
+  if (local_pref_state.registration_state ==
+          UnknownUserPrefAccessor::RegistrationState::kUnknown ||
+      local_pref_state.registration_state ==
+          UnknownUserPrefAccessor::RegistrationState::kNotSyncable) {
+    // Only process syncable prefs and unknown prefs if whitelisted.
+    return;
+  }
   VLOG(1) << "Associating preference " << pref_name;
 
   if (sync_pref.IsValid()) {
@@ -95,25 +102,20 @@
       return;
     }
 
-    if (user_pref_value) {
+    if (local_pref_state.persisted_value) {
       DVLOG(1) << "Found user pref value for " << pref_name;
       // We have both server and local values. Merge them.
-      std::unique_ptr<base::Value> new_value(
-          MergePreference(pref_name, *user_pref_value, *sync_value));
+      std::unique_ptr<base::Value> new_value(MergePreference(
+          pref_name, *local_pref_state.persisted_value, *sync_value));
 
       // Update the local preference based on what we got from the
       // sync server. Note: this only updates the user value store, which is
       // ignored if the preference is policy controlled.
       if (new_value->is_none()) {
         LOG(WARNING) << "Sync has null value for pref " << pref_name.c_str();
-        pref_service_->ClearPref(pref_name);
-      } else if (new_value->type() != user_pref_value->type()) {
-        LOG(WARNING) << "Synced value for " << preference.name()
-                     << " is of type " << new_value->type()
-                     << " which doesn't match pref type "
-                     << user_pref_value->type();
-      } else if (!user_pref_value->Equals(new_value.get())) {
-        pref_service_->Set(pref_name, *new_value);
+        pref_accessor_->ClearPref(pref_name, local_pref_state);
+      } else if (!local_pref_state.persisted_value->Equals(new_value.get())) {
+        pref_accessor_->SetPref(pref_name, local_pref_state, *new_value);
       }
 
       // If the merge resulted in an updated value, inform the syncer.
@@ -129,16 +131,19 @@
       }
     } else if (!sync_value->is_none()) {
       // Only a server value exists. Just set the local user value.
-      pref_service_->Set(pref_name, *sync_value);
+      pref_accessor_->SetPref(pref_name, local_pref_state, *sync_value);
     } else {
       LOG(WARNING) << "Sync has null value for pref " << pref_name.c_str();
     }
     synced_preferences_.insert(preference.name());
-  } else if (user_pref_value) {
+  } else if (local_pref_state.persisted_value) {
+    DCHECK_EQ(local_pref_state.registration_state,
+              UnknownUserPrefAccessor::RegistrationState::kSyncable);
     // The server does not know about this preference and should be added
     // to the syncer's database.
     syncer::SyncData sync_data;
-    if (!CreatePrefSyncData(pref_name, *user_pref_value, &sync_data)) {
+    if (!CreatePrefSyncData(pref_name, *local_pref_state.persisted_value,
+                            &sync_data)) {
       LOG(ERROR) << "Failed to update preference.";
       return;
     }
@@ -188,16 +193,6 @@
 
     const sync_pb::PreferenceSpecifics& preference = GetSpecifics(*sync_iter);
     std::string sync_pref_name = preference.name();
-
-    if (remaining_preferences.count(sync_pref_name) == 0) {
-      // We're not syncing this preference locally, ignore the sync data.
-      // TODO(zea): Eventually we want to be able to have the syncable service
-      // reconstruct all sync data for its datatype (therefore having
-      // GetAllSyncData be a complete representation). We should store this
-      // data somewhere, even if we don't use it.
-      continue;
-    }
-
     remaining_preferences.erase(sync_pref_name);
     InitPrefAndAssociate(*sync_iter, sync_pref_name, &new_changes);
   }
@@ -209,6 +204,9 @@
     InitPrefAndAssociate(syncer::SyncData(), *pref_name_iter, &new_changes);
   }
 
+  UMA_HISTOGRAM_COUNTS_1000("Sync.Preferences.SyncingUnknownPrefs",
+                            pref_accessor_->GetNumberOfSyncingUnknownPrefs());
+
   // Push updates to sync.
   merge_result.set_error(
       sync_processor_->ProcessSyncChanges(FROM_HERE, new_changes));
@@ -329,10 +327,6 @@
   return result;
 }
 
-// Note: This will build a model of all preferences registered as syncable
-// with user controlled data. We do not track any information for preferences
-// not registered locally as syncable and do not inform the syncer of
-// non-user controlled preferences.
 syncer::SyncDataList PrefModelAssociator::GetAllSyncData(
     syncer::ModelType type) const {
   DCHECK_EQ(type_, type);
@@ -340,6 +334,10 @@
   for (PreferenceSet::const_iterator iter = synced_preferences_.begin();
        iter != synced_preferences_.end(); ++iter) {
     std::string name = *iter;
+    if (pref_accessor_->GetPreferenceState(name).registration_state !=
+        UnknownUserPrefAccessor::RegistrationState::kSyncable) {
+      continue;
+    }
     const PrefService::Preference* pref = pref_service_->FindPreference(name);
     DCHECK(pref);
     if (!pref->IsUserControlled() || pref->IsDefaultValue())
@@ -369,39 +367,47 @@
     const sync_pb::PreferenceSpecifics& pref_specifics =
         GetSpecifics(iter->sync_data());
 
-    std::string name = pref_specifics.name();
-    // It is possible that we may receive a change to a preference we do not
-    // want to sync. For example if the user is syncing a Mac client and a
-    // Windows client, the Windows client does not support
-    // kConfirmToQuitEnabled. Ignore updates from these preferences.
-    std::string pref_name = pref_specifics.name();
-    if (!IsPrefRegistered(pref_name))
+    UnknownUserPrefAccessor::PreferenceState local_pref_state =
+        pref_accessor_->GetPreferenceState(pref_specifics.name());
+    if (local_pref_state.registration_state ==
+        UnknownUserPrefAccessor::RegistrationState::kUnknown) {
+      // It is possible that we may receive a change to a preference we do not
+      // want to sync. For example if the user is syncing a Mac client and a
+      // Windows client, the Windows client does not support
+      // kConfirmToQuitEnabled. Ignore updates from these preferences.
+      // We only sync such prefs if they are whitelisted.
       continue;
-
+    }
+    if (local_pref_state.registration_state ==
+        UnknownUserPrefAccessor::RegistrationState::kNotSyncable) {
+      // Don't process remote changes for prefs this client doesn't want synced.
+      continue;
+    }
     if (iter->change_type() == syncer::SyncChange::ACTION_DELETE) {
-      pref_service_->ClearPref(pref_name);
+      pref_accessor_->ClearPref(pref_specifics.name(), local_pref_state);
       continue;
     }
 
-    std::unique_ptr<base::Value> value(ReadPreferenceSpecifics(pref_specifics));
-    if (!value.get()) {
+    std::unique_ptr<base::Value> new_value(
+        ReadPreferenceSpecifics(pref_specifics));
+    if (!new_value.get()) {
       // Skip values we can't deserialize.
-      // TODO(zea): consider taking some further action such as erasing the bad
-      // data.
+      // TODO(zea): consider taking some further action such as erasing the
+      // bad data.
       continue;
     }
 
     // This will only modify the user controlled value store, which takes
     // priority over the default value but is ignored if the preference is
     // policy controlled.
-    pref_service_->Set(pref_name, *value);
+    pref_accessor_->SetPref(pref_specifics.name(), local_pref_state,
+                            *new_value);
 
     NotifySyncedPrefObservers(pref_specifics.name(), true /*from_sync*/);
 
-    // Keep track of any newly synced preferences.
-    if (iter->change_type() == syncer::SyncChange::ACTION_ADD) {
-      synced_preferences_.insert(pref_specifics.name());
-    }
+    // Keep track of any newly synced preferences. This can happen if a
+    // preference was late registered or remotely added (ACTION_ADD).
+    synced_preferences_.insert(pref_specifics.name());
   }
   return syncer::SyncError();
 }
@@ -443,9 +449,16 @@
   observer_iter->second->RemoveObserver(observer);
 }
 
-void PrefModelAssociator::RegisterPref(const char* name) {
-  DCHECK(!models_associated_ && registered_preferences_.count(name) == 0);
+void PrefModelAssociator::RegisterPref(const std::string& name) {
+  DCHECK(!registered_preferences_.count(name));
   registered_preferences_.insert(name);
+
+  // This pref might be registered after sync started. Make sure data in the
+  // local store matches the registered type.
+  // If this results in a modification of the local pref store, we don't want
+  // to tell ChromeSync about these -- it's a local anomaly,
+  base::AutoReset<bool> processing_changes(&processing_syncer_changes_, true);
+  pref_accessor_->EnforceRegisteredTypeInStore(name);
 }
 
 bool PrefModelAssociator::IsPrefRegistered(const std::string& name) const {
@@ -457,24 +470,33 @@
     return;  // These are changes originating from us, ignore.
 
   // We only process changes if we've already associated models.
+  // This also filters out local changes during the initial merge.
   if (!models_associated_)
     return;
 
+  // From now on, this method does not have to deal with lazily registered
+  // prefs, as local changes can only happen after they were registered.
+
   const PrefService::Preference* preference =
       pref_service_->FindPreference(name);
+  // TODO(tschumann): When can this ever happen? Should this be a DCHECK?
   if (!preference)
     return;
 
-  if (!IsPrefRegistered(name))
-    return;  // We are not syncing this preference.
+  if (!IsPrefRegistered(name)) {
+    // We are not syncing this preference -- this also filters out synced
+    // preferences of the wrong type (priority preference are handled by a
+    // separate associator).
+    return;
+  }
 
   syncer::SyncChangeList changes;
 
   if (!preference->IsUserModifiable()) {
-    // If the preference is no longer user modifiable, it must now be controlled
-    // by policy, whose values we do not sync. Just return. If the preference
-    // stops being controlled by policy, it will revert back to the user value
-    // (which we continue to update with sync changes).
+    // If the preference is no longer user modifiable, it must now be
+    // controlled by policy, whose values we do not sync. Just return. If the
+    // preference stops being controlled by policy, it will revert back to the
+    // user value (which we continue to update with sync changes).
     return;
   }
 
@@ -483,9 +505,10 @@
   NotifySyncedPrefObservers(name, false /*from_sync*/);
 
   if (synced_preferences_.count(name) == 0) {
-    // Not in synced_preferences_ means no synced data. InitPrefAndAssociate(..)
-    // will determine if we care about its data (e.g. if it has a default value
-    // and hasn't been changed yet we don't) and take care syncing any new data.
+    // Not in synced_preferences_ means no synced data.
+    // InitPrefAndAssociate(..) will determine if we care about its data (e.g.
+    // if it has a default value and hasn't been changed yet we don't) and
+    // take care syncing any new data.
     InitPrefAndAssociate(syncer::SyncData(), name, &changes);
   } else {
     // We are already syncing this preference, just update it's sync node.
diff --git a/components/sync_preferences/pref_model_associator.h b/components/sync_preferences/pref_model_associator.h
index d47a36b..5fb8e927 100644
--- a/components/sync_preferences/pref_model_associator.h
+++ b/components/sync_preferences/pref_model_associator.h
@@ -19,7 +19,7 @@
 #include "base/sequence_checker.h"
 #include "components/sync/model/sync_data.h"
 #include "components/sync/model/syncable_service.h"
-#include "components/sync_preferences/synced_pref_observer.h"
+#include "components/sync_preferences/unknown_user_pref_accessor.h"
 
 namespace base {
 class Value;
@@ -33,6 +33,7 @@
 
 class PrefModelAssociatorClient;
 class PrefServiceSyncable;
+class SyncedPrefObserver;
 
 // Contains all preference sync related logic.
 // TODO(sync): Merge this into PrefService once we separate the profile
@@ -40,16 +41,22 @@
 class PrefModelAssociator : public syncer::SyncableService {
  public:
   // Constructs a PrefModelAssociator initializing the |client_| and |type_|
-  // instance variable. The |client| is not owned by this object and the caller
-  // must ensure that it oulives the PrefModelAssociator.
+  // instance variable. |client| and |accessor| are not owned by this object
+  // and the caller must ensure they outlive the PrefModelAssociator.
   PrefModelAssociator(const PrefModelAssociatorClient* client,
-                      syncer::ModelType type);
+                      syncer::ModelType type,
+                      UnknownUserPrefAccessor* accessor);
   ~PrefModelAssociator() override;
 
   // See description above field for details.
   bool models_associated() const { return models_associated_; }
 
   // syncer::SyncableService implementation.
+
+  // Note for GetAllSyncData: This will build a model of all preferences
+  // registered as syncable with user controlled data. We do not track any
+  // information for preferences not registered locally as syncable and do not
+  // inform the syncer of non-user controlled preferences.
   syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
   syncer::SyncError ProcessSyncChanges(
       const base::Location& from_here,
@@ -66,12 +73,15 @@
   // syncer, we check if they can be applied and if not drop them.
   // Note: This should only be called at profile startup time (before sync
   // begins).
-  virtual void RegisterPref(const char* name);
+  void RegisterPref(const std::string& name);
 
   // Process a local preference change. This can trigger new SyncChanges being
   // sent to the syncer.
-  virtual void ProcessPrefChange(const std::string& name);
+  void ProcessPrefChange(const std::string& name);
 
+  // TODO(tschumann): Remove the associator's dependency on PrefServiceSyncable.
+  // It's only needed for calling OnIsSyncingChanged. This logic can be moved
+  // onto the associator: PrefServiceSyncable forwards the registration calls.
   void SetPrefService(PrefServiceSyncable* pref_service);
 
   // Merges the local_value into the supplied server_value and returns
@@ -136,15 +146,17 @@
   static base::Value* ReadPreferenceSpecifics(
       const sync_pb::PreferenceSpecifics& specifics);
 
+  void NotifySyncedPrefObservers(const std::string& path, bool from_sync) const;
+
   // Do we have an active association between the preferences and sync models?
   // Set when start syncing, reset in StopSyncing. While this is not set, we
   // ignore any local preference changes (when we start syncing we will look
   // up the most recent values anyways).
-  bool models_associated_;
+  bool models_associated_ = false;
 
   // Whether we're currently processing changes from the syncer. While this is
   // true, we ignore any local preference changes, since we triggered them.
-  bool processing_syncer_changes_;
+  bool processing_syncer_changes_ = false;
 
   // A set of preference names.
   typedef std::set<std::string> PreferenceSet;
@@ -162,7 +174,10 @@
   PreferenceSet synced_preferences_;
 
   // The PrefService we are syncing to.
-  PrefServiceSyncable* pref_service_;
+  PrefServiceSyncable* pref_service_ = nullptr;
+
+  // A pref accessor to access prefs which might not be registered.
+  UnknownUserPrefAccessor* pref_accessor_;
 
   // Sync's syncer::SyncChange handler. We push all our changes through this.
   std::unique_ptr<syncer::SyncChangeProcessor> sync_processor_;
@@ -174,14 +189,13 @@
   // PRIORITY_PREFERENCES.
   syncer::ModelType type_;
 
-  void NotifySyncedPrefObservers(const std::string& path, bool from_sync) const;
-
   // Map prefs to lists of observers. Observers will receive notification when
   // a pref changes, including the detail of whether or not the change came
   // from sync.
   base::hash_map<std::string,
                  std::unique_ptr<base::ObserverList<SyncedPrefObserver>>>
       synced_pref_observers_;
+
   const PrefModelAssociatorClient* client_;  // Weak.
 
   std::vector<base::Closure> callback_list_;
diff --git a/components/sync_preferences/pref_model_associator_unittest.cc b/components/sync_preferences/pref_model_associator_unittest.cc
index 55682ad..87a9760 100644
--- a/components/sync_preferences/pref_model_associator_unittest.cc
+++ b/components/sync_preferences/pref_model_associator_unittest.cc
@@ -10,6 +10,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/values.h"
 #include "components/prefs/scoped_user_pref_update.h"
+#include "components/prefs/testing_pref_store.h"
 #include "components/sync_preferences/pref_model_associator_client.h"
 #include "components/sync_preferences/pref_service_mock_factory.h"
 #include "components/sync_preferences/pref_service_syncable.h"
@@ -44,9 +45,11 @@
 
 class AbstractPreferenceMergeTest : public testing::Test {
  protected:
-  AbstractPreferenceMergeTest() {
+  AbstractPreferenceMergeTest()
+      : user_prefs_(base::MakeRefCounted<TestingPrefStore>()) {
     PrefServiceMockFactory factory;
     factory.SetPrefModelAssociatorClient(&client_);
+    factory.set_user_prefs(user_prefs_);
     scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry(
         new user_prefs::PrefRegistrySyncable);
     pref_registry->RegisterStringPref(
@@ -89,6 +92,7 @@
   }
 
   TestPrefModelAssociatorClient client_;
+  scoped_refptr<TestingPrefStore> user_prefs_;
   std::unique_ptr<PrefServiceSyncable> pref_service_;
   PrefModelAssociator* pref_sync_service_;
 };
diff --git a/components/sync_preferences/pref_service_syncable.cc b/components/sync_preferences/pref_service_syncable.cc
index 478d278a..c8ed9a9 100644
--- a/components/sync_preferences/pref_service_syncable.cc
+++ b/components/sync_preferences/pref_service_syncable.cc
@@ -27,6 +27,10 @@
 
 namespace sync_preferences {
 
+// TODO(tschumann): Handing out pointers to this in the constructor is an
+// anti-pattern. Instead, introduce a factory method which first constructs
+// the PrefServiceSyncable instance and then the members which need a reference
+// to the PrefServiceSycnable instance.
 PrefServiceSyncable::PrefServiceSyncable(
     std::unique_ptr<PrefNotifierImpl> pref_notifier,
     std::unique_ptr<PrefValueStore> pref_value_store,
@@ -39,13 +43,18 @@
     : PrefService(std::move(pref_notifier),
                   std::move(pref_value_store),
                   std::move(user_prefs),
-                  std::move(pref_registry),
+                  pref_registry,
                   std::move(read_error_callback),
                   async),
       pref_service_forked_(false),
-      pref_sync_associator_(pref_model_associator_client, syncer::PREFERENCES),
+      unknown_pref_accessor_(this, pref_registry.get(), user_pref_store_.get()),
+      pref_sync_associator_(pref_model_associator_client,
+                            syncer::PREFERENCES,
+                            &unknown_pref_accessor_),
       priority_pref_sync_associator_(pref_model_associator_client,
-                                     syncer::PRIORITY_PREFERENCES) {
+                                     syncer::PRIORITY_PREFERENCES,
+                                     &unknown_pref_accessor_),
+      pref_registry_(std::move(pref_registry)) {
   pref_sync_associator_.SetPrefService(this);
   priority_pref_sync_associator_.SetPrefService(this);
 
@@ -69,9 +78,7 @@
 
 PrefServiceSyncable::~PrefServiceSyncable() {
   // Remove our callback from the registry, since it may outlive us.
-  user_prefs::PrefRegistrySyncable* registry =
-      static_cast<user_prefs::PrefRegistrySyncable*>(pref_registry_.get());
-  registry->SetSyncableRegistrationCallback(
+  pref_registry_->SetSyncableRegistrationCallback(
       user_prefs::PrefRegistrySyncable::SyncableRegistrationCallback());
 }
 
@@ -84,8 +91,7 @@
   auto pref_notifier = std::make_unique<PrefNotifierImpl>();
 
   scoped_refptr<user_prefs::PrefRegistrySyncable> forked_registry =
-      static_cast<user_prefs::PrefRegistrySyncable*>(pref_registry_.get())
-          ->ForkForIncognito();
+      pref_registry_->ForkForIncognito();
 
   auto overlay = base::MakeRefCounted<InMemoryPrefStore>();
   if (delegate) {
@@ -179,9 +185,13 @@
     uint32_t flags) {
   DCHECK(FindPreference(path));
   if (flags & user_prefs::PrefRegistrySyncable::SYNCABLE_PREF) {
-    pref_sync_associator_.RegisterPref(path.c_str());
+    DCHECK(!pref_sync_associator_.models_associated() ||
+           pref_registry_->IsWhitelistedLateRegistrationPref(path));
+    pref_sync_associator_.RegisterPref(path);
   } else if (flags & user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF) {
-    priority_pref_sync_associator_.RegisterPref(path.c_str());
+    DCHECK(!priority_pref_sync_associator_.models_associated() ||
+           pref_registry_->IsWhitelistedLateRegistrationPref(path));
+    priority_pref_sync_associator_.RegisterPref(path);
   }
 }
 
diff --git a/components/sync_preferences/pref_service_syncable.h b/components/sync_preferences/pref_service_syncable.h
index 656b10e8..c94f5f2 100644
--- a/components/sync_preferences/pref_service_syncable.h
+++ b/components/sync_preferences/pref_service_syncable.h
@@ -18,6 +18,7 @@
 #include "components/prefs/pref_value_store.h"
 #include "components/sync_preferences/pref_model_associator.h"
 #include "components/sync_preferences/synced_pref_observer.h"
+#include "components/sync_preferences/unknown_user_pref_accessor.h"
 
 namespace syncer {
 class SyncableService;
@@ -107,8 +108,10 @@
   // "forked" PrefService.
   bool pref_service_forked_;
 
+  UnknownUserPrefAccessor unknown_pref_accessor_;
   PrefModelAssociator pref_sync_associator_;
   PrefModelAssociator priority_pref_sync_associator_;
+  const scoped_refptr<user_prefs::PrefRegistrySyncable> pref_registry_;
 
   base::ObserverList<PrefServiceSyncableObserver> observer_list_;
 
diff --git a/components/sync_preferences/pref_service_syncable_unittest.cc b/components/sync_preferences/pref_service_syncable_unittest.cc
index 1129b29..1113531 100644
--- a/components/sync_preferences/pref_service_syncable_unittest.cc
+++ b/components/sync_preferences/pref_service_syncable_unittest.cc
@@ -14,6 +14,7 @@
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "base/test/histogram_tester.h"
 #include "components/pref_registry/pref_registry_syncable.h"
 #include "components/prefs/pref_notifier_impl.h"
 #include "components/prefs/scoped_user_pref_update.h"
@@ -26,12 +27,17 @@
 #include "components/sync/protocol/sync.pb.h"
 #include "components/sync_preferences/pref_model_associator.h"
 #include "components/sync_preferences/pref_model_associator_client.h"
+#include "components/sync_preferences/synced_pref_observer.h"
 #include "components/sync_preferences/testing_pref_service_syncable.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 using syncer::SyncChange;
 using syncer::SyncData;
+using testing::Eq;
+using testing::IsEmpty;
+using testing::Not;
 using testing::NotNull;
+using testing::SizeIs;
 
 namespace sync_preferences {
 
@@ -57,6 +63,7 @@
  public:
   explicit TestSyncProcessorStub(syncer::SyncChangeList* output)
       : output_(output), fail_next_(false) {}
+
   syncer::SyncError ProcessSyncChanges(
       const base::Location& from_here,
       const syncer::SyncChangeList& change_list) override {
@@ -265,6 +272,23 @@
   EXPECT_EQ(kNonDefaultCharsetValue, prefs_.GetString(kDefaultCharsetPrefName));
 }
 
+// Verifies that the implementation gracefully handles an initial remote sync
+// data of wrong type. The local version should not get modified in these cases.
+TEST_F(PrefServiceSyncableTest, ModelAssociationWithDataTypeMismatch) {
+  base::HistogramTester histogram_tester;
+  prefs_.SetString(kStringPrefName, kExampleUrl0);
+
+  syncer::SyncDataList in;
+  base::Value remote_int_value(123);
+  AddToRemoteDataList(kStringPrefName, remote_int_value, &in);
+  syncer::SyncChangeList out;
+  InitWithSyncDataTakeOutput(in, &out);
+  EXPECT_THAT(out, IsEmpty());
+  histogram_tester.ExpectBucketCount("Sync.Preferences.RemotePrefTypeMismatch",
+                                     true, 1);
+  EXPECT_THAT(prefs_.GetString(kStringPrefName), Eq(kExampleUrl0));
+}
+
 class TestPrefModelAssociatorClient : public PrefModelAssociatorClient {
  public:
   TestPrefModelAssociatorClient() {}
@@ -511,6 +535,134 @@
   EXPECT_TRUE(GetPreferenceValue(kDictPrefName).Equals(&expected_dict));
 }
 
+TEST_F(PrefServiceSyncableMergeTest, InitWithUnknownPrefsValue) {
+  base::HistogramTester histogram_tester;
+  const std::string pref_name1 = "testing.whitelisted_pref1";
+  const std::string pref_name2 = "testing.whitelisted_pref2";
+  pref_registry_->WhitelistLateRegistrationPrefForSync(pref_name1);
+  pref_registry_->WhitelistLateRegistrationPrefForSync(pref_name2);
+
+  syncer::SyncDataList in;
+  AddToRemoteDataList(pref_name1, base::Value("remote_value1"), &in);
+  AddToRemoteDataList(pref_name2, base::Value("remote_value2"), &in);
+  syncer::SyncChangeList out;
+  InitWithSyncDataTakeOutput(in, &out);
+  pref_registry_->RegisterStringPref(
+      pref_name1, "default_value",
+      user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  EXPECT_THAT(GetPreferenceValue(pref_name1).GetString(), Eq("remote_value1"));
+
+  histogram_tester.ExpectBucketCount("Sync.Preferences.SyncingUnknownPrefs", 2,
+                                     1);
+}
+
+TEST_F(PrefServiceSyncableMergeTest, ReceiveUnknownPrefsValue) {
+  base::HistogramTester histogram_tester;
+  const std::string pref_name = "testing.whitelisted_pref";
+  pref_registry_->WhitelistLateRegistrationPrefForSync(pref_name);
+
+  syncer::SyncChangeList out;
+  InitWithSyncDataTakeOutput(syncer::SyncDataList(), &out);
+
+  syncer::SyncChangeList remote_changes;
+  remote_changes.push_back(MakeRemoteChange(
+      1, pref_name, base::Value("remote_value"), SyncChange::ACTION_UPDATE));
+  pref_sync_service_->ProcessSyncChanges(FROM_HERE, remote_changes);
+  EXPECT_THAT(prefs_.IsPrefSynced(pref_name), Eq(true));
+
+  pref_registry_->RegisterStringPref(
+      pref_name, "default_value",
+      user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  EXPECT_THAT(GetPreferenceValue(pref_name).GetString(), Eq("remote_value"));
+}
+
+class ShouldNotBeNotifedObserver : public SyncedPrefObserver {
+ public:
+  ShouldNotBeNotifedObserver() {}
+  ~ShouldNotBeNotifedObserver() {}
+
+  void OnSyncedPrefChanged(const std::string& path, bool from_sync) override {
+    ADD_FAILURE() << "Unexpected notification about a pref change with path: '"
+                  << path << "' and from_sync: " << from_sync;
+  }
+};
+
+TEST_F(PrefServiceSyncableMergeTest, RegisterShouldClearTypeMismatchingData) {
+  base::HistogramTester histogram_tester;
+  const std::string pref_name = "testing.whitelisted_pref";
+  pref_registry_->WhitelistLateRegistrationPrefForSync(pref_name);
+  // Make sure no changes will be communicated to any synced pref listeners
+  // (those listeners are typically only used for metrics but we still don't
+  // want to inform them).
+  ShouldNotBeNotifedObserver observer;
+  prefs_.AddSyncedPrefObserver(pref_name, &observer);
+  syncer::SyncDataList in;
+  AddToRemoteDataList(pref_name, base::Value("remote_value"), &in);
+  syncer::SyncChangeList out;
+  InitWithSyncDataTakeOutput(in, &out);
+  ASSERT_THAT(out, IsEmpty());
+
+  EXPECT_TRUE(user_prefs_->GetValue(pref_name, nullptr));
+
+  pref_registry_->RegisterListPref(
+      pref_name, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+  EXPECT_TRUE(GetPreferenceValue(pref_name).GetList().empty());
+  EXPECT_FALSE(user_prefs_->GetValue(pref_name, nullptr));
+  // Make sure the removal of the value was not communicated to sync via the
+  // SyncProcessor.
+  EXPECT_THAT(out, IsEmpty());
+
+  histogram_tester.ExpectBucketCount(
+      "Sync.Preferences.ClearedLocalPrefOnTypeMismatch", true, 1);
+  prefs_.RemoveSyncedPrefObserver(pref_name, &observer);
+}
+
+TEST_F(PrefServiceSyncableMergeTest, ShouldIgnoreUpdatesToNotSyncablePrefs) {
+  const std::string pref_name = "testing.not_syncable_pref";
+  pref_registry_->RegisterStringPref(pref_name, "default_value",
+                                     PrefRegistry::NO_REGISTRATION_FLAGS);
+  syncer::SyncDataList in;
+  AddToRemoteDataList(pref_name, base::Value("remote_value"), &in);
+  syncer::SyncChangeList out;
+  InitWithSyncDataTakeOutput(in, &out);
+  EXPECT_THAT(GetPreferenceValue(pref_name).GetString(), Eq("default_value"));
+
+  syncer::SyncChangeList remote_changes;
+  remote_changes.push_back(MakeRemoteChange(
+      1, pref_name, base::Value("remote_value2"), SyncChange::ACTION_UPDATE));
+  pref_sync_service_->ProcessSyncChanges(FROM_HERE, remote_changes);
+  EXPECT_THAT(prefs_.IsPrefSynced(pref_name), Eq(false));
+
+  EXPECT_THAT(GetPreferenceValue(pref_name).GetString(), Eq("default_value"));
+}
+
+TEST_F(PrefServiceSyncableMergeTest, GetAllSyncDataForLateRegisteredPrefs) {
+  const std::string pref_name = "testing.whitelisted_pref";
+  pref_registry_->WhitelistLateRegistrationPrefForSync(pref_name);
+
+  syncer::SyncDataList in;
+  AddToRemoteDataList(pref_name, base::Value("remote_value"), &in);
+  syncer::SyncChangeList out;
+  InitWithSyncDataTakeOutput(in, &out);
+
+  syncer::SyncDataList all_data =
+      prefs_.GetSyncableService(syncer::PREFERENCES)
+          ->GetAllSyncData(syncer::PREFERENCES);
+  EXPECT_THAT(all_data, IsEmpty());
+
+  // Make sure the preference appears in the result once it's registered.
+  pref_registry_->RegisterStringPref(
+      pref_name, "default_value",
+      user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
+
+  all_data = prefs_.GetSyncableService(syncer::PREFERENCES)
+                 ->GetAllSyncData(syncer::PREFERENCES);
+  ASSERT_THAT(all_data, SizeIs(1));
+  EXPECT_THAT(all_data[0].GetSpecifics().preference().name(), Eq(pref_name));
+  EXPECT_THAT(all_data[0].GetSpecifics().preference().value(),
+              Eq("\"remote_value\""));
+}
+
 TEST_F(PrefServiceSyncableTest, FailModelAssociation) {
   syncer::SyncChangeList output;
   TestSyncProcessorStub* stub = new TestSyncProcessorStub(&output);
@@ -565,6 +717,24 @@
   EXPECT_TRUE(expected.Equals(&actual));
 }
 
+// Verifies that the implementation gracefully handles a remote update with the
+// wrong type. The local version should not get modified in these cases.
+TEST_F(PrefServiceSyncableTest, UpdatedSyncNodeActionUpdateTypeMismatch) {
+  base::HistogramTester histogram_tester;
+  GetPrefs()->SetString(kStringPrefName, kExampleUrl0);
+  InitWithNoSyncData();
+
+  base::Value remote_int_value(123);
+  syncer::SyncChangeList remote_changes;
+  remote_changes.push_back(MakeRemoteChange(
+      1, kStringPrefName, remote_int_value, SyncChange::ACTION_UPDATE));
+  pref_sync_service_->ProcessSyncChanges(FROM_HERE, remote_changes);
+
+  EXPECT_THAT(prefs_.GetString(kStringPrefName), Eq(kExampleUrl0));
+  histogram_tester.ExpectBucketCount("Sync.Preferences.RemotePrefTypeMismatch",
+                                     true, 1);
+}
+
 TEST_F(PrefServiceSyncableTest, UpdatedSyncNodeActionAdd) {
   InitWithNoSyncData();
 
diff --git a/components/sync_preferences/unknown_user_pref_accessor.cc b/components/sync_preferences/unknown_user_pref_accessor.cc
new file mode 100644
index 0000000..fac3a04f
--- /dev/null
+++ b/components/sync_preferences/unknown_user_pref_accessor.cc
@@ -0,0 +1,177 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/sync_preferences/unknown_user_pref_accessor.h"
+
+#include <iterator>
+#include <memory>
+
+#include "base/json/json_string_value_serializer.h"
+#include "base/logging.h"
+#include "base/memory/ptr_util.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/values.h"
+#include "components/prefs/persistent_pref_store.h"
+#include "components/prefs/pref_service.h"
+#include "components/sync_preferences/pref_service_syncable.h"
+
+namespace sync_preferences {
+
+UnknownUserPrefAccessor::UnknownUserPrefAccessor(
+    PrefService* pref_service,
+    user_prefs::PrefRegistrySyncable* pref_registry,
+    PersistentPrefStore* user_prefs)
+    : pref_service_(pref_service),
+      pref_registry_(pref_registry),
+      user_prefs_(user_prefs) {}
+
+UnknownUserPrefAccessor::~UnknownUserPrefAccessor() {}
+
+UnknownUserPrefAccessor::PreferenceState
+UnknownUserPrefAccessor::GetPreferenceState(
+    const std::string& pref_name) const {
+  PreferenceState result;
+  result.registration_state = GetRegistrationState(pref_name);
+  switch (result.registration_state) {
+    case RegistrationState::kUnknown:
+    case RegistrationState::kUnknownWhitelisted:
+      if (!user_prefs_->GetValue(pref_name, &result.persisted_value)) {
+        result.persisted_value = nullptr;
+      }
+      break;
+    case RegistrationState::kSyncable:
+    case RegistrationState::kNotSyncable:
+      result.persisted_value = pref_service_->GetUserPrefValue(pref_name);
+      break;
+  }
+  return result;
+}
+
+void UnknownUserPrefAccessor::ClearPref(
+    const std::string& pref_name,
+    const PreferenceState& local_pref_state) {
+  switch (local_pref_state.registration_state) {
+    case RegistrationState::kUnknown:
+      NOTREACHED() << "Sync attempted to update an unknown pref which is not "
+                      "whitelisted: "
+                   << pref_name;
+      break;
+    case RegistrationState::kUnknownWhitelisted:
+      user_prefs_->RemoveValue(pref_name,
+                               WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
+      break;
+    case RegistrationState::kSyncable:
+      pref_service_->ClearPref(pref_name);
+      break;
+    case RegistrationState::kNotSyncable:
+      // As this can happen if different clients disagree about which
+      // preferences should be synced, we only log a warning.
+      DLOG(WARNING)
+          << "Sync attempted to update a pref which is not registered as "
+             "syncable. Ignoring the remote change for pref: "
+          << pref_name;
+      break;
+  }
+}
+
+int UnknownUserPrefAccessor::GetNumberOfSyncingUnknownPrefs() const {
+  return synced_unknown_prefs_.size();
+}
+
+namespace {
+
+bool VerifyTypesBeforeSet(const std::string& pref_name,
+                          const base::Value* local_value,
+                          const base::Value& new_value) {
+  if (local_value == nullptr || local_value->type() == new_value.type()) {
+    return true;
+  }
+  UMA_HISTOGRAM_BOOLEAN("Sync.Preferences.RemotePrefTypeMismatch", true);
+  DLOG(WARNING) << "Unexpected type mis-match for pref. "
+                << "Synced value for " << pref_name << " is of type "
+                << new_value.type() << " which doesn't match the locally "
+                << "present pref type: " << local_value->type();
+  return false;
+}
+
+}  // namespace
+
+void UnknownUserPrefAccessor::SetPref(const std::string& pref_name,
+                                      const PreferenceState& local_pref_state,
+                                      const base::Value& value) {
+  // On type mis-match, we trust the local preference DB and ignore the remote
+  // change.
+  switch (local_pref_state.registration_state) {
+    case RegistrationState::kUnknown:
+      NOTREACHED() << "Sync attempted to update a unknown pref which is not "
+                      "whitelisted: "
+                   << pref_name;
+      break;
+    case RegistrationState::kUnknownWhitelisted:
+      if (VerifyTypesBeforeSet(pref_name, local_pref_state.persisted_value,
+                               value)) {
+        user_prefs_->SetValue(pref_name, value.CreateDeepCopy(),
+                              WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
+      }
+      synced_unknown_prefs_.insert(pref_name);
+      break;
+    case RegistrationState::kSyncable:
+      if (VerifyTypesBeforeSet(pref_name, local_pref_state.persisted_value,
+                               value)) {
+        pref_service_->Set(pref_name, value);
+      }
+      break;
+    case RegistrationState::kNotSyncable:
+      // As this can happen if different clients disagree about which
+      // preferences should be synced, we only log a warning.
+      DLOG(WARNING)
+          << "Sync attempted to update a pref which is not registered as "
+             "syncable. Ignoring the remote change for pref: "
+          << pref_name;
+      break;
+  }
+}
+
+void UnknownUserPrefAccessor::EnforceRegisteredTypeInStore(
+    const std::string& pref_name) {
+  const base::Value* persisted_value = nullptr;
+  if (user_prefs_->GetValue(pref_name, &persisted_value)) {
+    // Get the registered type (typically from the default value).
+    const PrefService::Preference* pref =
+        pref_service_->FindPreference(pref_name);
+    DCHECK(pref);
+    if (pref->GetType() != persisted_value->type()) {
+      // We see conflicting type information and there's a chance the local
+      // type-conflicting data came in via sync. Remove it.
+      // TODO(tschumann): The value should get removed silently. Add a method
+      // RemoveValueSilently() to WriteablePrefStore. Note, that as of today
+      // that removal will only notify other pref stores but not sync -- that's
+      // done on a higher level.
+      user_prefs_->RemoveValue(pref_name,
+                               WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
+      UMA_HISTOGRAM_BOOLEAN("Sync.Preferences.ClearedLocalPrefOnTypeMismatch",
+                            true);
+    }
+  }
+  synced_unknown_prefs_.erase(pref_name);
+}
+
+UnknownUserPrefAccessor::RegistrationState
+UnknownUserPrefAccessor::GetRegistrationState(
+    const std::string& pref_name) const {
+  if (pref_registry_->defaults()->GetValue(pref_name, nullptr)) {
+    uint32_t flags = pref_registry_->GetRegistrationFlags(pref_name);
+    if ((flags & user_prefs::PrefRegistrySyncable::SYNCABLE_PREF) ||
+        (flags & user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF)) {
+      return RegistrationState::kSyncable;
+    }
+    return RegistrationState::kNotSyncable;
+  }
+  if (pref_registry_->IsWhitelistedLateRegistrationPref(pref_name)) {
+    return RegistrationState::kUnknownWhitelisted;
+  }
+  return RegistrationState::kUnknown;
+}
+
+}  // namespace sync_preferences
diff --git a/components/sync_preferences/unknown_user_pref_accessor.h b/components/sync_preferences/unknown_user_pref_accessor.h
new file mode 100644
index 0000000..7c42ea2
--- /dev/null
+++ b/components/sync_preferences/unknown_user_pref_accessor.h
@@ -0,0 +1,101 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_SYNC_PREFERENCES_UNKNOWN_USER_PREF_ACCESSOR_H_
+#define COMPONENTS_SYNC_PREFERENCES_UNKNOWN_USER_PREF_ACCESSOR_H_
+
+#include <memory>
+#include <set>
+#include <string>
+
+#include "base/callback.h"
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+
+class PersistentPrefStore;
+class PrefService;
+
+namespace base {
+class Value;
+}
+
+namespace user_prefs {
+class PrefRegistrySyncable;
+}
+
+namespace sync_preferences {
+
+// A class to access user prefs even before they were registered.
+// Currently, accessing not registered (unknown) prefs is limited to a
+// whitelist.
+class UnknownUserPrefAccessor {
+ public:
+  enum class RegistrationState {
+    kUnknown,  // Preference is not registered (on this Chrome instance).
+    kUnknownWhitelisted,  // Preference is not registered but whitelisted to be
+                          // synced without being registered.
+    kSyncable,            // Preference is registered as being synced.
+    kNotSyncable          // Preference is registered as not being synced.
+  };
+
+  struct PreferenceState {
+    // The registration state of a preference.
+    RegistrationState registration_state = RegistrationState::kUnknown;
+
+    // The actually stored value. nullptr if no value is persisted and the pref
+    // service serves a default value for this pref.
+    // Ownership lies with the underlying pref-store.
+    const base::Value* persisted_value = nullptr;
+  };
+
+  // |pref_service|, |pref_registry|, and |user_prefs| must not be null and must
+  // outlive the lifetime of the created instance. The caller keeps ownership
+  // over these objects.
+  UnknownUserPrefAccessor(PrefService* pref_service,
+                          user_prefs::PrefRegistrySyncable* pref_registry,
+                          PersistentPrefStore* user_prefs);
+  ~UnknownUserPrefAccessor();
+
+  // Computes the state of a preference with name |pref_name| which gives
+  // information about whether it's registered and the locally persisted value.
+  PreferenceState GetPreferenceState(const std::string& pref_name) const;
+
+  // Removes the value of the preference |pref_name| from the user prefstore.
+  // Must not be called for preferences having RegistrationState::kUnknown.
+  // When called for preferences registiered as not syncable
+  // (RegistrationState::kNotSyncable), no changes to the storage are made.
+  void ClearPref(const std::string& pref_name,
+                 const PreferenceState& local_pref_state);
+
+  // Changes the value of the preference |pref_name| on the user prefstore.
+  // Must not be called for preferences having RegistrationState::kUnknown.
+  // When called for preferences registiered as not syncable
+  // (RegistrationState::kNotSyncable), no changes to the storage are made.
+  void SetPref(const std::string& pref_name,
+               const PreferenceState& local_pref_state,
+               const base::Value& value);
+
+  // Verifies that the type which preference |pref_name| was registered with
+  // matches the type of any persisted value. On mismatch, the persisted value
+  // gets removed.
+  void EnforceRegisteredTypeInStore(const std::string& pref_name);
+
+  // Returns the number of synced preferences which have not been registered (so
+  // far).
+  int GetNumberOfSyncingUnknownPrefs() const;
+
+ private:
+  RegistrationState GetRegistrationState(const std::string& pref_name) const;
+
+  std::set<std::string> synced_unknown_prefs_;
+  PrefService* const pref_service_;
+  user_prefs::PrefRegistrySyncable* const pref_registry_;
+  PersistentPrefStore* const user_prefs_;
+
+  DISALLOW_COPY_AND_ASSIGN(UnknownUserPrefAccessor);
+};
+
+}  // namespace sync_preferences
+
+#endif  // COMPONENTS_SYNC_PREFERENCES_UNKNOWN_USER_PREF_ACCESSOR_H_
diff --git a/components/viz/service/display_embedder/in_process_gpu_memory_buffer_manager.cc b/components/viz/service/display_embedder/in_process_gpu_memory_buffer_manager.cc
index d9d73be6..09499aa4 100644
--- a/components/viz/service/display_embedder/in_process_gpu_memory_buffer_manager.cc
+++ b/components/viz/service/display_embedder/in_process_gpu_memory_buffer_manager.cc
@@ -15,7 +15,7 @@
 InProcessGpuMemoryBufferManager::InProcessGpuMemoryBufferManager(
     gpu::GpuChannelManager* channel_manager)
     : gpu_memory_buffer_support_(new gpu::GpuMemoryBufferSupport()),
-      client_id_(gpu::InProcessCommandBuffer::kGpuMemoryBufferClientId),
+      client_id_(gpu::InProcessCommandBuffer::kGpuClientId),
       channel_manager_(channel_manager),
       weak_factory_(this) {
   weak_ptr_ = weak_factory_.GetWeakPtr();
diff --git a/components/viz/service/gl/gpu_service_impl.cc b/components/viz/service/gl/gpu_service_impl.cc
index bcf2a9c..a97ffcf 100644
--- a/components/viz/service/gl/gpu_service_impl.cc
+++ b/components/viz/service/gl/gpu_service_impl.cc
@@ -27,6 +27,7 @@
 #include "gpu/config/gpu_util.h"
 #include "gpu/ipc/common/gpu_memory_buffer_support.h"
 #include "gpu/ipc/common/memory_stats.h"
+#include "gpu/ipc/in_process_command_buffer.h"
 #include "gpu/ipc/service/gpu_channel.h"
 #include "gpu/ipc/service/gpu_channel_manager.h"
 #include "gpu/ipc/service/gpu_memory_buffer_factory.h"
@@ -634,6 +635,10 @@
                                          uint64_t client_tracing_id,
                                          bool is_gpu_host,
                                          EstablishGpuChannelCallback callback) {
+  if (oopd_enabled_ && client_id == gpu::InProcessCommandBuffer::kGpuClientId) {
+    std::move(callback).Run(mojo::ScopedMessagePipeHandle());
+    return;
+  }
   if (io_runner_->BelongsToCurrentThread()) {
     EstablishGpuChannelCallback wrap_callback = base::BindOnce(
         [](scoped_refptr<base::SingleThreadTaskRunner> runner,
diff --git a/components/viz/service/gl/gpu_service_impl.h b/components/viz/service/gl/gpu_service_impl.h
index 4a5dbd4..a9f5926a6 100644
--- a/components/viz/service/gl/gpu_service_impl.h
+++ b/components/viz/service/gl/gpu_service_impl.h
@@ -127,6 +127,8 @@
   gl::GLContext* context_for_skia() { return context_for_skia_.get(); }
   GrContext* gr_context() { return gr_context_.get(); }
 
+  void set_oopd_enabled() { oopd_enabled_ = true; }
+
  private:
   void RecordLogMessage(int severity,
                         size_t message_start,
@@ -278,6 +280,8 @@
   scoped_refptr<arc::ProtectedBufferManager> protected_buffer_manager_;
 #endif  // defined(OS_CHROMEOS)
 
+  bool oopd_enabled_ = false;
+
   base::WeakPtr<GpuServiceImpl> weak_ptr_;
   base::WeakPtrFactory<GpuServiceImpl> weak_ptr_factory_;
 
diff --git a/components/viz/service/main/viz_main_impl.cc b/components/viz/service/main/viz_main_impl.cc
index b48d23bc..1bfec3a 100644
--- a/components/viz/service/main/viz_main_impl.cc
+++ b/components/viz/service/main/viz_main_impl.cc
@@ -155,6 +155,8 @@
       gpu_init_->gpu_feature_info(), gpu_init_->gpu_preferences(),
       gpu_init_->gpu_info_for_hardware_gpu(),
       gpu_init_->gpu_feature_info_for_hardware_gpu(), std::move(exit_callback));
+  if (dependencies_.create_display_compositor)
+    gpu_service_->set_oopd_enabled();
 }
 
 VizMainImpl::~VizMainImpl() {
diff --git a/components/viz/test/BUILD.gn b/components/viz/test/BUILD.gn
index 2b21433..83aa2fd0 100644
--- a/components/viz/test/BUILD.gn
+++ b/components/viz/test/BUILD.gn
@@ -60,8 +60,6 @@
     "test_shared_bitmap_manager.h",
     "test_texture.cc",
     "test_texture.h",
-    "test_web_graphics_context_3d.cc",
-    "test_web_graphics_context_3d.h",
   ]
   deps = [
     "//base",
@@ -101,7 +99,7 @@
     "begin_frame_source_test_unittest.cc",
     "mock_helper_unittest.cc",
     "ordered_simple_task_runner_unittest.cc",
-    "test_web_graphics_context_3d_unittest.cc",
+    "test_gles2_interface_unittest.cc",
   ]
   deps = [
     ":test_support",
diff --git a/components/viz/test/test_gles2_interface_unittest.cc b/components/viz/test/test_gles2_interface_unittest.cc
new file mode 100644
index 0000000..8a4198c
--- /dev/null
+++ b/components/viz/test/test_gles2_interface_unittest.cc
@@ -0,0 +1,111 @@
+// Copyright 2013 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 "components/viz/test/test_gles2_interface.h"
+
+#include <memory>
+
+#include "gpu/GLES2/gl2extchromium.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/khronos/GLES2/gl2ext.h"
+
+namespace viz {
+namespace {
+
+static bool check_parameter_value(TestGLES2Interface* gl,
+                                  GLenum pname,
+                                  GLint expected_value) {
+  GLint actual_value = 0;
+  gl->GetTexParameteriv(GL_TEXTURE_2D, pname, &actual_value);
+  return expected_value == actual_value;
+}
+
+static void expect_default_parameter_values(TestGLES2Interface* gl) {
+  EXPECT_TRUE(check_parameter_value(gl, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
+  EXPECT_TRUE(check_parameter_value(gl, GL_TEXTURE_MIN_FILTER,
+                                    GL_NEAREST_MIPMAP_LINEAR));
+  EXPECT_TRUE(check_parameter_value(gl, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
+  EXPECT_TRUE(check_parameter_value(gl, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
+  EXPECT_TRUE(check_parameter_value(gl, GL_TEXTURE_USAGE_ANGLE, GL_NONE));
+}
+
+TEST(TestGLES2InterfaceTest, GetDefaultTextureParameterValues) {
+  auto gl = std::make_unique<TestGLES2Interface>();
+
+  GLuint texture;
+  gl->GenTextures(1, &texture);
+  gl->BindTexture(GL_TEXTURE_2D, texture);
+
+  expect_default_parameter_values(gl.get());
+}
+
+TEST(TestGLES2InterfaceTest, SetAndGetTextureParameter) {
+  auto gl = std::make_unique<TestGLES2Interface>();
+
+  GLuint texture;
+  gl->GenTextures(1, &texture);
+  gl->BindTexture(GL_TEXTURE_2D, texture);
+  gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+
+  EXPECT_TRUE(
+      check_parameter_value(gl.get(), GL_TEXTURE_MIN_FILTER, GL_NEAREST));
+}
+
+TEST(TestGLES2InterfaceTest,
+     SetAndGetMultipleTextureParametersOnMultipleTextures) {
+  auto gl = std::make_unique<TestGLES2Interface>();
+
+  // Set and get non-default texture parameters on the first texture.
+  GLuint first_texture;
+  gl->GenTextures(1, &first_texture);
+  gl->BindTexture(GL_TEXTURE_2D, first_texture);
+  gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+  gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+
+  EXPECT_TRUE(
+      check_parameter_value(gl.get(), GL_TEXTURE_MIN_FILTER, GL_LINEAR));
+  EXPECT_TRUE(
+      check_parameter_value(gl.get(), GL_TEXTURE_MAG_FILTER, GL_NEAREST));
+
+  // Set and get different, non-default texture parameters on the second
+  // texture.
+  GLuint second_texture;
+  gl->GenTextures(1, &second_texture);
+  gl->BindTexture(GL_TEXTURE_2D, second_texture);
+  gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
+                    GL_LINEAR_MIPMAP_NEAREST);
+  gl->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
+                    GL_LINEAR_MIPMAP_LINEAR);
+
+  EXPECT_TRUE(check_parameter_value(gl.get(), GL_TEXTURE_MIN_FILTER,
+                                    GL_LINEAR_MIPMAP_NEAREST));
+  EXPECT_TRUE(check_parameter_value(gl.get(), GL_TEXTURE_MAG_FILTER,
+                                    GL_LINEAR_MIPMAP_LINEAR));
+
+  // Get texture parameters on the first texture and verify they are still
+  // intact.
+  gl->BindTexture(GL_TEXTURE_2D, first_texture);
+
+  EXPECT_TRUE(
+      check_parameter_value(gl.get(), GL_TEXTURE_MIN_FILTER, GL_LINEAR));
+  EXPECT_TRUE(
+      check_parameter_value(gl.get(), GL_TEXTURE_MAG_FILTER, GL_NEAREST));
+}
+
+TEST(TestGLES2InterfaceTest, UseMultipleRenderAndFramebuffers) {
+  auto gl = std::make_unique<TestGLES2Interface>();
+
+  GLuint ids[2];
+  gl->GenFramebuffers(2, ids);
+  EXPECT_NE(ids[0], ids[1]);
+  gl->DeleteFramebuffers(2, ids);
+
+  gl->GenRenderbuffers(2, ids);
+  EXPECT_NE(ids[0], ids[1]);
+  gl->DeleteRenderbuffers(2, ids);
+}
+
+}  // namespace
+}  // namespace viz
diff --git a/components/viz/test/test_web_graphics_context_3d.cc b/components/viz/test/test_web_graphics_context_3d.cc
deleted file mode 100644
index 7739efb..0000000
--- a/components/viz/test/test_web_graphics_context_3d.cc
+++ /dev/null
@@ -1,835 +0,0 @@
-// Copyright 2013 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 "components/viz/test/test_web_graphics_context_3d.h"
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <algorithm>
-#include <string>
-
-#include "base/bind.h"
-#include "base/lazy_instance.h"
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
-#include "base/numerics/safe_conversions.h"
-#include "components/viz/test/test_context_support.h"
-#include "gpu/GLES2/gl2extchromium.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/khronos/GLES2/gl2ext.h"
-
-namespace viz {
-
-unsigned NextContextId() {
-  static uint16_t s_context_id = 1;
-  // We need to ensure that the context_id fits in 16 bits since it is placed on
-  // the top 16 bits of the 32 bit identifiers (program_id, framebuffer_id,
-  // shader_id, etc.) generated by the context.
-  if (s_context_id == std::numeric_limits<uint16_t>::max()) {
-    LOG(ERROR) << "Exceeded max context id count; wrapping around";
-    s_context_id = 1;
-  }
-  return s_context_id++;
-}
-
-const GLuint TestWebGraphicsContext3D::kExternalTextureId = 1337;
-
-static base::LazyInstance<base::Lock>::Leaky g_shared_namespace_lock =
-    LAZY_INSTANCE_INITIALIZER;
-
-TestWebGraphicsContext3D::Namespace*
-    TestWebGraphicsContext3D::shared_namespace_ = nullptr;
-
-TestWebGraphicsContext3D::Namespace::Namespace()
-    : next_buffer_id(1),
-      next_image_id(1),
-      next_texture_id(1),
-      next_renderbuffer_id(1) {}
-
-TestWebGraphicsContext3D::Namespace::~Namespace() {
-  g_shared_namespace_lock.Get().AssertAcquired();
-  if (shared_namespace_ == this)
-    shared_namespace_ = nullptr;
-}
-
-// static
-std::unique_ptr<TestWebGraphicsContext3D> TestWebGraphicsContext3D::Create() {
-  return base::WrapUnique(new TestWebGraphicsContext3D());
-}
-
-TestWebGraphicsContext3D::TestWebGraphicsContext3D()
-    : context_id_(NextContextId()),
-      times_bind_texture_succeeds_(-1),
-      times_end_query_succeeds_(-1),
-      context_lost_(false),
-      times_map_buffer_chromium_succeeds_(-1),
-      next_program_id_(1000),
-      next_shader_id_(2000),
-      next_framebuffer_id_(1),
-      current_framebuffer_(0),
-      reshape_called_(false),
-      width_(0),
-      height_(0),
-      scale_factor_(-1.f),
-      test_support_(nullptr),
-      last_update_type_(NO_UPDATE),
-      next_insert_fence_sync_(1),
-      unpack_alignment_(4),
-      weak_ptr_factory_(this) {
-  CreateNamespace();
-}
-
-TestWebGraphicsContext3D::~TestWebGraphicsContext3D() {
-  base::AutoLock lock(g_shared_namespace_lock.Get());
-  namespace_ = nullptr;
-}
-
-void TestWebGraphicsContext3D::CreateNamespace() {
-  base::AutoLock lock(g_shared_namespace_lock.Get());
-  if (shared_namespace_) {
-    namespace_ = shared_namespace_;
-  } else {
-    namespace_ = new Namespace;
-    shared_namespace_ = namespace_.get();
-  }
-}
-
-void TestWebGraphicsContext3D::reshapeWithScaleFactor(int width,
-                                                      int height,
-                                                      float scale_factor) {
-  reshape_called_ = true;
-  width_ = width;
-  height_ = height;
-  scale_factor_ = scale_factor;
-}
-
-bool TestWebGraphicsContext3D::isContextLost() {
-  return context_lost_;
-}
-
-GLenum TestWebGraphicsContext3D::checkFramebufferStatus(GLenum target) {
-  if (context_lost_)
-    return GL_FRAMEBUFFER_UNDEFINED_OES;
-  return GL_FRAMEBUFFER_COMPLETE;
-}
-
-GLint TestWebGraphicsContext3D::getUniformLocation(GLuint program,
-                                                   const GLchar* name) {
-  return 0;
-}
-
-GLsizeiptr TestWebGraphicsContext3D::getVertexAttribOffset(GLuint index,
-                                                           GLenum pname) {
-  return 0;
-}
-
-GLboolean TestWebGraphicsContext3D::isBuffer(GLuint buffer) {
-  return false;
-}
-
-GLboolean TestWebGraphicsContext3D::isEnabled(GLenum cap) {
-  return false;
-}
-
-GLboolean TestWebGraphicsContext3D::isFramebuffer(GLuint framebuffer) {
-  return false;
-}
-
-GLboolean TestWebGraphicsContext3D::isProgram(GLuint program) {
-  return false;
-}
-
-GLboolean TestWebGraphicsContext3D::isRenderbuffer(GLuint renderbuffer) {
-  return false;
-}
-
-GLboolean TestWebGraphicsContext3D::isShader(GLuint shader) {
-  return false;
-}
-
-GLboolean TestWebGraphicsContext3D::isTexture(GLuint texture) {
-  return false;
-}
-
-void TestWebGraphicsContext3D::genBuffers(GLsizei count, GLuint* ids) {
-  for (int i = 0; i < count; ++i)
-    ids[i] = NextBufferId();
-}
-
-void TestWebGraphicsContext3D::genFramebuffers(GLsizei count, GLuint* ids) {
-  for (int i = 0; i < count; ++i)
-    ids[i] = NextFramebufferId();
-}
-
-void TestWebGraphicsContext3D::genRenderbuffers(GLsizei count, GLuint* ids) {
-  for (int i = 0; i < count; ++i)
-    ids[i] = NextRenderbufferId();
-}
-
-void TestWebGraphicsContext3D::genTextures(GLsizei count, GLuint* ids) {
-  for (int i = 0; i < count; ++i) {
-    ids[i] = NextTextureId();
-    DCHECK_NE(ids[i], kExternalTextureId);
-  }
-  base::AutoLock lock(namespace_->lock);
-  for (int i = 0; i < count; ++i)
-    namespace_->textures.Append(ids[i], new TestTexture());
-}
-
-void TestWebGraphicsContext3D::deleteBuffers(GLsizei count, const GLuint* ids) {
-  for (int i = 0; i < count; ++i)
-    RetireBufferId(ids[i]);
-}
-
-void TestWebGraphicsContext3D::deleteFramebuffers(GLsizei count,
-                                                  const GLuint* ids) {
-  for (int i = 0; i < count; ++i) {
-    if (ids[i]) {
-      RetireFramebufferId(ids[i]);
-      if (ids[i] == current_framebuffer_)
-        current_framebuffer_ = 0;
-    }
-  }
-}
-
-void TestWebGraphicsContext3D::deleteRenderbuffers(GLsizei count,
-                                                   const GLuint* ids) {
-  for (int i = 0; i < count; ++i)
-    RetireRenderbufferId(ids[i]);
-}
-
-void TestWebGraphicsContext3D::deleteTextures(GLsizei count,
-                                              const GLuint* ids) {
-  for (int i = 0; i < count; ++i)
-    RetireTextureId(ids[i]);
-  base::AutoLock lock(namespace_->lock);
-  for (int i = 0; i < count; ++i) {
-    namespace_->textures.Remove(ids[i]);
-    texture_targets_.UnbindTexture(ids[i]);
-  }
-}
-
-GLuint TestWebGraphicsContext3D::createBuffer() {
-  GLuint id;
-  genBuffers(1, &id);
-  return id;
-}
-
-GLuint TestWebGraphicsContext3D::createFramebuffer() {
-  GLuint id;
-  genFramebuffers(1, &id);
-  return id;
-}
-
-GLuint TestWebGraphicsContext3D::createRenderbuffer() {
-  GLuint id;
-  genRenderbuffers(1, &id);
-  return id;
-}
-
-GLuint TestWebGraphicsContext3D::createTexture() {
-  GLuint id;
-  genTextures(1, &id);
-  return id;
-}
-
-void TestWebGraphicsContext3D::deleteBuffer(GLuint id) {
-  deleteBuffers(1, &id);
-}
-
-void TestWebGraphicsContext3D::deleteFramebuffer(GLuint id) {
-  deleteFramebuffers(1, &id);
-}
-
-void TestWebGraphicsContext3D::deleteRenderbuffer(GLuint id) {
-  deleteRenderbuffers(1, &id);
-}
-
-void TestWebGraphicsContext3D::deleteTexture(GLuint id) {
-  deleteTextures(1, &id);
-}
-
-unsigned TestWebGraphicsContext3D::createProgram() {
-  unsigned program = next_program_id_++ | context_id_ << 16;
-  program_set_.insert(program);
-  return program;
-}
-
-GLuint TestWebGraphicsContext3D::createShader(GLenum) {
-  unsigned shader = next_shader_id_++ | context_id_ << 16;
-  shader_set_.insert(shader);
-  return shader;
-}
-
-GLuint TestWebGraphicsContext3D::createExternalTexture() {
-  base::AutoLock lock(namespace_->lock);
-  namespace_->textures.Append(kExternalTextureId, new TestTexture());
-  return kExternalTextureId;
-}
-
-void TestWebGraphicsContext3D::deleteProgram(GLuint id) {
-  if (!program_set_.count(id))
-    ADD_FAILURE() << "deleteProgram called on unknown program " << id;
-  program_set_.erase(id);
-}
-
-void TestWebGraphicsContext3D::deleteShader(GLuint id) {
-  if (!shader_set_.count(id))
-    ADD_FAILURE() << "deleteShader called on unknown shader " << id;
-  shader_set_.erase(id);
-}
-
-void TestWebGraphicsContext3D::attachShader(GLuint program, GLuint shader) {
-  if (!program_set_.count(program))
-    ADD_FAILURE() << "attachShader called with unknown program " << program;
-  if (!shader_set_.count(shader))
-    ADD_FAILURE() << "attachShader called with unknown shader " << shader;
-}
-
-void TestWebGraphicsContext3D::useProgram(GLuint program) {
-  if (!program)
-    return;
-  if (!program_set_.count(program))
-    ADD_FAILURE() << "useProgram called on unknown program " << program;
-}
-
-void TestWebGraphicsContext3D::bindFramebuffer(GLenum target,
-                                               GLuint framebuffer) {
-  base::AutoLock lock_for_framebuffer_access(namespace_->lock);
-  if (framebuffer != 0 &&
-      framebuffer_set_.find(framebuffer) == framebuffer_set_.end()) {
-    ADD_FAILURE() << "bindFramebuffer called with unknown framebuffer";
-  } else if (framebuffer != 0 && (framebuffer >> 16) != context_id_) {
-    ADD_FAILURE()
-        << "bindFramebuffer called with framebuffer from other context";
-  } else {
-    current_framebuffer_ = framebuffer;
-  }
-}
-
-void TestWebGraphicsContext3D::bindRenderbuffer(GLenum target,
-                                                GLuint renderbuffer) {
-  if (!renderbuffer)
-    return;
-  base::AutoLock lock_for_renderbuffer_access(namespace_->lock);
-  if (renderbuffer != 0 && namespace_->renderbuffer_set.find(renderbuffer) ==
-                               namespace_->renderbuffer_set.end()) {
-    ADD_FAILURE() << "bindRenderbuffer called with unknown renderbuffer";
-  } else if ((renderbuffer >> 16) != context_id_) {
-    ADD_FAILURE()
-        << "bindRenderbuffer called with renderbuffer from other context";
-  }
-}
-
-void TestWebGraphicsContext3D::bindTexture(GLenum target, GLuint texture_id) {
-  if (times_bind_texture_succeeds_ >= 0) {
-    if (!times_bind_texture_succeeds_) {
-      loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
-                          GL_INNOCENT_CONTEXT_RESET_ARB);
-    }
-    --times_bind_texture_succeeds_;
-  }
-
-  if (!texture_id)
-    return;
-  base::AutoLock lock(namespace_->lock);
-  DCHECK(namespace_->textures.ContainsId(texture_id));
-  texture_targets_.BindTexture(target, texture_id);
-  used_textures_.insert(texture_id);
-}
-
-GLuint TestWebGraphicsContext3D::BoundTextureId(GLenum target) {
-  return texture_targets_.BoundTexture(target);
-}
-
-scoped_refptr<TestTexture> TestWebGraphicsContext3D::BoundTexture(
-    GLenum target) {
-  // The caller is expected to lock the namespace for texture access.
-  namespace_->lock.AssertAcquired();
-  return namespace_->textures.TextureForId(BoundTextureId(target));
-}
-
-scoped_refptr<TestTexture> TestWebGraphicsContext3D::UnboundTexture(
-    GLuint texture) {
-  // The caller is expected to lock the namespace for texture access.
-  namespace_->lock.AssertAcquired();
-  return namespace_->textures.TextureForId(texture);
-}
-
-void TestWebGraphicsContext3D::CheckTextureIsBound(GLenum target) {
-  DCHECK(BoundTextureId(target));
-}
-
-GLuint TestWebGraphicsContext3D::createQueryEXT() {
-  return 1u;
-}
-
-void TestWebGraphicsContext3D::endQueryEXT(GLenum target) {
-  if (times_end_query_succeeds_ >= 0) {
-    if (!times_end_query_succeeds_) {
-      loseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
-                          GL_INNOCENT_CONTEXT_RESET_ARB);
-    }
-    --times_end_query_succeeds_;
-  }
-}
-
-void TestWebGraphicsContext3D::getQueryObjectuivEXT(GLuint query,
-                                                    GLenum pname,
-                                                    GLuint* params) {
-  // If the context is lost, behave as if result is available.
-  if (pname == GL_QUERY_RESULT_AVAILABLE_EXT)
-    *params = 1;
-}
-
-void TestWebGraphicsContext3D::getIntegerv(GLenum pname, GLint* value) {
-  if (pname == GL_MAX_TEXTURE_SIZE)
-    *value = test_capabilities_.max_texture_size;
-  else if (pname == GL_ACTIVE_TEXTURE)
-    *value = GL_TEXTURE0;
-  else if (pname == GL_UNPACK_ALIGNMENT)
-    *value = unpack_alignment_;
-  else if (pname == GL_FRAMEBUFFER_BINDING)
-    *value = current_framebuffer_;
-  else if (pname == GL_MAX_SAMPLES)
-    *value = test_capabilities_.max_samples;
-}
-
-void TestWebGraphicsContext3D::getProgramiv(GLuint program,
-                                            GLenum pname,
-                                            GLint* value) {
-  if (pname == GL_LINK_STATUS)
-    *value = 1;
-}
-
-void TestWebGraphicsContext3D::getShaderiv(GLuint shader,
-                                           GLenum pname,
-                                           GLint* value) {
-  if (pname == GL_COMPILE_STATUS)
-    *value = 1;
-}
-
-void TestWebGraphicsContext3D::getShaderPrecisionFormat(GLenum shadertype,
-                                                        GLenum precisiontype,
-                                                        GLint* range,
-                                                        GLint* precision) {
-  // Return the minimum precision requirements of the GLES2
-  // specification.
-  switch (precisiontype) {
-    case GL_LOW_INT:
-      range[0] = 8;
-      range[1] = 8;
-      *precision = 0;
-      break;
-    case GL_MEDIUM_INT:
-      range[0] = 10;
-      range[1] = 10;
-      *precision = 0;
-      break;
-    case GL_HIGH_INT:
-      range[0] = 16;
-      range[1] = 16;
-      *precision = 0;
-      break;
-    case GL_LOW_FLOAT:
-      range[0] = 8;
-      range[1] = 8;
-      *precision = 8;
-      break;
-    case GL_MEDIUM_FLOAT:
-      range[0] = 14;
-      range[1] = 14;
-      *precision = 10;
-      break;
-    case GL_HIGH_FLOAT:
-      range[0] = 62;
-      range[1] = 62;
-      *precision = 16;
-      break;
-    default:
-      NOTREACHED();
-      break;
-  }
-}
-
-void TestWebGraphicsContext3D::genMailboxCHROMIUM(GLbyte* mailbox) {
-  static char mailbox_name1 = '1';
-  static char mailbox_name2 = '1';
-  mailbox[0] = mailbox_name1;
-  mailbox[1] = mailbox_name2;
-  mailbox[2] = '\0';
-  if (++mailbox_name1 == 0) {
-    mailbox_name1 = '1';
-    ++mailbox_name2;
-  }
-}
-
-GLuint TestWebGraphicsContext3D::createAndConsumeTextureCHROMIUM(
-    const GLbyte* mailbox) {
-  return createTexture();
-}
-
-void TestWebGraphicsContext3D::loseContextCHROMIUM(GLenum current,
-                                                   GLenum other) {
-  if (context_lost_)
-    return;
-  context_lost_ = true;
-  if (!context_lost_callback_.is_null())
-    context_lost_callback_.Run();
-
-  for (size_t i = 0; i < shared_contexts_.size(); ++i)
-    shared_contexts_[i]->loseContextCHROMIUM(current, other);
-  shared_contexts_.clear();
-}
-
-void TestWebGraphicsContext3D::finish() {
-  test_support_->CallAllSyncPointCallbacks();
-}
-
-void TestWebGraphicsContext3D::flush() {
-  test_support_->CallAllSyncPointCallbacks();
-}
-
-void TestWebGraphicsContext3D::shallowFinishCHROMIUM() {
-  test_support_->CallAllSyncPointCallbacks();
-}
-
-GLint TestWebGraphicsContext3D::getAttribLocation(GLuint program,
-                                                  const GLchar* name) {
-  return 0;
-}
-
-GLenum TestWebGraphicsContext3D::getError() {
-  return GL_NO_ERROR;
-}
-
-void TestWebGraphicsContext3D::bindBuffer(GLenum target, GLuint buffer) {
-  bound_buffer_[target] = buffer;
-  if (!buffer)
-    return;
-  unsigned context_id = buffer >> 16;
-  unsigned buffer_id = buffer & 0xffff;
-  base::AutoLock lock(namespace_->lock);
-  DCHECK(buffer_id);
-  DCHECK_LT(buffer_id, namespace_->next_buffer_id);
-  DCHECK_EQ(context_id, context_id_);
-
-  std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
-      namespace_->buffers;
-  if (buffers.count(bound_buffer_[target]) == 0)
-    buffers[bound_buffer_[target]] = base::WrapUnique(new Buffer);
-
-  buffers[bound_buffer_[target]]->target = target;
-}
-
-void TestWebGraphicsContext3D::bufferData(GLenum target,
-                                          GLsizeiptr size,
-                                          const void* data,
-                                          GLenum usage) {
-  base::AutoLock lock(namespace_->lock);
-  std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
-      namespace_->buffers;
-  DCHECK_GT(bound_buffer_.count(target), 0u);
-  DCHECK_GT(buffers.count(bound_buffer_[target]), 0u);
-  DCHECK_EQ(target, buffers[bound_buffer_[target]]->target);
-  Buffer* buffer = buffers[bound_buffer_[target]].get();
-  if (context_lost_) {
-    buffer->pixels = nullptr;
-    return;
-  }
-
-  buffer->pixels.reset(new uint8_t[size]);
-  buffer->size = size;
-  if (data != nullptr)
-    memcpy(buffer->pixels.get(), data, size);
-}
-
-void TestWebGraphicsContext3D::pixelStorei(GLenum pname, GLint param) {
-  switch (pname) {
-    case GL_UNPACK_ALIGNMENT:
-      // Param should be a power of two <= 8.
-      EXPECT_EQ(0, param & (param - 1));
-      EXPECT_GE(8, param);
-      switch (param) {
-        case 1:
-        case 2:
-        case 4:
-        case 8:
-          unpack_alignment_ = param;
-          break;
-        default:
-          break;
-      }
-      break;
-    default:
-      break;
-  }
-}
-
-void* TestWebGraphicsContext3D::mapBufferCHROMIUM(GLenum target,
-                                                  GLenum access) {
-  base::AutoLock lock(namespace_->lock);
-  std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
-      namespace_->buffers;
-  DCHECK_GT(bound_buffer_.count(target), 0u);
-  DCHECK_GT(buffers.count(bound_buffer_[target]), 0u);
-  DCHECK_EQ(target, buffers[bound_buffer_[target]]->target);
-  if (times_map_buffer_chromium_succeeds_ >= 0) {
-    if (!times_map_buffer_chromium_succeeds_) {
-      return nullptr;
-    }
-    --times_map_buffer_chromium_succeeds_;
-  }
-
-  return buffers[bound_buffer_[target]]->pixels.get();
-}
-
-GLboolean TestWebGraphicsContext3D::unmapBufferCHROMIUM(GLenum target) {
-  base::AutoLock lock(namespace_->lock);
-  std::unordered_map<unsigned, std::unique_ptr<Buffer>>& buffers =
-      namespace_->buffers;
-  DCHECK_GT(bound_buffer_.count(target), 0u);
-  DCHECK_GT(buffers.count(bound_buffer_[target]), 0u);
-  DCHECK_EQ(target, buffers[bound_buffer_[target]]->target);
-  buffers[bound_buffer_[target]]->pixels = nullptr;
-  return true;
-}
-
-GLuint TestWebGraphicsContext3D::createImageCHROMIUM(ClientBuffer buffer,
-                                                     GLsizei width,
-                                                     GLsizei height,
-                                                     GLenum internalformat) {
-  DCHECK(internalformat == GL_RGB || internalformat == GL_RGBA ||
-         (test_capabilities_.texture_format_bgra8888 &&
-          internalformat == GL_BGRA_EXT));
-  GLuint image_id = NextImageId();
-  base::AutoLock lock(namespace_->lock);
-  std::unordered_set<unsigned>& images = namespace_->images;
-  images.insert(image_id);
-  return image_id;
-}
-
-void TestWebGraphicsContext3D::destroyImageCHROMIUM(GLuint id) {
-  RetireImageId(id);
-  base::AutoLock lock(namespace_->lock);
-  std::unordered_set<unsigned>& images = namespace_->images;
-  if (!images.count(id))
-    ADD_FAILURE() << "destroyImageCHROMIUM called on unknown image " << id;
-  images.erase(id);
-}
-
-GLuint TestWebGraphicsContext3D::createGpuMemoryBufferImageCHROMIUM(
-    GLsizei width,
-    GLsizei height,
-    GLenum internalformat,
-    GLenum usage) {
-  DCHECK(internalformat == GL_RGB || internalformat == GL_RGBA ||
-         (test_capabilities_.texture_format_bgra8888 &&
-          internalformat == GL_BGRA_EXT));
-  GLuint image_id = NextImageId();
-  base::AutoLock lock(namespace_->lock);
-  std::unordered_set<unsigned>& images = namespace_->images;
-  images.insert(image_id);
-  return image_id;
-}
-
-void TestWebGraphicsContext3D::genSyncToken(GLbyte* sync_token) {
-  // Don't return a valid sync token if context is lost. This matches behavior
-  // of CommandBufferProxyImpl.
-  if (context_lost_)
-    return;
-  gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO,
-                                 gpu::CommandBufferId(),
-                                 next_insert_fence_sync_++);
-  sync_token_data.SetVerifyFlush();
-  memcpy(sync_token, &sync_token_data, sizeof(sync_token_data));
-}
-
-void TestWebGraphicsContext3D::waitSyncToken(const GLbyte* sync_token) {
-  if (sync_token) {
-    gpu::SyncToken sync_token_data;
-    memcpy(sync_token_data.GetData(), sync_token, sizeof(sync_token_data));
-    if (sync_token_data.HasData())
-      last_waited_sync_token_ = sync_token_data;
-  }
-}
-
-void TestWebGraphicsContext3D::verifySyncTokens(GLbyte** sync_tokens,
-                                                GLsizei count) {
-  for (GLsizei i = 0; i < count; ++i) {
-    gpu::SyncToken sync_token_data;
-    memcpy(sync_token_data.GetData(), sync_tokens[i], sizeof(sync_token_data));
-    sync_token_data.SetVerifyFlush();
-    memcpy(sync_tokens[i], &sync_token_data, sizeof(sync_token_data));
-  }
-}
-
-size_t TestWebGraphicsContext3D::NumTextures() const {
-  base::AutoLock lock(namespace_->lock);
-  return namespace_->textures.Size();
-}
-
-GLuint TestWebGraphicsContext3D::TextureAt(int i) const {
-  base::AutoLock lock(namespace_->lock);
-  return namespace_->textures.IdAt(i);
-}
-
-GLuint TestWebGraphicsContext3D::NextTextureId() {
-  base::AutoLock lock(namespace_->lock);
-  GLuint texture_id = namespace_->next_texture_id++;
-  DCHECK(texture_id < (1 << 16));
-  texture_id |= context_id_ << 16;
-  return texture_id;
-}
-
-void TestWebGraphicsContext3D::RetireTextureId(GLuint id) {
-  base::AutoLock lock(namespace_->lock);
-  unsigned context_id = id >> 16;
-  unsigned texture_id = id & 0xffff;
-  DCHECK(texture_id);
-  DCHECK_LT(texture_id, namespace_->next_texture_id);
-  DCHECK_EQ(context_id, context_id_);
-}
-
-GLuint TestWebGraphicsContext3D::NextBufferId() {
-  base::AutoLock lock(namespace_->lock);
-  GLuint buffer_id = namespace_->next_buffer_id++;
-  DCHECK(buffer_id < (1 << 16));
-  buffer_id |= context_id_ << 16;
-  return buffer_id;
-}
-
-void TestWebGraphicsContext3D::RetireBufferId(GLuint id) {
-  base::AutoLock lock(namespace_->lock);
-  unsigned context_id = id >> 16;
-  unsigned buffer_id = id & 0xffff;
-  DCHECK(buffer_id);
-  DCHECK_LT(buffer_id, namespace_->next_buffer_id);
-  DCHECK_EQ(context_id, context_id_);
-}
-
-GLuint TestWebGraphicsContext3D::NextImageId() {
-  base::AutoLock lock(namespace_->lock);
-  GLuint image_id = namespace_->next_image_id++;
-  DCHECK(image_id < (1 << 16));
-  image_id |= context_id_ << 16;
-  return image_id;
-}
-
-void TestWebGraphicsContext3D::RetireImageId(GLuint id) {
-  base::AutoLock lock(namespace_->lock);
-  unsigned context_id = id >> 16;
-  unsigned image_id = id & 0xffff;
-  DCHECK(image_id);
-  DCHECK_LT(image_id, namespace_->next_image_id);
-  DCHECK_EQ(context_id, context_id_);
-}
-
-GLuint TestWebGraphicsContext3D::NextFramebufferId() {
-  base::AutoLock lock_for_framebuffer_access(namespace_->lock);
-  GLuint id = next_framebuffer_id_++;
-  DCHECK(id < (1 << 16));
-  id |= context_id_ << 16;
-  framebuffer_set_.insert(id);
-  return id;
-}
-
-void TestWebGraphicsContext3D::RetireFramebufferId(GLuint id) {
-  base::AutoLock lock_for_framebuffer_access(namespace_->lock);
-  DCHECK(framebuffer_set_.find(id) != framebuffer_set_.end());
-  framebuffer_set_.erase(id);
-}
-
-GLuint TestWebGraphicsContext3D::NextRenderbufferId() {
-  base::AutoLock lock_for_renderbuffer_access(namespace_->lock);
-  GLuint id = namespace_->next_renderbuffer_id++;
-  DCHECK(id < (1 << 16));
-  id |= context_id_ << 16;
-  namespace_->renderbuffer_set.insert(id);
-  return id;
-}
-
-void TestWebGraphicsContext3D::RetireRenderbufferId(GLuint id) {
-  base::AutoLock lock_for_renderbuffer_access(namespace_->lock);
-  DCHECK(namespace_->renderbuffer_set.find(id) !=
-         namespace_->renderbuffer_set.end());
-  namespace_->renderbuffer_set.erase(id);
-}
-
-void TestWebGraphicsContext3D::SetMaxSamples(int max_samples) {
-  test_capabilities_.max_samples = max_samples;
-}
-
-size_t TestWebGraphicsContext3D::NumFramebuffers() const {
-  base::AutoLock lock_for_framebuffer_access(namespace_->lock);
-  return framebuffer_set_.size();
-}
-
-size_t TestWebGraphicsContext3D::NumRenderbuffers() const {
-  base::AutoLock lock_for_renderbuffer_access(namespace_->lock);
-  return namespace_->renderbuffer_set.size();
-}
-
-TestWebGraphicsContext3D::TextureTargets::TextureTargets() {
-  // Initialize default bindings.
-  bound_textures_[GL_TEXTURE_2D] = 0;
-  bound_textures_[GL_TEXTURE_EXTERNAL_OES] = 0;
-  bound_textures_[GL_TEXTURE_RECTANGLE_ARB] = 0;
-}
-
-TestWebGraphicsContext3D::TextureTargets::~TextureTargets() = default;
-
-void TestWebGraphicsContext3D::TextureTargets::BindTexture(GLenum target,
-                                                           GLuint id) {
-  // Make sure this is a supported target by seeing if it was bound to before.
-  DCHECK(bound_textures_.find(target) != bound_textures_.end());
-  bound_textures_[target] = id;
-}
-
-void TestWebGraphicsContext3D::texParameteri(GLenum target,
-                                             GLenum pname,
-                                             GLint param) {
-  CheckTextureIsBound(target);
-  base::AutoLock lock_for_texture_access(namespace_->lock);
-  scoped_refptr<TestTexture> texture = BoundTexture(target);
-  DCHECK(texture->IsValidParameter(pname));
-  texture->params[pname] = param;
-}
-
-void TestWebGraphicsContext3D::getTexParameteriv(GLenum target,
-                                                 GLenum pname,
-                                                 GLint* value) {
-  CheckTextureIsBound(target);
-  base::AutoLock lock_for_texture_access(namespace_->lock);
-  scoped_refptr<TestTexture> texture = BoundTexture(target);
-  DCHECK(texture->IsValidParameter(pname));
-  TestTexture::TextureParametersMap::iterator it = texture->params.find(pname);
-  if (it != texture->params.end())
-    *value = it->second;
-}
-
-void TestWebGraphicsContext3D::TextureTargets::UnbindTexture(GLuint id) {
-  // Bind zero to any targets that the id is bound to.
-  for (TargetTextureMap::iterator it = bound_textures_.begin();
-       it != bound_textures_.end(); it++) {
-    if (it->second == id)
-      it->second = 0;
-  }
-}
-
-GLuint TestWebGraphicsContext3D::TextureTargets::BoundTexture(GLenum target) {
-  DCHECK(bound_textures_.find(target) != bound_textures_.end());
-  return bound_textures_[target];
-}
-
-TestWebGraphicsContext3D::Buffer::Buffer() : target(0), size(0) {}
-
-TestWebGraphicsContext3D::Buffer::~Buffer() = default;
-
-TestWebGraphicsContext3D::Image::Image() = default;
-
-TestWebGraphicsContext3D::Image::~Image() = default;
-
-}  // namespace viz
diff --git a/components/viz/test/test_web_graphics_context_3d.h b/components/viz/test/test_web_graphics_context_3d.h
deleted file mode 100644
index 122ef46..0000000
--- a/components/viz/test/test_web_graphics_context_3d.h
+++ /dev/null
@@ -1,523 +0,0 @@
-// Copyright 2013 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 COMPONENTS_VIZ_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
-#define COMPONENTS_VIZ_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
-
-#include <stddef.h>
-#include <stdint.h>
-
-#include <memory>
-#include <unordered_map>
-#include <unordered_set>
-#include <vector>
-
-#include "base/callback.h"
-#include "base/compiler_specific.h"
-#include "base/containers/flat_map.h"
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "base/stl_util.h"
-#include "base/synchronization/lock.h"
-#include "components/viz/test/ordered_texture_map.h"
-#include "components/viz/test/test_texture.h"
-#include "gpu/command_buffer/common/capabilities.h"
-#include "gpu/command_buffer/common/sync_token.h"
-#include "third_party/khronos/GLES2/gl2.h"
-#include "ui/gfx/geometry/rect.h"
-
-extern "C" typedef struct _ClientBuffer* ClientBuffer;
-
-namespace viz {
-
-class TestContextSupport;
-
-class TestWebGraphicsContext3D {
- public:
-  static std::unique_ptr<TestWebGraphicsContext3D> Create();
-
-  virtual ~TestWebGraphicsContext3D();
-
-  void set_context_lost_callback(const base::Closure& callback) {
-    context_lost_callback_ = callback;
-  }
-
-  virtual void reshapeWithScaleFactor(int width,
-                                      int height,
-                                      float scale_factor);
-
-  virtual bool isContextLost();
-
-  virtual void discardFramebufferEXT(GLenum target,
-                                     GLsizei num_attachments,
-                                     const GLenum* attachments) {}
-
-  virtual void activeTexture(GLenum texture) {}
-  virtual void attachShader(GLuint program, GLuint shader);
-  virtual void bindFramebuffer(GLenum target, GLuint framebuffer);
-  virtual void bindRenderbuffer(GLenum target, GLuint renderbuffer);
-  virtual void bindTexture(GLenum target, GLuint texture_id);
-
-  virtual void texParameteri(GLenum target, GLenum pname, GLint param);
-  virtual void getTexParameteriv(GLenum target, GLenum pname, GLint* value);
-  virtual void asyncTexImage2DCHROMIUM(GLenum target,
-                                       GLint level,
-                                       GLenum internalformat,
-                                       GLsizei width,
-                                       GLsizei height,
-                                       GLint border,
-                                       GLenum format,
-                                       GLenum type,
-                                       const void* pixels) {}
-  virtual void asyncTexSubImage2DCHROMIUM(GLenum target,
-                                          GLint level,
-                                          GLint xoffset,
-                                          GLint yoffset,
-                                          GLsizei width,
-                                          GLsizei height,
-                                          GLenum format,
-                                          GLenum type,
-                                          const void* pixels) {}
-  virtual void waitAsyncTexImage2DCHROMIUM(GLenum target) {}
-  virtual void releaseTexImage2DCHROMIUM(GLenum target, GLint image_id) {}
-  virtual void framebufferRenderbuffer(GLenum target,
-                                       GLenum attachment,
-                                       GLenum renderbuffertarget,
-                                       GLuint renderbuffer) {}
-  virtual void framebufferTexture2D(GLenum target,
-                                    GLenum attachment,
-                                    GLenum textarget,
-                                    GLuint texture,
-                                    GLint level) {}
-  virtual void renderbufferStorage(GLenum target,
-                                   GLenum internalformat,
-                                   GLsizei width,
-                                   GLsizei height) {}
-
-  virtual GLenum checkFramebufferStatus(GLenum target);
-
-  virtual void clear(GLbitfield mask) {}
-  virtual void clearColor(GLclampf red,
-                          GLclampf green,
-                          GLclampf blue,
-                          GLclampf alpha) {}
-  virtual void clearStencil(GLint s) {}
-  virtual void compressedTexImage2D(GLenum target,
-                                    GLint level,
-                                    GLenum internal_format,
-                                    GLsizei width,
-                                    GLsizei height,
-                                    GLint border,
-                                    GLsizei image_size,
-                                    const void* data) {}
-  virtual GLint getUniformLocation(GLuint program, const GLchar* name);
-  virtual GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname);
-
-  virtual GLboolean isBuffer(GLuint buffer);
-  virtual GLboolean isEnabled(GLenum cap);
-  virtual GLboolean isFramebuffer(GLuint framebuffer);
-  virtual GLboolean isProgram(GLuint program);
-  virtual GLboolean isRenderbuffer(GLuint renderbuffer);
-  virtual GLboolean isShader(GLuint shader);
-  virtual GLboolean isTexture(GLuint texture);
-
-  virtual void useProgram(GLuint program);
-
-  virtual void viewport(GLint x, GLint y, GLsizei width, GLsizei height) {}
-
-  virtual void genBuffers(GLsizei count, GLuint* ids);
-  virtual void genFramebuffers(GLsizei count, GLuint* ids);
-  virtual void genRenderbuffers(GLsizei count, GLuint* ids);
-  virtual void genTextures(GLsizei count, GLuint* ids);
-
-  virtual void deleteBuffers(GLsizei count, const GLuint* ids);
-  virtual void deleteFramebuffers(GLsizei count, const GLuint* ids);
-  virtual void deleteRenderbuffers(GLsizei count, const GLuint* ids);
-  virtual void deleteTextures(GLsizei count, const GLuint* ids);
-
-  virtual GLuint createBuffer();
-  virtual GLuint createFramebuffer();
-  virtual GLuint createRenderbuffer();
-  virtual GLuint createTexture();
-
-  virtual void deleteBuffer(GLuint id);
-  virtual void deleteFramebuffer(GLuint id);
-  virtual void deleteRenderbuffer(GLuint id);
-  virtual void deleteTexture(GLuint id);
-
-  virtual GLuint createProgram();
-  virtual GLuint createShader(GLenum);
-  virtual GLuint createExternalTexture();
-
-  virtual void deleteProgram(GLuint id);
-  virtual void deleteShader(GLuint id);
-
-  virtual void texStorage2DEXT(GLenum target,
-                               GLsizei levels,
-                               GLenum internalformat,
-                               GLsizei width,
-                               GLsizei height) {}
-  virtual void texStorage2DImageCHROMIUM(GLenum target,
-                                         GLenum internalformat,
-                                         GLenum bufferusage,
-                                         GLsizei width,
-                                         GLsizei height) {}
-
-  virtual GLuint createQueryEXT();
-  virtual void deleteQueryEXT(GLuint query) {}
-  virtual void beginQueryEXT(GLenum target, GLuint query) {}
-  virtual void endQueryEXT(GLenum target);
-  virtual void getQueryObjectuivEXT(GLuint query, GLenum pname, GLuint* params);
-
-  virtual void scissor(GLint x, GLint y, GLsizei width, GLsizei height) {}
-
-  virtual void texImage2D(GLenum target,
-                          GLint level,
-                          GLenum internalformat,
-                          GLsizei width,
-                          GLsizei height,
-                          GLint border,
-                          GLenum format,
-                          GLenum type,
-                          const void* pixels) {}
-
-  virtual void texSubImage2D(GLenum target,
-                             GLint level,
-                             GLint xoffset,
-                             GLint yoffset,
-                             GLsizei width,
-                             GLsizei height,
-                             GLenum format,
-                             GLenum type,
-                             const void* pixels) {}
-
-  virtual void genMailboxCHROMIUM(GLbyte* mailbox);
-  virtual void produceTextureDirectCHROMIUM(GLuint texture,
-                                            const GLbyte* mailbox) {}
-  virtual GLuint createAndConsumeTextureCHROMIUM(const GLbyte* mailbox);
-
-  virtual void loseContextCHROMIUM(GLenum current, GLenum other);
-
-  virtual void bindTexImage2DCHROMIUM(GLenum target, GLint image_id) {}
-
-  virtual void drawArrays(GLenum mode, GLint first, GLsizei count) {}
-  virtual void drawElements(GLenum mode,
-                            GLsizei count,
-                            GLenum type,
-                            GLintptr offset) {}
-  virtual void disable(GLenum cap) {}
-  virtual void enable(GLenum cap) {}
-  virtual void finish();
-  virtual void flush();
-  virtual void shallowFinishCHROMIUM();
-  virtual void shallowFlushCHROMIUM() {}
-
-  virtual void getAttachedShaders(GLuint program,
-                                  GLsizei max_count,
-                                  GLsizei* count,
-                                  GLuint* shaders) {}
-  virtual GLint getAttribLocation(GLuint program, const GLchar* name);
-  virtual void getBooleanv(GLenum pname, GLboolean* value) {}
-  virtual void getBufferParameteriv(GLenum target, GLenum pname, GLint* value) {
-  }
-  virtual GLenum getError();
-  virtual void getFloatv(GLenum pname, GLfloat* value) {}
-  virtual void getFramebufferAttachmentParameteriv(GLenum target,
-                                                   GLenum attachment,
-                                                   GLenum pname,
-                                                   GLint* value) {}
-
-  virtual void getIntegerv(GLenum pname, GLint* value);
-
-  virtual void getProgramiv(GLuint program, GLenum pname, GLint* value);
-
-  virtual void getRenderbufferParameteriv(GLenum target,
-                                          GLenum pname,
-                                          GLint* value) {}
-
-  virtual void getShaderiv(GLuint shader, GLenum pname, GLint* value);
-
-  virtual void getShaderPrecisionFormat(GLenum shadertype,
-                                        GLenum precisiontype,
-                                        GLint* range,
-                                        GLint* precision);
-
-  virtual void getTexParameterfv(GLenum target, GLenum pname, GLfloat* value) {}
-  virtual void getUniformfv(GLuint program, GLint location, GLfloat* value) {}
-  virtual void getUniformiv(GLuint program, GLint location, GLint* value) {}
-  virtual void getVertexAttribfv(GLuint index, GLenum pname, GLfloat* value) {}
-  virtual void getVertexAttribiv(GLuint index, GLenum pname, GLint* value) {}
-
-  virtual void bindBuffer(GLenum target, GLuint buffer);
-  virtual void bufferData(GLenum target,
-                          GLsizeiptr size,
-                          const void* data,
-                          GLenum usage);
-  virtual void pixelStorei(GLenum pname, GLint param);
-  virtual void* mapBufferCHROMIUM(GLenum target, GLenum access);
-  virtual GLboolean unmapBufferCHROMIUM(GLenum target);
-
-  virtual GLuint createImageCHROMIUM(ClientBuffer buffer,
-                                     GLsizei width,
-                                     GLsizei height,
-                                     GLenum internalformat);
-  virtual void destroyImageCHROMIUM(GLuint image_id);
-  virtual GLuint createGpuMemoryBufferImageCHROMIUM(GLsizei width,
-                                                    GLsizei height,
-                                                    GLenum internalformat,
-                                                    GLenum usage);
-
-  virtual void genSyncToken(GLbyte* sync_token);
-  virtual void waitSyncToken(const GLbyte* sync_token);
-  virtual void verifySyncTokens(GLbyte** sync_tokens, GLsizei count);
-
-  const gpu::SyncToken& last_waited_sync_token() const {
-    return last_waited_sync_token_;
-  }
-
-  const gpu::Capabilities& test_capabilities() const {
-    return test_capabilities_;
-  }
-
-  void set_capabilities(const gpu::Capabilities& caps) {
-    test_capabilities_ = caps;
-  }
-
-  void set_context_lost(bool context_lost) { context_lost_ = context_lost; }
-  void set_times_bind_texture_succeeds(int times) {
-    times_bind_texture_succeeds_ = times;
-  }
-  void set_times_end_query_succeeds(int times) {
-    times_end_query_succeeds_ = times;
-  }
-
-  // When set, mapBufferCHROMIUM will return NULL after this many times.
-  void set_times_map_buffer_chromium_succeeds(int times) {
-    times_map_buffer_chromium_succeeds_ = times;
-  }
-
-  size_t NumTextures() const;
-  GLuint TextureAt(int i) const;
-
-  size_t NumUsedTextures() const { return used_textures_.size(); }
-  bool UsedTexture(int texture) const {
-    return base::ContainsKey(used_textures_, texture);
-  }
-  void ResetUsedTextures() { used_textures_.clear(); }
-
-  void set_have_extension_io_surface(bool have) {
-    test_capabilities_.iosurface = have;
-    test_capabilities_.texture_rectangle = have;
-  }
-  void set_have_extension_egl_image(bool have) {
-    test_capabilities_.egl_image_external = have;
-  }
-  void set_have_post_sub_buffer(bool have) {
-    test_capabilities_.post_sub_buffer = have;
-  }
-  void set_have_swap_buffers_with_bounds(bool have) {
-    test_capabilities_.swap_buffers_with_bounds = have;
-  }
-  void set_have_commit_overlay_planes(bool have) {
-    test_capabilities_.commit_overlay_planes = have;
-  }
-  void set_have_discard_framebuffer(bool have) {
-    test_capabilities_.discard_framebuffer = have;
-  }
-  void set_support_compressed_texture_etc1(bool support) {
-    test_capabilities_.texture_format_etc1 = support;
-  }
-  void set_support_texture_format_bgra8888(bool support) {
-    test_capabilities_.texture_format_bgra8888 = support;
-  }
-  void set_support_texture_storage(bool support) {
-    test_capabilities_.texture_storage = support;
-  }
-  void set_support_texture_usage(bool support) {
-    test_capabilities_.texture_usage = support;
-  }
-  void set_support_sync_query(bool support) {
-    test_capabilities_.sync_query = support;
-  }
-  void set_support_texture_rectangle(bool support) {
-    test_capabilities_.texture_rectangle = support;
-  }
-  void set_support_texture_half_float_linear(bool support) {
-    test_capabilities_.texture_half_float_linear = support;
-  }
-  void set_support_texture_norm16(bool support) {
-    test_capabilities_.texture_norm16 = support;
-  }
-  void set_msaa_is_slow(bool msaa_is_slow) {
-    test_capabilities_.msaa_is_slow = msaa_is_slow;
-  }
-  void set_gpu_rasterization(bool gpu_rasterization) {
-    test_capabilities_.gpu_rasterization = gpu_rasterization;
-  }
-  void set_avoid_stencil_buffers(bool avoid_stencil_buffers) {
-    test_capabilities_.avoid_stencil_buffers = avoid_stencil_buffers;
-  }
-  void set_enable_dc_layers(bool support) {
-    test_capabilities_.dc_layers = support;
-  }
-  void set_support_multisample_compatibility(bool support) {
-    test_capabilities_.multisample_compatibility = support;
-  }
-  void set_support_texture_storage_image(bool support) {
-    test_capabilities_.texture_storage_image = support;
-  }
-  void set_support_texture_npot(bool support) {
-    test_capabilities_.texture_npot = support;
-  }
-
-  // When this context is lost, all contexts in its share group are also lost.
-  void add_share_group_context(TestWebGraphicsContext3D* context3d) {
-    shared_contexts_.push_back(context3d);
-  }
-
-  void set_max_texture_size(int size) {
-    test_capabilities_.max_texture_size = size;
-  }
-
-  static const GLuint kExternalTextureId;
-  virtual GLuint NextTextureId();
-  virtual void RetireTextureId(GLuint id);
-
-  virtual GLuint NextBufferId();
-  virtual void RetireBufferId(GLuint id);
-
-  virtual GLuint NextImageId();
-  virtual void RetireImageId(GLuint id);
-
-  virtual GLuint NextFramebufferId();
-  virtual void RetireFramebufferId(GLuint id);
-
-  virtual GLuint NextRenderbufferId();
-  virtual void RetireRenderbufferId(GLuint id);
-
-  void SetMaxSamples(int max_samples);
-  void set_test_support(TestContextSupport* test_support) {
-    test_support_ = test_support;
-  }
-
-  int width() const { return width_; }
-  int height() const { return height_; }
-  bool reshape_called() const { return reshape_called_; }
-  void clear_reshape_called() { reshape_called_ = false; }
-  float scale_factor() const { return scale_factor_; }
-
-  enum UpdateType { NO_UPDATE = 0, PREPARE_TEXTURE, POST_SUB_BUFFER };
-
-  gfx::Rect update_rect() const { return update_rect_; }
-
-  UpdateType last_update_type() { return last_update_type_; }
-
-  size_t NumFramebuffers() const;
-  size_t NumRenderbuffers() const;
-
- protected:
-  struct TextureTargets {
-    TextureTargets();
-    ~TextureTargets();
-
-    void BindTexture(GLenum target, GLuint id);
-    void UnbindTexture(GLuint id);
-
-    GLuint BoundTexture(GLenum target);
-
-   private:
-    using TargetTextureMap = std::unordered_map<GLenum, GLuint>;
-    TargetTextureMap bound_textures_;
-  };
-
-  struct Buffer {
-    Buffer();
-    ~Buffer();
-
-    GLenum target;
-    std::unique_ptr<uint8_t[]> pixels;
-    size_t size;
-
-   private:
-    DISALLOW_COPY_AND_ASSIGN(Buffer);
-  };
-
-  struct Image {
-    Image();
-    ~Image();
-
-    std::unique_ptr<uint8_t[]> pixels;
-
-   private:
-    DISALLOW_COPY_AND_ASSIGN(Image);
-  };
-
-  struct Namespace : public base::RefCountedThreadSafe<Namespace> {
-    Namespace();
-
-    // Protects all fields.
-    base::Lock lock;
-    unsigned next_buffer_id;
-    unsigned next_image_id;
-    unsigned next_texture_id;
-    unsigned next_renderbuffer_id;
-    std::unordered_map<unsigned, std::unique_ptr<Buffer>> buffers;
-    std::unordered_set<unsigned> images;
-    OrderedTextureMap textures;
-    std::unordered_set<unsigned> renderbuffer_set;
-
-   private:
-    friend class base::RefCountedThreadSafe<Namespace>;
-    ~Namespace();
-    DISALLOW_COPY_AND_ASSIGN(Namespace);
-  };
-
-  TestWebGraphicsContext3D();
-
-  void CreateNamespace();
-  GLuint BoundTextureId(GLenum target);
-  scoped_refptr<TestTexture> BoundTexture(GLenum target);
-  scoped_refptr<TestTexture> UnboundTexture(GLuint texture);
-  void CheckTextureIsBound(GLenum target);
-
-  unsigned context_id_;
-  gpu::Capabilities test_capabilities_;
-  int times_bind_texture_succeeds_;
-  int times_end_query_succeeds_;
-  bool context_lost_;
-  int times_map_buffer_chromium_succeeds_;
-  base::Closure context_lost_callback_;
-  std::unordered_set<unsigned> used_textures_;
-  unsigned next_program_id_;
-  std::unordered_set<unsigned> program_set_;
-  unsigned next_shader_id_;
-  std::unordered_set<unsigned> shader_set_;
-  unsigned next_framebuffer_id_;
-  std::unordered_set<unsigned> framebuffer_set_;
-  unsigned current_framebuffer_;
-  std::vector<TestWebGraphicsContext3D*> shared_contexts_;
-  bool reshape_called_;
-  int width_;
-  int height_;
-  float scale_factor_;
-  TestContextSupport* test_support_;
-  gfx::Rect update_rect_;
-  UpdateType last_update_type_;
-  GLuint64 next_insert_fence_sync_;
-  gpu::SyncToken last_waited_sync_token_;
-  int unpack_alignment_;
-
-  base::flat_map<unsigned, unsigned> bound_buffer_;
-  TextureTargets texture_targets_;
-
-  scoped_refptr<Namespace> namespace_;
-  static Namespace* shared_namespace_;
-
-  base::WeakPtrFactory<TestWebGraphicsContext3D> weak_ptr_factory_;
-};
-
-}  // namespace viz
-
-#endif  // COMPONENTS_VIZ_TEST_TEST_WEB_GRAPHICS_CONTEXT_3D_H_
diff --git a/components/viz/test/test_web_graphics_context_3d_unittest.cc b/components/viz/test/test_web_graphics_context_3d_unittest.cc
deleted file mode 100644
index ad2b6ea5..0000000
--- a/components/viz/test/test_web_graphics_context_3d_unittest.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-// Copyright 2013 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 "components/viz/test/test_web_graphics_context_3d.h"
-
-#include <memory>
-
-#include "gpu/GLES2/gl2extchromium.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
-#include "third_party/khronos/GLES2/gl2ext.h"
-
-namespace viz {
-namespace {
-
-static bool check_parameter_value(TestWebGraphicsContext3D* context,
-                                  GLenum pname,
-                                  GLint expected_value) {
-  GLint actual_value = 0;
-  context->getTexParameteriv(GL_TEXTURE_2D, pname, &actual_value);
-  return expected_value == actual_value;
-}
-
-static void expect_default_parameter_values(TestWebGraphicsContext3D* context) {
-  EXPECT_TRUE(check_parameter_value(context, GL_TEXTURE_MAG_FILTER, GL_LINEAR));
-  EXPECT_TRUE(check_parameter_value(context, GL_TEXTURE_MIN_FILTER,
-                                    GL_NEAREST_MIPMAP_LINEAR));
-  EXPECT_TRUE(
-      check_parameter_value(context, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
-  EXPECT_TRUE(
-      check_parameter_value(context, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
-  EXPECT_TRUE(check_parameter_value(context, GL_TEXTURE_USAGE_ANGLE, GL_NONE));
-}
-
-TEST(TestWebGraphicsContext3DTest, GetDefaultTextureParameterValues) {
-  std::unique_ptr<TestWebGraphicsContext3D> context(
-      TestWebGraphicsContext3D::Create());
-
-  GLuint texture = context->createTexture();
-  context->bindTexture(GL_TEXTURE_2D, texture);
-
-  expect_default_parameter_values(context.get());
-}
-
-TEST(TestWebGraphicsContext3DTest, SetAndGetTextureParameter) {
-  std::unique_ptr<TestWebGraphicsContext3D> context(
-      TestWebGraphicsContext3D::Create());
-
-  GLuint texture = context->createTexture();
-  context->bindTexture(GL_TEXTURE_2D, texture);
-  context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-
-  EXPECT_TRUE(
-      check_parameter_value(context.get(), GL_TEXTURE_MIN_FILTER, GL_NEAREST));
-}
-
-TEST(TestWebGraphicsContext3DTest,
-     SetAndGetMultipleTextureParametersOnMultipleTextures) {
-  std::unique_ptr<TestWebGraphicsContext3D> context(
-      TestWebGraphicsContext3D::Create());
-
-  // Set and get non-default texture parameters on the first texture.
-  GLuint first_texture = context->createTexture();
-  context->bindTexture(GL_TEXTURE_2D, first_texture);
-  context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-  context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-
-  EXPECT_TRUE(
-      check_parameter_value(context.get(), GL_TEXTURE_MIN_FILTER, GL_LINEAR));
-  EXPECT_TRUE(
-      check_parameter_value(context.get(), GL_TEXTURE_MAG_FILTER, GL_NEAREST));
-
-  // Set and get different, non-default texture parameters on the second
-  // texture.
-  GLuint second_texture = context->createTexture();
-  context->bindTexture(GL_TEXTURE_2D, second_texture);
-  context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
-                         GL_LINEAR_MIPMAP_NEAREST);
-  context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
-                         GL_LINEAR_MIPMAP_LINEAR);
-
-  EXPECT_TRUE(check_parameter_value(context.get(), GL_TEXTURE_MIN_FILTER,
-                                    GL_LINEAR_MIPMAP_NEAREST));
-  EXPECT_TRUE(check_parameter_value(context.get(), GL_TEXTURE_MAG_FILTER,
-                                    GL_LINEAR_MIPMAP_LINEAR));
-
-  // Get texture parameters on the first texture and verify they are still
-  // intact.
-  context->bindTexture(GL_TEXTURE_2D, first_texture);
-
-  EXPECT_TRUE(
-      check_parameter_value(context.get(), GL_TEXTURE_MIN_FILTER, GL_LINEAR));
-  EXPECT_TRUE(
-      check_parameter_value(context.get(), GL_TEXTURE_MAG_FILTER, GL_NEAREST));
-}
-
-TEST(TestWebGraphicsContext3DTest, UseMultipleRenderAndFramebuffers) {
-  std::unique_ptr<TestWebGraphicsContext3D> context(
-      TestWebGraphicsContext3D::Create());
-
-  GLuint ids[2];
-  context->genFramebuffers(2, ids);
-  EXPECT_NE(ids[0], ids[1]);
-  context->deleteFramebuffers(2, ids);
-
-  context->genRenderbuffers(2, ids);
-  EXPECT_NE(ids[0], ids[1]);
-  context->deleteRenderbuffers(2, ids);
-}
-
-}  // namespace
-}  // namespace viz
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index e7bb350..545d28c 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -94,6 +94,7 @@
     "//gpu/command_buffer/client:gles2_implementation",
     "//gpu/command_buffer/client:gles2_interface",
     "//gpu/command_buffer/client:raster_interface",
+    "//gpu/ipc:gl_in_process_context",
     "//gpu/ipc/common:gpu_preferences_util",
     "//gpu/ipc/host",
     "//gpu/vulkan:buildflags",
diff --git a/content/browser/accessibility/browser_accessibility_com_win.cc b/content/browser/accessibility/browser_accessibility_com_win.cc
index 0cd7fd5a2d..e137418 100644
--- a/content/browser/accessibility/browser_accessibility_com_win.cc
+++ b/content/browser/accessibility/browser_accessibility_com_win.cc
@@ -4,9 +4,6 @@
 
 #include "content/browser/accessibility/browser_accessibility_com_win.h"
 
-#include <UIAutomationClient.h>
-#include <UIAutomationCoreApi.h>
-
 #include <algorithm>
 #include <iterator>
 #include <utility>
@@ -1550,97 +1547,10 @@
     return QueryInterface(riid, object);
   }
 
-  // We only support the IAccessibleEx interface on Windows 8 and above. This
-  // is needed for the on-screen Keyboard to show up in metro mode, when the
-  // user taps an editable portion on the page.
-  // All methods in the IAccessibleEx interface are unimplemented.
-  if (riid == IID_IAccessibleEx &&
-      base::win::GetVersion() >= base::win::VERSION_WIN8) {
-    return QueryInterface(riid, object);
-  }
-
   *object = NULL;
   return E_FAIL;
 }
 
-STDMETHODIMP
-BrowserAccessibilityComWin::GetObjectForChild(long child_id,
-                                              IAccessibleEx** ret) {
-  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_OBJECT_FOR_CHILD);
-  return E_NOTIMPL;
-}
-
-STDMETHODIMP
-BrowserAccessibilityComWin::GetIAccessiblePair(IAccessible** acc,
-                                               long* child_id) {
-  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_IACCESSIBLE_PAIR);
-  return E_NOTIMPL;
-}
-
-STDMETHODIMP BrowserAccessibilityComWin::GetRuntimeId(SAFEARRAY** runtime_id) {
-  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_RUNTIME_ID);
-  return E_NOTIMPL;
-}
-
-STDMETHODIMP
-BrowserAccessibilityComWin::ConvertReturnedElement(
-    IRawElementProviderSimple* element,
-    IAccessibleEx** acc) {
-  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_CONVERT_RETURNED_ELEMENT);
-  return E_NOTIMPL;
-}
-
-STDMETHODIMP BrowserAccessibilityComWin::GetPatternProvider(
-    PATTERNID id,
-    IUnknown** provider) {
-  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_PATTERN_PROVIDER);
-  DVLOG(1) << "In Function: " << __func__ << " for pattern id: " << id;
-  if (!owner())
-    return E_FAIL;
-
-  if (id == UIA_ValuePatternId || id == UIA_TextPatternId) {
-    if (owner()->HasState(ax::mojom::State::kEditable)) {
-      DVLOG(1) << "Returning UIA text provider";
-      base::win::UIATextProvider::CreateTextProvider(GetRangeValueText(), true,
-                                                     provider);
-      return S_OK;
-    }
-  }
-  return E_NOTIMPL;
-}
-
-STDMETHODIMP BrowserAccessibilityComWin::GetPropertyValue(PROPERTYID id,
-                                                          VARIANT* ret) {
-  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_PROPERTY_VALUE);
-  DVLOG(1) << "In Function: " << __func__ << " for property id: " << id;
-  if (!owner())
-    return E_FAIL;
-
-  V_VT(ret) = VT_EMPTY;
-  if (id == UIA_ControlTypePropertyId) {
-    if (owner()->HasState(ax::mojom::State::kEditable)) {
-      V_VT(ret) = VT_I4;
-      ret->lVal = UIA_EditControlTypeId;
-      DVLOG(1) << "Returning Edit control type";
-    } else {
-      DVLOG(1) << "Returning empty control type";
-    }
-  }
-  return S_OK;
-}
-
-STDMETHODIMP BrowserAccessibilityComWin::get_ProviderOptions(
-    ProviderOptions* ret) {
-  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_PROVIDER_OPTIONS);
-  return E_NOTIMPL;
-}
-
-STDMETHODIMP BrowserAccessibilityComWin::get_HostRawElementProvider(
-    IRawElementProviderSimple** provider) {
-  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_HOST_RAW_ELEMENT_PROVIDER);
-  return E_NOTIMPL;
-}
-
 //
 // CComObjectRootEx methods.
 //
diff --git a/content/browser/accessibility/browser_accessibility_com_win.h b/content/browser/accessibility/browser_accessibility_com_win.h
index debd107f..4ce9c39 100644
--- a/content/browser/accessibility/browser_accessibility_com_win.h
+++ b/content/browser/accessibility/browser_accessibility_com_win.h
@@ -12,8 +12,6 @@
 #include <stdint.h>
 #include <vector>
 
-#include <UIAutomationCore.h>
-
 #include "base/compiler_specific.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
@@ -69,19 +67,15 @@
                                  public IAccessibleValue,
                                  public ISimpleDOMDocument,
                                  public ISimpleDOMNode,
-                                 public ISimpleDOMText,
-                                 public IAccessibleEx,
-                                 public IRawElementProviderSimple {
+                                 public ISimpleDOMText {
  public:
   BEGIN_COM_MAP(BrowserAccessibilityComWin)
   COM_INTERFACE_ENTRY(IAccessibleAction)
   COM_INTERFACE_ENTRY(IAccessibleApplication)
-  COM_INTERFACE_ENTRY(IAccessibleEx)
   COM_INTERFACE_ENTRY(IAccessibleHyperlink)
   COM_INTERFACE_ENTRY(IAccessibleHypertext)
   COM_INTERFACE_ENTRY(IAccessibleImage)
   COM_INTERFACE_ENTRY(IAccessibleValue)
-  COM_INTERFACE_ENTRY(IRawElementProviderSimple)
   COM_INTERFACE_ENTRY(ISimpleDOMDocument)
   COM_INTERFACE_ENTRY(ISimpleDOMNode)
   COM_INTERFACE_ENTRY(ISimpleDOMText)
@@ -378,37 +372,6 @@
                                            REFIID riid,
                                            void** object) override;
 
-  // IAccessibleEx methods not implemented.
-  CONTENT_EXPORT STDMETHODIMP GetObjectForChild(long child_id,
-                                                IAccessibleEx** ret) override;
-
-  CONTENT_EXPORT STDMETHODIMP GetIAccessiblePair(IAccessible** acc,
-                                                 long* child_id) override;
-
-  CONTENT_EXPORT STDMETHODIMP GetRuntimeId(SAFEARRAY** runtime_id) override;
-
-  CONTENT_EXPORT STDMETHODIMP
-  ConvertReturnedElement(IRawElementProviderSimple* element,
-                         IAccessibleEx** acc) override;
-
-  //
-  // IRawElementProviderSimple methods.
-  //
-  // The GetPatternProvider/GetPropertyValue methods need to be implemented for
-  // the on-screen keyboard to show up in Windows 8 metro.
-  CONTENT_EXPORT STDMETHODIMP GetPatternProvider(PATTERNID id,
-                                                 IUnknown** provider) override;
-  CONTENT_EXPORT STDMETHODIMP GetPropertyValue(PROPERTYID id,
-                                               VARIANT* ret) override;
-
-  //
-  // IRawElementProviderSimple methods not implemented
-  //
-  CONTENT_EXPORT STDMETHODIMP
-  get_ProviderOptions(enum ProviderOptions* ret) override;
-  CONTENT_EXPORT STDMETHODIMP
-  get_HostRawElementProvider(IRawElementProviderSimple** provider) override;
-
   //
   // CComObjectRootEx methods.
   //
diff --git a/content/browser/child_process_security_policy_impl.h b/content/browser/child_process_security_policy_impl.h
index 47eb3321..81cf618 100644
--- a/content/browser/child_process_security_policy_impl.h
+++ b/content/browser/child_process_security_policy_impl.h
@@ -183,8 +183,9 @@
   bool CanReadRawCookies(int child_id);
 
   // Sets the process as only permitted to use and see the cookies for the
-  // given origin.
-  void LockToOrigin(int child_id, const GURL& gurl);
+  // given origin. Most callers should use RenderProcessHostImpl::LockToOrigin
+  // instead of calling this directly.
+  void LockToOrigin(int child_id, const GURL& lock_url);
 
   // Used to indicate the result of comparing a process's origin lock to
   // another value:
diff --git a/content/browser/gpu/browser_gpu_channel_host_factory.cc b/content/browser/gpu/browser_gpu_channel_host_factory.cc
index cdc4d3d..fccb8da 100644
--- a/content/browser/gpu/browser_gpu_channel_host_factory.cc
+++ b/content/browser/gpu/browser_gpu_channel_host_factory.cc
@@ -15,6 +15,7 @@
 #include "base/trace_event/memory_dump_manager.h"
 #include "base/trace_event/trace_event.h"
 #include "build/build_config.h"
+#include "components/viz/common/features.h"
 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
 #include "content/browser/gpu/gpu_data_manager_impl.h"
 #include "content/browser/gpu/gpu_process_host.h"
@@ -26,6 +27,7 @@
 #include "content/public/common/content_client.h"
 #include "content/public/common/content_switches.h"
 #include "gpu/command_buffer/service/gpu_switches.h"
+#include "gpu/ipc/in_process_command_buffer.h"
 #include "services/resource_coordinator/public/mojom/memory_instrumentation/constants.mojom.h"
 #include "services/service_manager/runner/common/client_util.h"
 #include "ui/base/ui_base_features.h"
@@ -371,6 +373,10 @@
     int gpu_client_id,
     const base::FilePath& cache_dir) {
   GetShaderCacheFactorySingleton()->SetCacheInfo(gpu_client_id, cache_dir);
+  if (base::FeatureList::IsEnabled(features::kVizDisplayCompositor)) {
+    GetShaderCacheFactorySingleton()->SetCacheInfo(
+        gpu::InProcessCommandBuffer::kGpuClientId, cache_dir);
+  }
 }
 
 }  // namespace content
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 6d72db0..62ca3e9b 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -61,6 +61,7 @@
 #include "gpu/config/gpu_driver_bug_list.h"
 #include "gpu/config/gpu_driver_bug_workaround_type.h"
 #include "gpu/ipc/host/shader_disk_cache.h"
+#include "gpu/ipc/in_process_command_buffer.h"
 #include "media/base/media_switches.h"
 #include "media/media_buildflags.h"
 #include "mojo/edk/embedder/embedder.h"
@@ -940,6 +941,16 @@
     return;
   }
 
+  bool oopd_enabled =
+      base::FeatureList::IsEnabled(features::kVizDisplayCompositor);
+  if (oopd_enabled && client_id == gpu::InProcessCommandBuffer::kGpuClientId) {
+    // The display-compositor in the gpu process uses this special client id.
+    callback.Run(mojo::ScopedMessagePipeHandle(), gpu::GPUInfo(),
+                 gpu::GpuFeatureInfo(),
+                 EstablishChannelStatus::GPU_ACCESS_DENIED);
+    return;
+  }
+
   DCHECK_EQ(preempts, allow_view_command_buffers);
   DCHECK_EQ(preempts, allow_real_time_streams);
   bool is_gpu_host = preempts;
@@ -953,6 +964,8 @@
   if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
       switches::kDisableGpuShaderDiskCache)) {
     CreateChannelCache(client_id);
+    if (oopd_enabled)
+      CreateChannelCache(gpu::InProcessCommandBuffer::kGpuClientId);
   }
 }
 
diff --git a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
index e976df9..eaa915e6 100644
--- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
@@ -1446,7 +1446,7 @@
 TEST_F(IndexedDBBackingStoreTest, SchemaUpgradeWithoutBlobsSurvives) {
   struct TestState {
     int64_t database_id;
-    const int64_t object_store_id = 99;
+    int64_t object_store_id = 99;
   } state;
 
   // The database metadata needs to be written so we can verify the blob entry
@@ -1568,6 +1568,9 @@
 
             EXPECT_TRUE(found);
             EXPECT_EQ(3, found_int);
+
+            // Clean up Transactions, etc on the IDB thread.
+            *state = TestState();
           },
           base::Unretained(backing_store()), key1_, value1_,
           base::Unretained(&state)));
@@ -1582,7 +1585,7 @@
 TEST_F(IndexedDBBackingStoreTestWithBlobs, SchemaUpgradeWithBlobsCorrupt) {
   struct TestState {
     int64_t database_id;
-    const int64_t object_store_id = 99;
+    int64_t object_store_id = 99;
     std::unique_ptr<IndexedDBBackingStore::Transaction> transaction1;
     scoped_refptr<TestCallback> callback1;
     std::unique_ptr<IndexedDBBackingStore::Transaction> transaction3;
@@ -1677,6 +1680,9 @@
             const std::string schema_version_key = SchemaVersionKey::Encode();
             indexed_db::PutInt(transaction.get(), schema_version_key, 2);
             ASSERT_TRUE(transaction->Commit().ok());
+
+            // Clean up Transactions, etc on the IDB thread.
+            *state = TestState();
           },
           base::Unretained(this), base::Unretained(&state)));
   RunAllTasksUntilIdle();
diff --git a/content/browser/indexed_db/indexed_db_factory_impl.cc b/content/browser/indexed_db/indexed_db_factory_impl.cc
index 983281f..f063f01 100644
--- a/content/browser/indexed_db/indexed_db_factory_impl.cc
+++ b/content/browser/indexed_db/indexed_db_factory_impl.cc
@@ -379,10 +379,13 @@
       OpenBackingStore(origin, data_directory, request_context_getter,
                        &data_loss_info, &disk_full, &s);
   if (!backing_store.get()) {
-    callbacks->OnError(
-        IndexedDBDatabaseError(blink::kWebIDBDatabaseExceptionUnknownError,
-                               "Internal error opening backing store for "
-                               "indexedDB.webkitGetDatabaseNames."));
+    IndexedDBDatabaseError error(
+        blink::kWebIDBDatabaseExceptionUnknownError,
+        ASCIIToUTF16("Internal error opening backing store for "
+                     "indexedDB.webkitGetDatabaseNames."));
+    callbacks->OnError(error);
+    if (s.IsCorruption())
+      HandleBackingStoreCorruption(origin, error);
     return;
   }
 
diff --git a/content/browser/renderer_host/input/stylus_text_selector.cc b/content/browser/renderer_host/input/stylus_text_selector.cc
index 89660b8..cc4e7eb 100644
--- a/content/browser/renderer_host/input/stylus_text_selector.cc
+++ b/content/browser/renderer_host/input/stylus_text_selector.cc
@@ -103,7 +103,7 @@
   if (!gesture_detector_)
     gesture_detector_ = CreateGestureDetector(this);
 
-  gesture_detector_->OnTouchEvent(event);
+  gesture_detector_->OnTouchEvent(event, false /* should_process_double_tap */);
 
   // Always return true, even if |gesture_detector_| technically doesn't
   // consume the event. This prevents forwarding of a partial touch stream.
diff --git a/content/browser/renderer_host/input/touch_emulator.cc b/content/browser/renderer_host/input/touch_emulator.cc
index 93a9e5f..b36465dd 100644
--- a/content/browser/renderer_host/input/touch_emulator.cc
+++ b/content/browser/renderer_host/input/touch_emulator.cc
@@ -411,6 +411,10 @@
   }
 }
 
+bool TouchEmulator::RequiresDoubleTapGestureEvents() const {
+  return true;
+}
+
 void TouchEmulator::InjectTouchEvent(const blink::WebTouchEvent& event,
                                      base::OnceClosure callback) {
   DCHECK(enabled() && mode_ == Mode::kInjectingTouchEvents);
diff --git a/content/browser/renderer_host/input/touch_emulator.h b/content/browser/renderer_host/input/touch_emulator.h
index 43396f2..1abd4aba3 100644
--- a/content/browser/renderer_host/input/touch_emulator.h
+++ b/content/browser/renderer_host/input/touch_emulator.h
@@ -80,6 +80,7 @@
  private:
   // ui::GestureProviderClient implementation.
   void OnGestureEvent(const ui::GestureEventData& gesture) override;
+  bool RequiresDoubleTapGestureEvents() const override;
 
   // Returns cursor size in DIP.
   gfx::SizeF InitCursorFromResource(
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 68c7581..de5009d 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2547,6 +2547,15 @@
          pending_views_ == 0;
 }
 
+void RenderProcessHostImpl::LockToOrigin(const GURL& lock_url) {
+  ChildProcessSecurityPolicyImpl::GetInstance()->LockToOrigin(GetID(),
+                                                              lock_url);
+  // Notify renderer that it has been locked to a site, if |lock_url| has
+  // scheme and host.
+  if (SiteInstanceImpl::IsOriginLockASite(lock_url))
+    GetRendererInterface()->SetIsLockedToSite();
+}
+
 bool RenderProcessHostImpl::IsForGuestsOnly() const {
   return is_for_guests_only_;
 }
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index 60a1958..d3cc57f 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -213,6 +213,7 @@
   void SetIsUsed() override;
 
   bool HostHasNotBeenUsed() override;
+  void LockToOrigin(const GURL& lock_url) override;
 
   mojom::RouteProvider* GetRemoteRouteProvider();
 
diff --git a/content/browser/renderer_host/render_process_host_unittest.cc b/content/browser/renderer_host/render_process_host_unittest.cc
index 1ed8e6c..97cb243 100644
--- a/content/browser/renderer_host/render_process_host_unittest.cc
+++ b/content/browser/renderer_host/render_process_host_unittest.cc
@@ -888,6 +888,31 @@
   SetBrowserClientForTesting(regular_client);
 }
 
+// Check whether we notify the renderer that it has been locked to a site or
+// not. This should depend on the URL from the SiteInstance.
+TEST_F(RenderProcessHostUnitTest, RendererLockedToSite) {
+  struct TestData {
+    GURL test_url;
+    bool should_lock_renderer;
+  } tests[] = {{GURL("http://"), false},
+               {GURL("http://foo.com"), true},
+               {GURL("http://bar.foo.com"), true},
+               {GURL(""), false},
+               {GURL("google.com"), false},
+               {GURL("http:"), false},
+               {GURL("http://user:pass@google.com:99/foo;bar?q=a#ref"), true}};
+  for (const auto& test : tests) {
+    scoped_refptr<SiteInstanceImpl> site_instance =
+        SiteInstanceImpl::CreateForURL(browser_context(), test.test_url);
+    auto* host =
+        static_cast<MockRenderProcessHost*>(site_instance->GetProcess());
+    if (AreAllSitesIsolatedForTesting())
+      EXPECT_EQ(test.should_lock_renderer, host->is_renderer_locked_to_site());
+    else
+      EXPECT_EQ(false, host->is_renderer_locked_to_site());
+  }
+}
+
 class SpareRenderProcessHostUnitTest : public RenderViewHostImplTestHarness {
  public:
   SpareRenderProcessHostUnitTest() {}
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index 235529cc..fe8544b 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -264,8 +264,10 @@
 
 bool RenderWidgetHostViewAndroid::SynchronizeVisualProperties() {
   if (delegated_frame_host_) {
-    delegated_frame_host_->SynchronizeVisualProperties(
-        GetCompositorViewportPixelSize());
+    delegated_frame_host_->EmbedSurface(
+        local_surface_id_allocator_.GenerateId(),
+        GetCompositorViewportPixelSize(),
+        cc::DeadlinePolicy::UseDefaultDeadline());
 
     // TODO(ericrk): This can be removed once surface synchronization is
     // enabled. https://crbug.com/835102
@@ -962,7 +964,7 @@
 
   viz::BeginFrameAck ack = frame.metadata.begin_frame_ack;
   if (!has_content) {
-    DestroyDelegatedContent();
+    EvictDelegatedFrame();
 
     ack.has_damage = false;
     OnDidNotProduceFrame(ack);
@@ -981,14 +983,14 @@
   OnFrameMetadataUpdated(std::move(metadata), is_transparent);
 }
 
-void RenderWidgetHostViewAndroid::DestroyDelegatedContent() {
+void RenderWidgetHostViewAndroid::EvictDelegatedFrame() {
   if (!delegated_frame_host_)
     return;
 
   DCHECK(delegated_frame_host_->HasDelegatedContent() ==
          frame_evictor_->HasFrame());
 
-  delegated_frame_host_->DestroyDelegatedContent();
+  delegated_frame_host_->EvictDelegatedFrame();
 
   if (frame_evictor_->HasFrame())
     frame_evictor_->DiscardedFrame();
@@ -1017,7 +1019,7 @@
 }
 
 void RenderWidgetHostViewAndroid::ClearCompositorFrame() {
-  DestroyDelegatedContent();
+  EvictDelegatedFrame();
 }
 
 bool RenderWidgetHostViewAndroid::RequestRepaintForTesting() {
@@ -1328,7 +1330,7 @@
 
 void RenderWidgetHostViewAndroid::OnDidUpdateVisualPropertiesComplete(
     const cc::RenderFrameMetadata& metadata) {
-  if (delegated_frame_host_->GetLocalSurfaceIdAllocator()->UpdateFromChild(
+  if (local_surface_id_allocator_.UpdateFromChild(
           metadata.local_surface_id.value_or(viz::LocalSurfaceId()))) {
     // A synchronization event was initiated by the renderer so let's updated
     // the top/bottom bar controls now.
@@ -1336,6 +1338,12 @@
                    metadata.top_controls_shown_ratio,
                    metadata.bottom_controls_height,
                    metadata.bottom_controls_shown_ratio);
+    if (delegated_frame_host_) {
+      delegated_frame_host_->EmbedSurface(
+          local_surface_id_allocator_.GetCurrentLocalSurfaceId(),
+          GetCompositorViewportPixelSize(),
+          cc::DeadlinePolicy::UseDefaultDeadline());
+    }
   }
   host()->SynchronizeVisualProperties();
 }
@@ -1515,10 +1523,6 @@
     view_.RequestDisallowInterceptTouchEvent();
 }
 
-void RenderWidgetHostViewAndroid::EvictDelegatedFrame() {
-  DestroyDelegatedContent();
-}
-
 gfx::Vector2d RenderWidgetHostViewAndroid::GetOffsetFromRootSurface() {
   return gfx::Vector2d(
       0, DoBrowserControlsShrinkBlinkSize() ? GetTopControlsHeight() : 0);
@@ -1988,9 +1992,9 @@
 }
 
 viz::LocalSurfaceId RenderWidgetHostViewAndroid::GetLocalSurfaceId() const {
-  if (delegated_frame_host_)
-    return delegated_frame_host_->GetLocalSurfaceId();
-  return viz::LocalSurfaceId();
+  if (!delegated_frame_host_)
+    return viz::LocalSurfaceId();
+  return local_surface_id_allocator_.GetCurrentLocalSurfaceId();
 }
 
 void RenderWidgetHostViewAndroid::OnRenderWidgetInit() {
@@ -2033,6 +2037,10 @@
   SendGestureEvent(web_gesture);
 }
 
+bool RenderWidgetHostViewAndroid::RequiresDoubleTapGestureEvents() const {
+  return true;
+}
+
 void RenderWidgetHostViewAndroid::OnSizeChanged() {
   if (ime_adapter_android_)
     ime_adapter_android_->UpdateAfterViewSizeChanged();
@@ -2185,7 +2193,7 @@
 }
 
 void RenderWidgetHostViewAndroid::OnLostResources() {
-  DestroyDelegatedContent();
+  EvictDelegatedFrame();
   DCHECK(ack_callbacks_.empty());
 }
 
@@ -2330,10 +2338,13 @@
 }
 
 void RenderWidgetHostViewAndroid::DidNavigate() {
-  RenderWidgetHostViewBase::DidNavigate();
+  if (!delegated_frame_host_) {
+    RenderWidgetHostViewBase::DidNavigate();
+    return;
+  }
 
-  if (delegated_frame_host_)
-    delegated_frame_host_->DidNavigate();
+  SynchronizeVisualProperties();
+  delegated_frame_host_->DidNavigate();
 }
 
 viz::ScopedSurfaceIdAllocator
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index 3a36dd8..adc0b61e 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -22,6 +22,7 @@
 #include "components/viz/common/frame_sinks/begin_frame_args.h"
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/quads/selection.h"
+#include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
 #include "content/browser/renderer_host/input/mouse_wheel_phase_handler.h"
 #include "content/browser/renderer_host/input/stylus_text_selector.h"
 #include "content/browser/renderer_host/render_widget_host_view_base.h"
@@ -207,6 +208,7 @@
 
   // ui::GestureProviderClient implementation.
   void OnGestureEvent(const ui::GestureEventData& gesture) override;
+  bool RequiresDoubleTapGestureEvents() const override;
 
   // ui::WindowAndroidObserver implementation.
   void OnCompositingDidCommit() override {}
@@ -380,7 +382,7 @@
       const gfx::Size& dst_size_in_pixel,
       base::OnceCallback<void(const SkBitmap&)> callback);
 
-  void DestroyDelegatedContent();
+  void EvictDelegatedContent();
   void OnLostResources();
 
   enum BeginFrameRequestType {
@@ -512,6 +514,8 @@
   MouseWheelPhaseHandler mouse_wheel_phase_handler_;
   uint32_t latest_capture_sequence_number_ = 0u;
 
+  viz::ParentLocalSurfaceIdAllocator local_surface_id_allocator_;
+
   base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index bf212212..73b1078 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1604,6 +1604,11 @@
 void RenderWidgetHostViewAura::GetHitTestMask(gfx::Path* mask) const {
 }
 
+bool RenderWidgetHostViewAura::RequiresDoubleTapGestureEvents() const {
+  RenderViewHost* rvh = RenderViewHost::From(host());
+  return rvh && rvh->GetWebkitPreferences().double_tap_to_zoom_enabled;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // RenderWidgetHostViewAura, ui::EventHandler implementation:
 
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 874bf03..fc7f253 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -269,6 +269,7 @@
   void OnWindowTargetVisibilityChanged(bool visible) override;
   bool HasHitTestMask() const override;
   void GetHitTestMask(gfx::Path* mask) const override;
+  bool RequiresDoubleTapGestureEvents() const override;
 
   // Overridden from ui::EventHandler:
   void OnKeyEvent(ui::KeyEvent* event) override;
diff --git a/content/browser/service_manager/service_manager_context.cc b/content/browser/service_manager/service_manager_context.cc
index b3e07a14..cd0ce7bf 100644
--- a/content/browser/service_manager/service_manager_context.cc
+++ b/content/browser/service_manager/service_manager_context.cc
@@ -485,6 +485,7 @@
       service_manager_thread_task_runner_,
       base::BindRepeating(&GetGeolocationRequestContextFromContentClient),
       GetContentClient()->browser()->GetGeolocationApiKey(),
+      GetContentClient()->browser()->ShouldUseGmsCoreGeolocationProvider(),
       base::Bind(&WakeLockContextHost::GetNativeViewForContext),
       base::Bind(&ContentBrowserClient::OverrideSystemLocationProvider,
                  base::Unretained(GetContentClient()->browser())),
diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h
index a4c122f..fd6603e 100644
--- a/content/browser/service_worker/embedded_worker_instance.h
+++ b/content/browser/service_worker/embedded_worker_instance.h
@@ -67,7 +67,7 @@
     SCRIPT_READ_STARTED = 8,
     SCRIPT_READ_FINISHED = 9,
     SCRIPT_STREAMING = 10,
-    // Add new values here.
+    // Add new values here and update enums.xml.
     STARTING_PHASE_MAX_VALUE,
   };
 
diff --git a/content/browser/service_worker/embedded_worker_test_helper.cc b/content/browser/service_worker/embedded_worker_test_helper.cc
index 04fdb68..8de2797 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.cc
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc
@@ -380,6 +380,7 @@
   void SetProcessBackgrounded(bool backgrounded) override { NOTREACHED(); }
   void SetSchedulerKeepActive(bool keep_active) override { NOTREACHED(); }
   void ProcessPurgeAndSuspend() override { NOTREACHED(); }
+  void SetIsLockedToSite() override { NOTREACHED(); }
 
   base::WeakPtr<EmbeddedWorkerTestHelper> helper_;
   mojo::AssociatedBindingSet<mojom::Renderer> bindings_;
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index c8fc1c6..8e3ffe29 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -84,6 +84,11 @@
   return GetContentClient()->browser()->ShouldAssignSiteForURL(url);
 }
 
+// static
+bool SiteInstanceImpl::IsOriginLockASite(const GURL& lock_url) {
+  return lock_url.has_scheme() && lock_url.has_host();
+}
+
 int32_t SiteInstanceImpl::GetId() {
   return id_;
 }
@@ -578,7 +583,7 @@
         // strong protection. If only some sites are isolated, we need
         // additional logic to prevent the non-isolated sites from requesting
         // resources for isolated sites. https://crbug.com/509125
-        policy->LockToOrigin(process_->GetID(), site_);
+        process_->LockToOrigin(site_);
         break;
       }
       case CheckOriginLockResult::HAS_WRONG_LOCK:
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
index baf53b9..f0bc185 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -39,6 +39,12 @@
       const GURL& url);
   static bool ShouldAssignSiteForURL(const GURL& url);
 
+  // Returns whether |lock_url| is at least at the granularity of a site (i.e.,
+  // a scheme plus eTLD+1, like https://google.com).  Also returns true if the
+  // lock is to a more specific origin (e.g., https://accounts.google.com), but
+  // not if the lock is empty or applies to an entire scheme (e.g., file://).
+  static bool IsOriginLockASite(const GURL& lock_url);
+
   // See SiteInstance::IsSameWebSite.
   // This version allows comparing URLs without converting them to effective
   // URLs first, which is useful for avoiding OOPIFs when otherwise same-site
diff --git a/content/browser/site_instance_impl_unittest.cc b/content/browser/site_instance_impl_unittest.cc
index effcb936c..876a25a1 100644
--- a/content/browser/site_instance_impl_unittest.cc
+++ b/content/browser/site_instance_impl_unittest.cc
@@ -1233,4 +1233,17 @@
   SetBrowserClientForTesting(regular_client);
 }
 
+TEST_F(SiteInstanceTest, IsOriginLockASite) {
+  EXPECT_FALSE(SiteInstanceImpl::IsOriginLockASite(GURL("http://")));
+  EXPECT_FALSE(SiteInstanceImpl::IsOriginLockASite(GURL("")));
+  EXPECT_FALSE(SiteInstanceImpl::IsOriginLockASite(GURL("google.com")));
+  EXPECT_FALSE(SiteInstanceImpl::IsOriginLockASite(GURL("http:")));
+  EXPECT_FALSE(SiteInstanceImpl::IsOriginLockASite(GURL("chrome:")));
+
+  EXPECT_TRUE(SiteInstanceImpl::IsOriginLockASite(GURL("http://foo.com")));
+  EXPECT_TRUE(SiteInstanceImpl::IsOriginLockASite(GURL("http://bar.foo.com")));
+  EXPECT_TRUE(SiteInstanceImpl::IsOriginLockASite(
+      GURL("http://user:pass@google.com:99/foo;bar?q=a#ref")));
+}
+
 }  // namespace content
diff --git a/content/browser/web_package/signed_exchange_cert_fetcher_unittest.cc b/content/browser/web_package/signed_exchange_cert_fetcher_unittest.cc
index 19e3ed5..00db6af7 100644
--- a/content/browser/web_package/signed_exchange_cert_fetcher_unittest.cc
+++ b/content/browser/web_package/signed_exchange_cert_fetcher_unittest.cc
@@ -8,6 +8,8 @@
 #include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "base/test/scoped_task_environment.h"
+#include "components/cbor/cbor_values.h"
+#include "components/cbor/cbor_writer.h"
 #include "content/browser/loader/resource_dispatcher_host_impl.h"
 #include "content/public/common/resource_type.h"
 #include "content/public/common/url_loader_throttle.h"
@@ -154,30 +156,24 @@
   }
 
   static std::string CreateCertMessage(const base::StringPiece& cert_data) {
-    std::string message;
-    uint32_t cert_size = cert_data.length();
-    uint32_t cert_list_size = cert_size + 3 /* size of "cert data size" */ +
-                              2 /* size of "extensions size" */;
-    uint32_t message_size = cert_list_size +
-                            1 /* size of "request context size" */ +
-                            3 /* size of "certificate list size" */;
-    // request context size
-    message += static_cast<char>(0x00);
-    // certificate list size
-    message += static_cast<char>(cert_list_size >> 16);
-    message += static_cast<char>((cert_list_size & 0xFF00) >> 8);
-    message += static_cast<char>(cert_list_size & 0xFF);
-    // certificate list size
-    message += static_cast<char>(cert_size >> 16);
-    message += static_cast<char>((cert_size & 0xFF00) >> 8);
-    message += static_cast<char>(cert_size & 0xFF);
-    // cert data
-    message += std::string(cert_data);
-    // extensions size
-    message += static_cast<char>(0x00);
-    message += static_cast<char>(0x00);
-    CHECK_EQ(message_size, message.size());
-    return message;
+    cbor::CBORValue::MapValue cbor_map;
+    cbor_map[cbor::CBORValue("sct")] =
+        cbor::CBORValue("SCT", cbor::CBORValue::Type::BYTE_STRING);
+    cbor_map[cbor::CBORValue("cert")] =
+        cbor::CBORValue(cert_data, cbor::CBORValue::Type::BYTE_STRING);
+    cbor_map[cbor::CBORValue("ocsp")] =
+        cbor::CBORValue("OCSP", cbor::CBORValue::Type::BYTE_STRING);
+
+    cbor::CBORValue::ArrayValue cbor_array;
+    cbor_array.push_back(cbor::CBORValue(u8"\U0001F4DC\u26D3"));
+    cbor_array.push_back(cbor::CBORValue(std::move(cbor_map)));
+
+    base::Optional<std::vector<uint8_t>> serialized =
+        cbor::CBORWriter::Write(cbor::CBORValue(std::move(cbor_array)));
+    if (!serialized)
+      return std::string();
+    return std::string(reinterpret_cast<char*>(serialized->data()),
+                       serialized->size());
   }
 
   static base::StringPiece CreateCertMessageFromCert(
@@ -211,7 +207,7 @@
         base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
             &mock_loader_factory_),
         std::move(throttles_), url_, request_initiator_, force_fetch,
-        SignedExchangeVersion::kB0, std::move(callback),
+        SignedExchangeVersion::kB1, std::move(callback),
         nullptr /* devtools_proxy */);
   }
 
diff --git a/content/browser/web_package/signed_exchange_certificate_chain.cc b/content/browser/web_package/signed_exchange_certificate_chain.cc
index d94125e..5707112 100644
--- a/content/browser/web_package/signed_exchange_certificate_chain.cc
+++ b/content/browser/web_package/signed_exchange_certificate_chain.cc
@@ -4,7 +4,6 @@
 
 #include "content/browser/web_package/signed_exchange_certificate_chain.h"
 
-#include "base/command_line.h"
 #include "base/format_macros.h"
 #include "base/memory/ptr_util.h"
 #include "base/strings/stringprintf.h"
@@ -12,67 +11,12 @@
 #include "components/cbor/cbor_reader.h"
 #include "content/browser/web_package/signed_exchange_consts.h"
 #include "content/browser/web_package/signed_exchange_utils.h"
-#include "content/public/common/content_switches.h"
 #include "net/cert/x509_certificate.h"
 
 namespace content {
 
 namespace {
 
-bool ConsumeByte(base::span<const uint8_t>* data, uint8_t* out) {
-  if (data->empty())
-    return false;
-  *out = (*data)[0];
-  *data = data->subspan(1);
-  return true;
-}
-
-bool Consume2Bytes(base::span<const uint8_t>* data, uint16_t* out) {
-  if (data->size() < 2)
-    return false;
-  *out = ((*data)[0] << 8) | (*data)[1];
-  *data = data->subspan(2);
-  return true;
-}
-
-bool Consume3Bytes(base::span<const uint8_t>* data, uint32_t* out) {
-  if (data->size() < 3)
-    return false;
-  *out = ((*data)[0] << 16) | ((*data)[1] << 8) | (*data)[2];
-  *data = data->subspan(3);
-  return true;
-}
-
-std::unique_ptr<SignedExchangeCertificateChain> ParseB0(
-    base::span<const uint8_t> message,
-    SignedExchangeDevToolsProxy* devtools_proxy) {
-  TRACE_EVENT_BEGIN0(TRACE_DISABLED_BY_DEFAULT("loading"),
-                     "SignedExchangeCertificateChain::ParseB0");
-  base::Optional<std::vector<base::StringPiece>> der_certs =
-      SignedExchangeCertificateChain::GetCertChainFromMessage(message);
-  if (!der_certs) {
-    signed_exchange_utils::ReportErrorAndEndTraceEvent(
-        devtools_proxy, "SignedExchangeCertificateChain::ParseB0",
-        "Failed to parse the response as a TLS 1.3 Certificate message.");
-    return nullptr;
-  }
-
-  scoped_refptr<net::X509Certificate> cert =
-      net::X509Certificate::CreateFromDERCertChain(*der_certs);
-  if (!cert) {
-    signed_exchange_utils::ReportErrorAndEndTraceEvent(
-        devtools_proxy, "SignedExchangeCertificateChain::ParseB0",
-        "X509Certificate::CreateFromDERCertChain failed.");
-    return nullptr;
-  }
-
-  TRACE_EVENT_END0(TRACE_DISABLED_BY_DEFAULT("loading"),
-                   "SignedExchangeCertificateChain::ParseB1");
-  // The V0 certificate format doesn't support OCSP nor SCT.
-  return base::WrapUnique(
-      new SignedExchangeCertificateChain(cert, "" /* ocsp */, "" /* sct */));
-}
-
 // https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#cert-chain-format
 std::unique_ptr<SignedExchangeCertificateChain> ParseB1(
     base::span<const uint8_t> message,
@@ -224,71 +168,8 @@
     SignedExchangeVersion version,
     base::span<const uint8_t> cert_response_body,
     SignedExchangeDevToolsProxy* devtools_proxy) {
-  switch (version) {
-    case SignedExchangeVersion::kB0:
-      return ParseB0(cert_response_body, devtools_proxy);
-    case SignedExchangeVersion::kB1:
-      return ParseB1(cert_response_body, devtools_proxy);
-  }
-  NOTREACHED();
-  return nullptr;
-}
-
-// static
-base::Optional<std::vector<base::StringPiece>>
-SignedExchangeCertificateChain::GetCertChainFromMessage(
-    base::span<const uint8_t> message) {
-  uint8_t cert_request_context_size = 0;
-  if (!ConsumeByte(&message, &cert_request_context_size)) {
-    DVLOG(1) << "Can't read certificate request request context size.";
-    return base::nullopt;
-  }
-  if (cert_request_context_size != 0) {
-    DVLOG(1) << "Invalid certificate request context size: "
-             << static_cast<int>(cert_request_context_size);
-    return base::nullopt;
-  }
-  uint32_t cert_list_size = 0;
-  if (!Consume3Bytes(&message, &cert_list_size)) {
-    DVLOG(1) << "Can't read certificate list size.";
-    return base::nullopt;
-  }
-
-  if (cert_list_size != message.size()) {
-    DVLOG(1) << "Certificate list size error: cert_list_size=" << cert_list_size
-             << " remaining=" << message.size();
-    return base::nullopt;
-  }
-
-  std::vector<base::StringPiece> certs;
-  while (!message.empty()) {
-    uint32_t cert_data_size = 0;
-    if (!Consume3Bytes(&message, &cert_data_size)) {
-      DVLOG(1) << "Can't read certificate data size.";
-      return base::nullopt;
-    }
-    if (message.size() < cert_data_size) {
-      DVLOG(1) << "Certificate data size error: cert_data_size="
-               << cert_data_size << " remaining=" << message.size();
-      return base::nullopt;
-    }
-    certs.emplace_back(base::StringPiece(
-        reinterpret_cast<const char*>(message.data()), cert_data_size));
-    message = message.subspan(cert_data_size);
-
-    uint16_t extensions_size = 0;
-    if (!Consume2Bytes(&message, &extensions_size)) {
-      DVLOG(1) << "Can't read extensions size.";
-      return base::nullopt;
-    }
-    if (message.size() < extensions_size) {
-      DVLOG(1) << "Extensions size error: extensions_size=" << extensions_size
-               << " remaining=" << message.size();
-      return base::nullopt;
-    }
-    message = message.subspan(extensions_size);
-  }
-  return certs;
+  DCHECK_EQ(version, SignedExchangeVersion::kB1);
+  return ParseB1(cert_response_body, devtools_proxy);
 }
 
 SignedExchangeCertificateChain::SignedExchangeCertificateChain(
diff --git a/content/browser/web_package/signed_exchange_certificate_chain.h b/content/browser/web_package/signed_exchange_certificate_chain.h
index 7b6ece47..b20f7349 100644
--- a/content/browser/web_package/signed_exchange_certificate_chain.h
+++ b/content/browser/web_package/signed_exchange_certificate_chain.h
@@ -37,12 +37,6 @@
   SignedExchangeCertificateChain(scoped_refptr<net::X509Certificate> cert,
                                  const std::string& ocsp,
                                  const std::string& sct);
-
-  // Parses a TLS 1.3 Certificate message containing X.509v3 certificates and
-  // returns a vector of cert_data. Returns nullopt when failed to parse.
-  static base::Optional<std::vector<base::StringPiece>> GetCertChainFromMessage(
-      base::span<const uint8_t> message);
-
   ~SignedExchangeCertificateChain();
 
   const scoped_refptr<net::X509Certificate>& cert() const { return cert_; }
diff --git a/content/browser/web_package/signed_exchange_certificate_chain_fuzzer.cc b/content/browser/web_package/signed_exchange_certificate_chain_fuzzer.cc
index 56d34a6..8d718db 100644
--- a/content/browser/web_package/signed_exchange_certificate_chain_fuzzer.cc
+++ b/content/browser/web_package/signed_exchange_certificate_chain_fuzzer.cc
@@ -9,8 +9,6 @@
 namespace content {
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
-  SignedExchangeCertificateChain::Parse(SignedExchangeVersion::kB0,
-                                        base::make_span(data, size), nullptr);
   SignedExchangeCertificateChain::Parse(SignedExchangeVersion::kB1,
                                         base::make_span(data, size), nullptr);
   return 0;
diff --git a/content/browser/web_package/signed_exchange_certificate_chain_unittest.cc b/content/browser/web_package/signed_exchange_certificate_chain_unittest.cc
index 932f1cb..9f71430 100644
--- a/content/browser/web_package/signed_exchange_certificate_chain_unittest.cc
+++ b/content/browser/web_package/signed_exchange_certificate_chain_unittest.cc
@@ -21,261 +21,12 @@
 
 namespace {
 
-base::Optional<std::vector<base::StringPiece>> GetCertChain(
-    const uint8_t* input,
-    size_t input_size) {
-  return SignedExchangeCertificateChain::GetCertChainFromMessage(
-      base::make_span(input, input_size));
-}
-
 cbor::CBORValue CBORByteString(base::StringPiece str) {
   return cbor::CBORValue(str, cbor::CBORValue::Type::BYTE_STRING);
 }
 
 }  // namespace
 
-TEST(SignedExchangeCertificateParseB0Test, OneCert) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x00, 0x00, 0x07, // certificate list size
-
-      0x00, 0x00, 0x02, // cert data size
-      0x11, 0x22, // cert data
-      0x00, 0x00, // extensions size
-      // clang-format on
-  };
-  base::Optional<std::vector<base::StringPiece>> certs =
-      GetCertChain(input, arraysize(input));
-  ASSERT_TRUE(certs);
-  ASSERT_EQ(1u, certs->size());
-  const uint8_t kExpected[] = {
-      // clang-format off
-      0x11, 0x22, // cert data
-      // clang-format on
-  };
-  EXPECT_THAT((*certs)[0],
-              testing::ElementsAreArray(kExpected, arraysize(kExpected)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, OneCertWithExtension) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x00, 0x00, 0x0A, // certificate list size
-
-      0x00, 0x00, 0x02, // cert data size
-      0x11, 0x22, // cert data
-      0x00, 0x03, // extensions size
-      0xE1, 0xE2, 0xE3, // extensions data
-      // clang-format on
-  };
-  base::Optional<std::vector<base::StringPiece>> certs =
-      GetCertChain(input, arraysize(input));
-  ASSERT_TRUE(certs);
-  ASSERT_EQ(1u, certs->size());
-  const uint8_t kExpected[] = {
-      // clang-format off
-      0x11, 0x22, // cert data
-      // clang-format on
-  };
-  EXPECT_THAT((*certs)[0],
-              testing::ElementsAreArray(kExpected, arraysize(kExpected)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, TwoCerts) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x00, 0x01, 0x13, // certificate list size
-
-      0x00, 0x01, 0x04, // cert data size
-
-      // cert data
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-
-      0x00, 0x00, // extensions size
-
-      0x00, 0x00, 0x05, // cert data size
-      0x33, 0x44, 0x55, 0x66, 0x77, // cert data
-      0x00, 0x00, // extensions size
-
-      // clang-format on
-  };
-
-  const uint8_t kExpected1[] = {
-      // clang-format off
-      // cert data
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-      // clang-format on
-  };
-  const uint8_t kExpected2[] = {
-      // clang-format off
-      0x33, 0x44, 0x55, 0x66, 0x77, // cert data
-      // clang-format on
-  };
-
-  base::Optional<std::vector<base::StringPiece>> certs =
-      GetCertChain(input, sizeof(input));
-  ASSERT_TRUE(certs);
-  ASSERT_EQ(2u, certs->size());
-  EXPECT_THAT((*certs)[0],
-              testing::ElementsAreArray(kExpected1, arraysize(kExpected1)));
-  EXPECT_THAT((*certs)[1],
-              testing::ElementsAreArray(kExpected2, arraysize(kExpected2)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, Empty) {
-  EXPECT_FALSE(GetCertChain(nullptr, 0));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, InvalidRequestContextSize) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x01, // request context size: must be zero
-      0x20, // request context
-      // clang-format on
-  };
-  EXPECT_FALSE(GetCertChain(input, arraysize(input)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, CanNotReadCertListSize1) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x01, // certificate list size: must be 3 bytes
-      // clang-format on
-  };
-  EXPECT_FALSE(GetCertChain(input, arraysize(input)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, CanNotReadCertListSize2) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x00, 0x01, // certificate list size: must be 3 bytes
-      // clang-format on
-  };
-  EXPECT_FALSE(GetCertChain(input, arraysize(input)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, CertListSizeError) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x00, 0x01, 0x01, // certificate list size: 257 (This must be 7)
-
-      0x00, 0x00, 0x02, // cert data size
-      0x11, 0x22, // cert data
-      0x00, 0x00, // extensions size
-      // clang-format on
-  };
-  EXPECT_FALSE(GetCertChain(input, arraysize(input)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, CanNotReadCertDataSize) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x00, 0x00, 0x02, // certificate list size
-
-      0x00, 0x01, // cert data size: must be 3 bytes
-      // clang-format on
-  };
-  EXPECT_FALSE(GetCertChain(input, arraysize(input)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, CertDataSizeError) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x00, 0x00, 0x04, // certificate list size
-
-      0x00, 0x00, 0x02, // cert data size
-      0x11, // cert data: Need 2 bytes
-      // clang-format on
-  };
-  EXPECT_FALSE(GetCertChain(input, arraysize(input)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, CanNotReadExtensionsSize) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x00, 0x00, 0x06, // certificate list size
-
-      0x00, 0x00, 0x02, // cert data size
-      0x11, 0x22, // cert data
-      0x00, // extensions size : must be 2 bytes
-      // clang-format on
-  };
-  EXPECT_FALSE(GetCertChain(input, arraysize(input)));
-}
-
-TEST(SignedExchangeCertificateParseB0Test, ExtensionsSizeError) {
-  const uint8_t input[] = {
-      // clang-format off
-      0x00, // request context size
-      0x00, 0x00, 0x07, // certificate list size
-
-      0x00, 0x00, 0x02, // cert data size
-      0x11, 0x22, // cert data
-      0x00, 0x01, // extensions size
-      // clang-format on
-  };
-  EXPECT_FALSE(GetCertChain(input, arraysize(input)));
-}
-
 TEST(SignedExchangeCertificateParseB1Test, Empty) {
   auto parsed = SignedExchangeCertificateChain::Parse(
       SignedExchangeVersion::kB1, base::span<const uint8_t>(), nullptr);
@@ -408,7 +159,7 @@
   EXPECT_EQ(parsed->sct(), base::make_optional<std::string>("SCT"));
 }
 
-TEST(SignedExchangeCertificateParseB1Test, HavingOCSPInSecnodCert) {
+TEST(SignedExchangeCertificateParseB1Test, HavingOCSPInSecondCert) {
   net::CertificateList certs;
   ASSERT_TRUE(net::LoadCertificateFiles(
       {"subjectAltName_sanity_check.pem", "root_ca_cert.pem"}, &certs));
diff --git a/content/browser/web_package/signed_exchange_consts.h b/content/browser/web_package/signed_exchange_consts.h
index 9dedf00f..575c281 100644
--- a/content/browser/web_package/signed_exchange_consts.h
+++ b/content/browser/web_package/signed_exchange_consts.h
@@ -8,9 +8,9 @@
 namespace content {
 
 constexpr char kAcceptHeaderSignedExchangeSuffix[] =
-    ",application/signed-exchange;v=b0";
+    ",application/signed-exchange;v=b1";
 
-enum class SignedExchangeVersion { kB0, kB1 };
+enum class SignedExchangeVersion { kB1 };
 
 // Field names defined in the application/signed-exchange content type:
 // https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#application-signed-exchange
diff --git a/content/browser/web_package/signed_exchange_handler.cc b/content/browser/web_package/signed_exchange_handler.cc
index 0359d22..2b66561 100644
--- a/content/browser/web_package/signed_exchange_handler.cc
+++ b/content/browser/web_package/signed_exchange_handler.cc
@@ -91,8 +91,7 @@
 
   if (!SignedExchangeSignatureHeaderField::GetVersionParamFromContentType(
           content_type, &version_) ||
-      (version_ != SignedExchangeVersion::kB0 &&
-       version_ != SignedExchangeVersion::kB1)) {
+      version_ != SignedExchangeVersion::kB1) {
     base::SequencedTaskRunnerHandle::Get()->PostTask(
         FROM_HERE, base::BindOnce(&SignedExchangeHandler::RunErrorCallback,
                                   weak_factory_.GetWeakPtr(),
@@ -101,7 +100,7 @@
         devtools_proxy_.get(), "SignedExchangeHandler::SignedExchangeHandler",
         base::StringPrintf("Unsupported version of the content type. Currentry "
                            "content type must be "
-                           "\"application/signed-exchange;v={b0,b1}\". But the "
+                           "\"application/signed-exchange;v=b1\". But the "
                            "response content type was \"%s\"",
                            content_type.c_str()));
     return;
@@ -347,10 +346,6 @@
   // OCSP verification is done in CertVerifier::Verify(), so we just check the
   // result here.
 
-  // The b0 implementation checkpoint has no OCSP check.
-  if (version_ == SignedExchangeVersion::kB0)
-    return true;
-
   if (ocsp_result.response_status != net::OCSPVerifyResult::PROVIDED ||
       ocsp_result.revocation_status != net::OCSPRevocationStatus::GOOD)
     return false;
diff --git a/content/browser/web_package/signed_exchange_handler_unittest.cc b/content/browser/web_package/signed_exchange_handler_unittest.cc
index 1609556..7bb22de9d 100644
--- a/content/browser/web_package/signed_exchange_handler_unittest.cc
+++ b/content/browser/web_package/signed_exchange_handler_unittest.cc
@@ -107,7 +107,7 @@
             url::Origin::Create(GURL("https://htxg.example.com/test.htxg"))) {}
 
   virtual std::string ContentType() {
-    return "application/signed-exchange;v=b0";
+    return "application/signed-exchange;v=b1";
   }
 
   void SetUp() override {
@@ -219,12 +219,6 @@
   std::unique_ptr<net::SourceStream> payload_stream_;
 };
 
-class SignedExchangeHandlerB1Test : public SignedExchangeHandlerTest {
-  std::string ContentType() override {
-    return "application/signed-exchange;v=b1";
-  }
-};
-
 TEST_P(SignedExchangeHandlerTest, Empty) {
   source_->AddReadResult(nullptr, 0, net::OK, GetParam());
 
@@ -237,7 +231,7 @@
 TEST_P(SignedExchangeHandlerTest, Simple) {
   mock_cert_fetcher_factory_->ExpectFetch(
       GURL("https://cert.example.org/cert.msg"),
-      GetTestFileContents("wildcard_example.org.public.pem.msg"));
+      GetTestFileContents("wildcard_example.org.public.pem.cbor"));
 
   // Make the MockCertVerifier treat the certificate "wildcard.pem" as valid for
   // "*.example.org".
@@ -246,6 +240,8 @@
   net::CertVerifyResult dummy_result;
   dummy_result.verified_cert = original_cert;
   dummy_result.cert_status = net::OK;
+  dummy_result.ocsp_result.response_status = net::OCSPVerifyResult::PROVIDED;
+  dummy_result.ocsp_result.revocation_status = net::OCSPRevocationStatus::GOOD;
   auto mock_cert_verifier = std::make_unique<net::MockCertVerifier>();
   mock_cert_verifier->AddResultForCertAndHost(original_cert, "*.example.org",
                                               dummy_result, net::OK);
@@ -280,10 +276,20 @@
 TEST_P(SignedExchangeHandlerTest, MimeType) {
   mock_cert_fetcher_factory_->ExpectFetch(
       GURL("https://cert.example.org/cert.msg"),
-      GetTestFileContents("wildcard_example.org.public.pem.msg"));
+      GetTestFileContents("wildcard_example.org.public.pem.cbor"));
 
+  // Make the MockCertVerifier treat the certificate "wildcard.pem" as valid for
+  // "*.example.org".
+  scoped_refptr<net::X509Certificate> original_cert =
+      LoadCertificate("wildcard.pem");
+  net::CertVerifyResult dummy_result;
+  dummy_result.verified_cert = original_cert;
+  dummy_result.cert_status = net::OK;
+  dummy_result.ocsp_result.response_status = net::OCSPVerifyResult::PROVIDED;
+  dummy_result.ocsp_result.revocation_status = net::OCSPRevocationStatus::GOOD;
   auto mock_cert_verifier = std::make_unique<net::MockCertVerifier>();
-  mock_cert_verifier->set_default_result(net::OK);
+  mock_cert_verifier->AddResultForCertAndHost(original_cert, "*.example.org",
+                                              dummy_result, net::OK);
   SetCertVerifier(std::move(mock_cert_verifier));
 
   std::string contents = GetTestFileContents("test.example.org_hello.txt.htxg");
@@ -335,7 +341,7 @@
   // certification verification must fail.
   mock_cert_fetcher_factory_->ExpectFetch(
       GURL("https://cert.example.org/cert.msg"),
-      GetTestFileContents("127.0.0.1.public.pem.msg"));
+      GetTestFileContents("127.0.0.1.public.pem.cbor"));
 
   // Set the default result of MockCertVerifier to OK, to check that the
   // verification of SignedExchange must fail even if the certificate is valid.
@@ -358,7 +364,7 @@
 TEST_P(SignedExchangeHandlerTest, VerifyCertFailure) {
   mock_cert_fetcher_factory_->ExpectFetch(
       GURL("https://cert.example.org/cert.msg"),
-      GetTestFileContents("wildcard_example.org.public.pem.msg"));
+      GetTestFileContents("wildcard_example.org.public.pem.cbor"));
 
   // Make the MockCertVerifier treat the certificate "wildcard.pem" as valid for
   // "*.example.org".
@@ -388,52 +394,7 @@
   ReadStream(source_, nullptr);
 }
 
-TEST_P(SignedExchangeHandlerB1Test, Simple) {
-  mock_cert_fetcher_factory_->ExpectFetch(
-      GURL("https://cert.example.org/cert.msg"),
-      GetTestFileContents("wildcard_example.org.public.pem.cbor"));
-
-  // Make the MockCertVerifier treat the certificate "wildcard.pem" as valid for
-  // "*.example.org".
-  scoped_refptr<net::X509Certificate> original_cert =
-      LoadCertificate("wildcard.pem");
-  net::CertVerifyResult dummy_result;
-  dummy_result.verified_cert = original_cert;
-  dummy_result.cert_status = net::OK;
-  dummy_result.ocsp_result.response_status = net::OCSPVerifyResult::PROVIDED;
-  dummy_result.ocsp_result.revocation_status = net::OCSPRevocationStatus::GOOD;
-  auto mock_cert_verifier = std::make_unique<net::MockCertVerifier>();
-  mock_cert_verifier->AddResultForCertAndHost(original_cert, "*.example.org",
-                                              dummy_result, net::OK);
-  SetCertVerifier(std::move(mock_cert_verifier));
-
-  std::string contents = GetTestFileContents("test.example.org_test.htxg");
-  source_->AddReadResult(contents.data(), contents.size(), net::OK, GetParam());
-  source_->AddReadResult(nullptr, 0, net::OK, GetParam());
-
-  WaitForHeader();
-
-  ASSERT_TRUE(read_header());
-  EXPECT_EQ(net::OK, error());
-  EXPECT_EQ(200, resource_response().headers->response_code());
-  EXPECT_EQ("text/html", resource_response().mime_type);
-  EXPECT_EQ("utf-8", resource_response().charset);
-  EXPECT_FALSE(resource_response().load_timing.request_start_time.is_null());
-  EXPECT_FALSE(resource_response().load_timing.request_start.is_null());
-  EXPECT_FALSE(resource_response().load_timing.send_start.is_null());
-  EXPECT_FALSE(resource_response().load_timing.send_end.is_null());
-  EXPECT_FALSE(resource_response().load_timing.receive_headers_end.is_null());
-
-  std::string payload;
-  int rv = ReadPayloadStream(&payload);
-
-  std::string expected_payload = GetTestFileContents("test.html");
-
-  EXPECT_EQ(payload, expected_payload);
-  EXPECT_EQ(rv, static_cast<int>(expected_payload.size()));
-}
-
-TEST_P(SignedExchangeHandlerB1Test, OCSPNotChecked) {
+TEST_P(SignedExchangeHandlerTest, OCSPNotChecked) {
   mock_cert_fetcher_factory_->ExpectFetch(
       GURL("https://cert.example.org/cert.msg"),
       GetTestFileContents("wildcard_example.org.public.pem.cbor"));
@@ -463,7 +424,7 @@
   ReadStream(source_, nullptr);
 }
 
-TEST_P(SignedExchangeHandlerB1Test, OCSPNotProvided) {
+TEST_P(SignedExchangeHandlerTest, OCSPNotProvided) {
   mock_cert_fetcher_factory_->ExpectFetch(
       GURL("https://cert.example.org/cert.msg"),
       GetTestFileContents("wildcard_example.org.public.pem.cbor"));
@@ -493,7 +454,7 @@
   ReadStream(source_, nullptr);
 }
 
-TEST_P(SignedExchangeHandlerB1Test, OCSPInvalid) {
+TEST_P(SignedExchangeHandlerTest, OCSPInvalid) {
   mock_cert_fetcher_factory_->ExpectFetch(
       GURL("https://cert.example.org/cert.msg"),
       GetTestFileContents("wildcard_example.org.public.pem.cbor"));
@@ -524,7 +485,7 @@
   ReadStream(source_, nullptr);
 }
 
-TEST_P(SignedExchangeHandlerB1Test, OCSPRevoked) {
+TEST_P(SignedExchangeHandlerTest, OCSPRevoked) {
   mock_cert_fetcher_factory_->ExpectFetch(
       GURL("https://cert.example.org/cert.msg"),
       GetTestFileContents("wildcard_example.org.public.pem.cbor"));
@@ -558,7 +519,7 @@
 
 // Test that fetching a signed exchange properly extracts and
 // attempts to verify both the certificate and the OCSP response.
-TEST_P(SignedExchangeHandlerB1Test, CertVerifierParams) {
+TEST_P(SignedExchangeHandlerTest, CertVerifierParams) {
   mock_cert_fetcher_factory_->ExpectFetch(
       GURL("https://cert.example.org/cert.msg"),
       GetTestFileContents("wildcard_example.org.public.pem.cbor"));
@@ -617,9 +578,4 @@
                         ::testing::Values(net::MockSourceStream::SYNC,
                                           net::MockSourceStream::ASYNC));
 
-INSTANTIATE_TEST_CASE_P(SignedExchangeHandlerB1Tests,
-                        SignedExchangeHandlerB1Test,
-                        ::testing::Values(net::MockSourceStream::SYNC,
-                                          net::MockSourceStream::ASYNC));
-
 }  // namespace content
diff --git a/content/browser/web_package/signed_exchange_signature_header_field.cc b/content/browser/web_package/signed_exchange_signature_header_field.cc
index ebe6e521..0295fb5 100644
--- a/content/browser/web_package/signed_exchange_signature_header_field.cc
+++ b/content/browser/web_package/signed_exchange_signature_header_field.cc
@@ -297,9 +297,7 @@
   if (it == parameterised_label.params.end()) {
     *version_param = base::nullopt;
   } else {
-    if (it->second == "b0")
-      *version_param = SignedExchangeVersion::kB0;
-    else if (it->second == "b1")
+    if (it->second == "b1")
       *version_param = SignedExchangeVersion::kB1;
     else
       return false;
diff --git a/content/browser/web_package/signed_exchange_signature_header_field_unittest.cc b/content/browser/web_package/signed_exchange_signature_header_field_unittest.cc
index 684877a..cd32523b 100644
--- a/content/browser/web_package/signed_exchange_signature_header_field_unittest.cc
+++ b/content/browser/web_package/signed_exchange_signature_header_field_unittest.cc
@@ -255,13 +255,13 @@
 }
 
 TEST_F(SignedExchangeSignatureHeaderFieldTest, VersionParam_Simple) {
-  const char content_type[] = "application/signed-exchange;v=b0";
+  const char content_type[] = "application/signed-exchange;v=b1";
   base::Optional<SignedExchangeVersion> version;
   EXPECT_TRUE(
       SignedExchangeSignatureHeaderField::GetVersionParamFromContentType(
           content_type, &version));
   ASSERT_TRUE(version);
-  EXPECT_EQ(*version, SignedExchangeVersion::kB0);
+  EXPECT_EQ(*version, SignedExchangeVersion::kB1);
 }
 
 TEST_F(SignedExchangeSignatureHeaderFieldTest, VersionParam_SimpleWithSpace) {
@@ -276,13 +276,13 @@
 
 TEST_F(SignedExchangeSignatureHeaderFieldTest,
        VersionParam_SimpleWithDoublequotes) {
-  const char content_type[] = "application/signed-exchange;v=\"b0\"";
+  const char content_type[] = "application/signed-exchange;v=\"b1\"";
   base::Optional<SignedExchangeVersion> version;
   EXPECT_TRUE(
       SignedExchangeSignatureHeaderField::GetVersionParamFromContentType(
           content_type, &version));
   ASSERT_TRUE(version);
-  EXPECT_EQ(*version, SignedExchangeVersion::kB0);
+  EXPECT_EQ(*version, SignedExchangeVersion::kB1);
 }
 
 }  // namespace content
diff --git a/content/browser/web_package/web_package_request_handler_browsertest.cc b/content/browser/web_package/web_package_request_handler_browsertest.cc
index 2c2ee9f2..e00df9b 100644
--- a/content/browser/web_package/web_package_request_handler_browsertest.cc
+++ b/content/browser/web_package/web_package_request_handler_browsertest.cc
@@ -160,7 +160,7 @@
 IN_PROC_BROWSER_TEST_P(WebPackageRequestHandlerBrowserTest, Simple) {
   InstallUrlInterceptor(
       GURL("https://cert.example.org/cert.msg"),
-      "content/test/data/htxg/wildcard_example.org.public.pem.msg");
+      "content/test/data/htxg/wildcard_example.org.public.pem.cbor");
 
   // Make the MockCertVerifier treat the certificate "wildcard.pem" as valid for
   // "*.example.org".
@@ -169,6 +169,8 @@
   net::CertVerifyResult dummy_result;
   dummy_result.verified_cert = original_cert;
   dummy_result.cert_status = net::OK;
+  dummy_result.ocsp_result.response_status = net::OCSPVerifyResult::PROVIDED;
+  dummy_result.ocsp_result.revocation_status = net::OCSPRevocationStatus::GOOD;
   mock_cert_verifier_->AddResultForCertAndHost(original_cert, "*.example.org",
                                                dummy_result, net::OK);
 
@@ -177,7 +179,7 @@
         if (request.relative_url == "/htxg/test.example.org_test.htxg") {
           const auto& accept_value = request.headers.find("accept")->second;
           EXPECT_THAT(accept_value,
-                      ::testing::HasSubstr("application/signed-exchange;v=b0"));
+                      ::testing::HasSubstr("application/signed-exchange;v=b1"));
         }
       }));
   embedded_test_server()->ServeFilesFromSourceDirectory("content/test/data");
@@ -195,7 +197,7 @@
                   SSLStatus::DISPLAYED_INSECURE_CONTENT));
   ASSERT_TRUE(entry->GetSSL().certificate);
 
-  // "wildcard_example.org.public.pem.msg" is generated from "wildcard.pem". So
+  // "wildcard_example.org.public.pem.cbor" is generated from "wildcard.pem". So
   // the SHA256 of the certificates must match.
   const net::SHA256HashValue fingerprint =
       net::X509Certificate::CalculateFingerprint256(
@@ -210,7 +212,7 @@
                        InvalidContentType) {
   InstallUrlInterceptor(
       GURL("https://cert.example.org/cert.msg"),
-      "content/test/data/htxg/wildcard_example.org.public.pem.msg");
+      "content/test/data/htxg/wildcard_example.org.public.pem.cbor");
 
   // Make the MockCertVerifier treat the certificate "wildcard.pem" as valid for
   // "*.example.org".
@@ -219,6 +221,8 @@
   net::CertVerifyResult dummy_result;
   dummy_result.verified_cert = original_cert;
   dummy_result.cert_status = net::OK;
+  dummy_result.ocsp_result.response_status = net::OCSPVerifyResult::PROVIDED;
+  dummy_result.ocsp_result.revocation_status = net::OCSPRevocationStatus::GOOD;
   mock_cert_verifier_->AddResultForCertAndHost(original_cert, "*.example.org",
                                                dummy_result, net::OK);
 
diff --git a/content/common/renderer.mojom b/content/common/renderer.mojom
index 2405622dd..b19372b 100644
--- a/content/common/renderer.mojom
+++ b/content/common/renderer.mojom
@@ -254,4 +254,9 @@
 
   // Tells the renderer process to purge and suspend.
   ProcessPurgeAndSuspend();
+
+  // Tells the renderer process that it has been locked to a site (i.e., a
+  // scheme plus eTLD+1, such as https://google.com), or to a more specific
+  // origin.
+  SetIsLockedToSite();
 };
diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn
index 36e098f..882c8f6 100644
--- a/content/public/android/BUILD.gn
+++ b/content/public/android/BUILD.gn
@@ -106,7 +106,6 @@
     "java/src/org/chromium/content/app/SandboxedProcessService8.java",
     "java/src/org/chromium/content/app/SandboxedProcessService9.java",
     "java/src/org/chromium/content/browser/AppWebMessagePort.java",
-    "java/src/org/chromium/content/browser/ActivityContentVideoViewEmbedder.java",
     "java/src/org/chromium/content/browser/AudioFocusDelegate.java",
     "java/src/org/chromium/content/browser/BackgroundSyncNetworkObserver.java",
     "java/src/org/chromium/content/browser/BindingManager.java",
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index a8927d0..2825197 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -355,6 +355,12 @@
   return std::string();
 }
 
+#if defined(OS_ANDROID)
+bool ContentBrowserClient::ShouldUseGmsCoreGeolocationProvider() {
+  return false;
+}
+#endif
+
 std::string ContentBrowserClient::GetStoragePartitionIdForSite(
     BrowserContext* browser_context,
     const GURL& site) {
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index e9c6b81..690808d 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -557,6 +557,11 @@
   // * Default implementation returns empty string, meaning send no API key.
   virtual std::string GetGeolocationApiKey();
 
+#if defined(OS_ANDROID)
+  // Allows an embedder to decide whether to use the GmsCoreLocationProvider.
+  virtual bool ShouldUseGmsCoreGeolocationProvider();
+#endif
+
   // Allow the embedder to specify a string version of the storage partition
   // config with a site.
   virtual std::string GetStoragePartitionIdForSite(
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h
index b6c3319..04b82545 100644
--- a/content/public/browser/render_process_host.h
+++ b/content/public/browser/render_process_host.h
@@ -406,6 +406,13 @@
   // crbug.com/738634.
   virtual bool HostHasNotBeenUsed() = 0;
 
+  // Locks this RenderProcessHost to the 'origin' |lock_url|. This method is
+  // public so that it can be called from SiteInstanceImpl, and used by
+  // MockRenderProcessHost. It isn't meant to be called outside of content.
+  // TODO(creis): Rename LockToOrigin to LockToPrincipal. See
+  // https://crbug.com/846155.
+  virtual void LockToOrigin(const GURL& lock_url) = 0;
+
   // Returns the current number of active views in this process.  Excludes
   // any RenderViewHosts that are swapped out.
   size_t GetActiveViewCount();
diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h
index e3c46fdf..99dfcb4 100644
--- a/content/public/common/common_param_traits_macros.h
+++ b/content/public/common/common_param_traits_macros.h
@@ -198,13 +198,13 @@
   IPC_STRUCT_TRAITS_MEMBER(user_gesture_required_for_presentation)
   IPC_STRUCT_TRAITS_MEMBER(text_track_margin_percentage)
   IPC_STRUCT_TRAITS_MEMBER(save_previous_document_resources)
-#if defined(OS_ANDROID)
   IPC_STRUCT_TRAITS_MEMBER(text_autosizing_enabled)
+  IPC_STRUCT_TRAITS_MEMBER(double_tap_to_zoom_enabled)
+#if defined(OS_ANDROID)
   IPC_STRUCT_TRAITS_MEMBER(font_scale_factor)
   IPC_STRUCT_TRAITS_MEMBER(device_scale_adjustment)
   IPC_STRUCT_TRAITS_MEMBER(force_enable_zoom)
   IPC_STRUCT_TRAITS_MEMBER(fullscreen_supported)
-  IPC_STRUCT_TRAITS_MEMBER(double_tap_to_zoom_enabled)
   IPC_STRUCT_TRAITS_MEMBER(media_playback_gesture_whitelist_scope)
   IPC_STRUCT_TRAITS_MEMBER(default_video_poster_url)
   IPC_STRUCT_TRAITS_MEMBER(support_deprecated_target_density_dpi)
diff --git a/content/public/common/web_preferences.cc b/content/public/common/web_preferences.cc
index c5f6d0b..8ecb838 100644
--- a/content/public/common/web_preferences.cc
+++ b/content/public/common/web_preferences.cc
@@ -187,13 +187,16 @@
       user_gesture_required_for_presentation(true),
       text_track_margin_percentage(0.0f),
       immersive_mode_enabled(false),
-#if defined(OS_ANDROID)
+#if !defined(OS_ANDROID)
+      text_autosizing_enabled(false),
+      double_tap_to_zoom_enabled(false),
+#else
       text_autosizing_enabled(true),
+      double_tap_to_zoom_enabled(true),
       font_scale_factor(1.0f),
       device_scale_adjustment(1.0f),
       force_enable_zoom(false),
       fullscreen_supported(true),
-      double_tap_to_zoom_enabled(true),
       support_deprecated_target_density_dpi(false),
       use_legacy_background_size_shorthand_behavior(false),
       wide_viewport_quirk(false),
diff --git a/content/public/common/web_preferences.h b/content/public/common/web_preferences.h
index a1e9fba..0dfba08 100644
--- a/content/public/common/web_preferences.h
+++ b/content/public/common/web_preferences.h
@@ -81,9 +81,9 @@
 // A struct for managing blink's settings.
 //
 // Adding new values to this class probably involves updating
-// blink::WebSettings, content/common/view_messages.h, browser/tab_contents/
-// render_view_host_delegate_helper.cc, browser/profiles/profile.cc,
-// and content/public/common/common_param_traits_macros.h
+// blink::WebSettings, content/common/view_messages.h,
+// browser/profiles/profile.cc, and
+// content/public/common/common_param_traits_macros.h
 struct CONTENT_EXPORT WebPreferences {
   ScriptFontFamilyMap standard_font_family_map;
   ScriptFontFamilyMap fixed_font_family_map;
@@ -224,13 +224,15 @@
 
   bool immersive_mode_enabled;
 
-#if defined(OS_ANDROID)
   bool text_autosizing_enabled;
+
+  bool double_tap_to_zoom_enabled;
+
+#if defined(OS_ANDROID)
   float font_scale_factor;
   float device_scale_adjustment;
   bool force_enable_zoom;
   bool fullscreen_supported;
-  bool double_tap_to_zoom_enabled;
   std::string media_playback_gesture_whitelist_scope;
   GURL default_video_poster_url;
   bool support_deprecated_target_density_dpi;
diff --git a/content/public/test/mock_render_process_host.cc b/content/public/test/mock_render_process_host.cc
index 17d96fc..07a60306 100644
--- a/content/public/test/mock_render_process_host.cc
+++ b/content/public/test/mock_render_process_host.cc
@@ -412,6 +412,13 @@
   return IsUnused() && listeners_.IsEmpty() && GetKeepAliveRefCount() == 0;
 }
 
+void MockRenderProcessHost::LockToOrigin(const GURL& lock_url) {
+  ChildProcessSecurityPolicyImpl::GetInstance()->LockToOrigin(GetID(),
+                                                              lock_url);
+  if (SiteInstanceImpl::IsOriginLockASite(lock_url))
+    is_renderer_locked_to_site_ = true;
+}
+
 void MockRenderProcessHost::FilterURL(bool empty_allowed, GURL* url) {
   RenderProcessHostImpl::FilterURL(this, empty_allowed, url);
 }
diff --git a/content/public/test/mock_render_process_host.h b/content/public/test/mock_render_process_host.h
index b1cff65..7520d03 100644
--- a/content/public/test/mock_render_process_host.h
+++ b/content/public/test/mock_render_process_host.h
@@ -141,6 +141,7 @@
   void SetIsUsed() override;
 
   bool HostHasNotBeenUsed() override;
+  void LockToOrigin(const GURL& lock_url) override;
 
   // IPC::Sender via RenderProcessHost.
   bool Send(IPC::Message* msg) override;
@@ -174,6 +175,10 @@
       std::unique_ptr<mojo::AssociatedInterfacePtr<mojom::Renderer>>
           renderer_interface);
 
+  bool is_renderer_locked_to_site() const {
+    return is_renderer_locked_to_site_;
+  }
+
  private:
   // Stores IPC messages that would have been sent to the renderer.
   IPC::TestSink sink_;
@@ -201,6 +206,7 @@
   std::unique_ptr<resource_coordinator::ProcessResourceCoordinator>
       process_resource_coordinator_;
   service_manager::Identity child_identity_;
+  bool is_renderer_locked_to_site_ = false;
   base::WeakPtrFactory<MockRenderProcessHost> weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHost);
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 7a6285a..25ff174 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2519,8 +2519,7 @@
     const blink::WebHistoryItem& history_item) {
   frame_->LoadData(error_html, WebString::FromUTF8("text/html"),
                    WebString::FromUTF8("UTF-8"), error_page_url, error_url,
-                   replace, frame_load_type, history_item,
-                   blink::kWebHistoryDifferentDocumentLoad, false);
+                   replace, frame_load_type, history_item, false);
 }
 
 void RenderFrameImpl::DidMeaningfulLayout(
@@ -2646,8 +2645,7 @@
   frame_->LoadData(error_html, WebString::FromUTF8("text/html"),
                    WebString::FromUTF8("UTF-8"), GURL(kUnreachableWebDataURL),
                    error.url(), true, blink::WebFrameLoadType::kStandard,
-                   blink::WebHistoryItem(),
-                   blink::kWebHistoryDifferentDocumentLoad, true);
+                   blink::WebHistoryItem(), true);
 }
 
 void RenderFrameImpl::ExecuteJavaScript(const base::string16& javascript) {
@@ -2943,15 +2941,13 @@
 #endif
     if (is_main_frame_ && should_load_data_url) {
       LoadDataURL(common_params, request_params, frame_, load_type,
-                  item_for_history_navigation,
-                  blink::kWebHistoryDifferentDocumentLoad, is_client_redirect);
+                  item_for_history_navigation, is_client_redirect);
     } else {
       WebURLRequest request = CreateURLRequestForCommit(
           common_params, request_params, std::move(url_loader_client_endpoints),
           head);
 
       frame_->CommitNavigation(request, load_type, item_for_history_navigation,
-                               blink::kWebHistoryDifferentDocumentLoad,
                                is_client_redirect, devtools_navigation_token);
       // The commit can result in this frame being removed. Use a
       // WeakPtr as an easy way to detect whether this has occured. If so, this
@@ -6656,7 +6652,6 @@
     WebLocalFrame* frame,
     blink::WebFrameLoadType load_type,
     blink::WebHistoryItem item_for_history_navigation,
-    blink::WebHistoryLoadType history_load_type,
     bool is_client_redirect) {
   // A loadData request with a specified base URL.
   GURL data_url = params.url;
@@ -6687,7 +6682,7 @@
         WebString::FromUTF8(charset), base_url,
         // Needed so that history-url-only changes don't become reloads.
         params.history_url_for_data_url, replace, load_type,
-        item_for_history_navigation, history_load_type, is_client_redirect);
+        item_for_history_navigation, is_client_redirect);
   } else {
     CHECK(false) << "Invalid URL passed: "
                  << params.url.possibly_invalid_spec();
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 1494b09..1600b555 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -1151,7 +1151,6 @@
                    blink::WebLocalFrame* frame,
                    blink::WebFrameLoadType load_type,
                    blink::WebHistoryItem item_for_history_navigation,
-                   blink::WebHistoryLoadType history_load_type,
                    bool is_client_redirect);
 
   // Sends a proper FrameHostMsg_DidFailProvisionalLoadWithError_Params IPC for
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index c71f015..0ff1936d 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1810,6 +1810,11 @@
       base::TimeDelta::FromMinutes(90));
 }
 
+void RenderThreadImpl::SetIsLockedToSite() {
+  DCHECK(blink_platform_impl_);
+  blink_platform_impl_->SetIsLockedToSite();
+}
+
 bool RenderThreadImpl::GetRendererMemoryMetrics(
     RendererMemoryMetrics* memory_metrics) const {
   DCHECK(memory_metrics);
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 8baa631..858ae9e 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -579,6 +579,7 @@
   void SetProcessBackgrounded(bool backgrounded) override;
   void SetSchedulerKeepActive(bool keep_active) override;
   void ProcessPurgeAndSuspend() override;
+  void SetIsLockedToSite() override;
 
   void OnMemoryPressure(
       base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 2ddbf75..92d1a0ef 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -844,15 +844,16 @@
       static_cast<WebSettings::SavePreviousDocumentResources>(
           prefs.save_previous_document_resources));
 
+  settings->SetTextAutosizingEnabled(prefs.text_autosizing_enabled);
+  settings->SetDoubleTapToZoomEnabled(prefs.double_tap_to_zoom_enabled);
+
 #if defined(OS_ANDROID)
   settings->SetAllowCustomScrollbarInMainFrame(false);
-  settings->SetTextAutosizingEnabled(prefs.text_autosizing_enabled);
   settings->SetAccessibilityFontScaleFactor(prefs.font_scale_factor);
   settings->SetDeviceScaleAdjustment(prefs.device_scale_adjustment);
   settings->SetFullscreenSupported(prefs.fullscreen_supported);
   web_view->SetIgnoreViewportTagScaleLimits(prefs.force_enable_zoom);
   settings->SetAutoZoomFocusedNodeToLegibleScale(true);
-  settings->SetDoubleTapToZoomEnabled(prefs.double_tap_to_zoom_enabled);
   settings->SetMediaPlaybackGestureWhitelistScope(
       blink::WebString::FromUTF8(prefs.media_playback_gesture_whitelist_scope));
   settings->SetDefaultVideoPosterURL(
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index a740d32..5b4a026 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -267,6 +267,7 @@
       compositor_thread_(nullptr),
       main_thread_(main_thread_scheduler->CreateMainThread()),
       sudden_termination_disables_(0),
+      is_locked_to_site_(false),
       default_task_runner_(main_thread_scheduler->DefaultTaskRunner()),
       web_scrollbar_behavior_(new WebScrollbarBehaviorImpl),
       main_thread_scheduler_(main_thread_scheduler) {
@@ -690,6 +691,14 @@
                           RenderThread::Get()->GenerateRoutingID());
 }
 
+bool RendererBlinkPlatformImpl::IsLockedToSite() const {
+  return is_locked_to_site_;
+}
+
+void RendererBlinkPlatformImpl::SetIsLockedToSite() {
+  is_locked_to_site_ = true;
+}
+
 bool RendererBlinkPlatformImpl::IsThreadedCompositingEnabled() {
   RenderThreadImpl* thread = RenderThreadImpl::current();
   // thread can be NULL in tests.
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 65a16e42c..7551131 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -121,6 +121,7 @@
   blink::WebString DatabaseCreateOriginIdentifier(
       const blink::WebSecurityOrigin& origin) override;
   viz::FrameSinkId GenerateFrameSinkId() override;
+  bool IsLockedToSite() const override;
 
   void GetPluginList(bool refresh,
                      const blink::WebSecurityOrigin& mainFrameOrigin,
@@ -262,6 +263,10 @@
   void CloneSessionStorageNamespace(const std::string& source_namespace,
                                     const std::string& destination_namespace);
 
+  // Tells this platform that the renderer is locked to a site (i.e., a scheme
+  // plus eTLD+1, such as https://google.com), or to a more specific origin.
+  void SetIsLockedToSite();
+
  private:
   bool CheckPreparsedJsCachingEnabled() const;
 
@@ -296,6 +301,9 @@
   // we tell the browser to enable fast termination.
   int sudden_termination_disables_;
 
+  // If true, the renderer process is locked to a site.
+  bool is_locked_to_site_;
+
   std::unique_ptr<blink::WebIDBFactory> web_idb_factory_;
 
   std::unique_ptr<blink::WebBlobRegistry> blob_registry_;
diff --git a/content/shell/DEPS b/content/shell/DEPS
index 05b041e..1018b37 100644
--- a/content/shell/DEPS
+++ b/content/shell/DEPS
@@ -31,6 +31,7 @@
   # Content Shell can depend on more components than content/, since:
   #   1) it's an example browser
   #   2) it's not linked into the content library
+  "+components/embedder_support",
   "+components/content_view",
   "+components/crash",
   "+components/download/public/common",
diff --git a/content/shell/android/BUILD.gn b/content/shell/android/BUILD.gn
index a0560dd..d430a3a2 100644
--- a/content/shell/android/BUILD.gn
+++ b/content/shell/android/BUILD.gn
@@ -79,6 +79,7 @@
     ":content_shell_manifest",
     "//base:base_java",
     "//components/content_view:content_view_java",
+    "//components/embedder_support/android:media_java",
     "//content/public/android:content_java",
     "//device/geolocation:geolocation_java",
     "//media/base/android:media_java",
diff --git a/content/shell/android/java/src/org/chromium/content_shell/Shell.java b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
index ccec35c..99e3573 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/Shell.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
@@ -28,7 +28,7 @@
 import org.chromium.base.annotations.CalledByNative;
 import org.chromium.base.annotations.JNINamespace;
 import org.chromium.components.content_view.ContentView;
-import org.chromium.content.browser.ActivityContentVideoViewEmbedder;
+import org.chromium.components.embedder_support.media.ActivityContentVideoViewEmbedder;
 import org.chromium.content.browser.ContentViewCoreImpl;
 import org.chromium.content.browser.ContentViewRenderView;
 import org.chromium.content_public.browser.ActionModeCallbackHelper;
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index 5bb9899..4e4faf7 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -893,8 +893,7 @@
   // by the renderer.
   main_frame->CommitNavigation(WebURLRequest(GURL(url::kAboutBlankURL)),
                                blink::WebFrameLoadType::kStandard,
-                               blink::WebHistoryItem(),
-                               blink::kWebHistoryDifferentDocumentLoad, false,
+                               blink::WebHistoryItem(), false,
                                base::UnguessableToken::Create());
   Send(new ShellViewHostMsg_ResetDone(routing_id()));
 }
diff --git a/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/1 b/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/1
deleted file mode 100644
index db317ea..0000000
--- a/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/1
+++ /dev/null
Binary files differ
diff --git a/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/2 b/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/2
deleted file mode 100644
index 5063c880d..0000000
--- a/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/2
+++ /dev/null
Binary files differ
diff --git a/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/3 b/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/3
deleted file mode 100644
index 9c2effe..0000000
--- a/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/3
+++ /dev/null
Binary files differ
diff --git a/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/4 b/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/4
deleted file mode 100644
index b60397f0..0000000
--- a/content/test/data/fuzzer_corpus/signed_exchange_certificate_chain_data/4
+++ /dev/null
Binary files differ
diff --git a/content/test/data/htxg/127.0.0.1.public.pem.msg b/content/test/data/htxg/127.0.0.1.public.pem.cbor
similarity index 89%
rename from content/test/data/htxg/127.0.0.1.public.pem.msg
rename to content/test/data/htxg/127.0.0.1.public.pem.cbor
index ae612984b..77ec660 100644
--- a/content/test/data/htxg/127.0.0.1.public.pem.msg
+++ b/content/test/data/htxg/127.0.0.1.public.pem.cbor
Binary files differ
diff --git a/content/test/data/htxg/README b/content/test/data/htxg/README
index d2aef719..ed56bd1 100644
--- a/content/test/data/htxg/README
+++ b/content/test/data/htxg/README
@@ -9,10 +9,10 @@
  [2] https://github.com/nyaxt/webpackage
  [3] https://jyasskin.github.io/webpackage/implementation-draft/draft-yasskin-httpbis-origin-signed-exchanges-impl.html
 
-# Install gen-certurl command
-go get github.com/nyaxt/webpackage/go/signedexchange/cmd/gen-certurl
+# Install gen-certurl command from [1]
+go get github.com/WICG/webpackage/go/signedexchange/cmd/gen-certurl
 
-# Install gen-signedexchange command
+# Install gen-signedexchange command from [2]
 go get github.com/nyaxt/webpackage/go/signedexchange/cmd/gen-signedexchange
 
 
@@ -26,17 +26,21 @@
   ../../../../net/data/ssl/certificates/wildcard.pem \
   > /tmp/wildcard_example.org.public.pem
 
-# Generate the certificate message file of "*.example.org".
-gen-certurl  \
-  /tmp/wildcard_example.org.public.pem > wildcard_example.org.public.pem.msg
+# Make dummy OCSP and SCT data for cbor certificate chains.
+echo -n OCSP >/tmp/ocsp; echo -n SCT >/tmp/sct
+
+# Generate the certificate chain of "*.example.org".
+gen-certurl -pem /tmp/wildcard_example.org.public.pem \
+  -ocsp /tmp/ocsp -sct /tmp/sct > wildcard_example.org.public.pem.cbor
 
 # Get the public key of "127.0.0.1".
 sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' \
   ../../../../net/data/ssl/certificates/ok_cert.pem \
   > /tmp/127.0.0.1.public.pem
 
-# Generate the certificate message file of"127.0.0.1".
-gen-certurl /tmp/127.0.0.1.public.pem > 127.0.0.1.public.pem.msg
+# Generate the certificate chain of "127.0.0.1".
+gen-certurl -pem /tmp/127.0.0.1.public.pem \
+  -ocsp /tmp/ocsp -sct /tmp/sct > 127.0.0.1.public.pem.cbor
 
 # Generate the signed exchange file.
 gen-signedexchange \
@@ -111,14 +115,3 @@
   -certificate ./secp384r1-sha256.crt \
   -privateKey ./secp384r1.key \
   -date 2018-02-06T04:45:41Z
-
-# Install gen-certurl command from the original WICG repository [1].
-# (Note: this overwrites gen-certurl fetched from [2] in the above.)
-go get github.com/WICG/webpackage/go/signedexchange/cmd/gen-certurl
-
-# Currently OCSP and SCT are just dummy data.
-echo -n OCSP >/tmp/ocsp; echo -n SCT >/tmp/sct
-
-# Generate the certificate chain CBOR for "*.example.org".
-gen-certurl -pem /tmp/wildcard_example.org.public.pem \
- -ocsp /tmp/ocsp -sct /tmp/sct > wildcard_example.org.public.pem.cbor
diff --git a/content/test/data/htxg/test.example.com_invalid_test.htxg.mock-http-headers b/content/test/data/htxg/test.example.com_invalid_test.htxg.mock-http-headers
index 6e21762..c43a900 100644
--- a/content/test/data/htxg/test.example.com_invalid_test.htxg.mock-http-headers
+++ b/content/test/data/htxg/test.example.com_invalid_test.htxg.mock-http-headers
@@ -1,2 +1,2 @@
 HTTP/1.1 200 OK
-Content-Type: application/signed-exchange;v=b0
+Content-Type: application/signed-exchange;v=b1
diff --git a/content/test/data/htxg/test.example.org_test.htxg.mock-http-headers b/content/test/data/htxg/test.example.org_test.htxg.mock-http-headers
index 6e21762..c43a900 100644
--- a/content/test/data/htxg/test.example.org_test.htxg.mock-http-headers
+++ b/content/test/data/htxg/test.example.org_test.htxg.mock-http-headers
@@ -1,2 +1,2 @@
 HTTP/1.1 200 OK
-Content-Type: application/signed-exchange;v=b0
+Content-Type: application/signed-exchange;v=b1
diff --git a/content/test/data/htxg/wildcard_example.org.public.pem.msg b/content/test/data/htxg/wildcard_example.org.public.pem.msg
deleted file mode 100644
index 8a02ed0..0000000
--- a/content/test/data/htxg/wildcard_example.org.public.pem.msg
+++ /dev/null
Binary files differ
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
index 0b1b0aa..58d5085 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -557,8 +557,6 @@
     # shell.
     self.Skip('conformance/extensions/oes-texture-float-with-video.html',
         ['android', 'qualcomm', 'no_passthrough'], bug=499555)
-    self.Skip('conformance/rendering/line-rendering-quality.html',
-        ['android', 'qualcomm', 'no_passthrough'], bug=847222)
 
     # Nexus 5
     self.Fail('conformance/extensions/angle-instanced-arrays.html',
@@ -684,6 +682,8 @@
         ['android', ('qualcomm', 'Adreno (TM) 420')], bug=499555)
     self.Fail('conformance/rendering/gl-viewport-test.html',
         ['android', ('qualcomm', 'Adreno (TM) 420')], bug=611945)
+    self.Fail('conformance/rendering/line-rendering-quality.html',
+        ['android', ('qualcomm', 'Adreno (TM) 420')], bug=847222)
     self.Fail('conformance/textures/misc/' +
         'copy-tex-image-and-sub-image-2d.html',
         ['android', ('qualcomm', 'Adreno (TM) 420'), 'no_passthrough'],
diff --git a/device/geolocation/BUILD.gn b/device/geolocation/BUILD.gn
index a69729c..a5dad7e 100644
--- a/device/geolocation/BUILD.gn
+++ b/device/geolocation/BUILD.gn
@@ -112,6 +112,7 @@
   generate_jni("geolocation_jni_headers") {
     sources = [
       "android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java",
+      "android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java",
     ]
     jni_package = "device"
   }
diff --git a/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java b/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
index 40b12fff..34f916488 100644
--- a/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
+++ b/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java
@@ -6,10 +6,13 @@
 
 import org.chromium.base.ContextUtils;
 import org.chromium.base.VisibleForTesting;
+import org.chromium.base.annotations.CalledByNative;
+import org.chromium.base.annotations.JNINamespace;
 
 /**
  * Factory to create a LocationProvider to allow us to inject a mock for tests.
  */
+@JNINamespace("device")
 public class LocationProviderFactory {
     private static LocationProviderFactory.LocationProvider sProviderImpl;
     private static boolean sUseGmsCoreLocationProvider;
@@ -43,6 +46,7 @@
         sProviderImpl = provider;
     }
 
+    @CalledByNative
     public static void useGmsCoreLocationProvider() {
         sUseGmsCoreLocationProvider = true;
     }
diff --git a/device/geolocation/geolocation_provider_impl.cc b/device/geolocation/geolocation_provider_impl.cc
index e30b99d..97c972f 100644
--- a/device/geolocation/geolocation_provider_impl.cc
+++ b/device/geolocation/geolocation_provider_impl.cc
@@ -19,6 +19,11 @@
 #include "device/geolocation/location_arbitrator.h"
 #include "device/geolocation/public/cpp/geoposition.h"
 
+#if defined(OS_ANDROID)
+#include "base/android/jni_android.h"
+#include "jni/LocationProviderFactory_jni.h"
+#endif
+
 namespace device {
 
 namespace {
@@ -35,13 +40,22 @@
 }
 
 // static
-void GeolocationProviderImpl::SetGeolocationGlobals(
+void GeolocationProviderImpl::SetGeolocationConfiguration(
     const GeolocationProvider::RequestContextProducer request_context_producer,
     const std::string& api_key,
-    const CustomLocationProviderCallback& callback) {
+    const CustomLocationProviderCallback& custom_location_provider_getter,
+    bool use_gms_core_location_provider) {
   g_request_context_producer.Get() = request_context_producer;
   g_api_key.Get() = api_key;
-  g_custom_location_provider_callback.Get() = callback;
+  g_custom_location_provider_callback.Get() = custom_location_provider_getter;
+  if (use_gms_core_location_provider) {
+#if defined(OS_ANDROID)
+    JNIEnv* env = base::android::AttachCurrentThread();
+    Java_LocationProviderFactory_useGmsCoreLocationProvider(env);
+#else
+    NOTREACHED() << "GMS core location provider is only available for Android";
+#endif
+  }
 }
 
 std::unique_ptr<GeolocationProvider::Subscription>
diff --git a/device/geolocation/geolocation_provider_impl.h b/device/geolocation/geolocation_provider_impl.h
index 21d05e8..0dbbf66 100644
--- a/device/geolocation/geolocation_provider_impl.h
+++ b/device/geolocation/geolocation_provider_impl.h
@@ -13,6 +13,7 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/threading/thread.h"
+#include "build/build_config.h"
 #include "device/geolocation/geolocation_export.h"
 #include "device/geolocation/geolocation_provider.h"
 #include "device/geolocation/public/cpp/location_provider.h"
@@ -55,15 +56,21 @@
   // instantiated on the same thread. Ownership is NOT returned.
   static GeolocationProviderImpl* GetInstance();
 
-  // Optional: Provide a callback to produce a request context for network
-  // geolocation requests. Provide a Google API key for network geolocation
-  // requests. Provide a callback which can return a custom location provider
-  // from embedder. Call before using Init() on the singleton GetInstance().
-  static void SetGeolocationGlobals(
+  // Optional: Provide global configuration to Geolocation. Should be called
+  // before using Init() on the singleton GetInstance().
+  // |request_context_producer| : a callback to produce a request context for
+  // network geolocation requests.
+  // |api_key| : a Google API key for network geolocation requests.
+  // |custom_location_provider_getter| : a callback which returns a custom
+  // location provider from embedder.
+  // |use_gms_core_location_provider| : For android only, a flag indicates
+  // whether using the GMS core location provider.
+  static void SetGeolocationConfiguration(
       const GeolocationProvider::RequestContextProducer
           request_context_producer,
       const std::string& api_key,
-      const CustomLocationProviderCallback& callback);
+      const CustomLocationProviderCallback& custom_location_provider_getter,
+      bool use_gms_core_location_provider = false);
 
   void BindGeolocationControlRequest(mojom::GeolocationControlRequest request);
 
diff --git a/docs/security/side-channel-threat-model.md b/docs/security/side-channel-threat-model.md
new file mode 100644
index 0000000..4aa3ba8
--- /dev/null
+++ b/docs/security/side-channel-threat-model.md
@@ -0,0 +1,370 @@
+# Post-Spectre Threat Model Re-Think
+
+Contributors: awhalley, creis, dcheng, jschuh, jyasskin, lukasza, mkwst, nasko,
+palmer, tsepez. Patches and corrections welcome!
+
+Last Updated: 29 May 2018
+
+[TOC]
+
+## Introduction
+
+In light of [Spectre/Meltdown](https://spectreattack.com/), we needed to
+re-think our threat model and defenses for Chrome renderer processes. Spectre is
+a new class of hardware side-channel attack that affects (among many other
+targets) web browsers. This document describes the impact of these side-channel
+attacks and our approach to mitigating them.
+
+> The upshot of the latest developments is that the folks working on this from
+> the V8 side are increasingly convinced that there is no viable alternative to
+> Site Isolation as a systematic mitigation to SSCAs [speculative side-channel
+> attacks]. In this new mental model, we have to assume that user code can
+> reliably gain access to all data within a renderer process through
+> speculation. This means that we definitely need some sort of ‘privileged/PII
+> data isolation’ guarantees as well, for example ensuring that password and
+> credit card info are not speculatively loaded into a renderer process without
+> user consent. — Daniel Clifford, in private email
+
+In fact, any software that both (a) runs (native or interpreted) code from more
+than one source; and (b) attempts to create a security boundary inside a single
+address space, is potentially affected. For example, software that processes
+document formats with scripting capabilities, and which loads multiple documents
+from different sources into the same process, may need to take defense measures
+similar to those described here.
+
+### Problem Statement
+
+#### Active Web Content: Renderer Processes
+
+We must assume that *active web content* (JavaScript, WebAssembly, Native
+Client, Flash, PDFium, …) will be able to read any and all data in the address
+space of the process that hosts it. Multiple independent parties have developed
+proof-of-concept exploits that illustrate the effectiveness and reliability of
+Spectre-style attacks. The loss of cross-origin confidentiality inside a single
+process is thus not merely theoretical.
+
+The implications of this are far-reaching:
+
+* An attacker that can exploit Spectre can bypass certain native code exploit
+  mitigations, even without an infoleak bug in software.
+   * ASLR
+   * Stack canaries
+   * Heap metadata canaries
+   * Potentially certain forms of control-flow integrity
+* We must consider any data that gets into a renderer process to have no
+  confidentiality from any origins running in that process, regardless of the
+  same origin policy.
+
+Additionally, attackers may develop ways to read memory from other userland
+processes (e.g. a renderer reading the browser’s memory). We do not include
+those attacks in our threat model. The hardware, microcode, and OS must
+re-establish the process boundary and the userland/kernel boundary. If the
+underlying platform does not enforce those boundaries, there’s nothing an
+application (like a web browser) can do.
+
+#### GPU Process
+
+Chrome’s GPU process handles data from all origins in a single process. It is
+not currently practical to isolate different sites or origins into their own GPU
+processes. (At a minimum, there are time and space efficiency concerns; we are
+still trying to get Site Isolation shipped and are actively resolving issues
+there.)
+
+However, WebGL exposed high-resolution clocks that are useful for exploiting
+Spectre. It was possible to temporarily remove some of them, and to coarsen
+another, with minimal breakage of web compatibility, and so [that has been
+done](https://bugs.chromium.org/p/chromium/issues/detail?id=808744). However, we
+expect to reinstate the clocks on platforms where Site Isolation is on by
+default. (See [Attenuating Clocks, below](#attenuating-clocks).)
+
+We do not currently believe that, short of full code execution, an attacker can
+control speculative execution inside the GPU process to the extent necessary to
+exploit Spectre-like vulnerabilities. [As always, evidence to the contrary is
+welcome!](https://www.google.com/about/appsecurity/chrome-rewards/index.html)
+
+#### Nastier Threat Models
+
+It is generally safest to assume that an arbitrary read-write primitive in the
+renderer process will be available to the attacker. The richness of the
+attack/API surface available in a rendering engine makes this plausible.
+However, this capability is not a freebie the way Spectre is — the attacker must
+actually find 1 or more bugs that enable the RW primitive.
+
+Site Isolation (SI) gets us closer to a place where origins face in-process
+attacks only from other origins in their `SiteInstance`, and not from any
+arbitrary origin. (Origins that include script from hostile origins will still
+be vulnerable, of course.) However, [there may be hostile origins in the same
+process](#multiple-origins-within-a-siteinstance).
+
+Strict origin isolation is not yet being worked on; we must first ship SI on by
+default. It is an open question whether strict origin isolation will turn out to
+be feasible.
+
+## Defensive Approaches
+
+These are presented in no particular order, with the exception that Site
+Isolation is currently the best and most direct solution.
+
+### Site Isolation
+
+The first order solution is to simply get cross-origin data out of the Spectre
+attacker’s address space. [Site
+Isolation](https://www.chromium.org/Home/chromium-security/site-isolation) (SI)
+more closely aligns the web security model (the same-origin policy) with the
+underlying platform’s security model (separate address spaces and privilege
+reduction).
+
+SI still has some bugs that need to be ironed out before we can turn it on by
+default, both on Desktop and on Android. As of May 2018 we believe we can turn
+it on by default, on Desktop (but not Android yet) in M67 or M68.
+
+On iOS, where Chrome is a WKWebView embedder, we must rely on [the mitigations
+that Apple is
+developing](https://webkit.org/blog/8048/what-spectre-and-meltdown-mean-for-webkit/).
+
+All major browsers are working on some form of site isolation, and [we are
+collaborating publicly on a way for sites to opt in to
+isolation](https://groups.google.com/a/chromium.org/forum/#!forum/isolation-policy),
+to potentially make implementing and deploying site isolation easier. (Chrome
+Desktop’s Site Isolation will be on by default, regardless, in the M67 – M68
+timeframe.)
+
+#### Limitations
+
+##### Incompleteness of CORB
+
+Site Isolation depends on [cross-origin read
+blocking](https://chromium.googlesource.com/chromium/src/+/master/content/browser/loader/cross_origin_read_blocking_explainer.md)
+(CORB; formerly known as cross-site document blocking or XSDB) to prevent a
+malicious website from pulling in sensitive cross-origin data. Otherwise, an
+attacker could use markup like `<img src="http://example.com/secret.json">` to
+get cross-origin data within reach of Spectre or other OOB-read exploits.
+
+As of M63, CORB protects:
+
+* HTML, JSON, and XML responses.
+   * Protection requires the resource to be served with the correct
+     `Content-Type` header. [We recommend using `X-Content-Type-Options:
+     nosniff`](https://www.chromium.org/Home/chromium-security/ssca).
+   * In M65 we broadened which content types are considered JSON and XML. (E.g.
+     M63 didn’t consider `*+xml`.)
+* text/plain responses which sniff as HTML, XML, or JSON.
+
+Today, CORB doesn’t protect:
+
+* Responses without a `Content-Type` header.
+* Particular content types:
+   * `image/*`
+   * `video/*`
+   * `audio/*`
+   * `text/css`
+   * `font/*`
+   * `application/javascript`
+   * PDFs, ZIPs, and other unrecognized MIME types
+
+Site operators should read and follow, where applicable, [our guidance for
+maximizing CORB and other defensive
+features](https://developers.google.com/web/updates/2018/02/meltdown-spectre).
+(There is [an open bug to add a CORB evaluator to
+Lighthouse](https://bugs.chromium.org/p/chromium/issues/detail?id=806070).)
+
+<a name="multiple-origins-within-a-siteinstance"></a>
+##### Multiple Origins Within A `SiteInstance`
+
+A *site* is defined as the effective TLD + 1 DNS label (“eTLD+1”) and the URL
+scheme. This is a broader category than the origin, which is the scheme, entire
+hostname, and port number. All of these origins belong to the same site:
+
+* https, www.example.com, 443
+* https, www.example.com, 8443
+* https, goaty-desktop.internal.example.com, 443
+* https, compromised-and-hostile.unmaintained.example.com, 8443
+
+Therefore, even once we have shipped SI on all platforms and have shaken out all
+the bugs, renderers will still not be perfect compartments for origins. So we
+will still need to take a multi-faceted approach to UXSS, memory corruption, and
+OOB-read attacks like Spectre.
+
+Note that we are looking into the possibility of disabling assignments to
+`document.domain` (via [origin-wide](https://wicg.github.io/origin-policy)
+application of [Feature Policy](https://wicg.github.io/feature-policy/) or the
+like). This would open the possibility that we could isolate at the origin
+level.
+
+##### Memory Cost
+
+With SI, Chrome tends to spawn more renderer processes, which tends to lead to
+greater overall memory usage (conservative estimates seem to be about 10%). On
+many Android devices, it is more than 10%, and this additional cost can be
+prohibitive.
+
+##### Plug-Ins
+
+###### PDFium
+
+Chrome uses different PPAPI processes per origin, for secure origins. (We
+tracked this as [Issue
+809614](https://bugs.chromium.org/p/chromium/issues/detail?id=809614).)
+
+###### Flash
+
+Click To Play greatly reduces the risk that Flash-borne Spectre (and other)
+exploits will be effective at scale. Even so, [we might want to consider SI for
+Flash](https://bugs.chromium.org/p/chromium/issues/detail?id=816318).
+
+##### All Frames In A `<webview>` Run In The Same Process
+
+[`<webview>`s run in a separate renderer
+process](https://developer.chrome.com/apps/tags/webview), but that single
+process hosts all frames in the `<webview>` (even with Strict Site Isolation
+enabled elsewhere in Chrome). Extra work is needed to fix this.
+
+Mitigating factors:
+
+* `<webview>` is available only to Web UI and Chrome Apps (which are deprecated
+  outside of Chrome OS).
+* `<webview>` contents are in a separate storage partition (separate from the
+  normal profile and from the Chrome App using the `<webview>` tag). The Chrome
+  App is also in an additional separate storage partition.
+
+Chrome WebUI pages must not, and Chrome Apps should not, use `<webview>` for
+hosting arbitrary web pages. They must only allow a single trustworthy page or
+set of pages. The user already has to trust the Chrome App to do the right thing
+(there is no Omnibox, for example) and only take the user to safe sites. If we
+can’t enforce this programmatically, we may consider enforcing it through code
+review.
+
+##### Android `WebView`
+
+Android `WebView`s run in their own process as of Android O, so the hosting
+application gets protection from malicious web content. However, all origins are
+run in the same `WebView` process.
+
+### Ensure User Intent When Sending Data To A Renderer
+
+Before copying sensitive data into a renderer process, we should somehow get the
+person’s affirmative knowledge and consent. This has implications for all types
+of form auto-filling: normal form data, passwords, payment instruments, and any
+others. It seems like we are [currently in a pretty good place on that
+front](https://bugs.chromium.org/p/chromium/issues/detail?id=802993), with one
+exception: usernames and passwords get auto-filled into the shadow DOM, and then
+revealed to the real DOM on a (potentially forged?) user gesture. These
+credentials are origin-bound, however.
+
+The [Credential Management
+API](https://developer.mozilla.org/en-US/docs/Web/API/Credential_Management_API)
+still poses a risk, exposing usernames/passwords without a gesture for the
+subset of users who've accepted the auto-sign-in mechanism.
+
+What should count as a secure gesture is a gesture on relevant, well-labeled
+browser chrome, handled in the browser process. Tracking the gesture in the
+renderer, that can be forged by web content that compromises the renderer, does
+not suffice.
+
+#### Challenge
+
+We must enable a good user experience with autofill, payments, and passwords,
+while also not ending up with a browser that leaks these super-important classes
+of data. (A good password management experience is itself a key security goal,
+after all.)
+
+### Reducing Or Eliminating Speculation Gadgets
+
+Exploiting Spectre requires that the attacker can find (in V8, Blink, or Blink
+bindings), generate, or cause to be generated code ‘gadgets’ that will read out
+of bounds when speculatively executed. By exerting more control over how we
+generate machine code from JavaScript, and over where we place objects in memory
+relative to each other, we can reduce the prevalence and utility of these
+gadgets. The V8 team has been [landing such code generation
+changes](https://bugs.chromium.org/p/chromium/issues/detail?id=798964)
+continually since January 2018.
+
+Of the known attacks, we believe it’s currently only feasible to try to mitigate
+variant 1 with code changes in C++. We will need the toolchain and/or platform
+support to mitigate other types of speculation attacks. We could experiment with
+inserting `LFENCE` instructions or using
+[Retpoline](https://support.google.com/faqs/answer/7625886) before calling into
+Blink.
+
+PDFium uses V8 for its JavaScript support. To the extent that we rely on V8
+mitigations for Spectre defense, we need to be sure that PDFium uses the latest
+V8, so that it gets the latest mitigations. In shipping Chrome/ium products,
+PDFium uses the V8 that is in Chrome/ium.
+
+#### Limitations
+
+We don’t consider this approach to be a true solution; it’s only a mitigation.
+We think we can eliminate many of the most obvious gadgets and can buy some time
+for better defense mechanisms to be developed and deployed (primarily, Site
+Isolation).
+
+It is very likely impossible to eliminate all gadgets. As with [return-oriented
+programming](https://en.wikipedia.org/wiki/Return-oriented_programming), a large
+body of object code (like a Chrome renderer) is likely to contain so many
+gadgets that the attacker has a good probability to craft a working exploit. At
+some point, we may decide that we can’t stay ahead of attack research, and will
+stop trying to eliminate gadgets.
+
+Additionally, the mitigations typically come with a performance cost, and we may
+ultimately roll some or all of them back. Some potential mitigations are so
+expensive that it is impractical to deploy them.
+
+<a name="attenuating-clocks"></a>
+### Attenuating Clocks
+
+Exploiting Spectre requires a clock. We don’t believe it’s possible to
+eliminate, coarsen, or jitter all explicit and implicit clocks in the Open Web
+Platform (OWP) in a way that is sufficient to fully resolve Spectre. ([Merely
+enumerating all the
+clocks](https://bugs.chromium.org/p/chromium/issues/detail?id=798795) is
+difficult.) Surprisingly coarse clocks are still useful for exploitation.
+
+While it sometimes makes sense to deprecate, remove, coarsen, or jitter clocks,
+we don’t expect that we can get much long-term defensive value from doing so,
+for several reasons:
+
+* There are [many explicit and implicit clocks in the
+  platform](https://bugs.chromium.org/p/chromium/issues/detail?id=798795)
+* It is not always possible to coarsen or jitter them enough to slow or stop
+  exploitation…
+* …while also maintaining web platform compatibility and utility
+
+In particular, [clock jitter is of extremely limited
+utility](https://rdist.root.org/2009/05/28/timing-attack-in-google-keyczar-library/#comment-5485)
+when defending against side channel attacks.
+
+Many useful and legitimate web applications need access to high-precision
+clocks, and we want the OWP to be able to support them.
+
+### Gating Access To APIs That Enable Exploitation
+
+Although we want to support applications that necessarily need access to
+features that enable exploitation, such as `SharedArrayBuffer`, we don’t
+necessarily need to make the features available unconditionally. For example, a
+third-party `iframe` that is trying to exploit Spectre is very different than a
+WebAssembly game, in the top-level frame, that the person is actively playing
+(and issuing many gestures to). We could programmatically detect engagement and
+establish policies for when certain APIs and features will be available to web
+content. (See e.g. [Feature Policy](https://wicg.github.io/feature-policy/).)
+
+*Engagement* could be defined in a variety of complementary ways:
+
+* High [site engagement
+  score](https://www.chromium.org/developers/design-documents/site-engagement)
+* High site popularity, search rank, or similar
+* Frequent gestures on/interactions with the document
+* Document is the top-level document
+* Document is the currently-focused tab
+* Site is bookmarked or added to the Home screen or Desktop
+
+Additionally, we have considered the possibility of prompting the user for
+permission to run certain exploit-enabling APIs, although there are problems:
+warning fatigue, and the difficulty of communicating something accurate yet
+comprehensible to people.
+
+## Conclusion
+
+For the reasons above, we now assume any active code can read any data in the
+same address space. The plan going forward must be to keep sensitive
+cross-origin data out of address spaces that run untrustworthy code, rather than
+relying on in-process checks.
diff --git a/extensions/browser/api/web_request/web_request_api.cc b/extensions/browser/api/web_request/web_request_api.cc
index 82d2809..28917d9 100644
--- a/extensions/browser/api/web_request/web_request_api.cc
+++ b/extensions/browser/api/web_request/web_request_api.cc
@@ -43,6 +43,7 @@
 #include "extensions/browser/api/declarative_webrequest/webrequest_constants.h"
 #include "extensions/browser/api/declarative_webrequest/webrequest_rules_registry.h"
 #include "extensions/browser/api/extensions_api_client.h"
+#include "extensions/browser/api/web_request/web_request_api.h"
 #include "extensions/browser/api/web_request/web_request_api_constants.h"
 #include "extensions/browser/api/web_request/web_request_api_helpers.h"
 #include "extensions/browser/api/web_request/web_request_event_details.h"
@@ -356,10 +357,39 @@
 
 }  // namespace
 
+WebRequestAPI::ProxySet::ProxySet() {
+  DCHECK_CURRENTLY_ON(BrowserThread::UI);
+}
+
+WebRequestAPI::ProxySet::~ProxySet() {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+}
+
+void WebRequestAPI::ProxySet::AddProxy(std::unique_ptr<Proxy> proxy) {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  DCHECK(!is_shutdown_);
+
+  proxies_.insert(std::move(proxy));
+}
+
+void WebRequestAPI::ProxySet::RemoveProxy(Proxy* proxy) {
+  DCHECK_CURRENTLY_ON(BrowserThread::IO);
+  auto it = proxies_.find(proxy);
+  DCHECK(it != proxies_.end());
+  proxies_.erase(it);
+}
+
+void WebRequestAPI::ProxySet::Shutdown() {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+  is_shutdown_ = true;
+
+  proxies_.clear();
+}
+
 WebRequestAPI::WebRequestAPI(content::BrowserContext* context)
     : browser_context_(context),
       info_map_(ExtensionSystem::Get(browser_context_)->info_map()),
-      weak_ptr_factory_(this) {
+      proxies_(base::MakeRefCounted<ProxySet>()) {
   EventRouter* event_router = EventRouter::Get(browser_context_);
   for (size_t i = 0; i < arraysize(kWebRequestEvents); ++i) {
     // Observe the webRequest event.
@@ -373,7 +403,11 @@
   }
 }
 
-WebRequestAPI::~WebRequestAPI() = default;
+WebRequestAPI::~WebRequestAPI() {
+  BrowserThread::PostTask(
+      BrowserThread::IO, FROM_HERE,
+      base::BindOnce(&ProxySet::Shutdown, std::move(proxies_)));
+}
 
 void WebRequestAPI::Shutdown() {
   EventRouter::Get(browser_context_)->UnregisterObserver(this);
@@ -451,48 +485,22 @@
         std::make_unique<ExtensionNavigationUIData>(frame, tab_id, window_id);
   }
 
-  auto proxy = base::MakeRefCounted<WebRequestProxyingURLLoaderFactory>(
-      frame->GetProcess()->GetBrowserContext(),
-      frame->GetProcess()->GetBrowserContext()->GetResourceContext(),
-      info_map_);
-  proxies_.emplace(proxy.get(), proxy);
   BrowserThread::PostTask(
       BrowserThread::IO, FROM_HERE,
-      base::BindOnce(&WebRequestProxyingURLLoaderFactory::StartProxying, proxy,
-                     // Match the behavior of the WebRequestInfo constructor
-                     // which takes a net::URLRequest*.
-                     is_navigation ? -1 : frame->GetProcess()->GetID(),
-                     is_navigation ? MSG_ROUTING_NONE : frame->GetRoutingID(),
-                     std::move(navigation_ui_data), std::move(proxied_request),
-                     std::move(target_factory_info),
-                     base::BindOnce(&WebRequestAPI::RemoveProxyThreadSafe,
-                                    weak_ptr_factory_.GetWeakPtr(),
-                                    base::Unretained(proxy.get()))));
+      base::BindOnce(
+          &WebRequestProxyingURLLoaderFactory::StartProxying,
+          frame->GetProcess()->GetBrowserContext(),
+          frame->GetProcess()->GetBrowserContext()->GetResourceContext(),
+          // Match the behavior of the WebRequestInfo constructor
+          // which takes a net::URLRequest*.
+          is_navigation ? -1 : frame->GetProcess()->GetID(),
+          is_navigation ? MSG_ROUTING_NONE : frame->GetRoutingID(),
+          std::move(navigation_ui_data), base::Unretained(info_map_),
+          std::move(proxied_request), std::move(target_factory_info),
+          proxies_));
   return true;
 }
 
-// static
-void WebRequestAPI::RemoveProxyThreadSafe(
-    base::WeakPtr<WebRequestAPI> weak_self,
-    WebRequestProxyingURLLoaderFactory* factory) {
-  if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
-    BrowserThread::PostTask(
-        BrowserThread::UI, FROM_HERE,
-        base::BindOnce(&WebRequestAPI::RemoveProxyThreadSafe, weak_self,
-                       base::Unretained(factory)));
-    return;
-  }
-  if (!weak_self)
-    return;
-  weak_self->RemoveProxy(factory);
-}
-
-void WebRequestAPI::RemoveProxy(WebRequestProxyingURLLoaderFactory* factory) {
-  auto it = proxies_.find(factory);
-  DCHECK(it != proxies_.end());
-  proxies_.erase(it);
-}
-
 // Represents a single unique listener to an event, along with whatever filter
 // parameters and extra_info_spec were specified at the time the listener was
 // added.
diff --git a/extensions/browser/api/web_request/web_request_api.h b/extensions/browser/api/web_request/web_request_api.h
index 79cb3e5..ef838578 100644
--- a/extensions/browser/api/web_request/web_request_api.h
+++ b/extensions/browser/api/web_request/web_request_api.h
@@ -14,6 +14,7 @@
 #include <utility>
 #include <vector>
 
+#include "base/containers/unique_ptr_adapters.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
@@ -61,7 +62,6 @@
 class WebRequestEventDetails;
 class WebRequestEventRouterDelegate;
 struct WebRequestInfo;
-class WebRequestProxyingURLLoaderFactory;
 class WebRequestRulesRegistry;
 
 // Support class for the WebRequest API. Lives on the UI thread. Most of the
@@ -71,6 +71,50 @@
 class WebRequestAPI : public BrowserContextKeyedAPI,
                       public EventRouter::Observer {
  public:
+  // An interface which is held by ProxySet defined below.
+  class Proxy {
+   public:
+    virtual ~Proxy() {}
+  };
+
+  // A ProxySet is a set of proxies used by WebRequestAPI: It holds Proxy
+  // instances, and removes all proxies when the WebRequestAPI instance is
+  // gone, on the IO thread.
+  // This proxy set is created on the UI thread but anything else other than
+  // AddRef() and Release() including destruction will be done in the IO thread.
+  class ProxySet : public base::RefCountedThreadSafe<
+                       ProxySet,
+                       content::BrowserThread::DeleteOnIOThread> {
+   public:
+    ProxySet();
+
+    // Add a Proxy. This can be called only when |is_shutdown()| is false.
+    void AddProxy(std::unique_ptr<Proxy> proxy);
+    // Remove a Proxy. The removed proxy is deleted upon this call.
+    void RemoveProxy(Proxy* proxy);
+    // Set is_shutdown_ and deletes app proxies.
+    void Shutdown();
+    bool is_shutdown() const {
+      DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+      return is_shutdown_;
+    }
+
+   private:
+    friend struct content::BrowserThread::DeleteOnThread<
+        content::BrowserThread::IO>;
+    friend class base::DeleteHelper<ProxySet>;
+
+    ~ProxySet();
+
+    // Although these members are initialized on the UI thread, we expect at
+    // least one memory barrier before actually calling Generate in the IO
+    // thread, so we don't protect them with a lock.
+    std::set<std::unique_ptr<Proxy>, base::UniquePtrComparator> proxies_;
+    bool is_shutdown_ = false;
+
+    DISALLOW_COPY_AND_ASSIGN(ProxySet);
+  };
+
   explicit WebRequestAPI(content::BrowserContext* context);
   ~WebRequestAPI() override;
 
@@ -102,11 +146,6 @@
   static const bool kServiceRedirectedInIncognito = true;
   static const bool kServiceIsNULLWhileTesting = true;
 
-  static void RemoveProxyThreadSafe(
-      base::WeakPtr<WebRequestAPI> weak_self,
-      WebRequestProxyingURLLoaderFactory* factory);
-  void RemoveProxy(WebRequestProxyingURLLoaderFactory* factory);
-
   // A count of active event listeners registered in this BrowserContext. This
   // is eventually consistent with the state of
   int listener_count_ = 0;
@@ -114,13 +153,8 @@
   content::BrowserContext* const browser_context_;
   InfoMap* const info_map_;
 
-  // Active proxying URLLoaderFactory instances. Only used when the Network
-  // Service is enabled.
-  std::map<WebRequestProxyingURLLoaderFactory*,
-           scoped_refptr<WebRequestProxyingURLLoaderFactory>>
-      proxies_;
-
-  base::WeakPtrFactory<WebRequestAPI> weak_ptr_factory_;
+  // Active proxies. Only used when the Network Service is enabled.
+  scoped_refptr<ProxySet> proxies_;
 
   DISALLOW_COPY_AND_ASSIGN(WebRequestAPI);
 };
diff --git a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc
index 7b275e1..04d0b6f 100644
--- a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc
+++ b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.cc
@@ -8,7 +8,6 @@
 
 #include "base/strings/stringprintf.h"
 #include "content/public/browser/browser_thread.h"
-#include "extensions/browser/api/web_request/web_request_api.h"
 #include "extensions/browser/extension_navigation_ui_data.h"
 #include "net/http/http_util.h"
 
@@ -409,38 +408,53 @@
 WebRequestProxyingURLLoaderFactory::WebRequestProxyingURLLoaderFactory(
     void* browser_context,
     content::ResourceContext* resource_context,
-    InfoMap* info_map)
-    : RefCountedDeleteOnSequence(content::BrowserThread::GetTaskRunnerForThread(
-          content::BrowserThread::IO)),
-      browser_context_(browser_context),
-      resource_context_(resource_context),
-      info_map_(info_map) {}
-
-void WebRequestProxyingURLLoaderFactory::StartProxying(
     int render_process_id,
     int render_frame_id,
     std::unique_ptr<ExtensionNavigationUIData> navigation_ui_data,
+    InfoMap* info_map,
     network::mojom::URLLoaderFactoryRequest loader_request,
     network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
-    base::OnceClosure on_disconnect) {
+    WebRequestAPI::ProxySet* proxies)
+    : browser_context_(browser_context),
+      resource_context_(resource_context),
+      render_process_id_(render_process_id),
+      render_frame_id_(render_frame_id),
+      navigation_ui_data_(std::move(navigation_ui_data)),
+      info_map_(info_map),
+      proxies_(proxies) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
-
-  on_disconnect_ = std::move(on_disconnect);
-  render_process_id_ = render_process_id;
-  render_frame_id_ = render_frame_id;
-  navigation_ui_data_ = std::move(navigation_ui_data);
-
   target_factory_.Bind(std::move(target_factory_info));
   target_factory_.set_connection_error_handler(
       base::BindOnce(&WebRequestProxyingURLLoaderFactory::OnTargetFactoryError,
                      base::Unretained(this)));
-
   proxy_bindings_.AddBinding(this, std::move(loader_request));
   proxy_bindings_.set_connection_error_handler(base::BindRepeating(
       &WebRequestProxyingURLLoaderFactory::OnProxyBindingError,
       base::Unretained(this)));
 }
 
+void WebRequestProxyingURLLoaderFactory::StartProxying(
+    void* browser_context,
+    content::ResourceContext* resource_context,
+    int render_process_id,
+    int render_frame_id,
+    std::unique_ptr<ExtensionNavigationUIData> navigation_ui_data,
+    InfoMap* info_map,
+    network::mojom::URLLoaderFactoryRequest loader_request,
+    network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
+    scoped_refptr<WebRequestAPI::ProxySet> proxies) {
+  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
+  if (proxies->is_shutdown())
+    return;
+
+  auto proxy = std::make_unique<WebRequestProxyingURLLoaderFactory>(
+      browser_context, resource_context, render_process_id, render_frame_id,
+      std::move(navigation_ui_data), info_map, std::move(loader_request),
+      std::move(target_factory_info), proxies.get());
+
+  proxies->AddProxy(std::move(proxy));
+}
+
 void WebRequestProxyingURLLoaderFactory::CreateLoaderAndStart(
     network::mojom::URLLoaderRequest loader_request,
     int32_t routing_id,
@@ -478,7 +492,7 @@
   target_factory_.reset();
   if (proxy_bindings_.empty()) {
     // Deletes |this|.
-    std::move(on_disconnect_).Run();
+    proxies_->RemoveProxy(this);
   }
 }
 
@@ -486,7 +500,7 @@
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
   if (proxy_bindings_.empty() && !target_factory_.is_bound()) {
     // Deletes |this|.
-    std::move(on_disconnect_).Run();
+    proxies_->RemoveProxy(this);
   }
 }
 
diff --git a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h
index 91edf88..3481589 100644
--- a/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h
+++ b/extensions/browser/api/web_request/web_request_proxying_url_loader_factory.h
@@ -14,6 +14,7 @@
 #include "base/memory/ref_counted_delete_on_sequence.h"
 #include "base/memory/weak_ptr.h"
 #include "base/optional.h"
+#include "extensions/browser/api/web_request/web_request_api.h"
 #include "extensions/browser/api/web_request/web_request_info.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "mojo/public/cpp/bindings/binding_set.h"
@@ -42,8 +43,7 @@
 // path. Once Network Service is the only path, we can move all this stuff to
 // the UI thread.
 class WebRequestProxyingURLLoaderFactory
-    : public base::RefCountedDeleteOnSequence<
-          WebRequestProxyingURLLoaderFactory>,
+    : public WebRequestAPI::Proxy,
       public network::mojom::URLLoaderFactory {
  public:
   class InProgressRequest : public network::mojom::URLLoader,
@@ -136,17 +136,28 @@
     DISALLOW_COPY_AND_ASSIGN(InProgressRequest);
   };
 
-  WebRequestProxyingURLLoaderFactory(void* browser_context,
-                                     content::ResourceContext* resource_context,
-                                     InfoMap* info_map);
-
-  void StartProxying(
+  WebRequestProxyingURLLoaderFactory(
+      void* browser_context,
+      content::ResourceContext* resource_context,
       int render_process_id,
       int render_frame_id,
       std::unique_ptr<ExtensionNavigationUIData> navigation_ui_data,
+      InfoMap* info_map,
       network::mojom::URLLoaderFactoryRequest loader_request,
       network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
-      base::OnceClosure on_disconnect);
+      WebRequestAPI::ProxySet* proxies);
+  ~WebRequestProxyingURLLoaderFactory() override;
+
+  static void StartProxying(
+      void* browser_context,
+      content::ResourceContext* resource_context,
+      int render_process_id,
+      int render_frame_id,
+      std::unique_ptr<ExtensionNavigationUIData> navigation_ui_data,
+      InfoMap* info_map,
+      network::mojom::URLLoaderFactoryRequest loader_request,
+      network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
+      scoped_refptr<WebRequestAPI::ProxySet> proxies);
 
   // network::mojom::URLLoaderFactory:
   void CreateLoaderAndStart(network::mojom::URLLoaderRequest loader_request,
@@ -160,25 +171,20 @@
   void Clone(network::mojom::URLLoaderFactoryRequest loader_request) override;
 
  private:
-  friend class base::DeleteHelper<WebRequestProxyingURLLoaderFactory>;
-  friend class base::RefCountedDeleteOnSequence<
-      WebRequestProxyingURLLoaderFactory>;
-
-  ~WebRequestProxyingURLLoaderFactory() override;
-
   void OnTargetFactoryError();
   void OnProxyBindingError();
   void RemoveRequest(uint64_t request_id);
 
   void* const browser_context_;
   content::ResourceContext* const resource_context_;
-  int render_process_id_ = -1;
-  int render_frame_id_ = -1;
+  const int render_process_id_;
+  const int render_frame_id_;
   std::unique_ptr<ExtensionNavigationUIData> navigation_ui_data_;
   InfoMap* const info_map_;
   mojo::BindingSet<network::mojom::URLLoaderFactory> proxy_bindings_;
   network::mojom::URLLoaderFactoryPtr target_factory_;
-  base::OnceClosure on_disconnect_;
+  // Owns |this|.
+  WebRequestAPI::ProxySet* const proxies_;
   uint64_t next_request_id_ = 1;
 
   std::map<int32_t, std::unique_ptr<InProgressRequest>> requests_;
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc
index 2e227e4..8f805d5 100644
--- a/gpu/command_buffer/service/feature_info.cc
+++ b/gpu/command_buffer/service/feature_info.cc
@@ -456,14 +456,15 @@
   // so the extension string is always exposed.
   AddExtensionString("GL_OES_vertex_array_object");
 
+  if (!disallowed_features_.gpu_memory_manager) {
 // Texture storage image is only usable with native gpu memory buffer support.
 #if defined(OS_MACOSX) || (defined(OS_LINUX) && defined(USE_OZONE))
-  feature_flags_.chromium_texture_storage_image = true;
-  AddExtensionString("GL_CHROMIUM_texture_storage_image");
+    feature_flags_.chromium_texture_storage_image = true;
+    AddExtensionString("GL_CHROMIUM_texture_storage_image");
 #endif
 
-  if (!disallowed_features_.gpu_memory_manager)
     AddExtensionString("GL_CHROMIUM_gpu_memory_manager");
+  }
 
   if (gl::HasExtension(extensions, "GL_ANGLE_translated_shader_source")) {
     feature_flags_.angle_translated_shader_source = true;
diff --git a/gpu/command_buffer/tests/gl_manager.cc b/gpu/command_buffer/tests/gl_manager.cc
index 5f7d075..fe9ee06b 100644
--- a/gpu/command_buffer/tests/gl_manager.cc
+++ b/gpu/command_buffer/tests/gl_manager.cc
@@ -514,7 +514,7 @@
       gl_image = gpu_memory_buffer_factory_->AsImageFactory()
                      ->CreateImageForGpuMemoryBuffer(
                          handle, size, format, internalformat,
-                         gpu::InProcessCommandBuffer::kGpuMemoryBufferClientId,
+                         gpu::InProcessCommandBuffer::kGpuClientId,
                          gpu::kNullSurfaceHandle);
       if (!gl_image)
         return -1;
diff --git a/gpu/ipc/in_process_command_buffer.cc b/gpu/ipc/in_process_command_buffer.cc
index 6e7a552..73b8c61 100644
--- a/gpu/ipc/in_process_command_buffer.cc
+++ b/gpu/ipc/in_process_command_buffer.cc
@@ -152,7 +152,8 @@
 
 }  // anonyous namespace
 
-const int InProcessCommandBuffer::kGpuMemoryBufferClientId = 1;
+const int InProcessCommandBuffer::kGpuClientId =
+    std::numeric_limits<int>::max();
 
 InProcessCommandBuffer::Service::Service(
     const GpuPreferences& gpu_preferences,
@@ -951,7 +952,7 @@
 
       scoped_refptr<gl::GLImage> image =
           image_factory_->CreateImageForGpuMemoryBuffer(
-              handle, size, format, internalformat, kGpuMemoryBufferClientId,
+              handle, size, format, internalformat, kGpuClientId,
               kNullSurfaceHandle);
       if (!image.get()) {
         LOG(ERROR) << "Failed to create image for buffer.";
@@ -993,7 +994,8 @@
 
 void InProcessCommandBuffer::CacheShader(const std::string& key,
                                          const std::string& shader) {
-  // TODO(piman): implement this.
+  if (gpu_channel_manager_delegate_)
+    gpu_channel_manager_delegate_->StoreShaderToDisk(kGpuClientId, key, shader);
 }
 
 void InProcessCommandBuffer::OnFenceSyncRelease(uint64_t release) {
diff --git a/gpu/ipc/in_process_command_buffer.h b/gpu/ipc/in_process_command_buffer.h
index e62bbea..7f266880 100644
--- a/gpu/ipc/in_process_command_buffer.h
+++ b/gpu/ipc/in_process_command_buffer.h
@@ -202,7 +202,7 @@
 
   gpu::ServiceTransferCache* GetTransferCacheForTest() const;
 
-  static const int kGpuMemoryBufferClientId;
+  static const int kGpuClientId;
 
   // The serializer interface to the GPU service (i.e. thread).
   class Service {
diff --git a/infra/config/branch/cq.cfg b/infra/config/branch/cq.cfg
index 6f2c9be..76c609ba 100644
--- a/infra/config/branch/cq.cfg
+++ b/infra/config/branch/cq.cfg
@@ -82,7 +82,7 @@
         equivalent_to {
           bucket: "luci.chromium.try"
           builder: "android-kitkat-arm-rel"
-          percentage: 10
+          percentage: 100
         }
       }
     }
diff --git a/infra/config/global/cr-buildbucket.cfg b/infra/config/global/cr-buildbucket.cfg
index d2934425..552145a0 100644
--- a/infra/config/global/cr-buildbucket.cfg
+++ b/infra/config/global/cr-buildbucket.cfg
@@ -526,12 +526,12 @@
     }
 
     builders {
-      name: "Android FYI 64 dEQP Vk Release (Nexus 5X)"
+      name: "Android FYI 32 Vk Release (Nexus 5X)"
       mixins: "android-gpu-fyi-ci"
     }
 
     builders {
-      name: "Android FYI 32 Vk Release (Nexus 5X)"
+      name: "Android FYI 64 dEQP Vk Release (Nexus 5X)"
       mixins: "android-gpu-fyi-ci"
     }
 
@@ -1329,6 +1329,9 @@
     # Code coverage reports generation bots.
     builders {
       name: "linux-code-coverage-generation"
+      recipe {
+        name: "chromium_clang_coverage_reports"
+      }
       execution_timeout_secs: 72000  # 20h
     }
     ############################################################################
@@ -2238,8 +2241,12 @@
     }
 
     # Keep builders sorted by OS, then name.
-    builders { mixins: "android-angle-try" name: "android_angle_rel_ng" }
     builders { mixins: "android-angle-try" name: "android_angle_deqp_rel_ng" }
+    builders { mixins: "android-angle-try" name: "android_angle_rel_ng" }
+    builders { mixins: "android-angle-try" name: "android_angle_vk32_deqp_rel_ng" }
+    builders { mixins: "android-angle-try" name: "android_angle_vk32_rel_ng" }
+    builders { mixins: "android-angle-try" name: "android_angle_vk64_deqp_rel_ng" }
+    builders { mixins: "android-angle-try" name: "android_angle_vk64_rel_ng" }
     builders {
       mixins: "android-try"
       name: "android-kitkat-arm-rel"
diff --git a/infra/config/global/luci-milo.cfg b/infra/config/global/luci-milo.cfg
index 520c1fc..350f9ca 100644
--- a/infra/config/global/luci-milo.cfg
+++ b/infra/config/global/luci-milo.cfg
@@ -1694,16 +1694,6 @@
     short_name: "(ಥ_ಥ)"
   }
   builders {
-    name: "buildbot/chromium.fyi/Headless Linux (dbg)"
-    category: "chromium.fyi|linux|debug"
-    short_name: "bb"
-  }
-  builders {
-    name: "buildbucket/luci.chromium.ci/Headless Linux (dbg)"
-    category: "chromium.fyi|linux|debug"
-    short_name: "ci"
-  }
-  builders {
     name: "buildbucket/luci.chromium.ci/android-kitkat-arm-rel"
     category: "android|arm|rel"
     short_name: "ci"
@@ -2640,7 +2630,6 @@
     category: "linux"
   }
   builders {
-    name: "buildbot/chromium.fyi/Headless Linux (dbg)"
     name: "buildbucket/luci.chromium.ci/Headless Linux (dbg)"
     category: "linux"
   }
@@ -4643,9 +4632,21 @@
     name: "buildbucket/luci.chromium.try/android_angle_deqp_rel_ng"
   }
   builders {
+    name: "buildbucket/luci.chromium.try/android_angle_vk32_deqp_rel_ng"
+  }
+  builders {
+    name: "buildbucket/luci.chromium.try/android_angle_vk64_deqp_rel_ng"
+  }
+  builders {
     name: "buildbucket/luci.chromium.try/android_angle_rel_ng"
   }
   builders {
+    name: "buildbucket/luci.chromium.try/android_angle_vk32_rel_ng"
+  }
+  builders {
+    name: "buildbucket/luci.chromium.try/android_angle_vk64_rel_ng"
+  }
+  builders {
     name: "buildbucket/luci.chromium.try/linux_angle_dbg_ng"
   }
   builders {
@@ -4701,9 +4702,21 @@
     name: "buildbucket/luci.chromium.try/android_angle_deqp_rel_ng"
   }
   builders {
+    name: "buildbucket/luci.chromium.try/android_angle_vk32_deqp_rel_ng"
+  }
+  builders {
+    name: "buildbucket/luci.chromium.try/android_angle_vk64_deqp_rel_ng"
+  }
+  builders {
     name: "buildbucket/luci.chromium.try/android_angle_rel_ng"
   }
   builders {
+    name: "buildbucket/luci.chromium.try/android_angle_vk32_rel_ng"
+  }
+  builders {
+    name: "buildbucket/luci.chromium.try/android_angle_vk64_rel_ng"
+  }
+  builders {
     name: "buildbucket/luci.chromium.try/android_compile_dbg"
   }
   builders {
diff --git a/ios/chrome/app/strings/resources/ios_strings_es.xtb b/ios/chrome/app/strings/resources/ios_strings_es.xtb
index 70c5310..53466ab0 100644
--- a/ios/chrome/app/strings/resources/ios_strings_es.xtb
+++ b/ios/chrome/app/strings/resources/ios_strings_es.xtb
@@ -118,7 +118,7 @@
 <translation id="2969979262385602596">Error al iniciar sesión. Inténtalo más tarde.</translation>
 <translation id="2989805286512600854">Abrir en una pestaña nueva</translation>
 <translation id="3024255823539804759">Ayer</translation>
-<translation id="3037605927509011580">¡Oh, no!</translation>
+<translation id="3037605927509011580">¡Vaya!</translation>
 <translation id="3112556859945124369">Marcar…</translation>
 <translation id="3151924044251363314">Solo alguien que tenga tu frase de contraseña puede leer tus datos cifrados. Google no envía ni almacena la frase de contraseña. Si la olvidas o quieres cambiar esta configuración, debes restablecer la sincronización. <ph name="BEGIN_LINK" />Más información<ph name="END_LINK" /></translation>
 <translation id="3157684681743766797">Marcar todas…</translation>
diff --git a/media/README.md b/media/README.md
index 71ad42ff..01b21adc 100644
--- a/media/README.md
+++ b/media/README.md
@@ -180,4 +180,9 @@
 MediaLog will send logs to `about://media-internals`, which is easily accessible
 by developers (including web developes), testers and even users to get detailed
 information about a playback instance. For guidance on how to use MediaLog, see
-`media/base/media_log.h`.
\ No newline at end of file
+`media/base/media_log.h`.
+
+MediaLog messages should be concise and free of implementation details. Error
+messages should provide clues as to how to fix them, usually by precisely
+describing the circumstances that led to the error. Use properties, rather
+than messages, to record metadata and state changes.
diff --git a/media/formats/mp4/box_definitions.cc b/media/formats/mp4/box_definitions.cc
index 6def180..a9f747e 100644
--- a/media/formats/mp4/box_definitions.cc
+++ b/media/formats/mp4/box_definitions.cc
@@ -853,9 +853,9 @@
 #endif
     default:
       // Unknown/unsupported format
-      MEDIA_LOG(ERROR, reader->media_log()) << __func__
-                                            << " unsupported video format "
-                                            << FourCCToString(actual_format);
+      MEDIA_LOG(ERROR, reader->media_log())
+          << "Unsupported VisualSampleEntry type "
+          << FourCCToString(actual_format);
       return false;
   }
 
diff --git a/media/formats/mp4/mp4_stream_parser_unittest.cc b/media/formats/mp4/mp4_stream_parser_unittest.cc
index dac384d..5f0ec7f 100644
--- a/media/formats/mp4/mp4_stream_parser_unittest.cc
+++ b/media/formats/mp4/mp4_stream_parser_unittest.cc
@@ -348,7 +348,7 @@
   bool expect_success = true;
 #else
   bool expect_success = false;
-  EXPECT_MEDIA_LOG(ErrorLog("Parse unsupported video format hev1"));
+  EXPECT_MEDIA_LOG(ErrorLog("Unsupported VisualSampleEntry type hev1"));
 #endif
   auto params = GetDefaultInitParametersExpectations();
   params.duration = base::TimeDelta::FromMicroseconds(1002000);
diff --git a/media/gpu/windows/dxva_video_decode_accelerator_win.cc b/media/gpu/windows/dxva_video_decode_accelerator_win.cc
index 93e65ae..6cac07f 100644
--- a/media/gpu/windows/dxva_video_decode_accelerator_win.cc
+++ b/media/gpu/windows/dxva_video_decode_accelerator_win.cc
@@ -893,9 +893,6 @@
   if (d3d9_.Get())
     return true;
 
-  if (media_log_)
-    MEDIA_LOG(INFO, media_log_) << __func__ << ": Creating D3D9 device.";
-
   HRESULT hr = E_FAIL;
 
   hr = Direct3DCreate9Ex(D3D_SDK_VERSION, d3d9_.GetAddressOf());
@@ -1044,9 +1041,6 @@
   if (D3D11Device())
     return true;
 
-  if (media_log_)
-    MEDIA_LOG(INFO, media_log_) << __func__ << ": Creating D3D11 device.";
-
   HRESULT hr = create_dxgi_device_manager_(
       &dx11_dev_manager_reset_token_, d3d11_device_manager_.GetAddressOf());
   RETURN_ON_HR_FAILURE(hr, "MFCreateDXGIDeviceManager failed", false);
@@ -1647,12 +1641,16 @@
   ULONG_PTR device_manager_to_use = NULL;
   if (use_dx11_) {
     CHECK(create_dxgi_device_manager_);
+    if (media_log_)
+      MEDIA_LOG(INFO, media_log_) << "Using D3D11 device for DXVA";
     RETURN_AND_NOTIFY_ON_FAILURE(CreateDX11DevManager(),
                                  "Failed to initialize DX11 device and manager",
                                  PLATFORM_FAILURE, false);
     device_manager_to_use =
         reinterpret_cast<ULONG_PTR>(d3d11_device_manager_.Get());
   } else {
+    if (media_log_)
+      MEDIA_LOG(INFO, media_log_) << "Using D3D9 device for DXVA";
     RETURN_AND_NOTIFY_ON_FAILURE(CreateD3DDevManager(),
                                  "Failed to initialize D3D device and manager",
                                  PLATFORM_FAILURE, false);
@@ -1765,8 +1763,6 @@
     UINT32 dx11_aware = 0;
     attributes->GetUINT32(MF_SA_D3D11_AWARE, &dx11_aware);
     use_dx11_ = !!dx11_aware;
-    if (media_log_)
-      MEDIA_LOG(INFO, media_log_) << __func__ << ": Using DX11? " << use_dx11_;
   }
 
   use_keyed_mutex_ =
diff --git a/net/base/datagram_buffer.cc b/net/base/datagram_buffer.cc
index f3ed83c..b3c522f8 100644
--- a/net/base/datagram_buffer.cc
+++ b/net/base/datagram_buffer.cc
@@ -18,8 +18,8 @@
   DCHECK_LE(buf_len, max_buffer_size_);
   std::unique_ptr<DatagramBuffer> datagram_buffer;
   if (free_list_.empty()) {
-    datagram_buffer =
-        QuicWrapUnique<DatagramBuffer>(new DatagramBuffer(max_buffer_size_));
+    datagram_buffer = quic::QuicWrapUnique<DatagramBuffer>(
+        new DatagramBuffer(max_buffer_size_));
   } else {
     datagram_buffer = std::move(free_list_.front());
     free_list_.pop_front();
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 568c10e3..4559e25 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -516,10 +516,10 @@
   base::span<const char* const> standard_types;
 };
 static const StandardType kStandardTypes[] = {
-    {"image/", kStandardImageTypes},
-    {"audio/", kStandardAudioTypes},
-    {"video/", kStandardVideoTypes},
-    {nullptr, base::span<const char* const>()}};
+    {"image/", base::span<const char* const>{kStandardImageTypes}},
+    {"audio/", base::span<const char* const>{kStandardAudioTypes}},
+    {"video/", base::span<const char* const>{kStandardVideoTypes}},
+    {nullptr,  base::span<const char* const>{}}};
 
 // GetExtensionsFromHardCodedMappings() adds file extensions (without a leading
 // dot) to the set |extensions|, for all MIME types matching |mime_type|.
diff --git a/net/base/net_error_details.h b/net/base/net_error_details.h
index cf66b68a..2661f129 100644
--- a/net/base/net_error_details.h
+++ b/net/base/net_error_details.h
@@ -16,11 +16,11 @@
 struct NET_EXPORT NetErrorDetails {
   NetErrorDetails()
       : quic_broken(false),
-        quic_connection_error(QUIC_NO_ERROR),
+        quic_connection_error(quic::QUIC_NO_ERROR),
         connection_info(HttpResponseInfo::CONNECTION_INFO_UNKNOWN),
         quic_port_migration_detected(false) {}
 
-  NetErrorDetails(bool quic_broken, QuicErrorCode quic_connection_error)
+  NetErrorDetails(bool quic_broken, quic::QuicErrorCode quic_connection_error)
       : quic_broken(quic_broken),
         quic_connection_error(quic_connection_error),
         connection_info(HttpResponseInfo::CONNECTION_INFO_UNKNOWN),
@@ -29,7 +29,7 @@
   // True if all QUIC alternative services are marked broken for the origin.
   bool quic_broken;
   // QUIC granular error info.
-  QuicErrorCode quic_connection_error;
+  quic::QuicErrorCode quic_connection_error;
   // Early prediction of the connection type that this request attempts to use.
   // Will be discarded by upper layers if the connection type can be fetched
   // from response header from the server.
diff --git a/net/base/net_errors.cc b/net/base/net_errors.cc
index f09373b..2667765 100644
--- a/net/base/net_errors.cc
+++ b/net/base/net_errors.cc
@@ -16,7 +16,7 @@
   if (error == ERR_QUIC_PROTOCOL_ERROR && extended_error_code != 0) {
     return std::string("net::ERR_QUIC_PROTOCOL_ERROR.") +
            QuicErrorCodeToString(
-               static_cast<QuicErrorCode>(extended_error_code));
+               static_cast<quic::QuicErrorCode>(extended_error_code));
   }
   return ErrorToString(error);
 }
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 2e96c76..e2d876f 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -112,7 +112,7 @@
       enable_http2_alternative_service(false),
       enable_websocket_over_http2(false),
       enable_quic(false),
-      quic_max_packet_length(kDefaultMaxPacketSize),
+      quic_max_packet_length(quic::kDefaultMaxPacketSize),
       quic_max_server_configs_stored_in_properties(0u),
       quic_enable_socket_recv_optimization(false),
       mark_quic_broken_when_network_blackholes(false),
@@ -120,11 +120,11 @@
       support_ietf_format_quic_altsvc(false),
       quic_close_sessions_on_ip_change(false),
       quic_idle_connection_timeout_seconds(kIdleConnectionTimeoutSeconds),
-      quic_reduced_ping_timeout_seconds(kPingTimeoutSecs),
+      quic_reduced_ping_timeout_seconds(quic::kPingTimeoutSecs),
       quic_max_time_before_crypto_handshake_seconds(
-          kMaxTimeForCryptoHandshakeSecs),
+          quic::kMaxTimeForCryptoHandshakeSecs),
       quic_max_idle_time_before_crypto_handshake_seconds(
-          kInitialIdleTimeoutSecs),
+          quic::kInitialIdleTimeoutSecs),
       quic_migrate_sessions_on_network_change(false),
       quic_migrate_sessions_early(false),
       quic_migrate_sessions_on_network_change_v2(false),
@@ -144,7 +144,7 @@
       enable_channel_id(false),
       http_09_on_non_default_ports_enabled(false),
       disable_idle_sockets_close_on_memory_pressure(false) {
-  quic_supported_versions.push_back(QUIC_VERSION_43);
+  quic_supported_versions.push_back(quic::QUIC_VERSION_43);
 }
 
 HttpNetworkSession::Params::Params(const Params& other) = default;
@@ -202,9 +202,10 @@
           context.cert_transparency_verifier,
           context.socket_performance_watcher_factory,
           context.quic_crypto_client_stream_factory,
-          context.quic_random ? context.quic_random : QuicRandom::GetInstance(),
+          context.quic_random ? context.quic_random
+                              : quic::QuicRandom::GetInstance(),
           context.quic_clock ? context.quic_clock
-                             : QuicChromiumClock::GetInstance(),
+                             : quic::QuicChromiumClock::GetInstance(),
           params.quic_max_packet_length,
           params.quic_user_agent_id,
           params.quic_max_server_configs_stored_in_properties > 0,
@@ -343,7 +344,7 @@
 
   auto connection_options(std::make_unique<base::ListValue>());
   for (const auto& option : params_.quic_connection_options)
-    connection_options->AppendString(QuicTagToString(option));
+    connection_options->AppendString(quic::QuicTagToString(option));
   dict->Set("connection_options", std::move(connection_options));
 
   auto supported_versions(std::make_unique<base::ListValue>());
@@ -400,7 +401,7 @@
   normal_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED);
   websocket_socket_pool_manager_->FlushSocketPoolsWithError(ERR_ABORTED);
   spdy_session_pool_.CloseCurrentSessions(ERR_ABORTED);
-  quic_stream_factory_.CloseAllSessions(ERR_ABORTED, QUIC_INTERNAL_ERROR);
+  quic_stream_factory_.CloseAllSessions(ERR_ABORTED, quic::QUIC_INTERNAL_ERROR);
 }
 
 void HttpNetworkSession::CloseIdleConnections() {
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index 934fe95f..ba099ff6 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -59,7 +59,11 @@
 class NetworkQualityProvider;
 class ProxyDelegate;
 class ProxyResolutionService;
+}  // namespace net
+namespace quic {
 class QuicClock;
+}  // namespace quic
+namespace net {
 class QuicCryptoClientStreamFactory;
 class SocketPerformanceWatcherFactory;
 class SOCKSClientSocketPool;
@@ -123,7 +127,7 @@
     // QUIC runtime configuration options.
 
     // Versions of QUIC which may be used.
-    QuicTransportVersionVector quic_supported_versions;
+    quic::QuicTransportVersionVector quic_supported_versions;
     // User agent description to send in the QUIC handshake.
     std::string quic_user_agent_id;
     // Limit on the size of QUIC packets.
@@ -134,10 +138,10 @@
     // QUIC will be used for all connections in this set.
     std::set<HostPortPair> origins_to_force_quic_on;
     // Set of QUIC tags to send in the handshake's connection options.
-    QuicTagVector quic_connection_options;
+    quic::QuicTagVector quic_connection_options;
     // Set of QUIC tags to send in the handshake's connection options that only
     // affect the client.
-    QuicTagVector quic_client_connection_options;
+    quic::QuicTagVector quic_client_connection_options;
     // Enables experimental optimization for receiving data in UDPSocket.
     bool quic_enable_socket_recv_optimization;
 
@@ -240,9 +244,9 @@
     NetworkQualityProvider* network_quality_provider;
 
     // Source of time for QUIC connections.
-    QuicClock* quic_clock;
+    quic::QuicClock* quic_clock;
     // Source of entropy for QUIC connections.
-    QuicRandom* quic_random;
+    quic::QuicRandom* quic_random;
     // Optional factory to use for creating QuicCryptoClientStreams.
     QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory;
 
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 6cb10b29..3afe887 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1661,7 +1661,7 @@
   establishing_tunnel_ = false;
   remote_endpoint_ = IPEndPoint();
   net_error_details_.quic_broken = false;
-  net_error_details_.quic_connection_error = QUIC_NO_ERROR;
+  net_error_details_.quic_connection_error = quic::QUIC_NO_ERROR;
   provided_token_binding_key_.reset();
   referred_token_binding_key_.reset();
 }
diff --git a/net/http/http_proxy_client_socket_pool.cc b/net/http/http_proxy_client_socket_pool.cc
index ac29124..673401c2 100644
--- a/net/http/http_proxy_client_socket_pool.cc
+++ b/net/http/http_proxy_client_socket_pool.cc
@@ -77,7 +77,7 @@
 HttpProxySocketParams::HttpProxySocketParams(
     const scoped_refptr<TransportSocketParams>& transport_params,
     const scoped_refptr<SSLSocketParams>& ssl_params,
-    QuicTransportVersion quic_version,
+    quic::QuicTransportVersion quic_version,
     const std::string& user_agent,
     const HostPortPair& endpoint,
     HttpAuthCache* http_auth_cache,
@@ -99,11 +99,12 @@
       is_trusted_proxy_(is_trusted_proxy),
       tunnel_(tunnel),
       traffic_annotation_(traffic_annotation) {
-  // If doing a QUIC proxy, |quic_version| must not be QUIC_VERSION_UNSUPPORTED,
-  // and |ssl_params| must be valid while |transport_params| is null.
-  // Otherwise, |quic_version| must be QUIC_VERSION_UNSUPPORTED, and exactly
-  // one of |transport_params| or |ssl_params| must be set.
-  DCHECK(quic_version_ == QUIC_VERSION_UNSUPPORTED
+  // If doing a QUIC proxy, |quic_version| must not be
+  // quic::QUIC_VERSION_UNSUPPORTED, and |ssl_params| must be valid while
+  // |transport_params| is null. Otherwise, |quic_version| must be
+  // quic::QUIC_VERSION_UNSUPPORTED, and exactly one of |transport_params| or
+  // |ssl_params| must be set.
+  DCHECK(quic_version_ == quic::QUIC_VERSION_UNSUPPORTED
              ? (bool)transport_params != (bool)ssl_params
              : !transport_params && ssl_params);
   // Exactly one of |transport_params_| and |ssl_params_| must be non-null.
diff --git a/net/http/http_proxy_client_socket_pool.h b/net/http/http_proxy_client_socket_pool.h
index fb9bde8..7cf9b90e 100644
--- a/net/http/http_proxy_client_socket_pool.h
+++ b/net/http/http_proxy_client_socket_pool.h
@@ -43,14 +43,14 @@
 // types.  The other param must be NULL.  When using an HTTP proxy,
 // |transport_params| must be set.  When using an HTTPS proxy or QUIC proxy,
 // |ssl_params| must be set. Also, if using a QUIC proxy, |quic_version| must
-// not be QUIC_VERSION_UNSUPPORTED.
+// not be quic::QUIC_VERSION_UNSUPPORTED.
 class NET_EXPORT_PRIVATE HttpProxySocketParams
     : public base::RefCounted<HttpProxySocketParams> {
  public:
   HttpProxySocketParams(
       const scoped_refptr<TransportSocketParams>& transport_params,
       const scoped_refptr<SSLSocketParams>& ssl_params,
-      QuicTransportVersion quic_version,
+      quic::QuicTransportVersion quic_version,
       const std::string& user_agent,
       const HostPortPair& endpoint,
       HttpAuthCache* http_auth_cache,
@@ -67,7 +67,7 @@
   const scoped_refptr<SSLSocketParams>& ssl_params() const {
     return ssl_params_;
   }
-  QuicTransportVersion quic_version() const { return quic_version_; }
+  quic::QuicTransportVersion quic_version() const { return quic_version_; }
   const std::string& user_agent() const { return user_agent_; }
   const HostPortPair& endpoint() const { return endpoint_; }
   HttpAuthCache* http_auth_cache() const { return http_auth_cache_; }
@@ -93,7 +93,7 @@
 
   const scoped_refptr<TransportSocketParams> transport_params_;
   const scoped_refptr<SSLSocketParams> ssl_params_;
-  QuicTransportVersion quic_version_;
+  quic::QuicTransportVersion quic_version_;
   SpdySessionPool* spdy_session_pool_;
   QuicStreamFactory* quic_stream_factory_;
   const std::string user_agent_;
diff --git a/net/http/http_proxy_client_socket_pool_unittest.cc b/net/http/http_proxy_client_socket_pool_unittest.cc
index d531f8b6..2a8d89b 100644
--- a/net/http/http_proxy_client_socket_pool_unittest.cc
+++ b/net/http/http_proxy_client_socket_pool_unittest.cc
@@ -172,7 +172,7 @@
   scoped_refptr<HttpProxySocketParams> CreateParams(bool tunnel) {
     return base::MakeRefCounted<HttpProxySocketParams>(
         CreateHttpProxyParams(), CreateHttpsProxyParams(),
-        QUIC_VERSION_UNSUPPORTED, std::string(),
+        quic::QUIC_VERSION_UNSUPPORTED, std::string(),
         HostPortPair("www.google.com", tunnel ? 443 : 80),
         session_->http_auth_cache(), session_->http_auth_handler_factory(),
         session_->spdy_session_pool(), session_->quic_stream_factory(),
diff --git a/net/http/http_proxy_client_socket_wrapper.cc b/net/http/http_proxy_client_socket_wrapper.cc
index 682545f5..ff615245 100644
--- a/net/http/http_proxy_client_socket_wrapper.cc
+++ b/net/http/http_proxy_client_socket_wrapper.cc
@@ -43,7 +43,7 @@
     SSLClientSocketPool* ssl_pool,
     const scoped_refptr<TransportSocketParams>& transport_params,
     const scoped_refptr<SSLSocketParams>& ssl_params,
-    QuicTransportVersion quic_version,
+    quic::QuicTransportVersion quic_version,
     const std::string& user_agent,
     const HostPortPair& endpoint,
     HttpAuthCache* http_auth_cache,
@@ -88,11 +88,12 @@
       traffic_annotation_(traffic_annotation) {
   net_log_.BeginEvent(NetLogEventType::SOCKET_ALIVE,
                       net_log.source().ToEventParametersCallback());
-  // If doing a QUIC proxy, |quic_version| must not be QUIC_VERSION_UNSUPPORTED,
-  // and |ssl_params| must be valid while |transport_params| is null.
-  // Otherwise, |quic_version| must be QUIC_VERSION_UNSUPPORTED, and exactly
-  // one of |transport_params| or |ssl_params| must be set.
-  DCHECK(quic_version_ == QUIC_VERSION_UNSUPPORTED
+  // If doing a QUIC proxy, |quic_version| must not be
+  // quic::QUIC_VERSION_UNSUPPORTED, and |ssl_params| must be valid while
+  // |transport_params| is null. Otherwise, |quic_version| must be
+  // quic::QUIC_VERSION_UNSUPPORTED, and exactly one of |transport_params| or
+  // |ssl_params| must be set.
+  DCHECK(quic_version_ == quic::QUIC_VERSION_UNSUPPORTED
              ? (bool)transport_params != (bool)ssl_params
              : !transport_params && ssl_params);
 }
@@ -421,7 +422,7 @@
 int HttpProxyClientSocketWrapper::DoBeginConnect() {
   connect_start_time_ = base::TimeTicks::Now();
   SetConnectTimer(connect_timeout_duration_);
-  if (quic_version_ != QUIC_VERSION_UNSUPPORTED) {
+  if (quic_version_ != quic::QUIC_VERSION_UNSUPPORTED) {
     next_state_ = STATE_QUIC_PROXY_CREATE_SESSION;
   } else if (transport_params_) {
     next_state_ = STATE_TCP_CONNECT;
diff --git a/net/http/http_proxy_client_socket_wrapper.h b/net/http/http_proxy_client_socket_wrapper.h
index b273bfc..0c03c46b 100644
--- a/net/http/http_proxy_client_socket_wrapper.h
+++ b/net/http/http_proxy_client_socket_wrapper.h
@@ -66,7 +66,7 @@
       SSLClientSocketPool* ssl_pool,
       const scoped_refptr<TransportSocketParams>& transport_params,
       const scoped_refptr<SSLSocketParams>& ssl_params,
-      QuicTransportVersion quic_version,
+      quic::QuicTransportVersion quic_version,
       const std::string& user_agent,
       const HostPortPair& endpoint,
       HttpAuthCache* http_auth_cache,
@@ -191,7 +191,7 @@
   const scoped_refptr<TransportSocketParams> transport_params_;
   const scoped_refptr<SSLSocketParams> ssl_params_;
 
-  QuicTransportVersion quic_version_;
+  quic::QuicTransportVersion quic_version_;
 
   const std::string user_agent_;
   const HostPortPair endpoint_;
diff --git a/net/http/http_proxy_client_socket_wrapper_unittest.cc b/net/http/http_proxy_client_socket_wrapper_unittest.cc
index ef3fb54..81bc6e2 100644
--- a/net/http/http_proxy_client_socket_wrapper_unittest.cc
+++ b/net/http/http_proxy_client_socket_wrapper_unittest.cc
@@ -44,7 +44,7 @@
 const int kOriginPort = 443;
 const char kUserAgent[] = "Mozilla/1.0";
 
-const QuicStreamId kClientDataStreamId1 = kHeadersStreamId + 2;
+const quic::QuicStreamId kClientDataStreamId1 = quic::kHeadersStreamId + 2;
 
 class MockSSLConfigService : public SSLConfigService {
  public:
@@ -63,7 +63,8 @@
 namespace test {
 
 class HttpProxyClientSocketWrapperTest
-    : public ::testing::TestWithParam<std::tuple<QuicTransportVersion, bool>>,
+    : public ::testing::TestWithParam<
+          std::tuple<quic::QuicTransportVersion, bool>>,
       public WithScopedTaskEnvironment {
  protected:
   static const bool kFin = true;
@@ -85,19 +86,19 @@
                       0,
                       &clock_,
                       kProxyHost,
-                      Perspective::IS_CLIENT,
+                      quic::Perspective::IS_CLIENT,
                       client_headers_include_h2_stream_dependency_),
         server_maker_(quic_version_,
                       0,
                       &clock_,
                       kProxyHost,
-                      Perspective::IS_SERVER,
+                      quic::Perspective::IS_SERVER,
                       false),
         header_stream_offset_(0),
         response_offset_(0),
         store_server_configs_in_properties_(false),
         idle_connection_timeout_seconds_(kIdleConnectionTimeoutSeconds),
-        reduced_ping_timeout_seconds_(kPingTimeoutSecs),
+        reduced_ping_timeout_seconds_(quic::kPingTimeoutSecs),
         migrate_sessions_on_network_change_(false),
         migrate_sessions_early_(false),
         migrate_sessions_on_network_change_v2_(false),
@@ -110,7 +111,8 @@
         http_auth_handler_factory_(
             HttpAuthHandlerFactory::CreateDefault(&host_resolver_)),
         client_socket_wrapper_(nullptr) {
-    clock_.AdvanceTime(QuicTime::Delta::FromSeconds(1));  // why is this here???
+    clock_.AdvanceTime(
+        quic::QuicTime::Delta::FromSeconds(1));  // why is this here???
   }
 
   void Initialize() {
@@ -122,17 +124,17 @@
         &transport_security_state_, cert_transparency_verifier_.get(),
         /*SocketPerformanceWatcherFactory=*/nullptr,
         &crypto_client_stream_factory_, &random_generator_, &clock_,
-        kDefaultMaxPacketSize, /*user_agent_id=*/kUserAgent,
+        quic::kDefaultMaxPacketSize, /*user_agent_id=*/kUserAgent,
         store_server_configs_in_properties_,
         /*close_sessions_on_ip_change=*/true,
         /*mark_quic_broken_when_network_blackholes=*/false,
         idle_connection_timeout_seconds_, reduced_ping_timeout_seconds_,
         /*max_time_before_crypto_handshake_seconds=*/
-        kMaxTimeForCryptoHandshakeSecs,
+        quic::kMaxTimeForCryptoHandshakeSecs,
         /*max_idle_time_before_crypto_handshake_seconds=*/
-        kInitialIdleTimeoutSecs,
-        migrate_sessions_on_network_change_, migrate_sessions_early_,
-        migrate_sessions_on_network_change_v2_, migrate_sessions_early_v2_,
+        quic::kInitialIdleTimeoutSecs, migrate_sessions_on_network_change_,
+        migrate_sessions_early_, migrate_sessions_on_network_change_v2_,
+        migrate_sessions_early_v2_,
         base::TimeDelta::FromSeconds(kMaxTimeOnNonDefaultNetworkSecs),
         kMaxMigrationsToNonDefaultNetworkOnPathDegrading,
         allow_server_migration_, race_cert_verification_, estimate_initial_rtt_,
@@ -148,14 +150,14 @@
     (*block)["user-agent"] = kUserAgent;
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructSettingsPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructSettingsPacket(
+      quic::QuicPacketNumber packet_number) {
     return client_maker_.MakeInitialSettingsPacket(packet_number,
                                                    &header_stream_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructConnectRequestPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructConnectRequestPacket(
+      quic::QuicPacketNumber packet_number) {
     spdy::SpdyHeaderBlock block;
     PopulateConnectRequestIR(&block);
     return client_maker_.MakeRequestHeadersPacket(
@@ -164,8 +166,8 @@
         std::move(block), 0, nullptr, &header_stream_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerConnectReplyPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerConnectReplyPacket(
+      quic::QuicPacketNumber packet_number,
       bool fin) {
     spdy::SpdyHeaderBlock block;
     block[":status"] = "200";
@@ -175,12 +177,12 @@
         std::move(block), nullptr, &response_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructAckAndRstPacket(
-      QuicPacketNumber packet_number,
-      QuicRstStreamErrorCode error_code,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructAckAndRstPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicRstStreamErrorCode error_code,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckAndRstPacket(
         packet_number, !kIncludeVersion, kClientDataStreamId1, error_code,
         largest_received, smallest_received, least_unacked, kSendFeedback);
@@ -200,7 +202,7 @@
   HostPortPair proxy_host_port_;
   HostPortPair endpoint_host_port_;
 
-  MockClock clock_;
+  quic::MockClock clock_;
   MockQuicData mock_quic_data_;
 
   // QuicStreamFactory environment
@@ -215,14 +217,14 @@
   TransportSecurityState transport_security_state_;
   std::unique_ptr<DoNothingCTVerifier> cert_transparency_verifier_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
-  MockRandom random_generator_;
+  quic::test::MockRandom random_generator_;
 
-  const QuicTransportVersion quic_version_;
+  const quic::QuicTransportVersion quic_version_;
   const bool client_headers_include_h2_stream_dependency_;
   QuicTestPacketMaker client_maker_;
   QuicTestPacketMaker server_maker_;
-  QuicStreamOffset header_stream_offset_;
-  QuicStreamOffset response_offset_;
+  quic::QuicStreamOffset header_stream_offset_;
+  quic::QuicStreamOffset response_offset_;
 
   // Variables to configure QuicStreamFactory.
   bool store_server_configs_in_properties_;
@@ -235,8 +237,8 @@
   bool allow_server_migration_;
   bool race_cert_verification_;
   bool estimate_initial_rtt_;
-  QuicTagVector connection_options_;
-  QuicTagVector client_connection_options_;
+  quic::QuicTagVector connection_options_;
+  quic::QuicTagVector client_connection_options_;
 
   std::unique_ptr<QuicStreamFactory> quic_stream_factory_;
 
@@ -258,7 +260,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerConnectReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
   mock_quic_data_.AddSocketDataToFactory(&socket_factory_);
 
   scoped_refptr<TransportSocketParams> transport_params =
@@ -307,7 +310,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerConnectReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
   mock_quic_data_.AddSocketDataToFactory(&socket_factory_);
 
   scoped_refptr<TransportSocketParams> transport_params =
@@ -352,8 +356,9 @@
 INSTANTIATE_TEST_CASE_P(
     VersionIncludeStreamDependencySequence,
     HttpProxyClientSocketWrapperTest,
-    ::testing::Combine(::testing::ValuesIn(AllSupportedTransportVersions()),
-                       ::testing::Bool()));
+    ::testing::Combine(
+        ::testing::ValuesIn(quic::AllSupportedTransportVersions()),
+        ::testing::Bool()));
 
 };  // namespace test
 };  // namespace net
diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc
index 7abba85..8649ac196 100644
--- a/net/http/http_server_properties.cc
+++ b/net/http/http_server_properties.cc
@@ -86,14 +86,14 @@
     base::Time expiration) {
   DCHECK_EQ(alternative_service.protocol, kProtoHTTP2);
   return AlternativeServiceInfo(alternative_service, expiration,
-                                QuicTransportVersionVector());
+                                quic::QuicTransportVersionVector());
 }
 
 // static
 AlternativeServiceInfo AlternativeServiceInfo::CreateQuicAlternativeServiceInfo(
     const AlternativeService& alternative_service,
     base::Time expiration,
-    const QuicTransportVersionVector& advertised_versions) {
+    const quic::QuicTransportVersionVector& advertised_versions) {
   DCHECK_EQ(alternative_service.protocol, kProtoQUIC);
   return AlternativeServiceInfo(alternative_service, expiration,
                                 advertised_versions);
@@ -106,7 +106,7 @@
 AlternativeServiceInfo::AlternativeServiceInfo(
     const AlternativeService& alternative_service,
     base::Time expiration,
-    const QuicTransportVersionVector& advertised_versions)
+    const quic::QuicTransportVersionVector& advertised_versions)
     : alternative_service_(alternative_service), expiration_(expiration) {
   if (alternative_service_.protocol == kProtoQUIC) {
     advertised_versions_ = advertised_versions;
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index 0016cca..b9debce 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -132,7 +132,7 @@
   static AlternativeServiceInfo CreateQuicAlternativeServiceInfo(
       const AlternativeService& alternative_service,
       base::Time expiration,
-      const QuicTransportVersionVector& advertised_versions);
+      const quic::QuicTransportVersionVector& advertised_versions);
 
   AlternativeServiceInfo();
   ~AlternativeServiceInfo();
@@ -172,7 +172,7 @@
   }
 
   void set_advertised_versions(
-      const QuicTransportVersionVector& advertised_versions) {
+      const quic::QuicTransportVersionVector& advertised_versions) {
     if (alternative_service_.protocol != kProtoQUIC)
       return;
 
@@ -192,14 +192,15 @@
 
   base::Time expiration() const { return expiration_; }
 
-  const QuicTransportVersionVector& advertised_versions() const {
+  const quic::QuicTransportVersionVector& advertised_versions() const {
     return advertised_versions_;
   }
 
  private:
-  AlternativeServiceInfo(const AlternativeService& alternative_service,
-                         base::Time expiration,
-                         const QuicTransportVersionVector& advertised_versions);
+  AlternativeServiceInfo(
+      const AlternativeService& alternative_service,
+      base::Time expiration,
+      const quic::QuicTransportVersionVector& advertised_versions);
 
   AlternativeService alternative_service_;
   base::Time expiration_;
@@ -208,7 +209,7 @@
   // by Chrome. If empty, defaults to versions used by the current instance of
   // the netstack.
   // This list MUST be sorted in ascending order.
-  QuicTransportVersionVector advertised_versions_;
+  quic::QuicTransportVersionVector advertised_versions_;
 };
 
 struct NET_EXPORT SupportsQuic {
@@ -226,7 +227,7 @@
 };
 
 struct NET_EXPORT ServerNetworkStats {
-  ServerNetworkStats() : bandwidth_estimate(QuicBandwidth::Zero()) {}
+  ServerNetworkStats() : bandwidth_estimate(quic::QuicBandwidth::Zero()) {}
 
   bool operator==(const ServerNetworkStats& other) const {
     return srtt == other.srtt && bandwidth_estimate == other.bandwidth_estimate;
@@ -237,7 +238,7 @@
   }
 
   base::TimeDelta srtt;
-  QuicBandwidth bandwidth_estimate;
+  quic::QuicBandwidth bandwidth_estimate;
 };
 
 typedef std::vector<AlternativeService> AlternativeServiceVector;
@@ -297,7 +298,7 @@
 
 // Max number of quic servers to store is not hardcoded and can be set.
 // Because of this, QuicServerInfoMap will not be a subclass of MRUCache.
-typedef base::MRUCache<QuicServerId, std::string> QuicServerInfoMap;
+typedef base::MRUCache<quic::QuicServerId, std::string> QuicServerInfoMap;
 
 extern const char kAlternativeServiceHeader[];
 
@@ -371,7 +372,7 @@
       const url::SchemeHostPort& origin,
       const AlternativeService& alternative_service,
       base::Time expiration,
-      const QuicTransportVersionVector& advertised_versions) = 0;
+      const quic::QuicTransportVersionVector& advertised_versions) = 0;
 
   // Set alternative services for |origin|.  Previous alternative services for
   // |origin| are discarded.
@@ -437,12 +438,12 @@
 
   // Save QuicServerInfo (in std::string form) for the given |server_id|.
   // Returns true if the value has changed otherwise it returns false.
-  virtual bool SetQuicServerInfo(const QuicServerId& server_id,
+  virtual bool SetQuicServerInfo(const quic::QuicServerId& server_id,
                                  const std::string& server_info) = 0;
 
   // Get QuicServerInfo (in std::string form) for the given |server_id|.
   virtual const std::string* GetQuicServerInfo(
-      const QuicServerId& server_id) = 0;
+      const quic::QuicServerId& server_id) = 0;
 
   // Returns all persistent QuicServerInfo objects.
   virtual const QuicServerInfoMap& quic_server_info_map() const = 0;
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index 6e915cf..982c816 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -390,7 +390,7 @@
     const url::SchemeHostPort& origin,
     const AlternativeService& alternative_service,
     base::Time expiration,
-    const QuicTransportVersionVector& advertised_versions) {
+    const quic::QuicTransportVersionVector& advertised_versions) {
   DCHECK(alternative_service.protocol == kProtoQUIC);
 
   return SetAlternativeServices(
@@ -604,7 +604,7 @@
 }
 
 bool HttpServerPropertiesImpl::SetQuicServerInfo(
-    const QuicServerId& server_id,
+    const quic::QuicServerId& server_id,
     const std::string& server_info) {
   QuicServerInfoMap::iterator it = quic_server_info_map_.Peek(server_id);
   bool changed =
@@ -615,7 +615,7 @@
 }
 
 const std::string* HttpServerPropertiesImpl::GetQuicServerInfo(
-    const QuicServerId& server_id) {
+    const quic::QuicServerId& server_id) {
   QuicServerInfoMap::iterator it = quic_server_info_map_.Get(server_id);
   if (it != quic_server_info_map_.end()) {
     // Since |canonical_server_info_map_| should always map to the most
@@ -643,7 +643,7 @@
 
 HttpServerPropertiesImpl::CanonicalServerInfoMap::const_iterator
 HttpServerPropertiesImpl::GetCanonicalServerInfoHost(
-    const QuicServerId& server) const {
+    const quic::QuicServerId& server) const {
   const std::string* canonical_suffix = GetCanonicalSuffix(server.host());
   if (canonical_suffix == nullptr)
     return canonical_server_info_map_.end();
@@ -689,7 +689,7 @@
 }
 
 void HttpServerPropertiesImpl::UpdateCanonicalServerInfoMap(
-    const QuicServerId& server) {
+    const quic::QuicServerId& server) {
   const std::string* suffix = GetCanonicalSuffix(server.host());
   if (suffix) {
     HostPortPair canonical_pair(*suffix, server.port());
diff --git a/net/http/http_server_properties_impl.h b/net/http/http_server_properties_impl.h
index ce89063..26773e7 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -109,7 +109,7 @@
       const url::SchemeHostPort& origin,
       const AlternativeService& alternative_service,
       base::Time expiration,
-      const QuicTransportVersionVector& advertised_versions) override;
+      const quic::QuicTransportVersionVector& advertised_versions) override;
   bool SetAlternativeServices(const url::SchemeHostPort& origin,
                               const AlternativeServiceInfoVector&
                                   alternative_service_info_vector) override;
@@ -134,9 +134,10 @@
   const ServerNetworkStats* GetServerNetworkStats(
       const url::SchemeHostPort& server) override;
   const ServerNetworkStatsMap& server_network_stats_map() const override;
-  bool SetQuicServerInfo(const QuicServerId& server_id,
+  bool SetQuicServerInfo(const quic::QuicServerId& server_id,
                          const std::string& server_info) override;
-  const std::string* GetQuicServerInfo(const QuicServerId& server_id) override;
+  const std::string* GetQuicServerInfo(
+      const quic::QuicServerId& server_id) override;
   const QuicServerInfoMap& quic_server_info_map() const override;
   size_t max_server_configs_stored_in_properties() const override;
   void SetMaxServerConfigsStoredInProperties(
@@ -154,7 +155,8 @@
 
   typedef base::flat_map<url::SchemeHostPort, url::SchemeHostPort>
       CanonicalAltSvcMap;
-  typedef base::flat_map<HostPortPair, QuicServerId> CanonicalServerInfoMap;
+  typedef base::flat_map<HostPortPair, quic::QuicServerId>
+      CanonicalServerInfoMap;
   typedef std::vector<std::string> CanonicalSufficList;
   typedef std::set<HostPortPair> Http11ServerHostPortSet;
 
@@ -170,7 +172,7 @@
   // The returned canonical host can be used to search for server info in
   // |quic_server_info_map_|. Return 'end' the host doesn't exist.
   CanonicalServerInfoMap::const_iterator GetCanonicalServerInfoHost(
-      const QuicServerId& server) const;
+      const quic::QuicServerId& server) const;
 
   // Remove the canonical alt-svc host for |server|.
   void RemoveAltSvcCanonicalHost(const url::SchemeHostPort& server);
@@ -179,7 +181,7 @@
   // The |server| should have the corresponding server info associated with it
   // in |quic_server_info_map_|. If |canonical_server_info_map_| doesn't
   // have an entry associated with |server|, the method will add one.
-  void UpdateCanonicalServerInfoMap(const QuicServerId& server);
+  void UpdateCanonicalServerInfoMap(const quic::QuicServerId& server);
 
   const base::TickClock* tick_clock_;  // Unowned
   base::Clock* clock_;                 // Unowned
diff --git a/net/http/http_server_properties_impl_unittest.cc b/net/http/http_server_properties_impl_unittest.cc
index 02f80e7..23360d6 100644
--- a/net/http/http_server_properties_impl_unittest.cc
+++ b/net/http/http_server_properties_impl_unittest.cc
@@ -1211,7 +1211,7 @@
   // Check by initializing with www.google.com:443.
   ServerNetworkStats stats_google;
   stats_google.srtt = base::TimeDelta::FromMicroseconds(10);
-  stats_google.bandwidth_estimate = QuicBandwidth::FromBitsPerSecond(100);
+  stats_google.bandwidth_estimate = quic::QuicBandwidth::FromBitsPerSecond(100);
   init_server_network_stats_map = std::make_unique<ServerNetworkStatsMap>();
   init_server_network_stats_map->Put(google_server, stats_google);
   impl_.SetServerNetworkStats(std::move(init_server_network_stats_map));
@@ -1228,7 +1228,7 @@
   url::SchemeHostPort docs_server("https", "docs.google.com", 443);
   ServerNetworkStats stats_docs;
   stats_docs.srtt = base::TimeDelta::FromMicroseconds(20);
-  stats_docs.bandwidth_estimate = QuicBandwidth::FromBitsPerSecond(200);
+  stats_docs.bandwidth_estimate = quic::QuicBandwidth::FromBitsPerSecond(200);
   // Recency order will be |docs_server| and |google_server|.
   impl_.SetServerNetworkStats(docs_server, stats_docs);
 
@@ -1240,13 +1240,14 @@
   // Change the values for |docs_server|.
   ServerNetworkStats new_stats_docs;
   new_stats_docs.srtt = base::TimeDelta::FromMicroseconds(25);
-  new_stats_docs.bandwidth_estimate = QuicBandwidth::FromBitsPerSecond(250);
+  new_stats_docs.bandwidth_estimate =
+      quic::QuicBandwidth::FromBitsPerSecond(250);
   server_network_stats_map->Put(docs_server, new_stats_docs);
   // Add data for mail.google.com:443.
   url::SchemeHostPort mail_server("https", "mail.google.com", 443);
   ServerNetworkStats stats_mail;
   stats_mail.srtt = base::TimeDelta::FromMicroseconds(30);
-  stats_mail.bandwidth_estimate = QuicBandwidth::FromBitsPerSecond(300);
+  stats_mail.bandwidth_estimate = quic::QuicBandwidth::FromBitsPerSecond(300);
   server_network_stats_map->Put(mail_server, stats_mail);
 
   // Recency order will be |docs_server|, |google_server| and |mail_server|.
@@ -1274,7 +1275,7 @@
 
   ServerNetworkStats stats1;
   stats1.srtt = base::TimeDelta::FromMicroseconds(10);
-  stats1.bandwidth_estimate = QuicBandwidth::FromBitsPerSecond(100);
+  stats1.bandwidth_estimate = quic::QuicBandwidth::FromBitsPerSecond(100);
   impl_.SetServerNetworkStats(foo_http_server, stats1);
 
   const ServerNetworkStats* stats2 =
@@ -1292,7 +1293,7 @@
 TEST_F(ServerNetworkStatsServerPropertiesTest, ClearServerNetworkStats) {
   ServerNetworkStats stats;
   stats.srtt = base::TimeDelta::FromMicroseconds(10);
-  stats.bandwidth_estimate = QuicBandwidth::FromBitsPerSecond(100);
+  stats.bandwidth_estimate = quic::QuicBandwidth::FromBitsPerSecond(100);
   url::SchemeHostPort foo_https_server("https", "foo", 443);
   impl_.SetServerNetworkStats(foo_https_server, stats);
 
@@ -1304,7 +1305,7 @@
 
 TEST_F(QuicServerInfoServerPropertiesTest, Set) {
   HostPortPair google_server("www.google.com", 443);
-  QuicServerId google_quic_server_id(google_server, PRIVACY_MODE_ENABLED);
+  quic::QuicServerId google_quic_server_id(google_server, PRIVACY_MODE_ENABLED);
 
   const int kMaxQuicServerEntries = 10;
   impl_.SetMaxServerConfigsStoredInProperties(kMaxQuicServerEntries);
@@ -1334,7 +1335,7 @@
   // SetQuicServerInfoMap(), because |quic_server_info_map| has an
   // entry for |docs_server|.
   HostPortPair docs_server("docs.google.com", 443);
-  QuicServerId docs_quic_server_id(docs_server, PRIVACY_MODE_ENABLED);
+  quic::QuicServerId docs_quic_server_id(docs_server, PRIVACY_MODE_ENABLED);
   std::string docs_server_info("docs_quic_server_info");
   impl_.SetQuicServerInfo(docs_quic_server_id, docs_server_info);
 
@@ -1357,7 +1358,7 @@
   quic_server_info_map->Put(docs_quic_server_id, new_docs_server_info);
   // Add data for mail.google.com:443.
   HostPortPair mail_server("mail.google.com", 443);
-  QuicServerId mail_quic_server_id(mail_server, PRIVACY_MODE_ENABLED);
+  quic::QuicServerId mail_quic_server_id(mail_server, PRIVACY_MODE_ENABLED);
   std::string mail_server_info("mail_quic_server_info");
   quic_server_info_map->Put(mail_quic_server_id, mail_server_info);
   impl_.SetQuicServerInfoMap(std::move(quic_server_info_map));
@@ -1394,7 +1395,7 @@
 
 TEST_F(QuicServerInfoServerPropertiesTest, SetQuicServerInfo) {
   HostPortPair foo_server("foo", 80);
-  QuicServerId quic_server_id(foo_server, PRIVACY_MODE_ENABLED);
+  quic::QuicServerId quic_server_id(foo_server, PRIVACY_MODE_ENABLED);
   EXPECT_EQ(0u, impl_.quic_server_info_map().size());
 
   std::string quic_server_info1("quic_server_info1");
@@ -1413,17 +1414,17 @@
 TEST_F(QuicServerInfoServerPropertiesTest, TestCanonicalSuffixMatch) {
   // Set up HttpServerProperties.
   // Add a host that has the same canonical suffix.
-  QuicServerId foo_server_id("foo.googlevideo.com", 443);
+  quic::QuicServerId foo_server_id("foo.googlevideo.com", 443);
   std::string foo_server_info("foo_server_info");
   impl_.SetQuicServerInfo(foo_server_id, foo_server_info);
 
   // Add a host that has a different canonical suffix.
-  QuicServerId baz_server_id("baz.video.com", 443);
+  quic::QuicServerId baz_server_id("baz.video.com", 443);
   std::string baz_server_info("baz_server_info");
   impl_.SetQuicServerInfo(baz_server_id, baz_server_info);
 
-  // Create QuicServerId with a host that has the same canonical suffix.
-  QuicServerId bar_server_id("bar.googlevideo.com", 443);
+  // Create quic::QuicServerId with a host that has the same canonical suffix.
+  quic::QuicServerId bar_server_id("bar.googlevideo.com", 443);
 
   // Check the the server info associated with "foo" is returned for "bar".
   const std::string* bar_server_info = impl_.GetQuicServerInfo(bar_server_id);
@@ -1437,16 +1438,16 @@
        TestCanonicalSuffixMatchReturnsMruEntry) {
   // Set up HttpServerProperties by adding two hosts with the same canonical
   // suffixes.
-  QuicServerId h1_server_id("h1.googlevideo.com", 443);
+  quic::QuicServerId h1_server_id("h1.googlevideo.com", 443);
   std::string h1_server_info("h1_server_info");
   impl_.SetQuicServerInfo(h1_server_id, h1_server_info);
 
-  QuicServerId h2_server_id("h2.googlevideo.com", 443);
+  quic::QuicServerId h2_server_id("h2.googlevideo.com", 443);
   std::string h2_server_info("h2_server_info");
   impl_.SetQuicServerInfo(h2_server_id, h2_server_info);
 
-  // Create QuicServerId to use for the search.
-  QuicServerId foo_server_id("foo.googlevideo.com", 443);
+  // Create quic::QuicServerId to use for the search.
+  quic::QuicServerId foo_server_id("foo.googlevideo.com", 443);
 
   // Check that 'h2' info is returned since it is MRU.
   const std::string* server_info = impl_.GetQuicServerInfo(foo_server_id);
@@ -1467,12 +1468,12 @@
 TEST_F(QuicServerInfoServerPropertiesTest,
        TestCanonicalSuffixMatchDoesntChangeOrder) {
   // Add a host with a matching canonical name.
-  QuicServerId h1_server_id("h1.googlevideo.com", 443);
+  quic::QuicServerId h1_server_id("h1.googlevideo.com", 443);
   std::string h1_server_info("h1_server_info");
   impl_.SetQuicServerInfo(h1_server_id, h1_server_info);
 
   // Add a host hosts with a non-matching canonical name.
-  QuicServerId h2_server_id("h2.video.com", 443);
+  quic::QuicServerId h2_server_id("h2.video.com", 443);
   std::string h2_server_info("h2_server_info");
   impl_.SetQuicServerInfo(h2_server_id, h2_server_info);
 
@@ -1481,7 +1482,7 @@
 
   // Search for the entry that matches the canonical name
   // ("h1.googlevideo.com").
-  QuicServerId foo_server_id("foo.googlevideo.com", 443);
+  quic::QuicServerId foo_server_id("foo.googlevideo.com", 443);
   const std::string* server_info = impl_.GetQuicServerInfo(foo_server_id);
   ASSERT_TRUE(server_info != nullptr);
 
@@ -1504,16 +1505,16 @@
 TEST_F(QuicServerInfoServerPropertiesTest, TestCanonicalSuffixMatchSetInfoMap) {
   // Add a host info using SetQuicServerInfo(). That will simulate an info
   // entry stored in memory cache.
-  QuicServerId h1_server_id("h1.googlevideo.com", 443);
+  quic::QuicServerId h1_server_id("h1.googlevideo.com", 443);
   std::string h1_server_info("h1_server_info_memory_cache");
   impl_.SetQuicServerInfo(h1_server_id, h1_server_info);
 
   // Prepare a map with host info and add it using SetQuicServerInfoMap(). That
   // will simulate info records read from the persistence storage.
-  QuicServerId h2_server_id("h2.googlevideo.com", 443);
+  quic::QuicServerId h2_server_id("h2.googlevideo.com", 443);
   std::string h2_server_info("h2_server_info_from_disk");
 
-  QuicServerId h3_server_id("h3.ggpht.com", 443);
+  quic::QuicServerId h3_server_id("h3.ggpht.com", 443);
   std::string h3_server_info("h3_server_info_from_disk");
 
   const int kMaxQuicServerEntries = 10;
@@ -1528,14 +1529,14 @@
   // Check that the server info from the memory cache is returned since unique
   // entries from the memory cache are added after entries from the
   // persistence storage and, therefore, are most recently used.
-  QuicServerId foo_server_id("foo.googlevideo.com", 443);
+  quic::QuicServerId foo_server_id("foo.googlevideo.com", 443);
   const std::string* server_info = impl_.GetQuicServerInfo(foo_server_id);
   ASSERT_TRUE(server_info != nullptr);
   EXPECT_STREQ(h1_server_info.c_str(), server_info->c_str());
 
   // Check that server info that was added using SetQuicServerInfoMap() can be
   // found.
-  foo_server_id = QuicServerId("foo.ggpht.com", 443);
+  foo_server_id = quic::QuicServerId("foo.ggpht.com", 443);
   server_info = impl_.GetQuicServerInfo(foo_server_id);
   ASSERT_TRUE(server_info != nullptr);
   EXPECT_STREQ(h3_server_info.c_str(), server_info->c_str());
diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc
index c93386c6..7a0d02f 100644
--- a/net/http/http_server_properties_manager.cc
+++ b/net/http/http_server_properties_manager.cc
@@ -86,14 +86,15 @@
   ServerNetworkStats server_network_stats;
 };
 
-QuicServerId QuicServerIdFromString(const std::string& str) {
+quic::QuicServerId QuicServerIdFromString(const std::string& str) {
   GURL url(str);
   if (!url.is_valid()) {
-    return QuicServerId();
+    return quic::QuicServerId();
   }
-  return QuicServerId(HostPortPair::FromURL(url), url.path_piece() == "/private"
-                                                      ? PRIVACY_MODE_ENABLED
-                                                      : PRIVACY_MODE_DISABLED);
+  return quic::QuicServerId(HostPortPair::FromURL(url),
+                            url.path_piece() == "/private"
+                                ? PRIVACY_MODE_ENABLED
+                                : PRIVACY_MODE_DISABLED);
 }
 
 }  // namespace
@@ -216,7 +217,7 @@
     const url::SchemeHostPort& origin,
     const AlternativeService& alternative_service,
     base::Time expiration,
-    const QuicTransportVersionVector& advertised_versions) {
+    const quic::QuicTransportVersionVector& advertised_versions) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   const bool changed = http_server_properties_impl_->SetQuicAlternativeService(
       origin, alternative_service, expiration, advertised_versions);
@@ -351,7 +352,7 @@
 }
 
 bool HttpServerPropertiesManager::SetQuicServerInfo(
-    const QuicServerId& server_id,
+    const quic::QuicServerId& server_id,
     const std::string& server_info) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   bool changed =
@@ -362,7 +363,7 @@
 }
 
 const std::string* HttpServerPropertiesManager::GetQuicServerInfo(
-    const QuicServerId& server_id) {
+    const quic::QuicServerId& server_id) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   return http_server_properties_impl_->GetQuicServerInfo(server_id);
 }
@@ -815,7 +816,7 @@
                << "server: " << server_str;
       return false;
     }
-    QuicTransportVersionVector advertised_versions;
+    quic::QuicTransportVersionVector advertised_versions;
     for (const auto& value : *versions_list) {
       int version;
       if (!value.GetAsInteger(&version)) {
@@ -823,7 +824,7 @@
                  << server_str;
         return false;
       }
-      advertised_versions.push_back(QuicTransportVersion(version));
+      advertised_versions.push_back(quic::QuicTransportVersion(version));
     }
     alternative_service_info->set_advertised_versions(advertised_versions);
   }
@@ -939,7 +940,8 @@
     // Get quic_server_id.
     const std::string& quic_server_id_str = it.key();
 
-    QuicServerId quic_server_id = QuicServerIdFromString(quic_server_id_str);
+    quic::QuicServerId quic_server_id =
+        QuicServerIdFromString(quic_server_id_str);
     if (quic_server_id.host().empty()) {
       DVLOG(1) << "Malformed http_server_properties for quic server: "
                << quic_server_id_str;
@@ -1196,7 +1198,7 @@
   for (QuicServerInfoMap::const_reverse_iterator it =
            quic_server_info_map.rbegin();
        it != quic_server_info_map.rend(); ++it) {
-    const QuicServerId& server_id = it->first;
+    const quic::QuicServerId& server_id = it->first;
     auto quic_server_pref_dict = std::make_unique<base::DictionaryValue>();
     quic_server_pref_dict->SetKey(kServerInfoKey, base::Value(it->second));
     quic_servers_dict->SetWithoutPathExpansion(
diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h
index 0013920..3bf30da 100644
--- a/net/http/http_server_properties_manager.h
+++ b/net/http/http_server_properties_manager.h
@@ -106,7 +106,7 @@
       const url::SchemeHostPort& origin,
       const AlternativeService& alternative_service,
       base::Time expiration,
-      const QuicTransportVersionVector& advertised_versions) override;
+      const quic::QuicTransportVersionVector& advertised_versions) override;
   bool SetAlternativeServices(const url::SchemeHostPort& origin,
                               const AlternativeServiceInfoVector&
                                   alternative_service_info_vector) override;
@@ -131,9 +131,10 @@
   const ServerNetworkStats* GetServerNetworkStats(
       const url::SchemeHostPort& server) override;
   const ServerNetworkStatsMap& server_network_stats_map() const override;
-  bool SetQuicServerInfo(const QuicServerId& server_id,
+  bool SetQuicServerInfo(const quic::QuicServerId& server_id,
                          const std::string& server_info) override;
-  const std::string* GetQuicServerInfo(const QuicServerId& server_id) override;
+  const std::string* GetQuicServerInfo(
+      const quic::QuicServerId& server_id) override;
   const QuicServerInfoMap& quic_server_info_map() const override;
   size_t max_server_configs_stored_in_properties() const override;
   void SetMaxServerConfigsStoredInProperties(
diff --git a/net/http/http_server_properties_manager_unittest.cc b/net/http/http_server_properties_manager_unittest.cc
index 81738eb5..8c7461f 100644
--- a/net/http/http_server_properties_manager_unittest.cc
+++ b/net/http/http_server_properties_manager_unittest.cc
@@ -144,7 +144,7 @@
   MockPrefDelegate* pref_delegate_;  // Owned by HttpServerPropertiesManager.
   std::unique_ptr<HttpServerPropertiesManager> http_server_props_manager_;
   base::Time one_day_from_now_;
-  QuicTransportVersionVector advertised_versions_;
+  quic::QuicTransportVersionVector advertised_versions_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(HttpServerPropertiesManagerTest);
@@ -258,15 +258,15 @@
   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.
-  QuicServerId google_quic_server_id("www.google.com", 443);
+  quic::QuicServerId google_quic_server_id("www.google.com", 443);
   quic_servers_dict->SetWithoutPathExpansion(google_quic_server_id.ToString(),
                                              std::move(quic_server_pref_dict1));
   // Set the quic_server_info2 for https://mail.google.com.
-  QuicServerId mail_quic_server_id("mail.google.com", 443);
+  quic::QuicServerId mail_quic_server_id("mail.google.com", 443);
   quic_servers_dict->SetWithoutPathExpansion(mail_quic_server_id.ToString(),
                                              std::move(quic_server_pref_dict2));
   // Set the quic_server_info3 for https://play.google.com.
-  QuicServerId play_quic_server_id("play.google.com", 443);
+  quic::QuicServerId play_quic_server_id("play.google.com", 443);
   quic_servers_dict->SetWithoutPathExpansion(play_quic_server_id.ToString(),
                                              std::move(quic_server_pref_dict3));
   http_server_properties_dict.SetWithoutPathExpansion(
@@ -726,7 +726,7 @@
 }
 
 TEST_P(HttpServerPropertiesManagerTest, QuicServerInfo) {
-  QuicServerId mail_quic_server_id("mail.google.com", 80);
+  quic::QuicServerId mail_quic_server_id("mail.google.com", 80);
   EXPECT_EQ(nullptr,
             http_server_props_manager_->GetQuicServerInfo(mail_quic_server_id));
   std::string quic_server_info1("quic_server_info1");
@@ -755,7 +755,7 @@
 TEST_P(HttpServerPropertiesManagerTest, Clear) {
   const url::SchemeHostPort spdy_server("https", "mail.google.com", 443);
   const IPAddress actual_address(127, 0, 0, 1);
-  const QuicServerId mail_quic_server_id("mail.google.com", 80);
+  const quic::QuicServerId mail_quic_server_id("mail.google.com", 80);
   const std::string quic_server_info1("quic_server_info1");
   const AlternativeService alternative_service(kProtoHTTP2, "mail.google.com",
                                                1234);
@@ -966,7 +966,7 @@
   http_server_props_manager_->SetServerNetworkStats(server_mail, stats);
 
   // #5: Set quic_server_info string.
-  QuicServerId mail_quic_server_id("mail.google.com", 80);
+  quic::QuicServerId mail_quic_server_id("mail.google.com", 80);
   std::string quic_server_info1("quic_server_info1");
   http_server_props_manager_->SetQuicServerInfo(mail_quic_server_id,
                                                 quic_server_info1);
@@ -1303,8 +1303,8 @@
   AlternativeService quic_alternative_service1(kProtoQUIC, "", 443);
   base::Time expiration1;
   ASSERT_TRUE(base::Time::FromUTCString("2036-12-01 10:00:00", &expiration1));
-  QuicTransportVersionVector advertised_versions = {QUIC_VERSION_37,
-                                                    QUIC_VERSION_35};
+  quic::QuicTransportVersionVector advertised_versions = {
+      quic::QUIC_VERSION_37, quic::QUIC_VERSION_35};
   alternative_service_info_vector.push_back(
       AlternativeServiceInfo::CreateQuicAlternativeServiceInfo(
           quic_alternative_service1, expiration1, advertised_versions));
@@ -1332,7 +1332,7 @@
   http_server_props_manager_->SetServerNetworkStats(server_mail, stats);
 
   // #4: Set quic_server_info string.
-  QuicServerId mail_quic_server_id("mail.google.com", 80);
+  quic::QuicServerId mail_quic_server_id("mail.google.com", 80);
   std::string quic_server_info1("quic_server_info1");
   http_server_props_manager_->SetQuicServerInfo(mail_quic_server_id,
                                                 quic_server_info1);
@@ -1410,11 +1410,11 @@
   EXPECT_EQ(123, alternative_service_info_vector[1].alternative_service().port);
   EXPECT_EQ(base::Time::Max(), alternative_service_info_vector[1].expiration());
   // Verify advertised versions.
-  const QuicTransportVersionVector loaded_advertised_versions =
+  const quic::QuicTransportVersionVector loaded_advertised_versions =
       alternative_service_info_vector[1].advertised_versions();
   EXPECT_EQ(2u, loaded_advertised_versions.size());
-  EXPECT_EQ(QUIC_VERSION_35, loaded_advertised_versions[0]);
-  EXPECT_EQ(QUIC_VERSION_37, loaded_advertised_versions[1]);
+  EXPECT_EQ(quic::QUIC_VERSION_35, loaded_advertised_versions[0]);
+  EXPECT_EQ(quic::QUIC_VERSION_37, loaded_advertised_versions[1]);
 }
 
 TEST_P(HttpServerPropertiesManagerTest,
@@ -1423,7 +1423,8 @@
 
   // #1: Set alternate protocol.
   AlternativeServiceInfoVector alternative_service_info_vector;
-  // Quic alternative service set with a single QUIC version: QUIC_VERSION_37.
+  // Quic alternative service set with a single QUIC version:
+  // quic::QUIC_VERSION_37.
   AlternativeService quic_alternative_service1(kProtoQUIC, "", 443);
   base::Time expiration1;
   ASSERT_TRUE(base::Time::FromUTCString("2036-12-01 10:00:00", &expiration1));
@@ -1434,7 +1435,7 @@
       server_www, alternative_service_info_vector));
 
   // Set quic_server_info string.
-  QuicServerId mail_quic_server_id("mail.google.com", 80);
+  quic::QuicServerId mail_quic_server_id("mail.google.com", 80);
   std::string quic_server_info1("quic_server_info1");
   http_server_props_manager_->SetQuicServerInfo(mail_quic_server_id,
                                                 quic_server_info1);
@@ -1470,8 +1471,8 @@
   // AlternativeService.
   AlternativeServiceInfoVector alternative_service_info_vector_2;
   // Quic alternative service set with two advertised QUIC versions.
-  QuicTransportVersionVector advertised_versions = {QUIC_VERSION_37,
-                                                    QUIC_VERSION_35};
+  quic::QuicTransportVersionVector advertised_versions = {
+      quic::QUIC_VERSION_37, quic::QUIC_VERSION_35};
   alternative_service_info_vector_2.push_back(
       AlternativeServiceInfo::CreateQuicAlternativeServiceInfo(
           quic_alternative_service1, expiration1, advertised_versions));
@@ -1500,8 +1501,8 @@
   // #3: Set AlternativeService with same advertised_versions.
   AlternativeServiceInfoVector alternative_service_info_vector_3;
   // A same set of QUIC versions but listed in a different order.
-  QuicTransportVersionVector advertised_versions_2 = {QUIC_VERSION_35,
-                                                      QUIC_VERSION_37};
+  quic::QuicTransportVersionVector advertised_versions_2 = {
+      quic::QUIC_VERSION_35, quic::QUIC_VERSION_37};
   alternative_service_info_vector_3.push_back(
       AlternativeServiceInfo::CreateQuicAlternativeServiceInfo(
           quic_alternative_service1, expiration1, advertised_versions_2));
@@ -1763,7 +1764,7 @@
     //
     const std::string* quic_server_info =
         http_server_props_manager_->GetQuicServerInfo(
-            QuicServerId("mail.google.com", 80));
+            quic::QuicServerId("mail.google.com", 80));
     EXPECT_EQ("quic_server_info1", *quic_server_info);
 
     //
diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc
index 338595f..467a1ba 100644
--- a/net/http/http_stream_factory.cc
+++ b/net/http/http_stream_factory.cc
@@ -75,7 +75,7 @@
       continue;
     }
     // Check if QUIC version is supported. Filter supported QUIC versions.
-    QuicTransportVersionVector advertised_versions;
+    quic::QuicTransportVersionVector advertised_versions;
     if (protocol == kProtoQUIC && !alternative_service_entry.version.empty()) {
       advertised_versions = FilterSupportedAltSvcVersions(
           alternative_service_entry, session->params().quic_supported_versions,
diff --git a/net/http/http_stream_factory_job.cc b/net/http/http_stream_factory_job.cc
index bfbf6aec..ab66394 100644
--- a/net/http/http_stream_factory_job.cc
+++ b/net/http/http_stream_factory_job.cc
@@ -163,7 +163,7 @@
                             HostPortPair destination,
                             GURL origin_url,
                             NextProto alternative_protocol,
-                            QuicTransportVersion quic_version,
+                            quic::QuicTransportVersion quic_version,
                             const ProxyServer& alternative_proxy_server,
                             bool is_websocket,
                             bool enable_ip_based_pooling,
@@ -223,13 +223,13 @@
       ptr_factory_(this) {
   // The Job is forced to use QUIC without a designated version, try the
   // preferred QUIC version that is supported by default.
-  if (quic_version_ == QUIC_VERSION_UNSUPPORTED &&
+  if (quic_version_ == quic::QUIC_VERSION_UNSUPPORTED &&
       ShouldForceQuic(session, destination, origin_url, proxy_info)) {
     quic_version_ = session->params().quic_supported_versions[0];
   }
 
   if (using_quic_)
-    DCHECK_NE(quic_version_, QUIC_VERSION_UNSUPPORTED);
+    DCHECK_NE(quic_version_, quic::QUIC_VERSION_UNSUPPORTED);
 
   DCHECK(session);
   if (alternative_protocol != kProtoUnknown) {
@@ -1467,8 +1467,8 @@
   return std::make_unique<HttpStreamFactory::Job>(
       delegate, job_type, session, request_info, priority, proxy_info,
       server_ssl_config, proxy_ssl_config, destination, origin_url,
-      kProtoUnknown, QUIC_VERSION_UNSUPPORTED, ProxyServer(), is_websocket,
-      enable_ip_based_pooling, net_log);
+      kProtoUnknown, quic::QUIC_VERSION_UNSUPPORTED, ProxyServer(),
+      is_websocket, enable_ip_based_pooling, net_log);
 }
 
 std::unique_ptr<HttpStreamFactory::Job>
@@ -1484,7 +1484,7 @@
     HostPortPair destination,
     GURL origin_url,
     NextProto alternative_protocol,
-    QuicTransportVersion quic_version,
+    quic::QuicTransportVersion quic_version,
     bool is_websocket,
     bool enable_ip_based_pooling,
     NetLog* net_log) {
@@ -1514,7 +1514,7 @@
   return std::make_unique<HttpStreamFactory::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,
+      kProtoUnknown, quic::QUIC_VERSION_UNSUPPORTED, alternative_proxy_server,
       is_websocket, enable_ip_based_pooling, net_log);
 }
 
diff --git a/net/http/http_stream_factory_job.h b/net/http/http_stream_factory_job.h
index 90028c0..4ee08f9 100644
--- a/net/http/http_stream_factory_job.h
+++ b/net/http/http_stream_factory_job.h
@@ -188,7 +188,7 @@
       HostPortPair destination,
       GURL origin_url,
       NextProto alternative_protocol,
-      QuicTransportVersion quic_version,
+      quic::QuicTransportVersion quic_version,
       const ProxyServer& alternative_proxy_server,
       bool is_websocket,
       bool enable_ip_based_pooling,
@@ -448,9 +448,9 @@
   // True if Job uses QUIC.
   const bool using_quic_;
 
-  // QuicTransportVersion that should be used to connect to the QUIC server if
-  // Job uses QUIC.
-  QuicTransportVersion quic_version_;
+  // quic::QuicTransportVersion that should be used to connect to the QUIC
+  // server if Job uses QUIC.
+  quic::QuicTransportVersion quic_version_;
 
   // True if Alternative Service protocol field requires that HTTP/2 is used.
   // In this case, Job fails if it cannot pool to an existing SpdySession and
@@ -554,7 +554,7 @@
       HostPortPair destination,
       GURL origin_url,
       NextProto alternative_protocol,
-      QuicTransportVersion quic_version,
+      quic::QuicTransportVersion quic_version,
       bool is_websocket,
       bool enable_ip_based_pooling,
       NetLog* net_log);
diff --git a/net/http/http_stream_factory_job_controller.cc b/net/http/http_stream_factory_job_controller.cc
index 70e8391c..d632aabb 100644
--- a/net/http/http_stream_factory_job_controller.cc
+++ b/net/http/http_stream_factory_job_controller.cc
@@ -796,11 +796,11 @@
   // Create an alternative job if alternative service is set up for this domain.
   alternative_service_info_ =
       GetAlternativeServiceInfoFor(request_info_, delegate_, stream_type_);
-  QuicTransportVersion quic_version = QUIC_VERSION_UNSUPPORTED;
+  quic::QuicTransportVersion quic_version = quic::QUIC_VERSION_UNSUPPORTED;
   if (alternative_service_info_.protocol() == kProtoQUIC) {
     quic_version =
         SelectQuicVersion(alternative_service_info_.advertised_versions());
-    DCHECK_NE(quic_version, QUIC_VERSION_UNSUPPORTED);
+    DCHECK_NE(quic_version, quic::QUIC_VERSION_UNSUPPORTED);
   }
 
   if (is_preconnect_) {
@@ -1143,7 +1143,7 @@
     // If there is no QUIC version in the advertised versions that is
     // supported, ignore this entry.
     if (SelectQuicVersion(alternative_service_info.advertised_versions()) ==
-        QUIC_VERSION_UNSUPPORTED)
+        quic::QUIC_VERSION_UNSUPPORTED)
       continue;
 
     // Check whether there is an existing QUIC session to use for this origin.
@@ -1178,23 +1178,23 @@
   return first_alternative_service_info;
 }
 
-QuicTransportVersion HttpStreamFactory::JobController::SelectQuicVersion(
-    const QuicTransportVersionVector& advertised_versions) {
-  const QuicTransportVersionVector& supported_versions =
+quic::QuicTransportVersion HttpStreamFactory::JobController::SelectQuicVersion(
+    const quic::QuicTransportVersionVector& advertised_versions) {
+  const quic::QuicTransportVersionVector& supported_versions =
       session_->params().quic_supported_versions;
   if (advertised_versions.empty())
     return supported_versions[0];
 
-  for (const QuicTransportVersion& supported : supported_versions) {
-    for (const QuicTransportVersion& advertised : advertised_versions) {
+  for (const quic::QuicTransportVersion& supported : supported_versions) {
+    for (const quic::QuicTransportVersion& advertised : advertised_versions) {
       if (supported == advertised) {
-        DCHECK_NE(QUIC_VERSION_UNSUPPORTED, supported);
+        DCHECK_NE(quic::QUIC_VERSION_UNSUPPORTED, supported);
         return supported;
       }
     }
   }
 
-  return QUIC_VERSION_UNSUPPORTED;
+  return quic::QUIC_VERSION_UNSUPPORTED;
 }
 
 bool HttpStreamFactory::JobController::ShouldCreateAlternativeProxyServerJob(
diff --git a/net/http/http_stream_factory_job_controller.h b/net/http/http_stream_factory_job_controller.h
index 81089eaa..ac3f842 100644
--- a/net/http/http_stream_factory_job_controller.h
+++ b/net/http/http_stream_factory_job_controller.h
@@ -272,13 +272,13 @@
       HttpStreamRequest::Delegate* delegate,
       HttpStreamRequest::StreamType stream_type);
 
-  // Returns a QuicTransportVersion that has been advertised in
+  // Returns a quic::QuicTransportVersion that has been advertised in
   // |advertised_versions| and is supported.  If more than one
   // QuicTransportVersions are supported, the first matched in the supported
   // versions will be returned.  If no mutually supported version is found,
   // QUIC_VERSION_UNSUPPORTED_VERSION will be returned.
-  QuicTransportVersion SelectQuicVersion(
-      const QuicTransportVersionVector& advertised_versions);
+  quic::QuicTransportVersion SelectQuicVersion(
+      const quic::QuicTransportVersionVector& advertised_versions);
 
   // Remove session from the SpdySessionRequestMap.
   void RemoveRequestFromSpdySessionRequestMap();
diff --git a/net/http/http_stream_factory_job_controller_unittest.cc b/net/http/http_stream_factory_job_controller_unittest.cc
index d19d41c..d8690e4 100644
--- a/net/http/http_stream_factory_job_controller_unittest.cc
+++ b/net/http/http_stream_factory_job_controller_unittest.cc
@@ -316,14 +316,14 @@
   std::unique_ptr<SequencedSocketData> tcp_data_;
   std::unique_ptr<MockQuicData> quic_data_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
-  MockClock clock_;
-  MockRandom random_generator_{0};
+  quic::MockClock clock_;
+  quic::test::MockRandom random_generator_{0};
   QuicTestPacketMaker client_maker_{
       HttpNetworkSession::Params().quic_supported_versions[0],
       0,
       &clock_,
       kServerHostname,
-      Perspective::IS_CLIENT,
+      quic::Perspective::IS_CLIENT,
       false};
 
  protected:
@@ -798,7 +798,7 @@
 TEST_F(HttpStreamFactoryJobControllerTest, CancelJobsBeforeBinding) {
   // Use COLD_START to make the alt job pending.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
   quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, OK);
 
@@ -843,7 +843,8 @@
   AlternativeService alternative_service(kProtoQUIC, server.host(), 443);
   base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
   session_->http_server_properties()->SetQuicAlternativeService(
-      server, alternative_service, expiration, {QUIC_VERSION_UNSUPPORTED});
+      server, alternative_service, expiration,
+      {quic::QUIC_VERSION_UNSUPPORTED});
 
   request_ =
       job_controller_->Start(&request_delegate_, nullptr, net_log_.bound(),
@@ -890,7 +891,7 @@
   quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(ASYNC, ERR_FAILED);
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
 
   tcp_data_ = std::make_unique<SequencedSocketData>();
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
@@ -934,7 +935,7 @@
   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);
+      quic::MockCryptoClientStream::COLD_START);
   tcp_data_ = std::make_unique<SequencedSocketData>();
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, ERR_IO_PENDING));
 
@@ -1061,7 +1062,7 @@
   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);
+      quic::MockCryptoClientStream::COLD_START);
 
   tcp_data_ = std::make_unique<SequencedSocketData>();
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
@@ -1114,7 +1115,7 @@
   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);
+      quic::MockCryptoClientStream::COLD_START);
 
   // One failed TCP connect.
   tcp_data_ = std::make_unique<SequencedSocketData>();
@@ -1246,7 +1247,7 @@
   quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
 
   tcp_data_ = std::make_unique<SequencedSocketData>();
   tcp_data_->set_connect_data(MockConnect(ASYNC, ERR_FAILED));
@@ -1293,7 +1294,7 @@
   quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
 
   tcp_data_ = std::make_unique<SequencedSocketData>();
   tcp_data_->set_connect_data(MockConnect(SYNCHRONOUS, OK));
@@ -1380,7 +1381,7 @@
 
   // This prevents handshake from immediately succeeding.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
 
   request_ =
       job_controller_->Start(&request_delegate_, nullptr, net_log_.bound(),
@@ -1456,7 +1457,7 @@
 
   // This prevents handshake from immediately succeeding.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
 
   request_ =
       job_controller_->Start(&request_delegate_, nullptr, net_log_.bound(),
@@ -1599,7 +1600,7 @@
 
   // This prevents handshake from immediately succeeding.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
 
   request_ =
       job_controller_->Start(&request_delegate_, nullptr, net_log_.bound(),
@@ -1662,7 +1663,7 @@
 
   // This prevents handshake from immediately succeeding.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
 
   request_ =
       job_controller_->Start(&request_delegate_, nullptr, net_log_.bound(),
@@ -1785,7 +1786,7 @@
 
   // This prevents handshake from immediately succeeding.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
 
   request_ =
       job_controller_->Start(&request_delegate_, nullptr, net_log_.bound(),
@@ -1928,7 +1929,7 @@
 
   // Use COLD_START to make the alt job pending.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
   quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   tcp_data_ = std::make_unique<SequencedSocketData>();
@@ -2343,7 +2344,7 @@
 // Tests that HTTP/2 throttling logic only applies to non-QUIC jobs.
 TEST_F(JobControllerLimitMultipleH2Requests, QuicJobNotThrottled) {
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
   quic_data_ = std::make_unique<MockQuicData>();
   quic_data_->AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING)};
@@ -2533,7 +2534,8 @@
 
   // Set alternative service with no advertised version.
   session_->http_server_properties()->SetQuicAlternativeService(
-      server, alternative_service, expiration, QuicTransportVersionVector());
+      server, alternative_service, expiration,
+      quic::QuicTransportVersionVector());
 
   AlternativeServiceInfo alt_svc_info =
       JobControllerPeer::GetAlternativeServiceInfoFor(
@@ -2544,7 +2546,7 @@
 
   // Set alternative service for the same server with the same list of versions
   // that is supported.
-  QuicTransportVersionVector supported_versions =
+  quic::QuicTransportVersionVector supported_versions =
       session_->params().quic_supported_versions;
   ASSERT_TRUE(session_->http_server_properties()->SetQuicAlternativeService(
       server, alternative_service, expiration, supported_versions));
@@ -2555,13 +2557,16 @@
   std::sort(supported_versions.begin(), supported_versions.end());
   EXPECT_EQ(supported_versions, alt_svc_info.advertised_versions());
 
-  QuicTransportVersion unsupported_version_1(QUIC_VERSION_UNSUPPORTED);
-  QuicTransportVersion unsupported_version_2(QUIC_VERSION_UNSUPPORTED);
-  for (const QuicTransportVersion& version : AllSupportedTransportVersions()) {
+  quic::QuicTransportVersion unsupported_version_1(
+      quic::QUIC_VERSION_UNSUPPORTED);
+  quic::QuicTransportVersion unsupported_version_2(
+      quic::QUIC_VERSION_UNSUPPORTED);
+  for (const quic::QuicTransportVersion& version :
+       quic::AllSupportedTransportVersions()) {
     if (std::find(supported_versions.begin(), supported_versions.end(),
                   version) != supported_versions.end())
       continue;
-    if (unsupported_version_1 == QUIC_VERSION_UNSUPPORTED) {
+    if (unsupported_version_1 == quic::QUIC_VERSION_UNSUPPORTED) {
       unsupported_version_1 = version;
       continue;
     }
@@ -2572,7 +2577,7 @@
   // Set alternative service for the same server with two QUIC versions:
   // - one unsupported version: |unsupported_version_1|,
   // - one supported version: session_->params().quic_supported_versions[0].
-  QuicTransportVersionVector mixed_quic_versions = {
+  quic::QuicTransportVersionVector mixed_quic_versions = {
       unsupported_version_1, session_->params().quic_supported_versions[0]};
   ASSERT_TRUE(session_->http_server_properties()->SetQuicAlternativeService(
       server, alternative_service, expiration, mixed_quic_versions));
@@ -2617,7 +2622,7 @@
   // Set alternative service for www.google.com to be www.example.com over QUIC.
   url::SchemeHostPort server(request_info.url);
   base::Time expiration = base::Time::Now() + base::TimeDelta::FromDays(1);
-  QuicTransportVersionVector supported_versions =
+  quic::QuicTransportVersionVector supported_versions =
       session_->params().quic_supported_versions;
   session_->http_server_properties()->SetQuicAlternativeService(
       server, AlternativeService(kProtoQUIC, "www.example.com", 443),
diff --git a/net/http/http_stream_factory_test_util.cc b/net/http/http_stream_factory_test_util.cc
index 8ab4c97..bd71aa00 100644
--- a/net/http/http_stream_factory_test_util.cc
+++ b/net/http/http_stream_factory_test_util.cc
@@ -27,7 +27,7 @@
     HostPortPair destination,
     GURL origin_url,
     NextProto alternative_protocol,
-    QuicTransportVersion quic_version,
+    quic::QuicTransportVersion quic_version,
     const ProxyServer& alternative_proxy_server,
     bool is_websocket,
     bool enable_ip_based_pooling,
@@ -80,7 +80,7 @@
   auto main_job = std::make_unique<MockHttpStreamFactoryJob>(
       delegate, job_type, session, request_info, priority, proxy_info,
       SSLConfig(), SSLConfig(), destination, origin_url, kProtoUnknown,
-      QUIC_VERSION_UNSUPPORTED, ProxyServer(), is_websocket,
+      quic::QUIC_VERSION_UNSUPPORTED, ProxyServer(), is_websocket,
       enable_ip_based_pooling, net_log);
 
   // Keep raw pointer to Job but pass ownership.
@@ -101,7 +101,7 @@
     HostPortPair destination,
     GURL origin_url,
     NextProto alternative_protocol,
-    QuicTransportVersion quic_version,
+    quic::QuicTransportVersion quic_version,
     bool is_websocket,
     bool enable_ip_based_pooling,
     NetLog* net_log) {
@@ -135,7 +135,7 @@
   auto alternative_job = std::make_unique<MockHttpStreamFactoryJob>(
       delegate, job_type, session, request_info, priority, proxy_info,
       SSLConfig(), SSLConfig(), destination, origin_url, kProtoUnknown,
-      QUIC_VERSION_UNSUPPORTED, alternative_proxy_server, is_websocket,
+      quic::QUIC_VERSION_UNSUPPORTED, alternative_proxy_server, is_websocket,
       enable_ip_based_pooling, net_log);
 
   // Keep raw pointer to Job but pass ownership.
diff --git a/net/http/http_stream_factory_test_util.h b/net/http/http_stream_factory_test_util.h
index 74c75da..c186f10 100644
--- a/net/http/http_stream_factory_test_util.h
+++ b/net/http/http_stream_factory_test_util.h
@@ -118,7 +118,7 @@
                            HostPortPair destination,
                            GURL origin_url,
                            NextProto alternative_protocol,
-                           QuicTransportVersion quic_version,
+                           quic::QuicTransportVersion quic_version,
                            const ProxyServer& alternative_proxy_server,
                            bool is_websocket,
                            bool enable_ip_based_pooling,
@@ -164,7 +164,7 @@
       HostPortPair destination,
       GURL origin_url,
       NextProto alternative_protocol,
-      QuicTransportVersion quic_version,
+      quic::QuicTransportVersion quic_version,
       bool is_websocket,
       bool enable_ip_based_pooling,
       NetLog* net_log) override;
diff --git a/net/http/http_stream_factory_unittest.cc b/net/http/http_stream_factory_unittest.cc
index 57dc5304..72133c99d 100644
--- a/net/http/http_stream_factory_unittest.cc
+++ b/net/http/http_stream_factory_unittest.cc
@@ -887,7 +887,7 @@
 
   ~MockQuicData() = default;
 
-  void AddRead(std::unique_ptr<QuicEncryptedPacket> packet) {
+  void AddRead(std::unique_ptr<quic::QuicEncryptedPacket> packet) {
     reads_.push_back(
         MockRead(ASYNC, packet->data(), packet->length(), packet_number_++));
     packets_.push_back(std::move(packet));
@@ -897,7 +897,7 @@
     reads_.push_back(MockRead(mode, rv, packet_number_++));
   }
 
-  void AddWrite(std::unique_ptr<QuicEncryptedPacket> packet) {
+  void AddWrite(std::unique_ptr<quic::QuicEncryptedPacket> packet) {
     writes_.push_back(MockWrite(SYNCHRONOUS, packet->data(), packet->length(),
                                 packet_number_++));
     packets_.push_back(std::move(packet));
@@ -909,7 +909,7 @@
   }
 
  private:
-  std::vector<std::unique_ptr<QuicEncryptedPacket>> packets_;
+  std::vector<std::unique_ptr<quic::QuicEncryptedPacket>> packets_;
   std::vector<MockWrite> writes_;
   std::vector<MockRead> reads_;
   size_t packet_number_;
@@ -2335,7 +2335,7 @@
 class HttpStreamFactoryBidirectionalQuicTest
     : public TestWithScopedTaskEnvironment,
       public ::testing::WithParamInterface<
-          std::tuple<QuicTransportVersion, bool>> {
+          std::tuple<quic::QuicTransportVersion, bool>> {
  protected:
   HttpStreamFactoryBidirectionalQuicTest()
       : default_url_(kDefaultUrl),
@@ -2345,18 +2345,18 @@
                              0,
                              &clock_,
                              "www.example.org",
-                             Perspective::IS_CLIENT,
+                             quic::Perspective::IS_CLIENT,
                              client_headers_include_h2_stream_dependency_),
         server_packet_maker_(version_,
                              0,
                              &clock_,
                              "www.example.org",
-                             Perspective::IS_SERVER,
+                             quic::Perspective::IS_SERVER,
                              false),
         random_generator_(0),
         proxy_resolution_service_(ProxyResolutionService::CreateDirect()),
         ssl_config_service_(new SSLConfigServiceDefaults) {
-    clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20));
+    clock_.AdvanceTime(quic::QuicTime::Delta::FromMilliseconds(20));
   }
 
   void TearDown() override { session_.reset(); }
@@ -2370,7 +2370,7 @@
   void Initialize() {
     params_.enable_quic = true;
     params_.quic_supported_versions =
-        test::SupportedTransportVersions(version_);
+        quic::test::SupportedTransportVersions(version_);
     params_.quic_headers_include_h2_stream_dependency =
         client_headers_include_h2_stream_dependency_;
 
@@ -2387,7 +2387,7 @@
     verify_details_.cert_verify_result.is_issued_by_known_root = true;
     crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details_);
     crypto_client_stream_factory_.set_handshake_mode(
-        MockCryptoClientStream::CONFIRM_HANDSHAKE);
+        quic::MockCryptoClientStream::CONFIRM_HANDSHAKE);
     session_context.cert_verifier = &cert_verifier_;
     session_context.quic_crypto_client_stream_factory =
         &crypto_client_stream_factory_;
@@ -2424,19 +2424,19 @@
 
   const GURL default_url_;
 
-  QuicStreamId GetNthClientInitiatedStreamId(int n) {
-    return test::GetNthClientInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthClientInitiatedStreamId(int n) {
+    return quic::test::GetNthClientInitiatedStreamId(version_, n);
   }
 
  private:
-  const QuicTransportVersion version_;
+  const quic::QuicTransportVersion version_;
   const bool client_headers_include_h2_stream_dependency_;
-  MockClock clock_;
+  quic::MockClock clock_;
   test::QuicTestPacketMaker client_packet_maker_;
   test::QuicTestPacketMaker server_packet_maker_;
   MockTaggingClientSocketFactory socket_factory_;
   std::unique_ptr<HttpNetworkSession> session_;
-  test::MockRandom random_generator_;
+  quic::test::MockRandom random_generator_;
   MockCertVerifier cert_verifier_;
   ProofVerifyDetailsChromium verify_details_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
@@ -2453,8 +2453,9 @@
 INSTANTIATE_TEST_CASE_P(
     VersionIncludeStreamDependencySequence,
     HttpStreamFactoryBidirectionalQuicTest,
-    ::testing::Combine(::testing::ValuesIn(AllSupportedTransportVersions()),
-                       ::testing::Bool()));
+    ::testing::Combine(
+        ::testing::ValuesIn(quic::AllSupportedTransportVersions()),
+        ::testing::Bool()));
 
 TEST_P(HttpStreamFactoryBidirectionalQuicTest,
        RequestBidirectionalStreamImplQuicAlternative) {
@@ -2462,7 +2463,7 @@
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
   size_t spdy_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(client_packet_maker().MakeInitialSettingsPacket(
       1, &header_stream_offset));
   mock_quic_data.AddWrite(client_packet_maker().MakeRequestHeadersPacket(
@@ -2593,7 +2594,7 @@
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
   size_t spdy_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(client_packet_maker().MakeInitialSettingsPacket(
       1, &header_stream_offset));
   mock_quic_data.AddWrite(client_packet_maker().MakeRequestHeadersPacket(
@@ -2873,7 +2874,7 @@
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
   size_t spdy_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(client_packet_maker().MakeInitialSettingsPacket(
       1, &header_stream_offset));
   mock_quic_data.AddWrite(client_packet_maker().MakeRequestHeadersPacket(
@@ -2892,7 +2893,7 @@
 
   // Prepare mock QUIC data for a second session establishment.
   MockQuicData mock_quic_data2;
-  QuicStreamOffset header_stream_offset2 = 0;
+  quic::QuicStreamOffset header_stream_offset2 = 0;
   mock_quic_data2.AddWrite(client_packet_maker().MakeInitialSettingsPacket(
       1, &header_stream_offset2));
   mock_quic_data2.AddWrite(client_packet_maker().MakeRequestHeadersPacket(
diff --git a/net/log/net_log_event_type_list.h b/net/log/net_log_event_type_list.h
index 79f3590..96d411ef 100644
--- a/net/log/net_log_event_type_list.h
+++ b/net/log/net_log_event_type_list.h
@@ -1636,7 +1636,7 @@
 // Measures the time taken to execute the QuicStreamFactory::Job.
 // The event parameters are:
 //   {
-//     "server_id": <The QuicServerId that the Job serves>,
+//     "server_id": <The quic::QuicServerId that the Job serves>,
 //   }
 EVENT_TYPE(QUIC_STREAM_FACTORY_JOB)
 
@@ -1658,10 +1658,10 @@
 EVENT_TYPE(QUIC_STREAM_FACTORY_JOB_CONNECT)
 
 // ------------------------------------------------------------------------
-// QuicSession
+// quic::QuicSession
 // ------------------------------------------------------------------------
 
-// The start/end of a QuicSession.
+// The start/end of a quic::QuicSession.
 //   {
 //     "host": <The host-port string>,
 //   }
@@ -1693,8 +1693,8 @@
 
 // Session sent a QUIC packet.
 //   {
-//     "encryption_level": <The EncryptionLevel of the packet>,
-//     "transmission_type": <The TransmissionType of the packet>,
+//     "encryption_level": <The quic::EncryptionLevel of the packet>,
+//     "transmission_type": <The quic::TransmissionType of the packet>,
 //     "packet_sequence_number": <The packet's full 64-bit sequence number,
 //                                as a base-10 string.>,
 //     "size": <The size of the packet in bytes>
@@ -1815,7 +1815,7 @@
 
 // Session received a GOAWAY frame.
 //   {
-//     "quic_error":          <QuicErrorCode in the frame>,
+//     "quic_error":          <quic::QuicErrorCode in the frame>,
 //     "last_good_stream_id": <Last correctly received stream id by the server>,
 //     "reason_phrase":       <Prose justifying go-away request>,
 //   }
@@ -1823,7 +1823,7 @@
 
 // Session sent a GOAWAY frame.
 //   {
-//     "quic_error":          <QuicErrorCode in the frame>,
+//     "quic_error":          <quic::QuicErrorCode in the frame>,
 //     "last_good_stream_id": <Last correctly received stream id by the server>,
 //     "reason_phrase":       <Prose justifying go-away request>,
 //   }
@@ -1861,7 +1861,7 @@
 // Session recevied a RST_STREAM frame.
 //   {
 //     "offset": <Offset in the byte stream which triggered the reset>,
-//     "quic_rst_stream_error": <QuicRstStreamErrorCode in the frame>,
+//     "quic_rst_stream_error": <quic::QuicRstStreamErrorCode in the frame>,
 //     "details": <Human readable description>,
 //   }
 EVENT_TYPE(QUIC_SESSION_RST_STREAM_FRAME_RECEIVED)
@@ -1869,21 +1869,21 @@
 // Session sent a RST_STREAM frame.
 //   {
 //     "offset": <Offset in the byte stream which triggered the reset>,
-//     "quic_rst_stream_error": <QuicRstStreamErrorCode in the frame>,
+//     "quic_rst_stream_error": <quic::QuicRstStreamErrorCode in the frame>,
 //     "details": <Human readable description>,
 //   }
 EVENT_TYPE(QUIC_SESSION_RST_STREAM_FRAME_SENT)
 
 // Session received a CONNECTION_CLOSE frame.
 //   {
-//     "quic_error": <QuicErrorCode in the frame>,
+//     "quic_error": <quic::QuicErrorCode in the frame>,
 //     "details": <Human readable description>,
 //   }
 EVENT_TYPE(QUIC_SESSION_CONNECTION_CLOSE_FRAME_RECEIVED)
 
 // Session received a CONNECTION_CLOSE frame.
 //   {
-//     "quic_error": <QuicErrorCode in the frame>,
+//     "quic_error": <quic::QuicErrorCode in the frame>,
 //     "details": <Human readable description>,
 //   }
 EVENT_TYPE(QUIC_SESSION_CONNECTION_CLOSE_FRAME_SENT)
@@ -1942,8 +1942,8 @@
 
 // Session was closed, either remotely or by the peer.
 //   {
-//     "quic_error": <QuicErrorCode which caused the connection to be closed>,
-//     "from_peer":  <True if the peer closed the connection>
+//     "quic_error": <quic::QuicErrorCode which caused the connection to be
+//     closed>, "from_peer":  <True if the peer closed the connection>
 //   }
 EVENT_TYPE(QUIC_SESSION_CLOSED)
 
diff --git a/net/log/net_log_util.cc b/net/log/net_log_util.cc
index 38215db..b010fc3 100644
--- a/net/log/net_log_util.cc
+++ b/net/log/net_log_util.cc
@@ -207,8 +207,9 @@
   {
     std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
-    for (QuicErrorCode error = QUIC_NO_ERROR; error < QUIC_LAST_ERROR;
-         error = static_cast<QuicErrorCode>(error + 1)) {
+    for (quic::QuicErrorCode error = quic::QUIC_NO_ERROR;
+         error < quic::QUIC_LAST_ERROR;
+         error = static_cast<quic::QuicErrorCode>(error + 1)) {
       dict->SetInteger(QuicErrorCodeToString(error), static_cast<int>(error));
     }
 
@@ -220,9 +221,9 @@
   {
     std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
 
-    for (QuicRstStreamErrorCode error = QUIC_STREAM_NO_ERROR;
-         error < QUIC_STREAM_LAST_ERROR;
-         error = static_cast<QuicRstStreamErrorCode>(error + 1)) {
+    for (quic::QuicRstStreamErrorCode error = quic::QUIC_STREAM_NO_ERROR;
+         error < quic::QUIC_STREAM_LAST_ERROR;
+         error = static_cast<quic::QuicRstStreamErrorCode>(error + 1)) {
       dict->SetInteger(QuicRstStreamErrorCodeToString(error),
                        static_cast<int>(error));
     }
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl.cc b/net/quic/chromium/bidirectional_stream_quic_impl.cc
index b222afa9..e151b4a 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl.cc
+++ b/net/quic/chromium/bidirectional_stream_quic_impl.cc
@@ -60,7 +60,7 @@
 BidirectionalStreamQuicImpl::~BidirectionalStreamQuicImpl() {
   if (stream_) {
     delegate_ = nullptr;
-    stream_->Reset(QUIC_STREAM_CANCELLED);
+    stream_->Reset(quic::QUIC_STREAM_CANCELLED);
   }
 }
 
@@ -179,8 +179,8 @@
     return;
   }
 
-  std::unique_ptr<QuicConnection::ScopedPacketFlusher> bundler(
-      session_->CreatePacketBundler(QuicConnection::SEND_ACK_IF_PENDING));
+  std::unique_ptr<quic::QuicConnection::ScopedPacketFlusher> bundler(
+      session_->CreatePacketBundler(quic::QuicConnection::SEND_ACK_IF_PENDING));
   if (!has_sent_headers_) {
     DCHECK(!send_request_headers_automatically_);
     int rv = WriteHeaders();
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
index 985e4d2..40a1809 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
+++ b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
@@ -387,7 +387,8 @@
 }  // namespace
 
 class BidirectionalStreamQuicImplTest
-    : public ::testing::TestWithParam<std::tuple<QuicTransportVersion, bool>>,
+    : public ::testing::TestWithParam<
+          std::tuple<quic::QuicTransportVersion, bool>>,
       public WithScopedTaskEnvironment {
  protected:
   static const bool kFin = true;
@@ -397,19 +398,19 @@
   // Holds a packet to be written to the wire, and the IO mode that should
   // be used by the mock socket when performing the write.
   struct PacketToWrite {
-    PacketToWrite(IoMode mode, QuicReceivedPacket* packet)
+    PacketToWrite(IoMode mode, quic::QuicReceivedPacket* packet)
         : mode(mode), packet(packet) {}
     PacketToWrite(IoMode mode, int rv) : mode(mode), packet(nullptr), rv(rv) {}
     IoMode mode;
-    QuicReceivedPacket* packet;
+    quic::QuicReceivedPacket* packet;
     int rv;
   };
 
   BidirectionalStreamQuicImplTest()
       : version_(std::get<0>(GetParam())),
         client_headers_include_h2_stream_dependency_(std::get<1>(GetParam())),
-        crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
-                       TlsClientHandshaker::CreateSslCtx()),
+        crypto_config_(quic::test::crypto_test_utils::ProofVerifierForTesting(),
+                       quic::TlsClientHandshaker::CreateSslCtx()),
         read_buffer_(new IOBufferWithSize(4096)),
         connection_id_(2),
         stream_id_(GetNthClientInitiatedStreamId(0)),
@@ -417,24 +418,24 @@
                       connection_id_,
                       &clock_,
                       kDefaultServerHostName,
-                      Perspective::IS_CLIENT,
+                      quic::Perspective::IS_CLIENT,
                       client_headers_include_h2_stream_dependency_),
         server_maker_(version_,
                       connection_id_,
                       &clock_,
                       kDefaultServerHostName,
-                      Perspective::IS_SERVER,
+                      quic::Perspective::IS_SERVER,
                       false),
         random_generator_(0),
         destination_(kDefaultServerHostName, kDefaultServerPort) {
     IPAddress ip(192, 0, 2, 33);
     peer_addr_ = IPEndPoint(ip, 443);
     self_addr_ = IPEndPoint(ip, 8435);
-    clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20));
+    clock_.AdvanceTime(quic::QuicTime::Delta::FromMilliseconds(20));
   }
 
   ~BidirectionalStreamQuicImplTest() {
-    session_->CloseSessionOnError(ERR_ABORTED, QUIC_INTERNAL_ERROR);
+    session_->CloseSessionOnError(ERR_ABORTED, quic::QUIC_INTERNAL_ERROR);
     for (size_t i = 0; i < writes_.size(); i++) {
       delete writes_[i].packet;
     }
@@ -446,7 +447,7 @@
   }
 
   // Adds a packet to the list of expected writes.
-  void AddWrite(std::unique_ptr<QuicReceivedPacket> packet) {
+  void AddWrite(std::unique_ptr<quic::QuicReceivedPacket> packet) {
     writes_.push_back(PacketToWrite(SYNCHRONOUS, packet.release()));
   }
 
@@ -455,16 +456,17 @@
     writes_.push_back(PacketToWrite(mode, rv));
   }
 
-  void ProcessPacket(std::unique_ptr<QuicReceivedPacket> packet) {
+  void ProcessPacket(std::unique_ptr<quic::QuicReceivedPacket> packet) {
     connection_->ProcessUdpPacket(
-        QuicSocketAddress(QuicSocketAddressImpl(self_addr_)),
-        QuicSocketAddress(QuicSocketAddressImpl(peer_addr_)), *packet);
+        quic::QuicSocketAddress(quic::QuicSocketAddressImpl(self_addr_)),
+        quic::QuicSocketAddress(quic::QuicSocketAddressImpl(peer_addr_)),
+        *packet);
   }
 
   // Configures the test fixture to use the list of expected writes.
   void Initialize() {
     crypto_client_stream_factory_.set_handshake_mode(
-        MockCryptoClientStream::ZERO_RTT);
+        quic::MockCryptoClientStream::ZERO_RTT);
     mock_writes_.reset(new MockWrite[writes_.size()]);
     for (size_t i = 0; i < writes_.size(); i++) {
       if (writes_[i].packet == nullptr) {
@@ -486,13 +488,14 @@
     helper_.reset(
         new QuicChromiumConnectionHelper(&clock_, &random_generator_));
     alarm_factory_.reset(new QuicChromiumAlarmFactory(runner_.get(), &clock_));
-    connection_ = new QuicConnection(
-        connection_id_, QuicSocketAddress(QuicSocketAddressImpl(peer_addr_)),
+    connection_ = new quic::QuicConnection(
+        connection_id_,
+        quic::QuicSocketAddress(quic::QuicSocketAddressImpl(peer_addr_)),
         helper_.get(), alarm_factory_.get(),
         new QuicChromiumPacketWriter(socket.get(), runner_.get()),
-        true /* owns_writer */, Perspective::IS_CLIENT,
-        SupportedVersions(
-            net::ParsedQuicVersion(net::PROTOCOL_QUIC_CRYPTO, version_)));
+        true /* owns_writer */, quic::Perspective::IS_CLIENT,
+        quic::test::SupportedVersions(
+            quic::ParsedQuicVersion(quic::PROTOCOL_QUIC_CRYPTO, version_)));
     base::TimeTicks dns_end = base::TimeTicks::Now();
     base::TimeTicks dns_start = dns_end - base::TimeDelta::FromMilliseconds(1);
 
@@ -510,10 +513,11 @@
         base::TimeDelta::FromSeconds(kMaxTimeOnNonDefaultNetworkSecs),
         kMaxMigrationsToNonDefaultNetworkOnPathDegrading,
         kQuicYieldAfterPacketsRead,
-        QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
+        quic::QuicTime::Delta::FromMilliseconds(
+            kQuicYieldAfterDurationMilliseconds),
         client_headers_include_h2_stream_dependency_, /*cert_verify_flags=*/0,
-        DefaultQuicConfig(), &crypto_config_, "CONNECTION_UNKNOWN", dns_start,
-        dns_end, &push_promise_index_, nullptr,
+        quic::test::DefaultQuicConfig(), &crypto_config_, "CONNECTION_UNKNOWN",
+        dns_start, dns_end, &push_promise_index_, nullptr,
         base::ThreadTaskRunnerHandle::Get().get(),
         /*socket_performance_watcher=*/nullptr, net_log().bound().net_log()));
     session_->Initialize();
@@ -524,7 +528,7 @@
 
   void ConfirmHandshake() {
     crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-        QuicSession::HANDSHAKE_CONFIRMED);
+        quic::QuicSession::HANDSHAKE_CONFIRMED);
   }
 
   void SetRequest(const std::string& method,
@@ -538,48 +542,49 @@
     return server_maker_.GetResponseHeaders(response_code);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructDataPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructDataPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data,
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data,
       QuicTestPacketMaker* maker) {
-    std::unique_ptr<QuicReceivedPacket> packet(maker->MakeDataPacket(
+    std::unique_ptr<quic::QuicReceivedPacket> packet(maker->MakeDataPacket(
         packet_number, stream_id_, should_include_version, fin, offset, data));
     DVLOG(2) << "packet(" << packet_number << "): " << std::endl
-             << QuicTextUtils::HexDump(packet->AsStringPiece());
+             << quic::QuicTextUtils::HexDump(packet->AsStringPiece());
     return packet;
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerDataPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerDataPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data) {
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data) {
     return ConstructDataPacket(packet_number, should_include_version, fin,
                                offset, data, &server_maker_);
   }
 
   // Construct a data packet with multiple data frames
-  std::unique_ptr<QuicReceivedPacket> ConstructClientMultipleDataFramesPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket>
+  ConstructClientMultipleDataFramesPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
+      quic::QuicStreamOffset offset,
       const std::vector<std::string>& data_writes) {
-    std::unique_ptr<QuicReceivedPacket> packet(
+    std::unique_ptr<quic::QuicReceivedPacket> packet(
         client_maker_.MakeMultipleDataFramesPacket(packet_number, stream_id_,
                                                    should_include_version, fin,
                                                    offset, data_writes));
     DVLOG(2) << "packet(" << packet_number << "): " << std::endl
-             << QuicTextUtils::HexDump(packet->AsStringPiece());
+             << quic::QuicTextUtils::HexDump(packet->AsStringPiece());
     return packet;
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructRequestHeadersPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructRequestHeadersPacket(
+      quic::QuicPacketNumber packet_number,
       bool fin,
       RequestPriority request_priority,
       size_t* spdy_headers_frame_length) {
@@ -588,175 +593,176 @@
         spdy_headers_frame_length, /*offset=*/nullptr);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructRequestHeadersPacketInner(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructRequestHeadersPacketInner(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool fin,
       RequestPriority request_priority,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     return ConstructRequestHeadersPacketInner(
         packet_number, stream_id, fin, request_priority, 0,
         spdy_headers_frame_length, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructRequestHeadersPacketInner(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructRequestHeadersPacketInner(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool fin,
       RequestPriority request_priority,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId parent_stream_id,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     spdy::SpdyPriority priority =
         ConvertRequestPriorityToQuicPriority(request_priority);
-    std::unique_ptr<QuicReceivedPacket> packet(
+    std::unique_ptr<quic::QuicReceivedPacket> packet(
         client_maker_.MakeRequestHeadersPacket(
             packet_number, stream_id, kIncludeVersion, fin, priority,
             std::move(request_headers_), parent_stream_id,
             spdy_headers_frame_length, offset));
     DVLOG(2) << "packet(" << packet_number << "): " << std::endl
-             << QuicTextUtils::HexDump(packet->AsStringPiece());
+             << quic::QuicTextUtils::HexDump(packet->AsStringPiece());
     return packet;
   }
 
-  std::unique_ptr<QuicReceivedPacket>
+  std::unique_ptr<quic::QuicReceivedPacket>
   ConstructRequestHeadersAndMultipleDataFramesPacket(
-      QuicPacketNumber packet_number,
+      quic::QuicPacketNumber packet_number,
       bool fin,
       RequestPriority request_priority,
-      QuicStreamOffset* header_stream_offset,
+      quic::QuicStreamOffset* header_stream_offset,
       size_t* spdy_headers_frame_length,
       const std::vector<std::string>& data) {
     spdy::SpdyPriority priority =
         ConvertRequestPriorityToQuicPriority(request_priority);
-    std::unique_ptr<QuicReceivedPacket> packet(
+    std::unique_ptr<quic::QuicReceivedPacket> packet(
         client_maker_.MakeRequestHeadersAndMultipleDataFramesPacket(
             packet_number, stream_id_, kIncludeVersion, fin, priority,
             std::move(request_headers_), 0, header_stream_offset,
             spdy_headers_frame_length, data));
     DVLOG(2) << "packet(" << packet_number << "): " << std::endl
-             << QuicTextUtils::HexDump(packet->AsStringPiece());
+             << quic::QuicTextUtils::HexDump(packet->AsStringPiece());
     return packet;
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructResponseHeadersPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructResponseHeadersPacket(
+      quic::QuicPacketNumber packet_number,
       bool fin,
       spdy::SpdyHeaderBlock response_headers,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     return ConstructResponseHeadersPacketInner(
         packet_number, stream_id_, fin, std::move(response_headers),
         spdy_headers_frame_length, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructResponseHeadersPacketInner(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructResponseHeadersPacketInner(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool fin,
       spdy::SpdyHeaderBlock response_headers,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     return server_maker_.MakeResponseHeadersPacket(
         packet_number, stream_id, !kIncludeVersion, fin,
         std::move(response_headers), spdy_headers_frame_length, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructResponseTrailersPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructResponseTrailersPacket(
+      quic::QuicPacketNumber packet_number,
       bool fin,
       spdy::SpdyHeaderBlock trailers,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     return server_maker_.MakeResponseHeadersPacket(
         packet_number, stream_id_, !kIncludeVersion, fin, std::move(trailers),
         spdy_headers_frame_length, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientRstStreamPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructClientRstStreamPacket(
+      quic::QuicPacketNumber packet_number) {
     return ConstructRstStreamCancelledPacket(packet_number, !kIncludeVersion, 0,
                                              &client_maker_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerRstStreamPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerRstStreamPacket(
+      quic::QuicPacketNumber packet_number) {
     return ConstructRstStreamCancelledPacket(packet_number, !kIncludeVersion, 0,
                                              &server_maker_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientEarlyRstStreamPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructClientEarlyRstStreamPacket(
+      quic::QuicPacketNumber packet_number) {
     return ConstructRstStreamCancelledPacket(packet_number, kIncludeVersion, 0,
                                              &client_maker_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructRstStreamCancelledPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructRstStreamCancelledPacket(
+      quic::QuicPacketNumber packet_number,
       bool include_version,
       size_t bytes_written,
       QuicTestPacketMaker* maker) {
-    std::unique_ptr<QuicReceivedPacket> packet(
+    std::unique_ptr<quic::QuicReceivedPacket> packet(
         maker->MakeRstPacket(packet_number, include_version, stream_id_,
-                             QUIC_STREAM_CANCELLED, bytes_written));
+                             quic::QUIC_STREAM_CANCELLED, bytes_written));
     DVLOG(2) << "packet(" << packet_number << "): " << std::endl
-             << QuicTextUtils::HexDump(packet->AsStringPiece());
+             << quic::QuicTextUtils::HexDump(packet->AsStringPiece());
     return packet;
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientAckAndRstStreamPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket>
+  ConstructClientAckAndRstStreamPacket(quic::QuicPacketNumber packet_number,
+                                       quic::QuicPacketNumber largest_received,
+                                       quic::QuicPacketNumber smallest_received,
+                                       quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckAndRstPacket(
-        packet_number, !kIncludeVersion, stream_id_, QUIC_STREAM_CANCELLED,
-        largest_received, smallest_received, least_unacked,
-        !kIncludeCongestionFeedback);
+        packet_number, !kIncludeVersion, stream_id_,
+        quic::QUIC_STREAM_CANCELLED, largest_received, smallest_received,
+        least_unacked, !kIncludeCongestionFeedback);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructAckAndDataPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructAckAndDataPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data,
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data,
       QuicTestPacketMaker* maker) {
-    std::unique_ptr<QuicReceivedPacket> packet(maker->MakeAckAndDataPacket(
-        packet_number, should_include_version, stream_id_, largest_received,
-        smallest_received, least_unacked, fin, offset, data));
+    std::unique_ptr<quic::QuicReceivedPacket> packet(
+        maker->MakeAckAndDataPacket(
+            packet_number, should_include_version, stream_id_, largest_received,
+            smallest_received, least_unacked, fin, offset, data));
     DVLOG(2) << "packet(" << packet_number << "): " << std::endl
-             << QuicTextUtils::HexDump(packet->AsStringPiece());
+             << quic::QuicTextUtils::HexDump(packet->AsStringPiece());
     return packet;
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructClientAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckPacket(packet_number, largest_received,
                                        smallest_received, least_unacked,
                                        !kIncludeCongestionFeedback);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return server_maker_.MakeAckPacket(packet_number, largest_received,
                                        smallest_received, least_unacked,
                                        !kIncludeCongestionFeedback);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructInitialSettingsPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamOffset* offset) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructInitialSettingsPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamOffset* offset) {
     return client_maker_.MakeInitialSettingsPacket(packet_number, offset);
   }
 
@@ -778,57 +784,58 @@
 
   QuicChromiumClientSession* session() const { return session_.get(); }
 
-  QuicStreamId GetNthClientInitiatedStreamId(int n) {
-    return test::GetNthClientInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthClientInitiatedStreamId(int n) {
+    return quic::test::GetNthClientInitiatedStreamId(version_, n);
   }
 
  protected:
-  const QuicTransportVersion version_;
+  const quic::QuicTransportVersion version_;
   const bool client_headers_include_h2_stream_dependency_;
   BoundTestNetLog net_log_;
   scoped_refptr<TestTaskRunner> runner_;
   std::unique_ptr<MockWrite[]> mock_writes_;
-  MockClock clock_;
-  QuicConnection* connection_;
+  quic::MockClock clock_;
+  quic::QuicConnection* connection_;
   std::unique_ptr<QuicChromiumConnectionHelper> helper_;
   std::unique_ptr<QuicChromiumAlarmFactory> alarm_factory_;
   TransportSecurityState transport_security_state_;
   std::unique_ptr<QuicChromiumClientSession> session_;
-  QuicCryptoClientConfig crypto_config_;
+  quic::QuicCryptoClientConfig crypto_config_;
   HttpRequestHeaders headers_;
   HttpResponseInfo response_;
   scoped_refptr<IOBufferWithSize> read_buffer_;
   spdy::SpdyHeaderBlock request_headers_;
-  const QuicConnectionId connection_id_;
-  const QuicStreamId stream_id_;
+  const quic::QuicConnectionId connection_id_;
+  const quic::QuicStreamId stream_id_;
   QuicTestPacketMaker client_maker_;
   QuicTestPacketMaker server_maker_;
   IPEndPoint self_addr_;
   IPEndPoint peer_addr_;
-  MockRandom random_generator_;
+  quic::test::MockRandom random_generator_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
   std::unique_ptr<StaticSocketDataProvider> socket_data_;
   std::vector<PacketToWrite> writes_;
-  QuicClientPushPromiseIndex push_promise_index_;
+  quic::QuicClientPushPromiseIndex push_promise_index_;
   HostPortPair destination_;
 };
 
 INSTANTIATE_TEST_CASE_P(
     Version,
     BidirectionalStreamQuicImplTest,
-    ::testing::Combine(::testing::ValuesIn(AllSupportedTransportVersions()),
-                       ::testing::Bool()));
+    ::testing::Combine(
+        ::testing::ValuesIn(quic::AllSupportedTransportVersions()),
+        ::testing::Bool()));
 
 TEST_P(BidirectionalStreamQuicImplTest, GetRequest) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  quic::QuicStreamOffset header_stream_offset = 0;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   AddWrite(ConstructRequestHeadersPacketInner(
       1, GetNthClientInitiatedStreamId(0), kFin, DEFAULT_PRIORITY,
       &spdy_request_headers_frame_length, &header_stream_offset));
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   AddWrite(ConstructInitialSettingsPacket(2, &header_stream_offset));
   AddWrite(ConstructClientAckPacket(3, 3, 1, 1));
 
@@ -856,7 +863,7 @@
   spdy::SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
 
   size_t spdy_response_headers_frame_length;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessPacket(ConstructResponseHeadersPacket(
       2, !kFin, std::move(response_headers),
       &spdy_response_headers_frame_length, &offset));
@@ -882,14 +889,15 @@
   spdy::SpdyHeaderBlock trailers;
   size_t spdy_trailers_frame_length;
   trailers["foo"] = "bar";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(kResponseBody));
+  trailers[quic::kFinalOffsetHeaderKey] =
+      base::IntToString(strlen(kResponseBody));
   // Server sends trailers.
   ProcessPacket(ConstructResponseTrailersPacket(
       4, kFin, trailers.Clone(), &spdy_trailers_frame_length, &offset));
 
   delegate->WaitUntilNextCallback(kOnTrailersReceived);
   EXPECT_THAT(cb2.WaitForResult(), IsOk());
-  trailers.erase(kFinalOffsetHeaderKey);
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, delegate->trailers());
 
   EXPECT_THAT(delegate->ReadData(cb2.callback()), IsOk());
@@ -923,9 +931,9 @@
 
 TEST_P(BidirectionalStreamQuicImplTest, LoadTimingTwoRequests) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
-  QuicStreamOffset offset = 0;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  quic::QuicStreamOffset offset = 0;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   AddWrite(ConstructRequestHeadersPacketInner(
       1, GetNthClientInitiatedStreamId(0), kFin, DEFAULT_PRIORITY, nullptr,
       &offset));
@@ -934,7 +942,7 @@
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(1), kFin, DEFAULT_PRIORITY,
       GetNthClientInitiatedStreamId(0), nullptr, &offset));
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   AddWrite(ConstructInitialSettingsPacket(3, &offset));
   AddWrite(ConstructClientAckPacket(4, 3, 1, 1));
   Initialize();
@@ -998,7 +1006,7 @@
 TEST_P(BidirectionalStreamQuicImplTest, CoalesceDataBuffersNotHeadersFrame) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   const char kBody1[] = "here are some data";
   const char kBody2[] = "data keep coming";
@@ -1013,9 +1021,9 @@
   const char kBody3[] = "hello there";
   const char kBody4[] = "another piece of small data";
   const char kBody5[] = "really small";
-  QuicStreamOffset data_offset = strlen(kBody1) + strlen(kBody2);
-    AddWrite(ConstructClientMultipleDataFramesPacket(
-        5, !kIncludeVersion, kFin, data_offset, {kBody3, kBody4, kBody5}));
+  quic::QuicStreamOffset data_offset = strlen(kBody1) + strlen(kBody2);
+  AddWrite(ConstructClientMultipleDataFramesPacket(
+      5, !kIncludeVersion, kFin, data_offset, {kBody3, kBody4, kBody5}));
   Initialize();
 
   BidirectionalStreamRequestInfo request;
@@ -1052,7 +1060,7 @@
   // Server sends the response headers.
   spdy::SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
   size_t spdy_response_headers_frame_length;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessPacket(ConstructResponseHeadersPacket(
       2, !kFin, std::move(response_headers),
       &spdy_response_headers_frame_length, &offset));
@@ -1081,13 +1089,14 @@
   size_t spdy_trailers_frame_length;
   spdy::SpdyHeaderBlock trailers;
   trailers["foo"] = "bar";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(kResponseBody));
+  trailers[quic::kFinalOffsetHeaderKey] =
+      base::IntToString(strlen(kResponseBody));
   // Server sends trailers.
   ProcessPacket(ConstructResponseTrailersPacket(
       4, kFin, trailers.Clone(), &spdy_trailers_frame_length, &offset));
 
   delegate->WaitUntilNextCallback(kOnTrailersReceived);
-  trailers.erase(kFinalOffsetHeaderKey);
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, delegate->trailers());
   EXPECT_THAT(delegate->ReadData(cb.callback()), IsOk());
 
@@ -1111,7 +1120,7 @@
        SendDataCoalesceDataBufferAndHeaderFrame) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   const char kBody1[] = "here are some data";
   AddWrite(ConstructRequestHeadersAndMultipleDataFramesPacket(
@@ -1120,7 +1129,7 @@
   // Ack server's data packet.
   AddWrite(ConstructClientAckPacket(3, 3, 1, 1));
   const char kBody2[] = "really small";
-  QuicStreamOffset data_offset = strlen(kBody1);
+  quic::QuicStreamOffset data_offset = strlen(kBody1);
   AddWrite(ConstructClientMultipleDataFramesPacket(4, !kIncludeVersion, kFin,
                                                    data_offset, {kBody2}));
 
@@ -1153,7 +1162,7 @@
   // Server sends the response headers.
   spdy::SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
   size_t spdy_response_headers_frame_length;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessPacket(ConstructResponseHeadersPacket(
       2, !kFin, std::move(response_headers),
       &spdy_response_headers_frame_length, &offset));
@@ -1179,13 +1188,14 @@
   size_t spdy_trailers_frame_length;
   spdy::SpdyHeaderBlock trailers;
   trailers["foo"] = "bar";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(kResponseBody));
+  trailers[quic::kFinalOffsetHeaderKey] =
+      base::IntToString(strlen(kResponseBody));
   // Server sends trailers.
   ProcessPacket(ConstructResponseTrailersPacket(
       4, kFin, trailers.Clone(), &spdy_trailers_frame_length, &offset));
 
   delegate->WaitUntilNextCallback(kOnTrailersReceived);
-  trailers.erase(kFinalOffsetHeaderKey);
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, delegate->trailers());
   EXPECT_THAT(delegate->ReadData(cb.callback()), IsOk());
 
@@ -1207,7 +1217,7 @@
        SendvDataCoalesceDataBuffersAndHeaderFrame) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   const char kBody1[] = "here are some data";
   const char kBody2[] = "data keep coming";
@@ -1220,9 +1230,9 @@
   const char kBody3[] = "hello there";
   const char kBody4[] = "another piece of small data";
   const char kBody5[] = "really small";
-  QuicStreamOffset data_offset = strlen(kBody1) + strlen(kBody2);
-    AddWrite(ConstructClientMultipleDataFramesPacket(
-        4, !kIncludeVersion, kFin, data_offset, {kBody3, kBody4, kBody5}));
+  quic::QuicStreamOffset data_offset = strlen(kBody1) + strlen(kBody2);
+  AddWrite(ConstructClientMultipleDataFramesPacket(
+      4, !kIncludeVersion, kFin, data_offset, {kBody3, kBody4, kBody5}));
   Initialize();
 
   BidirectionalStreamRequestInfo request;
@@ -1254,7 +1264,7 @@
   // Server sends the response headers.
   spdy::SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
   size_t spdy_response_headers_frame_length;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessPacket(ConstructResponseHeadersPacket(
       2, !kFin, std::move(response_headers),
       &spdy_response_headers_frame_length, &offset));
@@ -1283,13 +1293,14 @@
   size_t spdy_trailers_frame_length;
   spdy::SpdyHeaderBlock trailers;
   trailers["foo"] = "bar";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(kResponseBody));
+  trailers[quic::kFinalOffsetHeaderKey] =
+      base::IntToString(strlen(kResponseBody));
   // Server sends trailers.
   ProcessPacket(ConstructResponseTrailersPacket(
       4, kFin, trailers.Clone(), &spdy_trailers_frame_length, &offset));
 
   delegate->WaitUntilNextCallback(kOnTrailersReceived);
-  trailers.erase(kFinalOffsetHeaderKey);
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, delegate->trailers());
   EXPECT_THAT(delegate->ReadData(cb.callback()), IsOk());
 
@@ -1311,7 +1322,7 @@
 // headers to be sent, if that write fails the stream does not crash.
 TEST_P(BidirectionalStreamQuicImplTest,
        SendDataWriteErrorCoalesceDataBufferAndHeaderFrame) {
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWriteError(SYNCHRONOUS, ERR_CONNECTION_REFUSED);
 
@@ -1345,7 +1356,7 @@
 // headers to be sent, if that write fails the stream does not crash.
 TEST_P(BidirectionalStreamQuicImplTest,
        SendvDataWriteErrorCoalesceDataBufferAndHeaderFrame) {
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWriteError(SYNCHRONOUS, ERR_CONNECTION_REFUSED);
 
@@ -1381,7 +1392,7 @@
 TEST_P(BidirectionalStreamQuicImplTest, PostRequest) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(0), !kFin, DEFAULT_PRIORITY,
@@ -1418,7 +1429,7 @@
   // Server sends the response headers.
   spdy::SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
   size_t spdy_response_headers_frame_length;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessPacket(ConstructResponseHeadersPacket(
       2, !kFin, std::move(response_headers),
       &spdy_response_headers_frame_length, &offset));
@@ -1438,13 +1449,14 @@
   size_t spdy_trailers_frame_length;
   spdy::SpdyHeaderBlock trailers;
   trailers["foo"] = "bar";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(kResponseBody));
+  trailers[quic::kFinalOffsetHeaderKey] =
+      base::IntToString(strlen(kResponseBody));
   // Server sends trailers.
   ProcessPacket(ConstructResponseTrailersPacket(
       4, kFin, trailers.Clone(), &spdy_trailers_frame_length, &offset));
 
   delegate->WaitUntilNextCallback(kOnTrailersReceived);
-  trailers.erase(kFinalOffsetHeaderKey);
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, delegate->trailers());
   EXPECT_THAT(delegate->ReadData(cb.callback()), IsOk());
 
@@ -1463,7 +1475,7 @@
 TEST_P(BidirectionalStreamQuicImplTest, EarlyDataOverrideRequest) {
   SetRequest("PUT", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(0), !kFin, DEFAULT_PRIORITY,
@@ -1501,7 +1513,7 @@
   // Server sends the response headers.
   spdy::SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
   size_t spdy_response_headers_frame_length;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessPacket(ConstructResponseHeadersPacket(
       2, !kFin, std::move(response_headers),
       &spdy_response_headers_frame_length, &offset));
@@ -1521,13 +1533,14 @@
   size_t spdy_trailers_frame_length;
   spdy::SpdyHeaderBlock trailers;
   trailers["foo"] = "bar";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(kResponseBody));
+  trailers[quic::kFinalOffsetHeaderKey] =
+      base::IntToString(strlen(kResponseBody));
   // Server sends trailers.
   ProcessPacket(ConstructResponseTrailersPacket(
       4, kFin, trailers.Clone(), &spdy_trailers_frame_length, &offset));
 
   delegate->WaitUntilNextCallback(kOnTrailersReceived);
-  trailers.erase(kFinalOffsetHeaderKey);
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, delegate->trailers());
   EXPECT_THAT(delegate->ReadData(cb.callback()), IsOk());
 
@@ -1546,7 +1559,7 @@
 TEST_P(BidirectionalStreamQuicImplTest, InterleaveReadDataAndSendData) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(0), !kFin, DEFAULT_PRIORITY,
@@ -1635,13 +1648,13 @@
 TEST_P(BidirectionalStreamQuicImplTest, ServerSendsRstAfterHeaders) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  quic::QuicStreamOffset header_stream_offset = 0;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   AddWrite(ConstructRequestHeadersPacketInner(
       1, GetNthClientInitiatedStreamId(0), kFin, DEFAULT_PRIORITY,
       &spdy_request_headers_frame_length, &header_stream_offset));
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   AddWrite(ConstructInitialSettingsPacket(2, &header_stream_offset));
   Initialize();
 
@@ -1681,13 +1694,13 @@
 TEST_P(BidirectionalStreamQuicImplTest, ServerSendsRstAfterReadData) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  quic::QuicStreamOffset header_stream_offset = 0;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   AddWrite(ConstructRequestHeadersPacketInner(
       1, GetNthClientInitiatedStreamId(0), kFin, DEFAULT_PRIORITY,
       &spdy_request_headers_frame_length, &header_stream_offset));
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   AddWrite(ConstructInitialSettingsPacket(2, &header_stream_offset));
   // Why does QUIC ack Rst? Is this expected?
   AddWrite(ConstructClientAckPacket(3, 3, 1, 1));
@@ -1715,7 +1728,7 @@
   spdy::SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
 
   size_t spdy_response_headers_frame_length;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessPacket(ConstructResponseHeadersPacket(
       2, !kFin, std::move(response_headers),
       &spdy_response_headers_frame_length, &offset));
@@ -1746,7 +1759,7 @@
 TEST_P(BidirectionalStreamQuicImplTest, SessionClosedBeforeReadData) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(0), !kFin, DEFAULT_PRIORITY,
@@ -1774,7 +1787,7 @@
   spdy::SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
 
   size_t spdy_response_headers_frame_length;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessPacket(ConstructResponseHeadersPacket(
       2, !kFin, std::move(response_headers),
       &spdy_response_headers_frame_length, &offset));
@@ -1784,7 +1797,7 @@
   int rv = delegate->ReadData(cb.callback());
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
   session()->connection()->CloseConnection(
-      QUIC_NO_ERROR, "test", ConnectionCloseBehavior::SILENT_CLOSE);
+      quic::QUIC_NO_ERROR, "test", quic::ConnectionCloseBehavior::SILENT_CLOSE);
   delegate->WaitUntilNextCallback(kOnFailed);
 
   // Try to send data after OnFailed(), should not get called back.
@@ -1815,7 +1828,7 @@
 
   ConfirmHandshake();
   session()->connection()->CloseConnection(
-      QUIC_NO_ERROR, "test", ConnectionCloseBehavior::SILENT_CLOSE);
+      quic::QUIC_NO_ERROR, "test", quic::ConnectionCloseBehavior::SILENT_CLOSE);
 
   scoped_refptr<IOBuffer> read_buffer(new IOBuffer(kReadBufferSize));
   std::unique_ptr<TestDelegateBase> delegate(
@@ -1832,7 +1845,7 @@
   Initialize();
 
   session()->connection()->CloseConnection(
-      QUIC_NO_ERROR, "test", ConnectionCloseBehavior::SILENT_CLOSE);
+      quic::QUIC_NO_ERROR, "test", quic::ConnectionCloseBehavior::SILENT_CLOSE);
 
   BidirectionalStreamRequestInfo request;
   request.method = "POST";
@@ -1852,7 +1865,7 @@
 
 TEST_P(BidirectionalStreamQuicImplTest, SessionCloseDuringOnStreamReady) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWriteError(SYNCHRONOUS, ERR_CONNECTION_REFUSED);
 
@@ -1879,7 +1892,7 @@
 TEST_P(BidirectionalStreamQuicImplTest, DeleteStreamDuringOnStreamReady) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(0), !kFin, DEFAULT_PRIORITY,
@@ -1910,7 +1923,7 @@
 TEST_P(BidirectionalStreamQuicImplTest, DeleteStreamAfterReadData) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(0), !kFin, DEFAULT_PRIORITY,
@@ -1965,7 +1978,7 @@
 TEST_P(BidirectionalStreamQuicImplTest, DeleteStreamDuringOnHeadersReceived) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(0), !kFin, DEFAULT_PRIORITY,
@@ -2012,7 +2025,7 @@
 TEST_P(BidirectionalStreamQuicImplTest, DeleteStreamDuringOnDataRead) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(0), !kFin, DEFAULT_PRIORITY,
@@ -2070,7 +2083,7 @@
   const char kBody[] = "here is some data";
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(1, &header_stream_offset));
   AddWrite(ConstructRequestHeadersPacketInner(
       2, GetNthClientInitiatedStreamId(0), !kFin, DEFAULT_PRIORITY,
@@ -2137,8 +2150,8 @@
 TEST_P(BidirectionalStreamQuicImplTest, DeleteStreamDuringOnTrailersReceived) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   AddWrite(ConstructRequestHeadersPacket(1, kFin, DEFAULT_PRIORITY,
                                          &spdy_request_headers_frame_length));
   AddWrite(ConstructClientAckPacket(2, 3, 1, 1));  // Ack the data packet
@@ -2166,7 +2179,7 @@
   // Server sends the response headers.
   spdy::SpdyHeaderBlock response_headers = ConstructResponseHeaders("200");
 
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   size_t spdy_response_headers_frame_length;
   ProcessPacket(ConstructResponseHeadersPacket(
       2, !kFin, std::move(response_headers),
@@ -2190,13 +2203,14 @@
   size_t spdy_trailers_frame_length;
   spdy::SpdyHeaderBlock trailers;
   trailers["foo"] = "bar";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(kResponseBody));
+  trailers[quic::kFinalOffsetHeaderKey] =
+      base::IntToString(strlen(kResponseBody));
   // Server sends trailers.
   ProcessPacket(ConstructResponseTrailersPacket(
       4, kFin, trailers.Clone(), &spdy_trailers_frame_length, &offset));
 
   delegate->WaitUntilNextCallback(kOnTrailersReceived);
-  trailers.erase(kFinalOffsetHeaderKey);
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, delegate->trailers());
 
   base::RunLoop().RunUntilIdle();
@@ -2228,7 +2242,7 @@
   delegate->Start(&request, net_log().bound(),
                   session()->CreateHandle(destination_));
   // Now closes the underlying session.
-  session_->CloseSessionOnError(ERR_ABORTED, QUIC_INTERNAL_ERROR);
+  session_->CloseSessionOnError(ERR_ABORTED, quic::QUIC_INTERNAL_ERROR);
   delegate->WaitUntilNextCallback(kOnFailed);
 
   EXPECT_THAT(delegate->error(), IsError(ERR_CONNECTION_CLOSED));
diff --git a/net/quic/chromium/crypto/channel_id_chromium.cc b/net/quic/chromium/crypto/channel_id_chromium.cc
index eb1ca91f..89ac1e11 100644
--- a/net/quic/chromium/crypto/channel_id_chromium.cc
+++ b/net/quic/chromium/crypto/channel_id_chromium.cc
@@ -22,18 +22,18 @@
 
 ChannelIDKeyChromium::~ChannelIDKeyChromium() {}
 
-bool ChannelIDKeyChromium::Sign(QuicStringPiece signed_data,
+bool ChannelIDKeyChromium::Sign(quic::QuicStringPiece signed_data,
                                 std::string* out_signature) const {
   std::unique_ptr<crypto::ECSignatureCreator> sig_creator(
       crypto::ECSignatureCreator::Create(ec_private_key_.get()));
   if (!sig_creator) {
     return false;
   }
-  const size_t len1 = strlen(ChannelIDVerifier::kContextStr) + 1;
-  const size_t len2 = strlen(ChannelIDVerifier::kClientToServerStr) + 1;
+  const size_t len1 = strlen(quic::ChannelIDVerifier::kContextStr) + 1;
+  const size_t len2 = strlen(quic::ChannelIDVerifier::kClientToServerStr) + 1;
   std::vector<uint8_t> data(len1 + len2 + signed_data.size());
-  memcpy(&data[0], ChannelIDVerifier::kContextStr, len1);
-  memcpy(&data[len1], ChannelIDVerifier::kClientToServerStr, len2);
+  memcpy(&data[0], quic::ChannelIDVerifier::kContextStr, len1);
+  memcpy(&data[len1], quic::ChannelIDVerifier::kClientToServerStr, len2);
   memcpy(&data[len1 + len2], signed_data.data(), signed_data.size());
   std::vector<uint8_t> der_signature;
   if (!sig_creator->Sign(&data[0], data.size(), &der_signature)) {
@@ -57,18 +57,19 @@
 }
 
 // A Job handles the lookup of a single channel ID.  It is owned by the
-// ChannelIDSource. If the operation can not complete synchronously, it will
-// notify the ChannelIDSource upon completion.
+// quic::ChannelIDSource. If the operation can not complete synchronously, it
+// will notify the quic::ChannelIDSource upon completion.
 class ChannelIDSourceChromium::Job {
  public:
   Job(ChannelIDSourceChromium* channel_id_source,
       ChannelIDService* channel_id_service);
 
-  // Starts the channel ID lookup.  If |QUIC_PENDING| is returned, then
+  // Starts the channel ID lookup.  If |quic::QUIC_PENDING| is returned, then
   // |callback| will be invoked asynchronously when the operation completes.
-  QuicAsyncStatus GetChannelIDKey(const std::string& hostname,
-                                  std::unique_ptr<ChannelIDKey>* channel_id_key,
-                                  ChannelIDSourceCallback* callback);
+  quic::QuicAsyncStatus GetChannelIDKey(
+      const std::string& hostname,
+      std::unique_ptr<quic::ChannelIDKey>* channel_id_key,
+      quic::ChannelIDSourceCallback* callback);
 
  private:
   enum State {
@@ -93,9 +94,9 @@
   // |hostname| specifies the hostname for which we need a channel ID.
   std::string hostname_;
 
-  std::unique_ptr<ChannelIDSourceCallback> callback_;
+  std::unique_ptr<quic::ChannelIDSourceCallback> callback_;
 
-  std::unique_ptr<ChannelIDKey> channel_id_key_;
+  std::unique_ptr<quic::ChannelIDKey> channel_id_key_;
 
   State next_state_;
 
@@ -108,16 +109,16 @@
       channel_id_service_(channel_id_service),
       next_state_(STATE_NONE) {}
 
-QuicAsyncStatus ChannelIDSourceChromium::Job::GetChannelIDKey(
+quic::QuicAsyncStatus ChannelIDSourceChromium::Job::GetChannelIDKey(
     const std::string& hostname,
-    std::unique_ptr<ChannelIDKey>* channel_id_key,
-    ChannelIDSourceCallback* callback) {
+    std::unique_ptr<quic::ChannelIDKey>* channel_id_key,
+    quic::ChannelIDSourceCallback* callback) {
   DCHECK(channel_id_key);
   DCHECK(callback);
 
   if (STATE_NONE != next_state_) {
     DLOG(DFATAL) << "GetChannelIDKey has begun";
-    return QUIC_FAILURE;
+    return quic::QUIC_FAILURE;
   }
 
   channel_id_key_.reset();
@@ -128,13 +129,13 @@
   switch (DoLoop(OK)) {
     case OK:
       *channel_id_key = std::move(channel_id_key_);
-      return QUIC_SUCCESS;
+      return quic::QUIC_SUCCESS;
     case ERR_IO_PENDING:
       callback_.reset(callback);
-      return QUIC_PENDING;
+      return quic::QUIC_PENDING;
     default:
       channel_id_key->reset();
-      return QUIC_FAILURE;
+      return quic::QUIC_FAILURE;
   }
 }
 
@@ -164,7 +165,8 @@
 void ChannelIDSourceChromium::Job::OnIOComplete(int result) {
   int rv = DoLoop(result);
   if (rv != ERR_IO_PENDING) {
-    std::unique_ptr<ChannelIDSourceCallback> callback(callback_.release());
+    std::unique_ptr<quic::ChannelIDSourceCallback> callback(
+        callback_.release());
     callback->Run(&channel_id_key_);
     // Will delete |this|.
     channel_id_source_->OnJobComplete(this);
@@ -201,14 +203,14 @@
 ChannelIDSourceChromium::~ChannelIDSourceChromium() {
 }
 
-QuicAsyncStatus ChannelIDSourceChromium::GetChannelIDKey(
+quic::QuicAsyncStatus ChannelIDSourceChromium::GetChannelIDKey(
     const std::string& hostname,
-    std::unique_ptr<ChannelIDKey>* channel_id_key,
-    ChannelIDSourceCallback* callback) {
+    std::unique_ptr<quic::ChannelIDKey>* channel_id_key,
+    quic::ChannelIDSourceCallback* callback) {
   std::unique_ptr<Job> job = std::make_unique<Job>(this, channel_id_service_);
-  QuicAsyncStatus status =
+  quic::QuicAsyncStatus status =
       job->GetChannelIDKey(hostname, channel_id_key, callback);
-  if (status == QUIC_PENDING) {
+  if (status == quic::QUIC_PENDING) {
     Job* job_ptr = job.get();
     active_jobs_[job_ptr] = std::move(job);
   }
diff --git a/net/quic/chromium/crypto/channel_id_chromium.h b/net/quic/chromium/crypto/channel_id_chromium.h
index 2a76350..741435e 100644
--- a/net/quic/chromium/crypto/channel_id_chromium.h
+++ b/net/quic/chromium/crypto/channel_id_chromium.h
@@ -22,14 +22,14 @@
 
 class ChannelIDService;
 
-class NET_EXPORT_PRIVATE ChannelIDKeyChromium : public ChannelIDKey {
+class NET_EXPORT_PRIVATE ChannelIDKeyChromium : public quic::ChannelIDKey {
  public:
   explicit ChannelIDKeyChromium(
       std::unique_ptr<crypto::ECPrivateKey> ec_private_key);
   ~ChannelIDKeyChromium() override;
 
-  // ChannelIDKey interface
-  bool Sign(QuicStringPiece signed_data,
+  // quic::ChannelIDKey interface
+  bool Sign(quic::QuicStringPiece signed_data,
             std::string* out_signature) const override;
   std::string SerializeKey() const override;
 
@@ -37,16 +37,17 @@
   std::unique_ptr<crypto::ECPrivateKey> ec_private_key_;
 };
 
-// ChannelIDSourceChromium implements the QUIC ChannelIDSource interface.
-class ChannelIDSourceChromium : public ChannelIDSource {
+// ChannelIDSourceChromium implements the QUIC quic::ChannelIDSource interface.
+class ChannelIDSourceChromium : public quic::ChannelIDSource {
  public:
   explicit ChannelIDSourceChromium(ChannelIDService* channel_id_service);
   ~ChannelIDSourceChromium() override;
 
-  // ChannelIDSource interface
-  QuicAsyncStatus GetChannelIDKey(const std::string& hostname,
-                                  std::unique_ptr<ChannelIDKey>* channel_id_key,
-                                  ChannelIDSourceCallback* callback) override;
+  // quic::ChannelIDSource interface
+  quic::QuicAsyncStatus GetChannelIDKey(
+      const std::string& hostname,
+      std::unique_ptr<quic::ChannelIDKey>* channel_id_key,
+      quic::ChannelIDSourceCallback* callback) override;
 
  private:
   class Job;
diff --git a/net/quic/chromium/crypto/proof_source_chromium.cc b/net/quic/chromium/crypto/proof_source_chromium.cc
index 102e769..9b5a6ba 100644
--- a/net/quic/chromium/crypto/proof_source_chromium.cc
+++ b/net/quic/chromium/crypto/proof_source_chromium.cc
@@ -45,7 +45,7 @@
     certs.emplace_back(
         x509_util::CryptoBufferAsStringPiece(cert->cert_buffer()));
   }
-  chain_ = new ProofSource::Chain(certs);
+  chain_ = new quic::ProofSource::Chain(certs);
 
   std::string key_data;
   if (!base::ReadFileToString(key_path, &key_data)) {
@@ -74,13 +74,13 @@
 }
 
 bool ProofSourceChromium::GetProofInner(
-    const QuicSocketAddress& server_addr,
+    const quic::QuicSocketAddress& server_addr,
     const string& hostname,
     const string& server_config,
-    QuicTransportVersion quic_version,
-    QuicStringPiece chlo_hash,
-    QuicReferenceCountedPointer<ProofSource::Chain>* out_chain,
-    QuicCryptoProof* proof) {
+    quic::QuicTransportVersion quic_version,
+    quic::QuicStringPiece chlo_hash,
+    quic::QuicReferenceCountedPointer<quic::ProofSource::Chain>* out_chain,
+    quic::QuicCryptoProof* proof) {
   DCHECK(proof != nullptr);
   DCHECK(private_key_.get()) << " this: " << this;
 
@@ -95,8 +95,8 @@
       !EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, -1) ||
       !EVP_DigestSignUpdate(
           sign_context.get(),
-          reinterpret_cast<const uint8_t*>(kProofSignatureLabel),
-          sizeof(kProofSignatureLabel)) ||
+          reinterpret_cast<const uint8_t*>(quic::kProofSignatureLabel),
+          sizeof(quic::kProofSignatureLabel)) ||
       !EVP_DigestSignUpdate(sign_context.get(),
                             reinterpret_cast<const uint8_t*>(&len_tmp),
                             sizeof(len_tmp)) ||
@@ -129,35 +129,35 @@
   return true;
 }
 
-void ProofSourceChromium::GetProof(const QuicSocketAddress& server_addr,
+void ProofSourceChromium::GetProof(const quic::QuicSocketAddress& server_addr,
                                    const std::string& hostname,
                                    const std::string& server_config,
-                                   QuicTransportVersion quic_version,
-                                   QuicStringPiece chlo_hash,
+                                   quic::QuicTransportVersion quic_version,
+                                   quic::QuicStringPiece chlo_hash,
                                    std::unique_ptr<Callback> callback) {
   // As a transitional implementation, just call the synchronous version of
   // GetProof, then invoke the callback with the results and destroy it.
-  QuicReferenceCountedPointer<ProofSource::Chain> chain;
+  quic::QuicReferenceCountedPointer<quic::ProofSource::Chain> chain;
   string signature;
   string leaf_cert_sct;
-  QuicCryptoProof out_proof;
+  quic::QuicCryptoProof out_proof;
 
   const bool ok = GetProofInner(server_addr, hostname, server_config,
                                 quic_version, chlo_hash, &chain, &out_proof);
   callback->Run(ok, chain, out_proof, nullptr /* details */);
 }
 
-QuicReferenceCountedPointer<ProofSource::Chain>
-ProofSourceChromium::GetCertChain(const QuicSocketAddress& server_address,
+quic::QuicReferenceCountedPointer<quic::ProofSource::Chain>
+ProofSourceChromium::GetCertChain(const quic::QuicSocketAddress& server_address,
                                   const std::string& hostname) {
   return chain_;
 }
 
 void ProofSourceChromium::ComputeTlsSignature(
-    const QuicSocketAddress& server_address,
+    const quic::QuicSocketAddress& server_address,
     const std::string& hostname,
     uint16_t signature_algorithm,
-    QuicStringPiece in,
+    quic::QuicStringPiece in,
     std::unique_ptr<SignatureCallback> callback) {
   crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
   bssl::ScopedEVP_MD_CTX sign_context;
diff --git a/net/quic/chromium/crypto/proof_source_chromium.h b/net/quic/chromium/crypto/proof_source_chromium.h
index c965b5ec..8d29e23 100644
--- a/net/quic/chromium/crypto/proof_source_chromium.h
+++ b/net/quic/chromium/crypto/proof_source_chromium.h
@@ -18,9 +18,9 @@
 
 namespace net {
 
-// ProofSourceChromium implements the QUIC ProofSource interface.
+// ProofSourceChromium implements the QUIC quic::ProofSource interface.
 // TODO(rtenneti): implement details of this class.
-class NET_EXPORT_PRIVATE ProofSourceChromium : public ProofSource {
+class NET_EXPORT_PRIVATE ProofSourceChromium : public quic::ProofSource {
  public:
   ProofSourceChromium();
   ~ProofSourceChromium() override;
@@ -32,36 +32,37 @@
                   const base::FilePath& key_path,
                   const base::FilePath& sct_path);
 
-  // ProofSource interface
-  void GetProof(const QuicSocketAddress& server_ip,
+  // quic::ProofSource interface
+  void GetProof(const quic::QuicSocketAddress& server_ip,
                 const std::string& hostname,
                 const std::string& server_config,
-                QuicTransportVersion quic_version,
-                QuicStringPiece chlo_hash,
+                quic::QuicTransportVersion quic_version,
+                quic::QuicStringPiece chlo_hash,
                 std::unique_ptr<Callback> callback) override;
 
-  QuicReferenceCountedPointer<Chain> GetCertChain(
-      const QuicSocketAddress& server_address,
+  quic::QuicReferenceCountedPointer<Chain> GetCertChain(
+      const quic::QuicSocketAddress& server_address,
       const std::string& hostname) override;
 
   void ComputeTlsSignature(
-      const QuicSocketAddress& server_address,
+      const quic::QuicSocketAddress& server_address,
       const std::string& hostname,
       uint16_t signature_algorithm,
-      QuicStringPiece in,
+      quic::QuicStringPiece in,
       std::unique_ptr<SignatureCallback> callback) override;
 
  private:
-  bool GetProofInner(const QuicSocketAddress& server_ip,
-                     const std::string& hostname,
-                     const std::string& server_config,
-                     QuicTransportVersion quic_version,
-                     QuicStringPiece chlo_hash,
-                     QuicReferenceCountedPointer<ProofSource::Chain>* out_chain,
-                     QuicCryptoProof* proof);
+  bool GetProofInner(
+      const quic::QuicSocketAddress& server_ip,
+      const std::string& hostname,
+      const std::string& server_config,
+      quic::QuicTransportVersion quic_version,
+      quic::QuicStringPiece chlo_hash,
+      quic::QuicReferenceCountedPointer<quic::ProofSource::Chain>* out_chain,
+      quic::QuicCryptoProof* proof);
 
   std::unique_ptr<crypto::RSAPrivateKey> private_key_;
-  QuicReferenceCountedPointer<ProofSource::Chain> chain_;
+  quic::QuicReferenceCountedPointer<quic::ProofSource::Chain> chain_;
   std::string signed_certificate_timestamp_;
 
   DISALLOW_COPY_AND_ASSIGN(ProofSourceChromium);
diff --git a/net/quic/chromium/crypto/proof_test_chromium.cc b/net/quic/chromium/crypto/proof_test_chromium.cc
index 7ff78ffd..1b858e2 100644
--- a/net/quic/chromium/crypto/proof_test_chromium.cc
+++ b/net/quic/chromium/crypto/proof_test_chromium.cc
@@ -25,10 +25,10 @@
 namespace test {
 namespace {
 
-// TestProofVerifierCallback is a simple callback for a ProofVerifier that
+// TestProofVerifierCallback is a simple callback for a quic::ProofVerifier that
 // signals a TestCompletionCallback when called and stores the results from the
-// ProofVerifier in pointers passed to the constructor.
-class TestProofVerifierCallback : public ProofVerifierCallback {
+// quic::ProofVerifier in pointers passed to the constructor.
+class TestProofVerifierCallback : public quic::ProofVerifierCallback {
  public:
   TestProofVerifierCallback(TestCompletionCallback* comp_callback,
                             bool* ok,
@@ -37,7 +37,7 @@
 
   void Run(bool ok,
            const string& error_details,
-           std::unique_ptr<ProofVerifyDetails>* details) override {
+           std::unique_ptr<quic::ProofVerifyDetails>* details) override {
     *ok_ = ok;
     *error_details_ = error_details;
 
@@ -52,56 +52,58 @@
 
 // RunVerification runs |verifier->VerifyProof| and asserts that the result
 // matches |expected_ok|.
-void RunVerification(ProofVerifier* verifier,
+void RunVerification(quic::ProofVerifier* verifier,
                      const string& hostname,
                      const uint16_t port,
                      const string& server_config,
-                     QuicTransportVersion quic_version,
-                     QuicStringPiece chlo_hash,
+                     quic::QuicTransportVersion quic_version,
+                     quic::QuicStringPiece chlo_hash,
                      const std::vector<string>& certs,
                      const string& proof,
                      bool expected_ok) {
-  std::unique_ptr<ProofVerifyDetails> details;
+  std::unique_ptr<quic::ProofVerifyDetails> details;
   TestCompletionCallback comp_callback;
   bool ok;
   string error_details;
-  std::unique_ptr<ProofVerifyContext> verify_context(
-      crypto_test_utils::ProofVerifyContextForTesting());
+  std::unique_ptr<quic::ProofVerifyContext> verify_context(
+      quic::test::crypto_test_utils::ProofVerifyContextForTesting());
   std::unique_ptr<TestProofVerifierCallback> callback(
       new TestProofVerifierCallback(&comp_callback, &ok, &error_details));
 
-  QuicAsyncStatus status = verifier->VerifyProof(
+  quic::QuicAsyncStatus status = verifier->VerifyProof(
       hostname, port, server_config, quic_version, chlo_hash, certs, "", proof,
       verify_context.get(), &error_details, &details, std::move(callback));
 
   switch (status) {
-    case QUIC_FAILURE:
+    case quic::QUIC_FAILURE:
       ASSERT_FALSE(expected_ok);
       ASSERT_NE("", error_details);
       return;
-    case QUIC_SUCCESS:
+    case quic::QUIC_SUCCESS:
       ASSERT_TRUE(expected_ok);
       ASSERT_EQ("", error_details);
       return;
-    case QUIC_PENDING:
+    case quic::QUIC_PENDING:
       comp_callback.WaitForResult();
       ASSERT_EQ(expected_ok, ok);
       break;
   }
 }
 
-class TestCallback : public ProofSource::Callback {
+class TestCallback : public quic::ProofSource::Callback {
  public:
-  explicit TestCallback(bool* called,
-                        bool* ok,
-                        QuicReferenceCountedPointer<ProofSource::Chain>* chain,
-                        QuicCryptoProof* proof)
+  explicit TestCallback(
+      bool* called,
+      bool* ok,
+      quic::QuicReferenceCountedPointer<quic::ProofSource::Chain>* chain,
+      quic::QuicCryptoProof* proof)
       : called_(called), ok_(ok), chain_(chain), proof_(proof) {}
 
-  void Run(bool ok,
-           const QuicReferenceCountedPointer<ProofSource::Chain>& chain,
-           const QuicCryptoProof& proof,
-           std::unique_ptr<ProofSource::Details> /* details */) override {
+  void Run(
+      bool ok,
+      const quic::QuicReferenceCountedPointer<quic::ProofSource::Chain>& chain,
+      const quic::QuicCryptoProof& proof,
+      std::unique_ptr<quic::ProofSource::Details> /* details */) override {
     *ok_ = ok;
     *chain_ = chain;
     *proof_ = proof;
@@ -111,44 +113,47 @@
  private:
   bool* called_;
   bool* ok_;
-  QuicReferenceCountedPointer<ProofSource::Chain>* chain_;
-  QuicCryptoProof* proof_;
+  quic::QuicReferenceCountedPointer<quic::ProofSource::Chain>* chain_;
+  quic::QuicCryptoProof* proof_;
 };
 
-class ProofTest : public ::testing::TestWithParam<QuicTransportVersion> {};
+class ProofTest : public ::testing::TestWithParam<quic::QuicTransportVersion> {
+};
 
 }  // namespace
 
-INSTANTIATE_TEST_CASE_P(QuicTransportVersion,
-                        ProofTest,
-                        ::testing::ValuesIn(AllSupportedTransportVersions()));
+INSTANTIATE_TEST_CASE_P(
+    QuicTransportVersion,
+    ProofTest,
+    ::testing::ValuesIn(quic::AllSupportedTransportVersions()));
 
-// TODO(rtenneti): Enable testing of ProofVerifier. See http://crbug.com/514468.
+// TODO(rtenneti): Enable testing of quic::ProofVerifier. See
+// http://crbug.com/514468.
 TEST_P(ProofTest, DISABLED_Verify) {
-  std::unique_ptr<ProofSource> source(
-      crypto_test_utils::ProofSourceForTesting());
-  std::unique_ptr<ProofVerifier> verifier(
-      crypto_test_utils::ProofVerifierForTesting());
+  std::unique_ptr<quic::ProofSource> source(
+      quic::test::crypto_test_utils::ProofSourceForTesting());
+  std::unique_ptr<quic::ProofVerifier> verifier(
+      quic::test::crypto_test_utils::ProofVerifierForTesting());
 
   const string server_config = "server config bytes";
   const string hostname = "test.example.com";
   const uint16_t port = 8443;
   const string first_chlo_hash = "first chlo hash bytes";
   const string second_chlo_hash = "first chlo hash bytes";
-  const QuicTransportVersion quic_version = GetParam();
+  const quic::QuicTransportVersion quic_version = GetParam();
 
   bool called = false;
   bool first_called = false;
   bool ok, first_ok;
-  QuicReferenceCountedPointer<ProofSource::Chain> chain;
-  QuicReferenceCountedPointer<ProofSource::Chain> first_chain;
+  quic::QuicReferenceCountedPointer<quic::ProofSource::Chain> chain;
+  quic::QuicReferenceCountedPointer<quic::ProofSource::Chain> first_chain;
   string error_details;
-  QuicCryptoProof proof, first_proof;
-  QuicSocketAddress server_addr;
+  quic::QuicCryptoProof proof, first_proof;
+  quic::QuicSocketAddress server_addr;
 
-  std::unique_ptr<ProofSource::Callback> cb(
+  std::unique_ptr<quic::ProofSource::Callback> cb(
       new TestCallback(&called, &ok, &chain, &proof));
-  std::unique_ptr<ProofSource::Callback> first_cb(
+  std::unique_ptr<quic::ProofSource::Callback> first_cb(
       new TestCallback(&first_called, &first_ok, &first_chain, &first_proof));
 
   // GetProof here expects the async method to invoke the callback
@@ -192,7 +197,7 @@
 
 namespace {
 
-class TestingSignatureCallback : public ProofSource::SignatureCallback {
+class TestingSignatureCallback : public quic::ProofSource::SignatureCallback {
  public:
   TestingSignatureCallback(bool* ok_out, std::string* signature_out)
       : ok_out_(ok_out), signature_out_(signature_out) {}
@@ -210,13 +215,13 @@
 }  // namespace
 
 TEST_P(ProofTest, TlsSignature) {
-  std::unique_ptr<ProofSource> source(
-      crypto_test_utils::ProofSourceForTesting());
+  std::unique_ptr<quic::ProofSource> source(
+      quic::test::crypto_test_utils::ProofSourceForTesting());
 
-  QuicSocketAddress server_address;
+  quic::QuicSocketAddress server_address;
   const string hostname = "test.example.com";
 
-  QuicReferenceCountedPointer<ProofSource::Chain> chain =
+  quic::QuicReferenceCountedPointer<quic::ProofSource::Chain> chain =
       source->GetCertChain(server_address, hostname);
   ASSERT_GT(chain->certs.size(), 0ul);
 
@@ -233,7 +238,7 @@
   string sig;
   bool success;
   std::unique_ptr<TestingSignatureCallback> callback =
-      QuicMakeUnique<TestingSignatureCallback>(&success, &sig);
+      quic::QuicMakeUnique<TestingSignatureCallback>(&success, &sig);
   source->ComputeTlsSignature(server_address, hostname, SSL_SIGN_RSA_PSS_SHA256,
                               to_be_signed, std::move(callback));
   EXPECT_TRUE(success);
@@ -264,19 +269,19 @@
 }
 
 TEST_P(ProofTest, UseAfterFree) {
-  std::unique_ptr<ProofSource> source(
-      crypto_test_utils::ProofSourceForTesting());
+  std::unique_ptr<quic::ProofSource> source(
+      quic::test::crypto_test_utils::ProofSourceForTesting());
 
   const string server_config = "server config bytes";
   const string hostname = "test.example.com";
   const string chlo_hash = "proof nonce bytes";
   bool called = false;
   bool ok;
-  QuicReferenceCountedPointer<ProofSource::Chain> chain;
+  quic::QuicReferenceCountedPointer<quic::ProofSource::Chain> chain;
   string error_details;
-  QuicCryptoProof proof;
-  QuicSocketAddress server_addr;
-  std::unique_ptr<ProofSource::Callback> cb(
+  quic::QuicCryptoProof proof;
+  quic::QuicSocketAddress server_addr;
+  std::unique_ptr<quic::ProofSource::Callback> cb(
       new TestCallback(&called, &ok, &chain, &proof));
 
   // GetProof here expects the async method to invoke the callback
diff --git a/net/quic/chromium/crypto/proof_verifier_chromium.cc b/net/quic/chromium/crypto/proof_verifier_chromium.cc
index dac1a39..33044dd4 100644
--- a/net/quic/chromium/crypto/proof_verifier_chromium.cc
+++ b/net/quic/chromium/crypto/proof_verifier_chromium.cc
@@ -39,7 +39,7 @@
 ProofVerifyDetailsChromium::ProofVerifyDetailsChromium(
     const ProofVerifyDetailsChromium&) = default;
 
-ProofVerifyDetails* ProofVerifyDetailsChromium::Clone() const {
+quic::ProofVerifyDetails* ProofVerifyDetailsChromium::Clone() const {
   ProofVerifyDetailsChromium* other = new ProofVerifyDetailsChromium;
   other->cert_verify_result = cert_verify_result;
   other->ct_verify_result = ct_verify_result;
@@ -47,8 +47,8 @@
 }
 
 // A Job handles the verification of a single proof.  It is owned by the
-// ProofVerifier. If the verification can not complete synchronously, it
-// will notify the ProofVerifier upon completion.
+// quic::ProofVerifier. If the verification can not complete synchronously, it
+// will notify the quic::ProofVerifier upon completion.
 class ProofVerifierChromium::Job {
  public:
   Job(ProofVerifierChromium* proof_verifier,
@@ -60,30 +60,30 @@
       const NetLogWithSource& net_log);
   ~Job();
 
-  // Starts the proof verification.  If |QUIC_PENDING| is returned, then
+  // Starts the proof verification.  If |quic::QUIC_PENDING| is returned, then
   // |callback| will be invoked asynchronously when the verification completes.
-  QuicAsyncStatus VerifyProof(
+  quic::QuicAsyncStatus VerifyProof(
       const std::string& hostname,
       const uint16_t port,
       const std::string& server_config,
-      QuicTransportVersion quic_version,
-      QuicStringPiece chlo_hash,
+      quic::QuicTransportVersion quic_version,
+      quic::QuicStringPiece chlo_hash,
       const std::vector<std::string>& certs,
       const std::string& cert_sct,
       const std::string& signature,
       std::string* error_details,
-      std::unique_ptr<ProofVerifyDetails>* verify_details,
-      std::unique_ptr<ProofVerifierCallback> callback);
+      std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+      std::unique_ptr<quic::ProofVerifierCallback> callback);
 
-  // Starts the certificate chain verification of |certs|.  If |QUIC_PENDING| is
-  // returned, then |callback| will be invoked asynchronously when the
-  // verification completes.
-  QuicAsyncStatus VerifyCertChain(
+  // Starts the certificate chain verification of |certs|.  If
+  // |quic::QUIC_PENDING| is returned, then |callback| will be invoked
+  // asynchronously when the verification completes.
+  quic::QuicAsyncStatus VerifyCertChain(
       const std::string& hostname,
       const std::vector<std::string>& certs,
       std::string* error_details,
-      std::unique_ptr<ProofVerifyDetails>* verify_details,
-      std::unique_ptr<ProofVerifierCallback> callback);
+      std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+      std::unique_ptr<quic::ProofVerifierCallback> callback);
 
  private:
   enum State {
@@ -93,17 +93,18 @@
   };
 
   // Convert |certs| to |cert_|(X509Certificate). Returns true if successful.
-  bool GetX509Certificate(const std::vector<string>& certs,
-                          std::string* error_details,
-                          std::unique_ptr<ProofVerifyDetails>* verify_details);
+  bool GetX509Certificate(
+      const std::vector<string>& certs,
+      std::string* error_details,
+      std::unique_ptr<quic::ProofVerifyDetails>* verify_details);
 
   // Start the cert verification.
-  QuicAsyncStatus VerifyCert(
+  quic::QuicAsyncStatus VerifyCert(
       const string& hostname,
       const uint16_t port,
       std::string* error_details,
-      std::unique_ptr<ProofVerifyDetails>* verify_details,
-      std::unique_ptr<ProofVerifierCallback> callback);
+      std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+      std::unique_ptr<quic::ProofVerifierCallback> callback);
 
   int DoLoop(int last_io_result);
   void OnIOComplete(int result);
@@ -111,8 +112,8 @@
   int DoVerifyCertComplete(int result);
 
   bool VerifySignature(const std::string& signed_data,
-                       QuicTransportVersion quic_version,
-                       QuicStringPiece chlo_hash,
+                       quic::QuicTransportVersion quic_version,
+                       quic::QuicStringPiece chlo_hash,
                        const std::string& signature,
                        const std::string& cert);
 
@@ -134,7 +135,7 @@
   // |port| specifies the target port for the connection.
   uint16_t port_;
 
-  std::unique_ptr<ProofVerifierCallback> callback_;
+  std::unique_ptr<quic::ProofVerifierCallback> callback_;
   std::unique_ptr<ProofVerifyDetailsChromium> verify_details_;
   std::string error_details_;
 
@@ -193,18 +194,18 @@
   }
 }
 
-QuicAsyncStatus ProofVerifierChromium::Job::VerifyProof(
+quic::QuicAsyncStatus ProofVerifierChromium::Job::VerifyProof(
     const string& hostname,
     const uint16_t port,
     const string& server_config,
-    QuicTransportVersion quic_version,
-    QuicStringPiece chlo_hash,
+    quic::QuicTransportVersion quic_version,
+    quic::QuicStringPiece chlo_hash,
     const std::vector<string>& certs,
     const std::string& cert_sct,
     const string& signature,
     std::string* error_details,
-    std::unique_ptr<ProofVerifyDetails>* verify_details,
-    std::unique_ptr<ProofVerifierCallback> callback) {
+    std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+    std::unique_ptr<quic::ProofVerifierCallback> callback) {
   DCHECK(error_details);
   DCHECK(verify_details);
   DCHECK(callback);
@@ -214,14 +215,14 @@
   if (STATE_NONE != next_state_) {
     *error_details = "Certificate is already set and VerifyProof has begun";
     DLOG(DFATAL) << *error_details;
-    return QUIC_FAILURE;
+    return quic::QUIC_FAILURE;
   }
 
   verify_details_.reset(new ProofVerifyDetailsChromium);
 
   // Converts |certs| to |cert_|.
   if (!GetX509Certificate(certs, error_details, verify_details))
-    return QUIC_FAILURE;
+    return quic::QUIC_FAILURE;
 
   // Note that this is a completely synchronous operation: The CT Log Verifier
   // gets all the data it needs for SCT verification and does not do any
@@ -239,7 +240,7 @@
     DLOG(WARNING) << *error_details;
     verify_details_->cert_verify_result.cert_status = CERT_STATUS_INVALID;
     *verify_details = std::move(verify_details_);
-    return QUIC_FAILURE;
+    return quic::QUIC_FAILURE;
   }
 
   DCHECK(enforce_policy_checking_);
@@ -247,12 +248,12 @@
                     std::move(callback));
 }
 
-QuicAsyncStatus ProofVerifierChromium::Job::VerifyCertChain(
+quic::QuicAsyncStatus ProofVerifierChromium::Job::VerifyCertChain(
     const string& hostname,
     const std::vector<string>& certs,
     std::string* error_details,
-    std::unique_ptr<ProofVerifyDetails>* verify_details,
-    std::unique_ptr<ProofVerifierCallback> callback) {
+    std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+    std::unique_ptr<quic::ProofVerifierCallback> callback) {
   DCHECK(error_details);
   DCHECK(verify_details);
   DCHECK(callback);
@@ -262,14 +263,14 @@
   if (STATE_NONE != next_state_) {
     *error_details = "Certificate is already set and VerifyCertChain has begun";
     DLOG(DFATAL) << *error_details;
-    return QUIC_FAILURE;
+    return quic::QUIC_FAILURE;
   }
 
   verify_details_.reset(new ProofVerifyDetailsChromium);
 
   // Converts |certs| to |cert_|.
   if (!GetX509Certificate(certs, error_details, verify_details))
-    return QUIC_FAILURE;
+    return quic::QUIC_FAILURE;
 
   enforce_policy_checking_ = false;
   // |port| is not needed because |enforce_policy_checking_| is false.
@@ -280,7 +281,7 @@
 bool ProofVerifierChromium::Job::GetX509Certificate(
     const std::vector<string>& certs,
     std::string* error_details,
-    std::unique_ptr<ProofVerifyDetails>* verify_details) {
+    std::unique_ptr<quic::ProofVerifyDetails>* verify_details) {
   if (certs.empty()) {
     *error_details = "Failed to create certificate chain. Certs are empty.";
     DLOG(WARNING) << *error_details;
@@ -290,9 +291,9 @@
   }
 
   // Convert certs to X509Certificate.
-  std::vector<QuicStringPiece> cert_pieces(certs.size());
+  std::vector<quic::QuicStringPiece> cert_pieces(certs.size());
   for (unsigned i = 0; i < certs.size(); i++) {
-    cert_pieces[i] = QuicStringPiece(certs[i]);
+    cert_pieces[i] = quic::QuicStringPiece(certs[i]);
   }
   cert_ = X509Certificate::CreateFromDERCertChain(cert_pieces);
   if (!cert_.get()) {
@@ -305,12 +306,12 @@
   return true;
 }
 
-QuicAsyncStatus ProofVerifierChromium::Job::VerifyCert(
+quic::QuicAsyncStatus ProofVerifierChromium::Job::VerifyCert(
     const string& hostname,
     const uint16_t port,
     std::string* error_details,
-    std::unique_ptr<ProofVerifyDetails>* verify_details,
-    std::unique_ptr<ProofVerifierCallback> callback) {
+    std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+    std::unique_ptr<quic::ProofVerifierCallback> callback) {
   hostname_ = hostname;
   port_ = port;
 
@@ -318,14 +319,14 @@
   switch (DoLoop(OK)) {
     case OK:
       *verify_details = std::move(verify_details_);
-      return QUIC_SUCCESS;
+      return quic::QUIC_SUCCESS;
     case ERR_IO_PENDING:
       callback_ = std::move(callback);
-      return QUIC_PENDING;
+      return quic::QUIC_PENDING;
     default:
       *error_details = error_details_;
       *verify_details = std::move(verify_details_);
-      return QUIC_FAILURE;
+      return quic::QUIC_FAILURE;
   }
 }
 
@@ -355,9 +356,9 @@
 void ProofVerifierChromium::Job::OnIOComplete(int result) {
   int rv = DoLoop(result);
   if (rv != ERR_IO_PENDING) {
-    std::unique_ptr<ProofVerifierCallback> callback(std::move(callback_));
-    // Callback expects ProofVerifyDetails not ProofVerifyDetailsChromium.
-    std::unique_ptr<ProofVerifyDetails> verify_details(
+    std::unique_ptr<quic::ProofVerifierCallback> callback(std::move(callback_));
+    // Callback expects quic::ProofVerifyDetails not ProofVerifyDetailsChromium.
+    std::unique_ptr<quic::ProofVerifyDetails> verify_details(
         std::move(verify_details_));
     callback->Run(rv == OK, error_details_, &verify_details);
     // Will delete |this|.
@@ -509,8 +510,8 @@
 
 bool ProofVerifierChromium::Job::VerifySignature(
     const string& signed_data,
-    QuicTransportVersion quic_version,
-    QuicStringPiece chlo_hash,
+    quic::QuicTransportVersion quic_version,
+    quic::QuicStringPiece chlo_hash,
     const string& signature,
     const string& cert) {
   size_t size_bits;
@@ -537,7 +538,8 @@
     return false;
   }
 
-  verifier.VerifyUpdate(base::as_bytes(base::make_span(kProofSignatureLabel)));
+  verifier.VerifyUpdate(
+      base::as_bytes(base::make_span(quic::kProofSignatureLabel)));
   uint32_t len = chlo_hash.length();
   verifier.VerifyUpdate(base::as_bytes(base::make_span(&len, 1)));
   verifier.VerifyUpdate(base::as_bytes(base::make_span(chlo_hash)));
@@ -570,22 +572,22 @@
 ProofVerifierChromium::~ProofVerifierChromium() {
 }
 
-QuicAsyncStatus ProofVerifierChromium::VerifyProof(
+quic::QuicAsyncStatus ProofVerifierChromium::VerifyProof(
     const std::string& hostname,
     const uint16_t port,
     const std::string& server_config,
-    QuicTransportVersion quic_version,
-    QuicStringPiece chlo_hash,
+    quic::QuicTransportVersion quic_version,
+    quic::QuicStringPiece chlo_hash,
     const std::vector<std::string>& certs,
     const std::string& cert_sct,
     const std::string& signature,
-    const ProofVerifyContext* verify_context,
+    const quic::ProofVerifyContext* verify_context,
     std::string* error_details,
-    std::unique_ptr<ProofVerifyDetails>* verify_details,
-    std::unique_ptr<ProofVerifierCallback> callback) {
+    std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+    std::unique_ptr<quic::ProofVerifierCallback> callback) {
   if (!verify_context) {
     *error_details = "Missing context";
-    return QUIC_FAILURE;
+    return quic::QUIC_FAILURE;
   }
   const ProofVerifyContextChromium* chromium_context =
       reinterpret_cast<const ProofVerifyContextChromium*>(verify_context);
@@ -593,26 +595,26 @@
       this, cert_verifier_, ct_policy_enforcer_, transport_security_state_,
       cert_transparency_verifier_, chromium_context->cert_verify_flags,
       chromium_context->net_log);
-  QuicAsyncStatus status = job->VerifyProof(
+  quic::QuicAsyncStatus status = job->VerifyProof(
       hostname, port, server_config, quic_version, chlo_hash, certs, cert_sct,
       signature, error_details, verify_details, std::move(callback));
-  if (status == QUIC_PENDING) {
+  if (status == quic::QUIC_PENDING) {
     Job* job_ptr = job.get();
     active_jobs_[job_ptr] = std::move(job);
   }
   return status;
 }
 
-QuicAsyncStatus ProofVerifierChromium::VerifyCertChain(
+quic::QuicAsyncStatus ProofVerifierChromium::VerifyCertChain(
     const std::string& hostname,
     const std::vector<std::string>& certs,
-    const ProofVerifyContext* verify_context,
+    const quic::ProofVerifyContext* verify_context,
     std::string* error_details,
-    std::unique_ptr<ProofVerifyDetails>* verify_details,
-    std::unique_ptr<ProofVerifierCallback> callback) {
+    std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+    std::unique_ptr<quic::ProofVerifierCallback> callback) {
   if (!verify_context) {
     *error_details = "Missing context";
-    return QUIC_FAILURE;
+    return quic::QUIC_FAILURE;
   }
   const ProofVerifyContextChromium* chromium_context =
       reinterpret_cast<const ProofVerifyContextChromium*>(verify_context);
@@ -620,9 +622,9 @@
       this, cert_verifier_, ct_policy_enforcer_, transport_security_state_,
       cert_transparency_verifier_, chromium_context->cert_verify_flags,
       chromium_context->net_log);
-  QuicAsyncStatus status = job->VerifyCertChain(
+  quic::QuicAsyncStatus status = job->VerifyCertChain(
       hostname, certs, error_details, verify_details, std::move(callback));
-  if (status == QUIC_PENDING) {
+  if (status == quic::QUIC_PENDING) {
     Job* job_ptr = job.get();
     active_jobs_[job_ptr] = std::move(job);
   }
diff --git a/net/quic/chromium/crypto/proof_verifier_chromium.h b/net/quic/chromium/crypto/proof_verifier_chromium.h
index 3972c28..2db83b7 100644
--- a/net/quic/chromium/crypto/proof_verifier_chromium.h
+++ b/net/quic/chromium/crypto/proof_verifier_chromium.h
@@ -29,14 +29,14 @@
 // ProofVerifyDetailsChromium is the implementation-specific information that a
 // ProofVerifierChromium returns about a certificate verification.
 class NET_EXPORT_PRIVATE ProofVerifyDetailsChromium
-    : public ProofVerifyDetails {
+    : public quic::ProofVerifyDetails {
  public:
   ProofVerifyDetailsChromium();
   ProofVerifyDetailsChromium(const ProofVerifyDetailsChromium&);
   ~ProofVerifyDetailsChromium() override;
 
-  // ProofVerifyDetails implementation
-  ProofVerifyDetails* Clone() const override;
+  // quic::ProofVerifyDetails implementation
+  quic::ProofVerifyDetails* Clone() const override;
 
   CertVerifyResult cert_verify_result;
   ct::CTVerifyResult ct_verify_result;
@@ -56,7 +56,7 @@
 
 // ProofVerifyContextChromium is the implementation-specific information that a
 // ProofVerifierChromium needs in order to log correctly.
-struct ProofVerifyContextChromium : public ProofVerifyContext {
+struct ProofVerifyContextChromium : public quic::ProofVerifyContext {
  public:
   ProofVerifyContextChromium(int cert_verify_flags,
                              const NetLogWithSource& net_log)
@@ -66,9 +66,9 @@
   NetLogWithSource net_log;
 };
 
-// ProofVerifierChromium implements the QUIC ProofVerifier interface.  It is
-// capable of handling multiple simultaneous requests.
-class NET_EXPORT_PRIVATE ProofVerifierChromium : public ProofVerifier {
+// ProofVerifierChromium implements the QUIC quic::ProofVerifier interface.  It
+// is capable of handling multiple simultaneous requests.
+class NET_EXPORT_PRIVATE ProofVerifierChromium : public quic::ProofVerifier {
  public:
   ProofVerifierChromium(CertVerifier* cert_verifier,
                         CTPolicyEnforcer* ct_policy_enforcer,
@@ -76,27 +76,27 @@
                         CTVerifier* cert_transparency_verifier);
   ~ProofVerifierChromium() override;
 
-  // ProofVerifier interface
-  QuicAsyncStatus VerifyProof(
+  // quic::ProofVerifier interface
+  quic::QuicAsyncStatus VerifyProof(
       const std::string& hostname,
       const uint16_t port,
       const std::string& server_config,
-      QuicTransportVersion quic_version,
-      QuicStringPiece chlo_hash,
+      quic::QuicTransportVersion quic_version,
+      quic::QuicStringPiece chlo_hash,
       const std::vector<std::string>& certs,
       const std::string& cert_sct,
       const std::string& signature,
-      const ProofVerifyContext* verify_context,
+      const quic::ProofVerifyContext* verify_context,
       std::string* error_details,
-      std::unique_ptr<ProofVerifyDetails>* verify_details,
-      std::unique_ptr<ProofVerifierCallback> callback) override;
-  QuicAsyncStatus VerifyCertChain(
+      std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+      std::unique_ptr<quic::ProofVerifierCallback> callback) override;
+  quic::QuicAsyncStatus VerifyCertChain(
       const std::string& hostname,
       const std::vector<std::string>& certs,
-      const ProofVerifyContext* verify_context,
+      const quic::ProofVerifyContext* verify_context,
       std::string* error_details,
-      std::unique_ptr<ProofVerifyDetails>* verify_details,
-      std::unique_ptr<ProofVerifierCallback> callback) override;
+      std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+      std::unique_ptr<quic::ProofVerifierCallback> callback) override;
 
  private:
   class Job;
diff --git a/net/quic/chromium/crypto/proof_verifier_chromium_test.cc b/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
index b56c137a..776c5be 100644
--- a/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
+++ b/net/quic/chromium/crypto/proof_verifier_chromium_test.cc
@@ -69,29 +69,30 @@
 };
 
 // Proof source callback which saves the signature into |signature|.
-class SignatureSaver : public ProofSource::Callback {
+class SignatureSaver : public quic::ProofSource::Callback {
  public:
   explicit SignatureSaver(std::string* signature) : signature_(signature) {}
   ~SignatureSaver() override {}
 
   void Run(bool /*ok*/,
-           const QuicReferenceCountedPointer<ProofSource::Chain>& /*chain*/,
-           const QuicCryptoProof& proof,
-           std::unique_ptr<ProofSource::Details> /*details*/) override {
+           const quic::QuicReferenceCountedPointer<
+               quic::ProofSource::Chain>& /*chain*/,
+           const quic::QuicCryptoProof& proof,
+           std::unique_ptr<quic::ProofSource::Details> /*details*/) override {
     *signature_ = proof.signature;
   }
 
   std::string* signature_;
 };
 
-class DummyProofVerifierCallback : public ProofVerifierCallback {
+class DummyProofVerifierCallback : public quic::ProofVerifierCallback {
  public:
   DummyProofVerifierCallback() {}
   ~DummyProofVerifierCallback() override {}
 
   void Run(bool ok,
            const std::string& error_details,
-           std::unique_ptr<ProofVerifyDetails>* details) override {
+           std::unique_ptr<quic::ProofVerifyDetails>* details) override {
     // Do nothing
   }
 };
@@ -148,8 +149,8 @@
         GetTestCertsDirectory().AppendASCII("quic-leaf-cert.key"),
         base::FilePath());
     std::string signature;
-    source.GetProof(QuicSocketAddress(), kTestHostname, kTestConfig,
-                    QUIC_VERSION_35, kTestChloHash,
+    source.GetProof(quic::QuicSocketAddress(), kTestHostname, kTestConfig,
+                    quic::QUIC_VERSION_35, kTestChloHash,
                     std::make_unique<SignatureSaver>(&signature));
     return signature;
   }
@@ -188,13 +189,13 @@
 
   std::unique_ptr<MultiLogCTVerifier> ct_verifier_;
   std::vector<scoped_refptr<const CTLogVerifier>> log_verifiers_;
-  std::unique_ptr<ProofVerifyContext> verify_context_;
-  std::unique_ptr<ProofVerifyDetails> details_;
+  std::unique_ptr<quic::ProofVerifyContext> verify_context_;
+  std::unique_ptr<quic::ProofVerifyDetails> details_;
   std::string error_details_;
   std::vector<std::string> certs_;
 };
 
-// Tests that the ProofVerifier fails verification if certificate
+// Tests that the quic::ProofVerifier fails verification if certificate
 // verification fails.
 TEST_F(ProofVerifierChromiumTest, FailsIfCertFails) {
   MockCertVerifier dummy_verifier;
@@ -204,11 +205,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
 }
 
 // Valid SCT, but invalid signature.
@@ -224,11 +225,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, ct::GetSCTListForTesting(), kTestEmptySCT, verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, ct::GetSCTListForTesting(), kTestEmptySCT,
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
   CheckSCT(/*sct_expected_ok=*/true);
 }
 
@@ -244,15 +245,15 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, ct::GetSCTListWithInvalidSCT(), kTestEmptySCT,
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, ct::GetSCTListWithInvalidSCT(), kTestEmptySCT,
       verify_context_.get(), &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
   CheckSCT(/*sct_expected_ok=*/false);
 }
 
-// Tests that the ProofVerifier doesn't verify certificates if the config
+// Tests that the quic::ProofVerifier doesn't verify certificates if the config
 // signature fails.
 TEST_F(ProofVerifierChromiumTest, FailsIfSignatureFails) {
   FailsTestCertVerifier cert_verifier;
@@ -262,11 +263,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, kTestConfig, verify_context_.get(),
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, kTestConfig, verify_context_.get(),
       &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
 }
 
 // Tests that the certificate policy enforcer is consulted for EV
@@ -292,11 +293,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_SUCCESS, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
   ASSERT_TRUE(details_.get());
   ProofVerifyDetailsChromium* verify_details =
@@ -328,11 +329,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_SUCCESS, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
   ASSERT_TRUE(details_.get());
   ProofVerifyDetailsChromium* verify_details =
@@ -370,11 +371,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_SUCCESS, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
   ASSERT_TRUE(details_.get());
   ProofVerifyDetailsChromium* verify_details =
@@ -416,11 +417,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_SUCCESS, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
   ASSERT_TRUE(details_.get());
   ProofVerifyDetailsChromium* verify_details =
@@ -459,11 +460,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
 
   ProofVerifyDetailsChromium* verify_details =
       static_cast<ProofVerifyDetailsChromium*>(details_.get());
@@ -492,11 +493,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
   ProofVerifyDetailsChromium* verify_details =
       static_cast<ProofVerifyDetailsChromium*>(details_.get());
   EXPECT_TRUE(verify_details->is_fatal_cert_error);
@@ -527,11 +528,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
 
   ASSERT_TRUE(details_.get());
   ProofVerifyDetailsChromium* verify_details =
@@ -568,11 +569,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_SUCCESS, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
   ASSERT_TRUE(details_.get());
   ProofVerifyDetailsChromium* verify_details =
@@ -614,11 +615,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
 
   ASSERT_TRUE(details_.get());
   ProofVerifyDetailsChromium* verify_details =
@@ -666,11 +667,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
 
   histograms.ExpectUniqueSample(
       kHistogramName,
@@ -717,11 +718,11 @@
 
     std::unique_ptr<DummyProofVerifierCallback> callback(
         new DummyProofVerifierCallback);
-    QuicAsyncStatus status = proof_verifier.VerifyProof(
-        kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-        certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-        &error_details_, &details_, std::move(callback));
-    ASSERT_EQ(QUIC_SUCCESS, status);
+    quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+        kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+        kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+        verify_context_.get(), &error_details_, &details_, std::move(callback));
+    ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
     histograms.ExpectTotalCount(kHistogramName, 0);
   }
@@ -736,11 +737,11 @@
 
     std::unique_ptr<DummyProofVerifierCallback> callback(
         new DummyProofVerifierCallback);
-    QuicAsyncStatus status = proof_verifier.VerifyProof(
-        kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-        certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-        &error_details_, &details_, std::move(callback));
-    ASSERT_EQ(QUIC_SUCCESS, status);
+    quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+        kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+        kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+        verify_context_.get(), &error_details_, &details_, std::move(callback));
+    ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
     histograms.ExpectUniqueSample(
         kHistogramName,
@@ -774,11 +775,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_SUCCESS, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
   histograms.ExpectTotalCount(kHistogramName, 0);
 }
@@ -822,11 +823,11 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
-  ASSERT_EQ(QUIC_FAILURE, status);
+  quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
+  ASSERT_EQ(quic::QUIC_FAILURE, status);
 
   ASSERT_TRUE(details_.get());
   ProofVerifyDetailsChromium* verify_details =
@@ -866,11 +867,11 @@
 
     std::unique_ptr<DummyProofVerifierCallback> callback(
         new DummyProofVerifierCallback);
-    QuicAsyncStatus status = proof_verifier.VerifyProof(
-        kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-        certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-        &error_details_, &details_, std::move(callback));
-    ASSERT_EQ(QUIC_SUCCESS, status);
+    quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+        kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+        kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+        verify_context_.get(), &error_details_, &details_, std::move(callback));
+    ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
     // The histogram should not have been recorded.
     histograms.ExpectTotalCount(kHistogramName, 0);
@@ -887,11 +888,11 @@
 
     std::unique_ptr<DummyProofVerifierCallback> callback(
         new DummyProofVerifierCallback);
-    QuicAsyncStatus status = proof_verifier.VerifyProof(
-        kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-        certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-        &error_details_, &details_, std::move(callback));
-    ASSERT_EQ(QUIC_SUCCESS, status);
+    quic::QuicAsyncStatus status = proof_verifier.VerifyProof(
+        kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+        kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+        verify_context_.get(), &error_details_, &details_, std::move(callback));
+    ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
     // The histogram should have been recorded with the CT compliance status.
     histograms.ExpectUniqueSample(
@@ -932,9 +933,9 @@
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
 
   // The flag should be set in the CTVerifyResult.
   ProofVerifyDetailsChromium* proof_details =
@@ -974,9 +975,9 @@
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
   proof_verifier.VerifyProof(
-      kTestHostname, kTestPort, kTestConfig, QUIC_VERSION_35, kTestChloHash,
-      certs_, kTestEmptySCT, GetTestSignature(), verify_context_.get(),
-      &error_details_, &details_, std::move(callback));
+      kTestHostname, kTestPort, kTestConfig, quic::QUIC_VERSION_35,
+      kTestChloHash, certs_, kTestEmptySCT, GetTestSignature(),
+      verify_context_.get(), &error_details_, &details_, std::move(callback));
 
   // The flag should be set in the CTVerifyResult.
   ProofVerifyDetailsChromium* proof_details =
@@ -1003,10 +1004,10 @@
 
   std::unique_ptr<DummyProofVerifierCallback> callback(
       new DummyProofVerifierCallback);
-  QuicAsyncStatus status = proof_verifier.VerifyCertChain(
+  quic::QuicAsyncStatus status = proof_verifier.VerifyCertChain(
       kTestHostname, certs_, verify_context_.get(), &error_details_, &details_,
       std::move(callback));
-  ASSERT_EQ(QUIC_SUCCESS, status);
+  ASSERT_EQ(quic::QUIC_SUCCESS, status);
 
   ASSERT_TRUE(details_.get());
   ProofVerifyDetailsChromium* verify_details =
diff --git a/net/quic/chromium/crypto_test_utils_chromium.cc b/net/quic/chromium/crypto_test_utils_chromium.cc
index d84e34b7..e2832cd 100644
--- a/net/quic/chromium/crypto_test_utils_chromium.cc
+++ b/net/quic/chromium/crypto_test_utils_chromium.cc
@@ -75,12 +75,17 @@
 };
 
 }  // namespace
+}  // namespace test
+}  // namespace
 
+namespace quic {
+namespace test {
 namespace crypto_test_utils {
 
-std::unique_ptr<ProofSource> ProofSourceForTesting() {
-  std::unique_ptr<ProofSourceChromium> source(new ProofSourceChromium());
-  base::FilePath certs_dir = GetTestCertsDirectory();
+std::unique_ptr<quic::ProofSource> ProofSourceForTesting() {
+  std::unique_ptr<net::ProofSourceChromium> source(
+      new net::ProofSourceChromium());
+  base::FilePath certs_dir = net::GetTestCertsDirectory();
   CHECK(source->Initialize(
       certs_dir.AppendASCII("quic-chain.pem"),
       certs_dir.AppendASCII("quic-leaf-cert.key"),
@@ -88,23 +93,25 @@
   return std::move(source);
 }
 
-std::unique_ptr<ProofVerifier> ProofVerifierForTesting() {
+std::unique_ptr<quic::ProofVerifier> ProofVerifierForTesting() {
   // TODO(rch): use a real cert verifier?
-  std::unique_ptr<MockCertVerifier> cert_verifier(new MockCertVerifier());
+  std::unique_ptr<net::MockCertVerifier> cert_verifier(
+      new net::MockCertVerifier());
   net::CertVerifyResult verify_result;
   verify_result.verified_cert =
-      ImportCertFromFile(GetTestCertsDirectory(), "quic-chain.pem");
+      net::ImportCertFromFile(net::GetTestCertsDirectory(), "quic-chain.pem");
   cert_verifier->AddResultForCertAndHost(verify_result.verified_cert.get(),
-                                         "test.example.com", verify_result, OK);
-  return std::make_unique<TestProofVerifierChromium>(
-      std::move(cert_verifier), std::make_unique<TransportSecurityState>(),
-      std::make_unique<MultiLogCTVerifier>(),
-      std::make_unique<DefaultCTPolicyEnforcer>(), "quic-root.pem");
+                                         "test.example.com", verify_result,
+                                         net::OK);
+  return std::make_unique<net::test::TestProofVerifierChromium>(
+      std::move(cert_verifier), std::make_unique<net::TransportSecurityState>(),
+      std::make_unique<net::MultiLogCTVerifier>(),
+      std::make_unique<net::DefaultCTPolicyEnforcer>(), "quic-root.pem");
 }
 
-ProofVerifyContext* ProofVerifyContextForTesting() {
-  return new ProofVerifyContextChromium(/*cert_verify_flags=*/0,
-                                        NetLogWithSource());
+quic::ProofVerifyContext* ProofVerifyContextForTesting() {
+  return new net::ProofVerifyContextChromium(/*cert_verify_flags=*/0,
+                                             net::NetLogWithSource());
 }
 
 }  // namespace crypto_test_utils
diff --git a/net/quic/chromium/mock_crypto_client_stream_factory.cc b/net/quic/chromium/mock_crypto_client_stream_factory.cc
index 76e74db..a8efdbf5 100644
--- a/net/quic/chromium/mock_crypto_client_stream_factory.cc
+++ b/net/quic/chromium/mock_crypto_client_stream_factory.cc
@@ -15,24 +15,25 @@
 MockCryptoClientStreamFactory::~MockCryptoClientStreamFactory() {}
 
 MockCryptoClientStreamFactory::MockCryptoClientStreamFactory()
-    : handshake_mode_(MockCryptoClientStream::CONFIRM_HANDSHAKE),
+    : handshake_mode_(quic::MockCryptoClientStream::CONFIRM_HANDSHAKE),
       last_stream_(nullptr),
-      config_(new QuicConfig()),
+      config_(new quic::QuicConfig()),
       use_mock_crypter_(false) {}
 
-void MockCryptoClientStreamFactory::SetConfig(const QuicConfig& config) {
-  config_.reset(new QuicConfig(config));
+void MockCryptoClientStreamFactory::SetConfig(const quic::QuicConfig& config) {
+  config_.reset(new quic::QuicConfig(config));
 }
 
-QuicCryptoClientStream*
+quic::QuicCryptoClientStream*
 MockCryptoClientStreamFactory::CreateQuicCryptoClientStream(
-    const QuicServerId& server_id,
+    const quic::QuicServerId& server_id,
     QuicChromiumClientSession* session,
-    std::unique_ptr<ProofVerifyContext> /*proof_verify_context*/,
-    QuicCryptoClientConfig* crypto_config) {
-  if (handshake_mode_ == MockCryptoClientStream::USE_DEFAULT_CRYPTO_STREAM) {
-    return new QuicCryptoClientStream(server_id, session, nullptr,
-                                      crypto_config, session);
+    std::unique_ptr<quic::ProofVerifyContext> /*proof_verify_context*/,
+    quic::QuicCryptoClientConfig* crypto_config) {
+  if (handshake_mode_ ==
+      quic::MockCryptoClientStream::USE_DEFAULT_CRYPTO_STREAM) {
+    return new quic::QuicCryptoClientStream(server_id, session, nullptr,
+                                            crypto_config, session);
   }
 
   const ProofVerifyDetailsChromium* proof_verify_details = nullptr;
@@ -40,7 +41,7 @@
     proof_verify_details = proof_verify_details_queue_.front();
     proof_verify_details_queue_.pop();
   }
-  last_stream_ = new MockCryptoClientStream(
+  last_stream_ = new quic::MockCryptoClientStream(
       server_id, session, nullptr, *(config_.get()), crypto_config,
       handshake_mode_, proof_verify_details, use_mock_crypter_);
   return last_stream_;
diff --git a/net/quic/chromium/mock_crypto_client_stream_factory.h b/net/quic/chromium/mock_crypto_client_stream_factory.h
index 3d9cd23..2436ae1 100644
--- a/net/quic/chromium/mock_crypto_client_stream_factory.h
+++ b/net/quic/chromium/mock_crypto_client_stream_factory.h
@@ -15,23 +15,24 @@
 #include "net/third_party/quic/core/quic_server_id.h"
 #include "net/third_party/quic/test_tools/mock_crypto_client_stream.h"
 
-namespace net {
-
+namespace quic {
 class QuicCryptoClientStream;
+}  // namespace quic
+namespace net {
 
 class MockCryptoClientStreamFactory : public QuicCryptoClientStreamFactory {
  public:
   MockCryptoClientStreamFactory();
   ~MockCryptoClientStreamFactory() override;
 
-  QuicCryptoClientStream* CreateQuicCryptoClientStream(
-      const QuicServerId& server_id,
+  quic::QuicCryptoClientStream* CreateQuicCryptoClientStream(
+      const quic::QuicServerId& server_id,
       QuicChromiumClientSession* session,
-      std::unique_ptr<ProofVerifyContext> proof_verify_context,
-      QuicCryptoClientConfig* crypto_config) override;
+      std::unique_ptr<quic::ProofVerifyContext> proof_verify_context,
+      quic::QuicCryptoClientConfig* crypto_config) override;
 
   void set_handshake_mode(
-      MockCryptoClientStream::HandshakeMode handshake_mode) {
+      quic::MockCryptoClientStream::HandshakeMode handshake_mode) {
     handshake_mode_ = handshake_mode;
   }
 
@@ -45,16 +46,16 @@
     proof_verify_details_queue_.push(proof_verify_details);
   }
 
-  MockCryptoClientStream* last_stream() const { return last_stream_; }
+  quic::MockCryptoClientStream* last_stream() const { return last_stream_; }
 
   // Sets initial config for new sessions.
-  void SetConfig(const QuicConfig& config);
+  void SetConfig(const quic::QuicConfig& config);
 
  private:
-  MockCryptoClientStream::HandshakeMode handshake_mode_;
-  MockCryptoClientStream* last_stream_;
+  quic::MockCryptoClientStream::HandshakeMode handshake_mode_;
+  quic::MockCryptoClientStream* last_stream_;
   base::queue<const ProofVerifyDetailsChromium*> proof_verify_details_queue_;
-  std::unique_ptr<QuicConfig> config_;
+  std::unique_ptr<quic::QuicConfig> config_;
   bool use_mock_crypter_;
 
   DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStreamFactory);
diff --git a/net/quic/chromium/mock_quic_data.cc b/net/quic/chromium/mock_quic_data.cc
index 7cee15f..fe6d8d7 100644
--- a/net/quic/chromium/mock_quic_data.cc
+++ b/net/quic/chromium/mock_quic_data.cc
@@ -16,7 +16,7 @@
 }
 
 void MockQuicData::AddRead(IoMode mode,
-                           std::unique_ptr<QuicEncryptedPacket> packet) {
+                           std::unique_ptr<quic::QuicEncryptedPacket> packet) {
   reads_.push_back(
       MockRead(mode, packet->data(), packet->length(), sequence_number_++));
   packets_.push_back(std::move(packet));
@@ -26,7 +26,7 @@
 }
 
 void MockQuicData::AddWrite(IoMode mode,
-                            std::unique_ptr<QuicEncryptedPacket> packet) {
+                            std::unique_ptr<quic::QuicEncryptedPacket> packet) {
   writes_.push_back(
       MockWrite(mode, packet->data(), packet->length(), sequence_number_++));
   packets_.push_back(std::move(packet));
diff --git a/net/quic/chromium/mock_quic_data.h b/net/quic/chromium/mock_quic_data.h
index 7aa20d9..fa17cb6 100644
--- a/net/quic/chromium/mock_quic_data.h
+++ b/net/quic/chromium/mock_quic_data.h
@@ -24,7 +24,7 @@
 
   // Adds a read at the next sequence number which will read |packet|
   // synchronously or asynchronously based on |mode|.
-  void AddRead(IoMode mode, std::unique_ptr<QuicEncryptedPacket> packet);
+  void AddRead(IoMode mode, std::unique_ptr<quic::QuicEncryptedPacket> packet);
 
   // Adds a read at the next sequence number which will return |rv| either
   // synchronously or asynchronously based on |mode|.
@@ -32,7 +32,7 @@
 
   // Adds a write at the next sequence number which will write |packet|
   // synchronously or asynchronously based on |mode|.
-  void AddWrite(IoMode mode, std::unique_ptr<QuicEncryptedPacket> packet);
+  void AddWrite(IoMode mode, std::unique_ptr<quic::QuicEncryptedPacket> packet);
 
   // Adds a write at the next sequence number which will return |rv| either
   // synchronously or asynchronously based on |mode|.
@@ -57,7 +57,7 @@
   SequencedSocketData* GetSequencedSocketData();
 
  private:
-  std::vector<std::unique_ptr<QuicEncryptedPacket>> packets_;
+  std::vector<std::unique_ptr<quic::QuicEncryptedPacket>> packets_;
   std::unique_ptr<MockConnect> connect_;
   std::vector<MockWrite> writes_;
   std::vector<MockRead> reads_;
diff --git a/net/quic/chromium/properties_based_quic_server_info.cc b/net/quic/chromium/properties_based_quic_server_info.cc
index a78d5c8..664b72a 100644
--- a/net/quic/chromium/properties_based_quic_server_info.cc
+++ b/net/quic/chromium/properties_based_quic_server_info.cc
@@ -24,7 +24,7 @@
 namespace net {
 
 PropertiesBasedQuicServerInfo::PropertiesBasedQuicServerInfo(
-    const QuicServerId& server_id,
+    const quic::QuicServerId& server_id,
     HttpServerProperties* http_server_properties)
     : QuicServerInfo(server_id),
       http_server_properties_(http_server_properties) {
diff --git a/net/quic/chromium/properties_based_quic_server_info.h b/net/quic/chromium/properties_based_quic_server_info.h
index 4395db1..fc96fd1 100644
--- a/net/quic/chromium/properties_based_quic_server_info.h
+++ b/net/quic/chromium/properties_based_quic_server_info.h
@@ -24,7 +24,7 @@
 class QUIC_EXPORT_PRIVATE PropertiesBasedQuicServerInfo
     : public QuicServerInfo {
  public:
-  PropertiesBasedQuicServerInfo(const QuicServerId& server_id,
+  PropertiesBasedQuicServerInfo(const quic::QuicServerId& server_id,
                                 HttpServerProperties* http_server_properties);
   ~PropertiesBasedQuicServerInfo() override;
 
diff --git a/net/quic/chromium/properties_based_quic_server_info_test.cc b/net/quic/chromium/properties_based_quic_server_info_test.cc
index b528d68b..400aa03 100644
--- a/net/quic/chromium/properties_based_quic_server_info_test.cc
+++ b/net/quic/chromium/properties_based_quic_server_info_test.cc
@@ -57,7 +57,7 @@
   }
 
   HttpServerPropertiesImpl http_server_properties_;
-  QuicServerId server_id_;
+  quic::QuicServerId server_id_;
   PropertiesBasedQuicServerInfo server_info_;
   CompletionCallback callback_;
 };
diff --git a/net/quic/chromium/quic_address_mismatch.h b/net/quic/chromium/quic_address_mismatch.h
index 5527169..fb69cd73 100644
--- a/net/quic/chromium/quic_address_mismatch.h
+++ b/net/quic/chromium/quic_address_mismatch.h
@@ -34,7 +34,7 @@
 // |first_address| differs from |second_address|. Returns -1 if either address
 // is empty.
 //
-// Only used by the Net.QuicSession.PublicResetAddressMismatch histogram.
+// Only used by the Net.quic::QuicSession.PublicResetAddressMismatch histogram.
 NET_EXPORT_PRIVATE int GetAddressMismatch(const IPEndPoint& first_address,
                                           const IPEndPoint& second_address);
 
diff --git a/net/quic/chromium/quic_chromium_alarm_factory.cc b/net/quic/chromium/quic_chromium_alarm_factory.cc
index 1b8315e..4f8cc8e 100644
--- a/net/quic/chromium/quic_chromium_alarm_factory.cc
+++ b/net/quic/chromium/quic_chromium_alarm_factory.cc
@@ -15,15 +15,15 @@
 
 namespace {
 
-class QuicChromeAlarm : public QuicAlarm {
+class QuicChromeAlarm : public quic::QuicAlarm {
  public:
-  QuicChromeAlarm(const QuicClock* clock,
+  QuicChromeAlarm(const quic::QuicClock* clock,
                   base::TaskRunner* task_runner,
-                  QuicArenaScopedPtr<QuicAlarm::Delegate> delegate)
-      : QuicAlarm(std::move(delegate)),
+                  quic::QuicArenaScopedPtr<quic::QuicAlarm::Delegate> delegate)
+      : quic::QuicAlarm(std::move(delegate)),
         clock_(clock),
         task_runner_(task_runner),
-        task_deadline_(QuicTime::Zero()),
+        task_deadline_(quic::QuicTime::Zero()),
         weak_factory_(this) {}
 
  protected:
@@ -61,7 +61,7 @@
  private:
   void OnAlarm() {
     DCHECK(task_deadline_.IsInitialized());
-    task_deadline_ = QuicTime::Zero();
+    task_deadline_ = quic::QuicTime::Zero();
     // The alarm may have been cancelled.
     if (!deadline().IsInitialized()) {
       return;
@@ -76,14 +76,14 @@
     Fire();
   }
 
-  const QuicClock* clock_;
+  const quic::QuicClock* clock_;
   base::TaskRunner* task_runner_;
   // If a task has been posted to the message loop, this is the time it
   // was scheduled to fire.  Tracking this allows us to avoid posting a
   // new tast if the new deadline is in the future, but permits us to
   // post a new task when the new deadline now earlier than when
   // previously posted.
-  QuicTime task_deadline_;
+  quic::QuicTime task_deadline_;
   base::WeakPtrFactory<QuicChromeAlarm> weak_factory_;
 };
 
@@ -91,27 +91,28 @@
 
 QuicChromiumAlarmFactory::QuicChromiumAlarmFactory(
     base::TaskRunner* task_runner,
-    const QuicClock* clock)
+    const quic::QuicClock* clock)
     : task_runner_(task_runner), clock_(clock), weak_factory_(this) {}
 
 QuicChromiumAlarmFactory::~QuicChromiumAlarmFactory() {}
 
-QuicArenaScopedPtr<QuicAlarm> QuicChromiumAlarmFactory::CreateAlarm(
-    QuicArenaScopedPtr<QuicAlarm::Delegate> delegate,
-    QuicConnectionArena* arena) {
+quic::QuicArenaScopedPtr<quic::QuicAlarm> QuicChromiumAlarmFactory::CreateAlarm(
+    quic::QuicArenaScopedPtr<quic::QuicAlarm::Delegate> delegate,
+    quic::QuicConnectionArena* arena) {
   if (arena != nullptr) {
     return arena->New<QuicChromeAlarm>(clock_, task_runner_,
                                        std::move(delegate));
   } else {
-    return QuicArenaScopedPtr<QuicAlarm>(
+    return quic::QuicArenaScopedPtr<quic::QuicAlarm>(
         new QuicChromeAlarm(clock_, task_runner_, std::move(delegate)));
   }
 }
 
-QuicAlarm* QuicChromiumAlarmFactory::CreateAlarm(
-    QuicAlarm::Delegate* delegate) {
-  return new QuicChromeAlarm(clock_, task_runner_,
-                             QuicArenaScopedPtr<QuicAlarm::Delegate>(delegate));
+quic::QuicAlarm* QuicChromiumAlarmFactory::CreateAlarm(
+    quic::QuicAlarm::Delegate* delegate) {
+  return new QuicChromeAlarm(
+      clock_, task_runner_,
+      quic::QuicArenaScopedPtr<quic::QuicAlarm::Delegate>(delegate));
 }
 
 }  // namespace net
diff --git a/net/quic/chromium/quic_chromium_alarm_factory.h b/net/quic/chromium/quic_chromium_alarm_factory.h
index 3ef28c7..e41d778 100644
--- a/net/quic/chromium/quic_chromium_alarm_factory.h
+++ b/net/quic/chromium/quic_chromium_alarm_factory.h
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// The Chrome-specific helper for QuicConnection which uses
+// The Chrome-specific helper for quic::QuicConnection which uses
 // a TaskRunner for alarms, and uses a DatagramClientSocket for writing data.
 
 #ifndef NET_QUIC_CHROMIUM_QUIC_CHROMIUM_ALARM_FACTORY_H_
@@ -24,21 +24,22 @@
 
 namespace net {
 
-class NET_EXPORT_PRIVATE QuicChromiumAlarmFactory : public QuicAlarmFactory {
+class NET_EXPORT_PRIVATE QuicChromiumAlarmFactory
+    : public quic::QuicAlarmFactory {
  public:
   QuicChromiumAlarmFactory(base::TaskRunner* task_runner,
-                           const QuicClock* clock);
+                           const quic::QuicClock* clock);
   ~QuicChromiumAlarmFactory() override;
 
-  // QuicAlarmFactory
-  QuicAlarm* CreateAlarm(QuicAlarm::Delegate* delegate) override;
-  QuicArenaScopedPtr<QuicAlarm> CreateAlarm(
-      QuicArenaScopedPtr<QuicAlarm::Delegate> delegate,
-      QuicConnectionArena* arena) override;
+  // quic::QuicAlarmFactory
+  quic::QuicAlarm* CreateAlarm(quic::QuicAlarm::Delegate* delegate) override;
+  quic::QuicArenaScopedPtr<quic::QuicAlarm> CreateAlarm(
+      quic::QuicArenaScopedPtr<quic::QuicAlarm::Delegate> delegate,
+      quic::QuicConnectionArena* arena) override;
 
  private:
   base::TaskRunner* task_runner_;
-  const QuicClock* clock_;
+  const quic::QuicClock* clock_;
   base::WeakPtrFactory<QuicChromiumAlarmFactory> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(QuicChromiumAlarmFactory);
diff --git a/net/quic/chromium/quic_chromium_alarm_factory_test.cc b/net/quic/chromium/quic_chromium_alarm_factory_test.cc
index b441282..afeac27 100644
--- a/net/quic/chromium/quic_chromium_alarm_factory_test.cc
+++ b/net/quic/chromium/quic_chromium_alarm_factory_test.cc
@@ -12,7 +12,7 @@
 namespace test {
 namespace {
 
-class TestDelegate : public QuicAlarm::Delegate {
+class TestDelegate : public quic::QuicAlarm::Delegate {
  public:
   TestDelegate() : fired_(false) {}
 
@@ -33,14 +33,14 @@
 
   scoped_refptr<TestTaskRunner> runner_;
   QuicChromiumAlarmFactory alarm_factory_;
-  MockClock clock_;
+  quic::MockClock clock_;
 };
 
 TEST_F(QuicChromiumAlarmFactoryTest, CreateAlarm) {
   TestDelegate* delegate = new TestDelegate();
-  std::unique_ptr<QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
+  std::unique_ptr<quic::QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
 
-  QuicTime::Delta delta = QuicTime::Delta::FromMicroseconds(1);
+  quic::QuicTime::Delta delta = quic::QuicTime::Delta::FromMicroseconds(1);
   alarm->Set(clock_.Now() + delta);
 
   // Verify that the alarm task has been posted.
@@ -49,15 +49,15 @@
             runner_->GetPostedTasks()[0].delay);
 
   runner_->RunNextTask();
-  EXPECT_EQ(QuicTime::Zero() + delta, clock_.Now());
+  EXPECT_EQ(quic::QuicTime::Zero() + delta, clock_.Now());
   EXPECT_TRUE(delegate->fired());
 }
 
 TEST_F(QuicChromiumAlarmFactoryTest, CreateAlarmAndCancel) {
   TestDelegate* delegate = new TestDelegate();
-  std::unique_ptr<QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
+  std::unique_ptr<quic::QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
 
-  QuicTime::Delta delta = QuicTime::Delta::FromMicroseconds(1);
+  quic::QuicTime::Delta delta = quic::QuicTime::Delta::FromMicroseconds(1);
   alarm->Set(clock_.Now() + delta);
   alarm->Cancel();
 
@@ -67,18 +67,18 @@
             runner_->GetPostedTasks()[0].delay);
 
   runner_->RunNextTask();
-  EXPECT_EQ(QuicTime::Zero() + delta, clock_.Now());
+  EXPECT_EQ(quic::QuicTime::Zero() + delta, clock_.Now());
   EXPECT_FALSE(delegate->fired());
 }
 
 TEST_F(QuicChromiumAlarmFactoryTest, CreateAlarmAndReset) {
   TestDelegate* delegate = new TestDelegate();
-  std::unique_ptr<QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
+  std::unique_ptr<quic::QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
 
-  QuicTime::Delta delta = QuicTime::Delta::FromMicroseconds(1);
+  quic::QuicTime::Delta delta = quic::QuicTime::Delta::FromMicroseconds(1);
   alarm->Set(clock_.Now() + delta);
   alarm->Cancel();
-  QuicTime::Delta new_delta = QuicTime::Delta::FromMicroseconds(3);
+  quic::QuicTime::Delta new_delta = quic::QuicTime::Delta::FromMicroseconds(3);
   alarm->Set(clock_.Now() + new_delta);
 
   // The alarm task should still be posted.
@@ -87,25 +87,25 @@
             runner_->GetPostedTasks()[0].delay);
 
   runner_->RunNextTask();
-  EXPECT_EQ(QuicTime::Zero() + delta, clock_.Now());
+  EXPECT_EQ(quic::QuicTime::Zero() + delta, clock_.Now());
   EXPECT_FALSE(delegate->fired());
 
   // The alarm task should be posted again.
   ASSERT_EQ(1u, runner_->GetPostedTasks().size());
 
   runner_->RunNextTask();
-  EXPECT_EQ(QuicTime::Zero() + new_delta, clock_.Now());
+  EXPECT_EQ(quic::QuicTime::Zero() + new_delta, clock_.Now());
   EXPECT_TRUE(delegate->fired());
 }
 
 TEST_F(QuicChromiumAlarmFactoryTest, CreateAlarmAndResetEarlier) {
   TestDelegate* delegate = new TestDelegate();
-  std::unique_ptr<QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
+  std::unique_ptr<quic::QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
 
-  QuicTime::Delta delta = QuicTime::Delta::FromMicroseconds(3);
+  quic::QuicTime::Delta delta = quic::QuicTime::Delta::FromMicroseconds(3);
   alarm->Set(clock_.Now() + delta);
   alarm->Cancel();
-  QuicTime::Delta new_delta = QuicTime::Delta::FromMicroseconds(1);
+  quic::QuicTime::Delta new_delta = quic::QuicTime::Delta::FromMicroseconds(1);
   alarm->Set(clock_.Now() + new_delta);
 
   // Both alarm tasks will be posted.
@@ -113,7 +113,7 @@
 
   // The earlier task will execute and will fire the alarm->
   runner_->RunNextTask();
-  EXPECT_EQ(QuicTime::Zero() + new_delta, clock_.Now());
+  EXPECT_EQ(quic::QuicTime::Zero() + new_delta, clock_.Now());
   EXPECT_TRUE(delegate->fired());
   delegate->Clear();
 
@@ -123,19 +123,20 @@
   // When the latter task is executed, the weak ptr will be invalid and
   // the alarm will not fire.
   runner_->RunNextTask();
-  EXPECT_EQ(QuicTime::Zero() + delta, clock_.Now());
+  EXPECT_EQ(quic::QuicTime::Zero() + delta, clock_.Now());
   EXPECT_FALSE(delegate->fired());
 }
 
 TEST_F(QuicChromiumAlarmFactoryTest, CreateAlarmAndUpdate) {
   TestDelegate* delegate = new TestDelegate();
-  std::unique_ptr<QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
+  std::unique_ptr<quic::QuicAlarm> alarm(alarm_factory_.CreateAlarm(delegate));
 
-  QuicTime start = clock_.Now();
-  QuicTime::Delta delta = QuicTime::Delta::FromMicroseconds(1);
+  quic::QuicTime start = clock_.Now();
+  quic::QuicTime::Delta delta = quic::QuicTime::Delta::FromMicroseconds(1);
   alarm->Set(clock_.Now() + delta);
-  QuicTime::Delta new_delta = QuicTime::Delta::FromMicroseconds(3);
-  alarm->Update(clock_.Now() + new_delta, QuicTime::Delta::FromMicroseconds(1));
+  quic::QuicTime::Delta new_delta = quic::QuicTime::Delta::FromMicroseconds(3);
+  alarm->Update(clock_.Now() + new_delta,
+                quic::QuicTime::Delta::FromMicroseconds(1));
 
   // The alarm task should still be posted.
   ASSERT_EQ(1u, runner_->GetPostedTasks().size());
@@ -143,11 +144,12 @@
             runner_->GetPostedTasks()[0].delay);
 
   runner_->RunNextTask();
-  EXPECT_EQ(QuicTime::Zero() + delta, clock_.Now());
+  EXPECT_EQ(quic::QuicTime::Zero() + delta, clock_.Now());
   EXPECT_FALSE(delegate->fired());
 
   // Move the alarm forward 1us and ensure it doesn't move forward.
-  alarm->Update(clock_.Now() + new_delta, QuicTime::Delta::FromMicroseconds(2));
+  alarm->Update(clock_.Now() + new_delta,
+                quic::QuicTime::Delta::FromMicroseconds(2));
 
   ASSERT_EQ(1u, runner_->GetPostedTasks().size());
   EXPECT_EQ(
@@ -158,12 +160,14 @@
   EXPECT_TRUE(delegate->fired());
 
   // Set the alarm via an update call.
-  new_delta = QuicTime::Delta::FromMicroseconds(5);
-  alarm->Update(clock_.Now() + new_delta, QuicTime::Delta::FromMicroseconds(1));
+  new_delta = quic::QuicTime::Delta::FromMicroseconds(5);
+  alarm->Update(clock_.Now() + new_delta,
+                quic::QuicTime::Delta::FromMicroseconds(1));
   EXPECT_TRUE(alarm->IsSet());
 
   // Update it with an uninitialized time and ensure it's cancelled.
-  alarm->Update(QuicTime::Zero(), QuicTime::Delta::FromMicroseconds(1));
+  alarm->Update(quic::QuicTime::Zero(),
+                quic::QuicTime::Delta::FromMicroseconds(1));
   EXPECT_FALSE(alarm->IsSet());
 }
 
diff --git a/net/quic/chromium/quic_chromium_client_session.cc b/net/quic/chromium/quic_chromium_client_session.cc
index cc657ca..a00778c 100644
--- a/net/quic/chromium/quic_chromium_client_session.cc
+++ b/net/quic/chromium/quic_chromium_client_session.cc
@@ -119,7 +119,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicConnectionMigrationFailureCallback(
-    QuicConnectionId connection_id,
+    quic::QuicConnectionId connection_id,
     std::string reason,
     NetLogCaptureMode capture_mode) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
@@ -129,7 +129,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicConnectionMigrationSuccessCallback(
-    QuicConnectionId connection_id,
+    quic::QuicConnectionId connection_id,
     NetLogCaptureMode capture_mode) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("connection_id", base::NumberToString(connection_id));
@@ -190,7 +190,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicClientSessionCallback(
-    const QuicServerId* server_id,
+    const quic::QuicServerId* server_id,
     int cert_verify_flags,
     bool require_confirmation,
     NetLogCaptureMode /* capture_mode */) {
@@ -229,16 +229,16 @@
           histogram_name, base::HistogramBase::kUmaTargetedHistogramFlag));
 }
 
-class HpackEncoderDebugVisitor : public QuicHpackDebugVisitor {
-  void OnUseEntry(QuicTime::Delta elapsed) override {
+class HpackEncoderDebugVisitor : public quic::QuicHpackDebugVisitor {
+  void OnUseEntry(quic::QuicTime::Delta elapsed) override {
     UMA_HISTOGRAM_TIMES(
         "Net.QuicHpackEncoder.IndexedEntryAge",
         base::TimeDelta::FromMicroseconds(elapsed.ToMicroseconds()));
   }
 };
 
-class HpackDecoderDebugVisitor : public QuicHpackDebugVisitor {
-  void OnUseEntry(QuicTime::Delta elapsed) override {
+class HpackDecoderDebugVisitor : public quic::QuicHpackDebugVisitor {
+  void OnUseEntry(quic::QuicTime::Delta elapsed) override {
     UMA_HISTOGRAM_TIMES(
         "Net.QuicHpackDecoder.IndexedEntryAge",
         base::TimeDelta::FromMicroseconds(elapsed.ToMicroseconds()));
@@ -276,7 +276,7 @@
       net_log_(session_->net_log()),
       was_handshake_confirmed_(session->IsCryptoHandshakeConfirmed()),
       net_error_(OK),
-      quic_error_(QUIC_NO_ERROR),
+      quic_error_(quic::QUIC_NO_ERROR),
       port_migration_detected_(false),
       server_id_(session_->server_id()),
       quic_version_(session->connection()->transport_version()),
@@ -302,9 +302,9 @@
 }
 
 void QuicChromiumClientSession::Handle::OnSessionClosed(
-    QuicTransportVersion quic_version,
+    quic::QuicTransportVersion quic_version,
     int net_error,
-    QuicErrorCode quic_error,
+    quic::QuicErrorCode quic_error,
     bool port_migration_detected,
     LoadTimingInfo::ConnectTiming connect_timing,
     bool was_ever_used) {
@@ -354,7 +354,8 @@
   }
 }
 
-QuicTransportVersion QuicChromiumClientSession::Handle::GetQuicVersion() const {
+quic::QuicTransportVersion QuicChromiumClientSession::Handle::GetQuicVersion()
+    const {
   if (!session_)
     return quic_version_;
 
@@ -362,19 +363,19 @@
 }
 
 void QuicChromiumClientSession::Handle::ResetPromised(
-    QuicStreamId id,
-    QuicRstStreamErrorCode error_code) {
+    quic::QuicStreamId id,
+    quic::QuicRstStreamErrorCode error_code) {
   if (session_)
     session_->ResetPromised(id, error_code);
 }
 
-std::unique_ptr<QuicConnection::ScopedPacketFlusher>
+std::unique_ptr<quic::QuicConnection::ScopedPacketFlusher>
 QuicChromiumClientSession::Handle::CreatePacketBundler(
-    QuicConnection::AckBundling bundling_mode) {
+    quic::QuicConnection::AckBundling bundling_mode) {
   if (!session_)
     return nullptr;
 
-  return std::make_unique<QuicConnection::ScopedPacketFlusher>(
+  return std::make_unique<quic::QuicConnection::ScopedPacketFlusher>(
       session_->connection(), bundling_mode);
 }
 
@@ -389,15 +390,15 @@
   if (!session_)
     return ERR_CONNECTION_CLOSED;
 
-  QuicAsyncStatus push_status =
+  quic::QuicAsyncStatus push_status =
       session_->push_promise_index()->Try(headers, this, &push_handle_);
 
   switch (push_status) {
-    case QUIC_FAILURE:
+    case quic::QUIC_FAILURE:
       return ERR_FAILED;
-    case QUIC_SUCCESS:
+    case quic::QUIC_SUCCESS:
       return OK;
-    case QUIC_PENDING:
+    case quic::QUIC_PENDING:
       push_callback_ = callback;
       return ERR_IO_PENDING;
   }
@@ -456,7 +457,7 @@
   return session_->TryCreateStream(request);
 }
 
-QuicClientPushPromiseIndex*
+quic::QuicClientPushPromiseIndex*
 QuicChromiumClientSession::Handle::GetPushPromiseIndex() {
   if (!session_)
     return push_promise_index_;
@@ -518,7 +519,7 @@
 }
 
 void QuicChromiumClientSession::Handle::OnRendezvousResult(
-    QuicSpdyStream* stream) {
+    quic::QuicSpdyStream* stream) {
   DCHECK(!push_stream_);
   int rv = ERR_FAILED;
   if (stream) {
@@ -546,7 +547,7 @@
 
 QuicChromiumClientSession::StreamRequest::~StreamRequest() {
   if (stream_)
-    stream_->Reset(QUIC_STREAM_CANCELLED);
+    stream_->Reset(quic::QUIC_STREAM_CANCELLED);
 
   if (session_)
     session_->CancelRequest(this);
@@ -673,11 +674,11 @@
 }
 
 QuicChromiumClientSession::QuicChromiumClientSession(
-    QuicConnection* connection,
+    quic::QuicConnection* connection,
     std::unique_ptr<DatagramClientSocket> socket,
     QuicStreamFactory* stream_factory,
     QuicCryptoClientStreamFactory* crypto_client_stream_factory,
-    QuicClock* clock,
+    quic::QuicClock* clock,
     TransportSecurityState* transport_security_state,
     std::unique_ptr<QuicServerInfo> server_info,
     const QuicSessionKey& session_key,
@@ -689,20 +690,20 @@
     base::TimeDelta max_time_on_non_default_network,
     int max_migrations_to_non_default_network_on_path_degrading,
     int yield_after_packets,
-    QuicTime::Delta yield_after_duration,
+    quic::QuicTime::Delta yield_after_duration,
     bool headers_include_h2_stream_dependency,
     int cert_verify_flags,
-    const QuicConfig& config,
-    QuicCryptoClientConfig* crypto_config,
+    const quic::QuicConfig& config,
+    quic::QuicCryptoClientConfig* crypto_config,
     const char* const connection_description,
     base::TimeTicks dns_resolution_start_time,
     base::TimeTicks dns_resolution_end_time,
-    QuicClientPushPromiseIndex* push_promise_index,
+    quic::QuicClientPushPromiseIndex* push_promise_index,
     ServerPushDelegate* push_delegate,
     base::SequencedTaskRunner* task_runner,
     std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
     NetLog* net_log)
-    : QuicSpdyClientSessionBase(connection, push_promise_index, config),
+    : quic::QuicSpdyClientSessionBase(connection, push_promise_index, config),
       session_key_(session_key),
       require_confirmation_(require_confirmation),
       migrate_session_early_(migrate_session_early),
@@ -747,7 +748,7 @@
       migration_pending_(false),
       headers_include_h2_stream_dependency_(
           headers_include_h2_stream_dependency &&
-          this->connection()->transport_version() > QUIC_VERSION_42),
+          this->connection()->transport_version() > quic::QUIC_VERSION_42),
       weak_factory_(this) {
   default_network_ = socket->GetBoundNetwork();
   sockets_.push_back(std::move(socket));
@@ -777,7 +778,7 @@
   connect_timing_.dns_end = dns_resolution_end_time;
   if (migrate_session_early_v2_) {
     connection->set_retransmittable_on_wire_timeout(
-        QuicTime::Delta::FromMilliseconds(
+        quic::QuicTime::Delta::FromMilliseconds(
             kDefaultRetransmittableOnWireTimeoutMillisecs));
   }
 }
@@ -809,9 +810,10 @@
   if (connection()->connected()) {
     // Ensure that the connection is closed by the time the session is
     // destroyed.
-    RecordInternalErrorLocation(QUIC_CHROMIUM_CLIENT_SESSION_DESTRUCTOR);
-    connection()->CloseConnection(QUIC_INTERNAL_ERROR, "session torn down",
-                                  ConnectionCloseBehavior::SILENT_CLOSE);
+    RecordInternalErrorLocation(quic::QUIC_CHROMIUM_CLIENT_SESSION_DESTRUCTOR);
+    connection()->CloseConnection(quic::QUIC_INTERNAL_ERROR,
+                                  "session torn down",
+                                  quic::ConnectionCloseBehavior::SILENT_CLOSE);
   }
 
   if (IsEncryptionEstablished())
@@ -856,7 +858,7 @@
     }
   }
 
-  const QuicConnectionStats stats = connection()->GetStats();
+  const quic::QuicConnectionStats stats = connection()->GetStats();
 
   // The MTU used by QUIC is limited to a fairly small set of predefined values
   // (initial values and MTU discovery values), but does not fare well when
@@ -896,18 +898,18 @@
 }
 
 void QuicChromiumClientSession::Initialize() {
-  QuicSpdyClientSessionBase::Initialize();
+  quic::QuicSpdyClientSessionBase::Initialize();
   SetHpackEncoderDebugVisitor(std::make_unique<HpackEncoderDebugVisitor>());
   SetHpackDecoderDebugVisitor(std::make_unique<HpackDecoderDebugVisitor>());
   set_max_uncompressed_header_bytes(kMaxUncompressedHeaderSize);
 }
 
 size_t QuicChromiumClientSession::WriteHeaders(
-    QuicStreamId id,
+    quic::QuicStreamId id,
     spdy::SpdyHeaderBlock headers,
     bool fin,
     spdy::SpdyPriority priority,
-    QuicReferenceCountedPointer<QuicAckListenerInterface>
+    quic::QuicReferenceCountedPointer<quic::QuicAckListenerInterface>
         ack_notifier_delegate) {
   spdy::SpdyStreamId parent_stream_id = 0;
   int weight = 0;
@@ -922,16 +924,16 @@
                           exclusive, std::move(ack_notifier_delegate));
 }
 
-void QuicChromiumClientSession::UnregisterStreamPriority(QuicStreamId id,
+void QuicChromiumClientSession::UnregisterStreamPriority(quic::QuicStreamId id,
                                                          bool is_static) {
   if (headers_include_h2_stream_dependency_ && !is_static) {
     priority_dependency_state_.OnStreamDestruction(id);
   }
-  QuicSpdySession::UnregisterStreamPriority(id, is_static);
+  quic::QuicSpdySession::UnregisterStreamPriority(id, is_static);
 }
 
 void QuicChromiumClientSession::UpdateStreamPriority(
-    QuicStreamId id,
+    quic::QuicStreamId id,
     spdy::SpdyPriority new_priority) {
   if (headers_include_h2_stream_dependency_) {
     auto updates = priority_dependency_state_.OnStreamUpdate(id, new_priority);
@@ -940,17 +942,18 @@
                     update.exclusive);
     }
   }
-  QuicSpdySession::UpdateStreamPriority(id, new_priority);
+  quic::QuicSpdySession::UpdateStreamPriority(id, new_priority);
 }
 
-void QuicChromiumClientSession::OnStreamFrame(const QuicStreamFrame& frame) {
+void QuicChromiumClientSession::OnStreamFrame(
+    const quic::QuicStreamFrame& frame) {
   // Record total number of stream frames.
   UMA_HISTOGRAM_COUNTS_1M("Net.QuicNumStreamFramesInPacket", 1);
 
   // Record number of frames per stream in packet.
   UMA_HISTOGRAM_COUNTS_1M("Net.QuicNumStreamFramesPerStreamInPacket", 1);
 
-  return QuicSpdySession::OnStreamFrame(frame);
+  return quic::QuicSpdySession::OnStreamFrame(frame);
 }
 
 void QuicChromiumClientSession::AddHandle(Handle* handle) {
@@ -1065,7 +1068,7 @@
 }
 
 bool QuicChromiumClientSession::WasConnectionEverUsed() {
-  const QuicConnectionStats& stats = connection()->GetStats();
+  const quic::QuicConnectionStats& stats = connection()->GetStats();
   return stats.bytes_sent > 0 || stats.bytes_received > 0;
 }
 
@@ -1092,11 +1095,12 @@
   return stream;
 }
 
-QuicCryptoClientStream* QuicChromiumClientSession::GetMutableCryptoStream() {
+quic::QuicCryptoClientStream*
+QuicChromiumClientSession::GetMutableCryptoStream() {
   return crypto_stream_.get();
 }
 
-const QuicCryptoClientStream* QuicChromiumClientSession::GetCryptoStream()
+const quic::QuicCryptoClientStream* QuicChromiumClientSession::GetCryptoStream()
     const {
   return crypto_stream_.get();
 }
@@ -1119,15 +1123,15 @@
 
   // Map QUIC AEADs to the corresponding TLS 1.3 cipher. OpenSSL's cipher suite
   // numbers begin with a stray 0x03, so mask them off.
-  QuicTag aead = crypto_stream_->crypto_negotiated_params().aead;
+  quic::QuicTag aead = crypto_stream_->crypto_negotiated_params().aead;
   uint16_t cipher_suite;
   int security_bits;
   switch (aead) {
-    case kAESG:
+    case quic::kAESG:
       cipher_suite = TLS1_CK_AES_128_GCM_SHA256 & 0xffff;
       security_bits = 128;
       break;
-    case kCC20:
+    case quic::kCC20:
       cipher_suite = TLS1_CK_CHACHA20_POLY1305_SHA256 & 0xffff;
       security_bits = 256;
       break;
@@ -1142,10 +1146,10 @@
 
   // Report the QUIC key exchange as the corresponding TLS curve.
   switch (crypto_stream_->crypto_negotiated_params().key_exchange) {
-    case kP256:
+    case quic::kP256:
       ssl_info->key_exchange_group = SSL_CURVE_SECP256R1;
       break;
-    case kC255:
+    case quic::kC255:
       ssl_info->key_exchange_group = SSL_CURVE_X25519;
       break;
     default:
@@ -1169,7 +1173,7 @@
   ssl_info->UpdateCertificateTransparencyInfo(*ct_verify_result_);
 
   if (crypto_stream_->crypto_negotiated_params().token_binding_key_param ==
-      kTB10) {
+      quic::kTB10) {
     ssl_info->token_binding_negotiated = true;
     ssl_info->token_binding_key_param = TB_PARAM_ECDSAP256;
   }
@@ -1249,7 +1253,7 @@
 }
 
 bool QuicChromiumClientSession::ShouldCreateIncomingDynamicStream(
-    QuicStreamId id) {
+    quic::QuicStreamId id) {
   if (!connection()->connected()) {
     LOG(DFATAL) << "ShouldCreateIncomingDynamicStream called when disconnected";
     return false;
@@ -1265,15 +1269,15 @@
   if (id % 2 != 0) {
     LOG(WARNING) << "Received invalid push stream id " << id;
     connection()->CloseConnection(
-        QUIC_INVALID_STREAM_ID, "Server created odd numbered stream",
-        ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
+        quic::QUIC_INVALID_STREAM_ID, "Server created odd numbered stream",
+        quic::ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
     return false;
   }
   return true;
 }
 
 QuicChromiumClientStream*
-QuicChromiumClientSession::CreateIncomingDynamicStream(QuicStreamId id) {
+QuicChromiumClientSession::CreateIncomingDynamicStream(quic::QuicStreamId id) {
   if (!ShouldCreateIncomingDynamicStream(id)) {
     return nullptr;
   }
@@ -1304,7 +1308,7 @@
 
 QuicChromiumClientStream*
 QuicChromiumClientSession::CreateIncomingReliableStreamImpl(
-    QuicStreamId id,
+    quic::QuicStreamId id,
     const NetworkTrafficAnnotationTag& traffic_annotation) {
   DCHECK(connection()->connected());
 
@@ -1316,8 +1320,8 @@
   return stream;
 }
 
-void QuicChromiumClientSession::CloseStream(QuicStreamId stream_id) {
-  QuicStream* stream = GetOrCreateStream(stream_id);
+void QuicChromiumClientSession::CloseStream(quic::QuicStreamId stream_id) {
+  quic::QuicStream* stream = GetOrCreateStream(stream_id);
   if (stream) {
     logger_->UpdateReceivedFrameCounts(stream_id, stream->num_frames_received(),
                                        stream->num_duplicate_frames_received());
@@ -1326,21 +1330,22 @@
       bytes_pushed_count_ += stream->stream_bytes_read();
     }
   }
-  QuicSpdySession::CloseStream(stream_id);
+  quic::QuicSpdySession::CloseStream(stream_id);
   OnClosedStream();
 }
 
-void QuicChromiumClientSession::SendRstStream(QuicStreamId id,
-                                              QuicRstStreamErrorCode error,
-                                              QuicStreamOffset bytes_written) {
-  QuicStream* stream = GetOrCreateStream(id);
+void QuicChromiumClientSession::SendRstStream(
+    quic::QuicStreamId id,
+    quic::QuicRstStreamErrorCode error,
+    quic::QuicStreamOffset bytes_written) {
+  quic::QuicStream* stream = GetOrCreateStream(id);
   if (stream) {
     if (id % 2 == 0) {
       // Stream with even stream is initiated by server for PUSH.
       bytes_pushed_count_ += stream->stream_bytes_read();
     }
   }
-  QuicSpdySession::SendRstStream(id, error, bytes_written);
+  quic::QuicSpdySession::SendRstStream(id, error, bytes_written);
   OnClosedStream();
 }
 
@@ -1365,7 +1370,7 @@
 }
 
 void QuicChromiumClientSession::OnConfigNegotiated() {
-  QuicSpdyClientSessionBase::OnConfigNegotiated();
+  quic::QuicSpdyClientSessionBase::OnConfigNegotiated();
   if (!stream_factory_ || !config()->HasReceivedAlternateServerAddress())
     return;
 
@@ -1439,46 +1444,48 @@
 
     NotifyRequestsOfConfirmation(OK);
   }
-  QuicSpdySession::OnCryptoHandshakeEvent(event);
+  quic::QuicSpdySession::OnCryptoHandshakeEvent(event);
 }
 
 void QuicChromiumClientSession::OnCryptoHandshakeMessageSent(
-    const CryptoHandshakeMessage& message) {
+    const quic::CryptoHandshakeMessage& message) {
   logger_->OnCryptoHandshakeMessageSent(message);
 }
 
 void QuicChromiumClientSession::OnCryptoHandshakeMessageReceived(
-    const CryptoHandshakeMessage& message) {
+    const quic::CryptoHandshakeMessage& message) {
   logger_->OnCryptoHandshakeMessageReceived(message);
-  if (message.tag() == kREJ || message.tag() == kSREJ) {
+  if (message.tag() == quic::kREJ || message.tag() == quic::kSREJ) {
     UMA_HISTOGRAM_CUSTOM_COUNTS(
         "Net.QuicSession.RejectLength",
-        message.GetSerialized(Perspective::IS_CLIENT).length(), 1000, 10000,
-        50);
-    QuicStringPiece proof;
+        message.GetSerialized(quic::Perspective::IS_CLIENT).length(), 1000,
+        10000, 50);
+    quic::QuicStringPiece proof;
     UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.RejectHasProof",
-                          message.GetStringPiece(kPROF, &proof));
+                          message.GetStringPiece(quic::kPROF, &proof));
   }
 }
 
-void QuicChromiumClientSession::OnGoAway(const QuicGoAwayFrame& frame) {
-  QuicSession::OnGoAway(frame);
+void QuicChromiumClientSession::OnGoAway(const quic::QuicGoAwayFrame& frame) {
+  quic::QuicSession::OnGoAway(frame);
   NotifyFactoryOfSessionGoingAway();
-  port_migration_detected_ = frame.error_code == QUIC_ERROR_MIGRATING_PORT;
+  port_migration_detected_ =
+      frame.error_code == quic::QUIC_ERROR_MIGRATING_PORT;
 }
 
-void QuicChromiumClientSession::OnRstStream(const QuicRstStreamFrame& frame) {
-  QuicSession::OnRstStream(frame);
+void QuicChromiumClientSession::OnRstStream(
+    const quic::QuicRstStreamFrame& frame) {
+  quic::QuicSession::OnRstStream(frame);
   OnClosedStream();
 }
 
 void QuicChromiumClientSession::OnConnectionClosed(
-    QuicErrorCode error,
+    quic::QuicErrorCode error,
     const std::string& error_details,
-    ConnectionCloseSource source) {
+    quic::ConnectionCloseSource source) {
   DCHECK(!connection()->connected());
   logger_->OnConnectionClosed(error, error_details, source);
-  if (source == ConnectionCloseSource::FROM_PEER) {
+  if (source == quic::ConnectionCloseSource::FROM_PEER) {
     if (IsCryptoHandshakeConfirmed()) {
       base::UmaHistogramSparse(
           "Net.QuicSession.ConnectionCloseErrorCodeServer.HandshakeConfirmed",
@@ -1508,7 +1515,7 @@
                              error);
   }
 
-  if (error == QUIC_NETWORK_IDLE_TIMEOUT) {
+  if (error == quic::QUIC_NETWORK_IDLE_TIMEOUT) {
     UMA_HISTOGRAM_COUNTS_1M(
         "Net.QuicSession.ConnectionClose.NumOpenStreams.TimedOut",
         GetNumOpenOutgoingStreams());
@@ -1543,13 +1550,13 @@
     // connection timed out with open streams then QUIC traffic has become
     // blackholed. Alternatively, if too many retransmission timeouts occur
     // then QUIC traffic has become blackholed.
-    if (stream_factory_ &&
-        (error == QUIC_TOO_MANY_RTOS || (error == QUIC_NETWORK_IDLE_TIMEOUT &&
-                                         GetNumOpenOutgoingStreams() > 0))) {
+    if (stream_factory_ && (error == quic::QUIC_TOO_MANY_RTOS ||
+                            (error == quic::QUIC_NETWORK_IDLE_TIMEOUT &&
+                             GetNumOpenOutgoingStreams() > 0))) {
       stream_factory_->OnBlackholeAfterHandshakeConfirmed(this);
     }
   } else {
-    if (error == QUIC_PUBLIC_RESET) {
+    if (error == quic::QUIC_PUBLIC_RESET) {
       RecordHandshakeFailureReason(HANDSHAKE_FAILURE_PUBLIC_RESET);
     } else if (connection()->GetStats().packets_received == 0) {
       RecordHandshakeFailureReason(HANDSHAKE_FAILURE_BLACK_HOLE);
@@ -1567,7 +1574,7 @@
   base::UmaHistogramSparse("Net.QuicSession.QuicVersion",
                            connection()->transport_version());
   NotifyFactoryOfSessionGoingAway();
-  QuicSession::OnConnectionClosed(error, error_details, source);
+  quic::QuicSession::OnConnectionClosed(error, error_details, source);
 
   if (!callback_.is_null()) {
     base::ResetAndReturn(&callback_).Run(ERR_QUIC_PROTOCOL_ERROR);
@@ -1585,14 +1592,14 @@
 }
 
 void QuicChromiumClientSession::OnSuccessfulVersionNegotiation(
-    const ParsedQuicVersion& version) {
+    const quic::ParsedQuicVersion& version) {
   logger_->OnSuccessfulVersionNegotiation(version);
-  QuicSpdySession::OnSuccessfulVersionNegotiation(version);
+  quic::QuicSpdySession::OnSuccessfulVersionNegotiation(version);
 }
 
 void QuicChromiumClientSession::OnConnectivityProbeReceived(
-    const QuicSocketAddress& self_address,
-    const QuicSocketAddress& peer_address) {
+    const quic::QuicSocketAddress& self_address,
+    const quic::QuicSocketAddress& peer_address) {
   DVLOG(1) << "Probing response from ip:port: " << peer_address.ToString()
            << " to ip:port: " << self_address.ToString() << " is received";
   // Notify the probing manager that a connectivity probing packet is received.
@@ -1636,7 +1643,7 @@
 
   // Cause the packet writer to return ERR_IO_PENDING and block so
   // that the actual migration happens from the message loop instead
-  // of under the call stack of QuicConnection::WritePacket.
+  // of under the call stack of quic::QuicConnection::WritePacket.
   return ERR_IO_PENDING;
 }
 
@@ -1676,9 +1683,9 @@
 
   // Close the connection if migration failed. Do not cause a
   // connection close packet to be sent since socket may be borked.
-  connection()->CloseConnection(QUIC_PACKET_WRITE_ERROR,
+  connection()->CloseConnection(quic::QUIC_PACKET_WRITE_ERROR,
                                 "Write and subsequent migration failed",
-                                ConnectionCloseBehavior::SILENT_CLOSE);
+                                quic::ConnectionCloseBehavior::SILENT_CLOSE);
 }
 
 void QuicChromiumClientSession::OnNoNewNetwork() {
@@ -1712,7 +1719,7 @@
   // asynchronously. The new writer will notify the connection if the
   // write below completes asynchronously, but a synchronous competion
   // must be propagated back to the connection here.
-  WriteResult result =
+  quic::WriteResult result =
       static_cast<QuicChromiumPacketWriter*>(connection()->writer())
           ->WritePacketToSocket(std::move(packet_));
   if (result.error_code == ERR_IO_PENDING)
@@ -1731,12 +1738,12 @@
 
   LogConnectionMigrationResultToHistogram(MIGRATION_STATUS_TIMEOUT);
   CloseSessionOnError(ERR_NETWORK_CHANGED,
-                      QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK);
+                      quic::QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK);
 }
 
 void QuicChromiumClientSession::OnProbeNetworkSucceeded(
     NetworkChangeNotifier::NetworkHandle network,
-    const QuicSocketAddress& self_address,
+    const quic::QuicSocketAddress& self_address,
     std::unique_ptr<DatagramClientSocket> socket,
     std::unique_ptr<QuicChromiumPacketWriter> writer,
     std::unique_ptr<QuicChromiumPacketReader> reader) {
@@ -1801,7 +1808,7 @@
 
 bool QuicChromiumClientSession::OnSendConnectivityProbingPacket(
     QuicChromiumPacketWriter* writer,
-    const QuicSocketAddress& peer_address) {
+    const quic::QuicSocketAddress& peer_address) {
   return connection()->SendConnectivityProbingPacket(writer, peer_address);
 }
 
@@ -2038,12 +2045,12 @@
 }
 
 bool QuicChromiumClientSession::HasOpenDynamicStreams() const {
-  return QuicSession::HasOpenDynamicStreams() ||
+  return quic::QuicSession::HasOpenDynamicStreams() ||
          GetNumDrainingOutgoingStreams() > 0;
 }
 
 void QuicChromiumClientSession::OnProofValid(
-    const QuicCryptoClientConfig::CachedState& cached) {
+    const quic::QuicCryptoClientConfig::CachedState& cached) {
   DCHECK(cached.proof_valid());
 
   if (!server_info_) {
@@ -2063,7 +2070,7 @@
 }
 
 void QuicChromiumClientSession::OnProofVerifyDetailsAvailable(
-    const ProofVerifyDetails& verify_details) {
+    const quic::ProofVerifyDetails& verify_details) {
   const ProofVerifyDetailsChromium* verify_details_chromium =
       reinterpret_cast<const ProofVerifyDetailsChromium*>(&verify_details);
   cert_verify_result_.reset(
@@ -2083,12 +2090,13 @@
   }
 }
 
-void QuicChromiumClientSession::CloseSessionOnError(int net_error,
-                                                    QuicErrorCode quic_error) {
+void QuicChromiumClientSession::CloseSessionOnError(
+    int net_error,
+    quic::QuicErrorCode quic_error) {
   base::UmaHistogramSparse("Net.QuicSession.CloseSessionOnError", -net_error);
-  if (quic_error == QUIC_INTERNAL_ERROR) {
+  if (quic_error == quic::QUIC_INTERNAL_ERROR) {
     RecordInternalErrorLocation(
-        QUIC_CHROMIUM_CLIENT_SESSION_CLOSE_SESSION_ON_ERROR);
+        quic::QUIC_CHROMIUM_CLIENT_SESSION_CLOSE_SESSION_ON_ERROR);
   }
 
   if (!callback_.is_null()) {
@@ -2101,7 +2109,7 @@
 
   if (connection()->connected())
     connection()->CloseConnection(quic_error, "net error",
-                                  ConnectionCloseBehavior::SILENT_CLOSE);
+                                  quic::ConnectionCloseBehavior::SILENT_CLOSE);
   DCHECK(!connection()->connected());
 
   NotifyFactoryOfSessionClosed();
@@ -2109,7 +2117,7 @@
 
 void QuicChromiumClientSession::CloseSessionOnErrorLater(
     int net_error,
-    QuicErrorCode quic_error) {
+    quic::QuicErrorCode quic_error) {
   base::UmaHistogramSparse("Net.QuicSession.CloseSessionOnError", -net_error);
 
   if (!callback_.is_null()) {
@@ -2122,7 +2130,7 @@
 
   if (connection()->connected())
     connection()->CloseConnection(quic_error, "net error",
-                                  ConnectionCloseBehavior::SILENT_CLOSE);
+                                  quic::ConnectionCloseBehavior::SILENT_CLOSE);
   DCHECK(!connection()->connected());
 
   NotifyFactoryOfSessionClosedLater();
@@ -2130,8 +2138,8 @@
 
 void QuicChromiumClientSession::CloseAllStreams(int net_error) {
   while (!dynamic_streams().empty()) {
-    QuicStream* stream = dynamic_streams().begin()->second.get();
-    QuicStreamId id = stream->id();
+    quic::QuicStream* stream = dynamic_streams().begin()->second.get();
+    quic::QuicStreamId id = stream->id();
     static_cast<QuicChromiumClientStream*>(stream)->OnError(net_error);
     CloseStream(id);
   }
@@ -2179,8 +2187,9 @@
     HistogramAndLogMigrationFailure(migration_net_log,
                                     MIGRATION_STATUS_NO_MIGRATABLE_STREAMS,
                                     connection_id(), "No active streams");
-    CloseSessionOnErrorLater(ERR_NETWORK_CHANGED,
-                             QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS);
+    CloseSessionOnErrorLater(
+        ERR_NETWORK_CHANGED,
+        quic::QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS);
     return ProbingResult::DISABLED_WITH_IDLE_SESSION;
   }
 
@@ -2209,7 +2218,8 @@
 
   // Check if probing manager is probing the same path.
   if (probing_manager_.IsUnderProbing(
-          network, QuicSocketAddress(QuicSocketAddressImpl(peer_address)))) {
+          network,
+          quic::QuicSocketAddress(quic::QuicSocketAddressImpl(peer_address)))) {
     return ProbingResult::PENDING;
   }
 
@@ -2243,7 +2253,8 @@
   int timeout_ms = rtt_ms * 2;
 
   probing_manager_.StartProbing(
-      network, QuicSocketAddress(QuicSocketAddressImpl(peer_address)),
+      network,
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(peer_address)),
       std::move(probing_socket), std::move(probing_writer),
       std::move(probing_reader), base::TimeDelta::FromMilliseconds(timeout_ms),
       net_log_);
@@ -2324,8 +2335,9 @@
     HistogramAndLogMigrationFailure(migration_net_log,
                                     MIGRATION_STATUS_NO_MIGRATABLE_STREAMS,
                                     connection_id(), "No active streams");
-    CloseSessionOnErrorLater(ERR_NETWORK_CHANGED,
-                             QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS);
+    CloseSessionOnErrorLater(
+        ERR_NETWORK_CHANGED,
+        quic::QUIC_CONNECTION_MIGRATION_NO_MIGRATABLE_STREAMS);
     return false;
   }
 
@@ -2342,8 +2354,9 @@
         migration_net_log, MIGRATION_STATUS_DISABLED_BY_CONFIG, connection_id(),
         "Migration disabled by config");
     if (close_if_cannot_migrate) {
-      CloseSessionOnErrorLater(ERR_NETWORK_CHANGED,
-                               QUIC_CONNECTION_MIGRATION_DISABLED_BY_CONFIG);
+      CloseSessionOnErrorLater(
+          ERR_NETWORK_CHANGED,
+          quic::QUIC_CONNECTION_MIGRATION_DISABLED_BY_CONFIG);
     } else if (migrate_session_on_network_change_v2_) {
       // Session cannot migrate, mark it as going away for v2.
       stream_factory_->OnSessionGoingAway(this);
@@ -2357,8 +2370,9 @@
                                     MIGRATION_STATUS_NON_MIGRATABLE_STREAM,
                                     connection_id(), "Non-migratable stream");
     if (close_if_cannot_migrate) {
-      CloseSessionOnErrorLater(ERR_NETWORK_CHANGED,
-                               QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM);
+      CloseSessionOnErrorLater(
+          ERR_NETWORK_CHANGED,
+          quic::QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM);
     } else if (migrate_session_on_network_change_v2_) {
       // Session cannot migrate, mark it as going away for v2.
       stream_factory_->OnSessionGoingAway(this);
@@ -2449,7 +2463,7 @@
 void QuicChromiumClientSession::HistogramAndLogMigrationFailure(
     const NetLogWithSource& net_log,
     QuicConnectionMigrationStatus status,
-    QuicConnectionId connection_id,
+    quic::QuicConnectionId connection_id,
     const std::string& reason) {
   LogConnectionMigrationResultToHistogram(status);
   net_log.AddEvent(NetLogEventType::QUIC_CONNECTION_MIGRATION_FAILURE,
@@ -2459,7 +2473,7 @@
 
 void QuicChromiumClientSession::HistogramAndLogMigrationSuccess(
     const NetLogWithSource& net_log,
-    QuicConnectionId connection_id) {
+    quic::QuicConnectionId connection_id) {
   LogConnectionMigrationResultToHistogram(MIGRATION_STATUS_SUCCESS);
   net_log.AddEvent(
       NetLogEventType::QUIC_CONNECTION_MIGRATION_SUCCESS,
@@ -2483,7 +2497,7 @@
   dict->SetString("peer_address", peer_address().ToString());
   dict->SetString("connection_id", base::NumberToString(connection_id()));
   dict->SetBoolean("connected", connection()->connected());
-  const QuicConnectionStats& stats = connection()->GetStats();
+  const quic::QuicConnectionStats& stats = connection()->GetStats();
   dict->SetInteger("packets_sent", stats.packets_sent);
   dict->SetInteger("packets_received", stats.packets_received);
   dict->SetInteger("packets_lost", stats.packets_lost);
@@ -2534,14 +2548,15 @@
   }
 
   DVLOG(1) << "Closing session on read error: " << result;
-  connection()->CloseConnection(QUIC_PACKET_READ_ERROR, ErrorToString(result),
-                                ConnectionCloseBehavior::SILENT_CLOSE);
+  connection()->CloseConnection(quic::QUIC_PACKET_READ_ERROR,
+                                ErrorToString(result),
+                                quic::ConnectionCloseBehavior::SILENT_CLOSE);
 }
 
 bool QuicChromiumClientSession::OnPacket(
-    const QuicReceivedPacket& packet,
-    const QuicSocketAddress& local_address,
-    const QuicSocketAddress& peer_address) {
+    const quic::QuicReceivedPacket& packet,
+    const quic::QuicSocketAddress& local_address,
+    const quic::QuicSocketAddress& peer_address) {
   ProcessUdpPacket(local_address, peer_address, packet);
   if (!connection()->connected()) {
     NotifyFactoryOfSessionClosedLater();
@@ -2666,11 +2681,12 @@
         "Socket configuration failed");
     if (close_session_on_error) {
       if (migrate_session_on_network_change_v2_) {
-        CloseSessionOnErrorLater(ERR_NETWORK_CHANGED,
-                                 QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR);
+        CloseSessionOnErrorLater(
+            ERR_NETWORK_CHANGED,
+            quic::QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR);
       } else {
         CloseSessionOnError(ERR_NETWORK_CHANGED,
-                            QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR);
+                            quic::QUIC_CONNECTION_MIGRATION_INTERNAL_ERROR);
       }
     }
     return MigrationResult::FAILURE;
@@ -2693,11 +2709,12 @@
                                     connection_id(), "Too many changes");
     if (close_session_on_error) {
       if (migrate_session_on_network_change_v2_) {
-        CloseSessionOnErrorLater(ERR_NETWORK_CHANGED,
-                                 QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES);
+        CloseSessionOnErrorLater(
+            ERR_NETWORK_CHANGED,
+            quic::QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES);
       } else {
         CloseSessionOnError(ERR_NETWORK_CHANGED,
-                            QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES);
+                            quic::QUIC_CONNECTION_MIGRATION_TOO_MANY_CHANGES);
       }
     }
     return MigrationResult::FAILURE;
@@ -2772,16 +2789,17 @@
 }
 
 bool QuicChromiumClientSession::HandlePromised(
-    QuicStreamId id,
-    QuicStreamId promised_id,
+    quic::QuicStreamId id,
+    quic::QuicStreamId promised_id,
     const spdy::SpdyHeaderBlock& headers) {
   bool result =
-      QuicSpdyClientSessionBase::HandlePromised(id, promised_id, headers);
+      quic::QuicSpdyClientSessionBase::HandlePromised(id, promised_id, headers);
   if (result) {
     // The push promise is accepted, notify the push_delegate that a push
     // promise has been received.
     if (push_delegate_) {
-      std::string pushed_url = SpdyUtils::GetPromisedUrlFromHeaders(headers);
+      std::string pushed_url =
+          quic::SpdyUtils::GetPromisedUrlFromHeaders(headers);
       push_delegate_->OnPush(std::make_unique<QuicServerPushHelper>(
                                  weak_factory_.GetWeakPtr(), GURL(pushed_url)),
                              net_log_);
@@ -2791,7 +2809,7 @@
       // push promise headers are received, send a PRIORITY frame for the
       // promised stream ID. Send |kDefaultPriority| since that will be the
       // initial spdy::SpdyPriority of the push promise stream when created.
-      const spdy::SpdyPriority priority = QuicStream::kDefaultPriority;
+      const spdy::SpdyPriority priority = quic::QuicStream::kDefaultPriority;
       spdy::SpdyStreamId parent_stream_id = 0;
       int weight = 0;
       bool exclusive = false;
@@ -2807,35 +2825,37 @@
 }
 
 void QuicChromiumClientSession::DeletePromised(
-    QuicClientPromisedInfo* promised) {
+    quic::QuicClientPromisedInfo* promised) {
   if (IsOpenStream(promised->id()))
     streams_pushed_and_claimed_count_++;
-  QuicSpdyClientSessionBase::DeletePromised(promised);
+  quic::QuicSpdyClientSessionBase::DeletePromised(promised);
 }
 
-void QuicChromiumClientSession::OnPushStreamTimedOut(QuicStreamId stream_id) {
-  QuicSpdyStream* stream = GetPromisedStream(stream_id);
+void QuicChromiumClientSession::OnPushStreamTimedOut(
+    quic::QuicStreamId stream_id) {
+  quic::QuicSpdyStream* stream = GetPromisedStream(stream_id);
   if (stream != nullptr)
     bytes_pushed_and_unclaimed_count_ += stream->stream_bytes_read();
 }
 
 void QuicChromiumClientSession::CancelPush(const GURL& url) {
-  QuicClientPromisedInfo* promised_info =
-      QuicSpdyClientSessionBase::GetPromisedByUrl(url.spec());
+  quic::QuicClientPromisedInfo* promised_info =
+      quic::QuicSpdyClientSessionBase::GetPromisedByUrl(url.spec());
   if (!promised_info || promised_info->is_validating()) {
     // Push stream has already been claimed or is pending matched to a request.
     return;
   }
 
-  QuicStreamId stream_id = promised_info->id();
+  quic::QuicStreamId stream_id = promised_info->id();
 
   // Collect data on the cancelled push stream.
-  QuicSpdyStream* stream = GetPromisedStream(stream_id);
+  quic::QuicSpdyStream* stream = GetPromisedStream(stream_id);
   if (stream != nullptr)
     bytes_pushed_and_unclaimed_count_ += stream->stream_bytes_read();
 
   // Send the reset and remove the promised info from the promise index.
-  QuicSpdyClientSessionBase::ResetPromised(stream_id, QUIC_STREAM_CANCELLED);
+  quic::QuicSpdyClientSessionBase::ResetPromised(stream_id,
+                                                 quic::QUIC_STREAM_CANCELLED);
   DeletePromised(promised_info);
 }
 
@@ -2846,14 +2866,14 @@
   return connect_timing_;
 }
 
-QuicTransportVersion QuicChromiumClientSession::GetQuicVersion() const {
+quic::QuicTransportVersion QuicChromiumClientSession::GetQuicVersion() const {
   return connection()->transport_version();
 }
 
 size_t QuicChromiumClientSession::EstimateMemoryUsage() const {
-  // TODO(xunjieli): Estimate |crypto_stream_|, QuicSpdySession's
-  // QuicHeaderList, QuicSession's QuiCWriteBlockedList, open streams and
-  // unacked packet map.
+  // TODO(xunjieli): Estimate |crypto_stream_|, quic::QuicSpdySession's
+  // quic::QuicHeaderList, quic::QuicSession's QuiCWriteBlockedList, open
+  // streams and unacked packet map.
   return base::trace_event::EstimateMemoryUsage(packet_readers_);
 }
 
diff --git a/net/quic/chromium/quic_chromium_client_session.h b/net/quic/chromium/quic_chromium_client_session.h
index 0a68353d..4f47760c 100644
--- a/net/quic/chromium/quic_chromium_client_session.h
+++ b/net/quic/chromium/quic_chromium_client_session.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// A client specific QuicSession subclass.  This class owns the underlying
-// QuicConnection and QuicConnectionHelper objects.  The connection stores
+// A client specific quic::QuicSession subclass.  This class owns the underlying
+// quic::QuicConnection and QuicConnectionHelper objects.  The connection stores
 // a non-owning pointer to the helper so this session needs to ensure that
 // the helper outlives the connection.
 
@@ -121,7 +121,7 @@
 };
 
 class NET_EXPORT_PRIVATE QuicChromiumClientSession
-    : public QuicSpdyClientSessionBase,
+    : public quic::QuicSpdyClientSessionBase,
       public MultiplexedSession,
       public QuicConnectivityProbingManager::Delegate,
       public QuicChromiumPacketReader::Visitor,
@@ -134,7 +134,7 @@
   // the Handle are safe to use even after the underlying session is destroyed.
   class NET_EXPORT_PRIVATE Handle
       : public MultiplexedSessionHandle,
-        public QuicClientPushPromiseIndex::Delegate {
+        public quic::QuicClientPushPromiseIndex::Delegate {
    public:
     // Constructs a handle to |session| which was created via the alternative
     // server |destination|.
@@ -175,12 +175,13 @@
     // IsClosedStream(id) return true, which ensures that any subsequent
     // frames related to this stream will be ignored (modulo flow
     // control accounting).
-    void ResetPromised(QuicStreamId id, QuicRstStreamErrorCode error_code);
+    void ResetPromised(quic::QuicStreamId id,
+                       quic::QuicRstStreamErrorCode error_code);
 
     // Returns a new packet bundler while will cause writes to be batched up
     // until a packet is full, or the last bundler is destroyed.
-    std::unique_ptr<QuicConnection::ScopedPacketFlusher> CreatePacketBundler(
-        QuicConnection::AckBundling bundling_mode);
+    std::unique_ptr<quic::QuicConnection::ScopedPacketFlusher>
+    CreatePacketBundler(quic::QuicConnection::AckBundling bundling_mode);
 
     // Populates network error details for this session.
     void PopulateNetErrorDetails(NetErrorDetails* details) const;
@@ -198,7 +199,7 @@
     bool SharesSameSession(const Handle& other) const;
 
     // Returns the QUIC version used by the session.
-    QuicTransportVersion GetQuicVersion() const;
+    quic::QuicTransportVersion GetQuicVersion() const;
 
     // Copies the remote udp address into |address| and returns a net error
     // code.
@@ -209,10 +210,10 @@
     int GetSelfAddress(IPEndPoint* address) const;
 
     // Returns the push promise index associated with the session.
-    QuicClientPushPromiseIndex* GetPushPromiseIndex();
+    quic::QuicClientPushPromiseIndex* GetPushPromiseIndex();
 
     // Returns the session's server ID.
-    QuicServerId server_id() const { return server_id_; }
+    quic::QuicServerId server_id() const { return server_id_; }
 
     // Returns the alternative server used for this session.
     HostPortPair destination() const { return destination_; }
@@ -225,11 +226,11 @@
       return session_->connection_migration_mode();
     }
 
-    // QuicClientPushPromiseIndex::Delegate implementation
+    // quic::QuicClientPushPromiseIndex::Delegate implementation
     bool CheckVary(const spdy::SpdyHeaderBlock& client_request,
                    const spdy::SpdyHeaderBlock& promise_request,
                    const spdy::SpdyHeaderBlock& promise_response) override;
-    void OnRendezvousResult(QuicSpdyStream* stream) override;
+    void OnRendezvousResult(quic::QuicSpdyStream* stream) override;
 
     // Returns true if the session's connection has sent or received any bytes.
     bool WasEverUsed() const;
@@ -249,9 +250,9 @@
     void OnCryptoHandshakeConfirmed();
 
     // Called when the session is closed with a net error.
-    void OnSessionClosed(QuicTransportVersion quic_version,
+    void OnSessionClosed(quic::QuicTransportVersion quic_version,
                          int net_error,
-                         QuicErrorCode quic_error,
+                         quic::QuicErrorCode quic_error,
                          bool port_migration_detected,
                          LoadTimingInfo::ConnectTiming connect_timing,
                          bool was_ever_used);
@@ -275,18 +276,18 @@
     NetLogWithSource net_log_;
     bool was_handshake_confirmed_;
     int net_error_;
-    QuicErrorCode quic_error_;
+    quic::QuicErrorCode quic_error_;
     bool port_migration_detected_;
-    QuicServerId server_id_;
-    QuicTransportVersion quic_version_;
+    quic::QuicServerId server_id_;
+    quic::QuicTransportVersion quic_version_;
     LoadTimingInfo::ConnectTiming connect_timing_;
-    QuicClientPushPromiseIndex* push_promise_index_;
+    quic::QuicClientPushPromiseIndex* push_promise_index_;
 
-    // |QuicClientPromisedInfo| owns this. It will be set when |Try()|
-    // is asynchronous, i.e. it returned QUIC_PENDING, and remains valid
+    // |quic::QuicClientPromisedInfo| owns this. It will be set when |Try()|
+    // is asynchronous, i.e. it returned quic::QUIC_PENDING, and remains valid
     // until |OnRendezvouResult()| fires or |push_handle_->Cancel()| is
     // invoked.
-    QuicClientPushPromiseIndex::TryHandle* push_handle_;
+    quic::QuicClientPushPromiseIndex::TryHandle* push_handle_;
     CompletionCallback push_callback_;
     std::unique_ptr<QuicChromiumClientStream::Handle> push_stream_;
 
@@ -367,11 +368,11 @@
   // |stream_factory|, which must outlive this session.
   // TODO(rch): decouple the factory from the session via a Delegate interface.
   QuicChromiumClientSession(
-      QuicConnection* connection,
+      quic::QuicConnection* connection,
       std::unique_ptr<DatagramClientSocket> socket,
       QuicStreamFactory* stream_factory,
       QuicCryptoClientStreamFactory* crypto_client_stream_factory,
-      QuicClock* clock,
+      quic::QuicClock* clock,
       TransportSecurityState* transport_security_state,
       std::unique_ptr<QuicServerInfo> server_info,
       const QuicSessionKey& session_key,
@@ -383,15 +384,15 @@
       base::TimeDelta max_time_on_non_default_network,
       int max_migrations_to_non_default_network_on_path_degrading,
       int yield_after_packets,
-      QuicTime::Delta yield_after_duration,
+      quic::QuicTime::Delta yield_after_duration,
       bool headers_include_h2_stream_dependency,
       int cert_verify_flags,
-      const QuicConfig& config,
-      QuicCryptoClientConfig* crypto_config,
+      const quic::QuicConfig& config,
+      quic::QuicCryptoClientConfig* crypto_config,
       const char* const connection_description,
       base::TimeTicks dns_resolution_start_time,
       base::TimeTicks dns_resolution_end_time,
-      QuicClientPushPromiseIndex* push_promise_index,
+      quic::QuicClientPushPromiseIndex* push_promise_index,
       ServerPushDelegate* push_delegate,
       base::SequencedTaskRunner* task_runner,
       std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
@@ -435,7 +436,7 @@
   // QuicConnectivityProbingManager::Delegate override.
   void OnProbeNetworkSucceeded(
       NetworkChangeNotifier::NetworkHandle network,
-      const QuicSocketAddress& self_address,
+      const quic::QuicSocketAddress& self_address,
       std::unique_ptr<DatagramClientSocket> socket,
       std::unique_ptr<QuicChromiumPacketWriter> writer,
       std::unique_ptr<QuicChromiumPacketReader> reader) override;
@@ -445,59 +446,61 @@
 
   bool OnSendConnectivityProbingPacket(
       QuicChromiumPacketWriter* writer,
-      const QuicSocketAddress& peer_address) override;
+      const quic::QuicSocketAddress& peer_address) override;
 
-  // QuicSpdySession methods:
-  size_t WriteHeaders(QuicStreamId id,
-                      spdy::SpdyHeaderBlock headers,
-                      bool fin,
-                      spdy::SpdyPriority priority,
-                      QuicReferenceCountedPointer<QuicAckListenerInterface>
-                          ack_listener) override;
-  void UnregisterStreamPriority(QuicStreamId id, bool is_static) override;
-  void UpdateStreamPriority(QuicStreamId id,
+  // quic::QuicSpdySession methods:
+  size_t WriteHeaders(
+      quic::QuicStreamId id,
+      spdy::SpdyHeaderBlock headers,
+      bool fin,
+      spdy::SpdyPriority priority,
+      quic::QuicReferenceCountedPointer<quic::QuicAckListenerInterface>
+          ack_listener) override;
+  void UnregisterStreamPriority(quic::QuicStreamId id, bool is_static) override;
+  void UpdateStreamPriority(quic::QuicStreamId id,
                             spdy::SpdyPriority new_priority) override;
 
-  // QuicSession methods:
-  void OnStreamFrame(const QuicStreamFrame& frame) override;
+  // quic::QuicSession methods:
+  void OnStreamFrame(const quic::QuicStreamFrame& frame) override;
   QuicChromiumClientStream* CreateOutgoingDynamicStream() override;
-  const QuicCryptoClientStream* GetCryptoStream() const override;
-  QuicCryptoClientStream* GetMutableCryptoStream() override;
-  void CloseStream(QuicStreamId stream_id) override;
-  void SendRstStream(QuicStreamId id,
-                     QuicRstStreamErrorCode error,
-                     QuicStreamOffset bytes_written) override;
+  const quic::QuicCryptoClientStream* GetCryptoStream() const override;
+  quic::QuicCryptoClientStream* GetMutableCryptoStream() override;
+  void CloseStream(quic::QuicStreamId stream_id) override;
+  void SendRstStream(quic::QuicStreamId id,
+                     quic::QuicRstStreamErrorCode error,
+                     quic::QuicStreamOffset bytes_written) override;
   void OnCryptoHandshakeEvent(CryptoHandshakeEvent event) override;
   void OnCryptoHandshakeMessageSent(
-      const CryptoHandshakeMessage& message) override;
+      const quic::CryptoHandshakeMessage& message) override;
   void OnCryptoHandshakeMessageReceived(
-      const CryptoHandshakeMessage& message) override;
-  void OnGoAway(const QuicGoAwayFrame& frame) override;
-  void OnRstStream(const QuicRstStreamFrame& frame) override;
+      const quic::CryptoHandshakeMessage& message) override;
+  void OnGoAway(const quic::QuicGoAwayFrame& frame) override;
+  void OnRstStream(const quic::QuicRstStreamFrame& frame) override;
 
   // QuicClientSessionBase methods:
   void OnConfigNegotiated() override;
-  void OnProofValid(const QuicCryptoClientConfig::CachedState& cached) override;
+  void OnProofValid(
+      const quic::QuicCryptoClientConfig::CachedState& cached) override;
   void OnProofVerifyDetailsAvailable(
-      const ProofVerifyDetails& verify_details) override;
+      const quic::ProofVerifyDetails& verify_details) override;
 
-  // QuicConnectionVisitorInterface methods:
-  void OnConnectionClosed(QuicErrorCode error,
+  // quic::QuicConnectionVisitorInterface methods:
+  void OnConnectionClosed(quic::QuicErrorCode error,
                           const std::string& error_details,
-                          ConnectionCloseSource source) override;
+                          quic::ConnectionCloseSource source) override;
   void OnSuccessfulVersionNegotiation(
-      const ParsedQuicVersion& version) override;
+      const quic::ParsedQuicVersion& version) override;
   void OnConnectivityProbeReceived(
-      const QuicSocketAddress& self_address,
-      const QuicSocketAddress& peer_address) override;
+      const quic::QuicSocketAddress& self_address,
+      const quic::QuicSocketAddress& peer_address) override;
   void OnPathDegrading() override;
   bool HasOpenDynamicStreams() const override;
 
   // QuicChromiumPacketReader::Visitor methods:
   void OnReadError(int result, const DatagramClientSocket* socket) override;
-  bool OnPacket(const QuicReceivedPacket& packet,
-                const QuicSocketAddress& local_address,
-                const QuicSocketAddress& peer_address) override;
+  bool OnPacket(const quic::QuicReceivedPacket& packet,
+                const quic::QuicSocketAddress& local_address,
+                const quic::QuicSocketAddress& peer_address) override;
 
   // MultiplexedSession methods:
   bool GetRemoteEndpoint(IPEndPoint* endpoint) override;
@@ -510,16 +513,16 @@
   int CryptoConnect(const CompletionCallback& callback);
 
   // Causes the QuicConnectionHelper to start reading from all sockets
-  // and passing the data along to the QuicConnection.
+  // and passing the data along to the quic::QuicConnection.
   void StartReading();
 
   // Close the session because of |net_error| and notifies the factory
   // that this session has been closed, which will delete the session.
-  void CloseSessionOnError(int net_error, QuicErrorCode quic_error);
+  void CloseSessionOnError(int net_error, quic::QuicErrorCode quic_error);
 
   // Close the session because of |net_error| and notifies the factory
   // that this session has been closed later, which will delete the session.
-  void CloseSessionOnErrorLater(int net_error, QuicErrorCode quic_error);
+  void CloseSessionOnErrorLater(int net_error, quic::QuicErrorCode quic_error);
 
   std::unique_ptr<base::Value> GetInfoAsValue(
       const std::set<HostPortPair>& aliases);
@@ -542,7 +545,9 @@
                PrivacyMode privacy_mode,
                const SocketTag& socket_tag) const;
 
-  const QuicServerId& server_id() const { return session_key_.server_id(); }
+  const quic::QuicServerId& server_id() const {
+    return session_key_.server_id();
+  }
 
   // Attempts to migrate session when a write error is encountered.
   void MigrateSessionOnWriteError(int error_code);
@@ -639,13 +644,13 @@
   // Returns true if session has one ore more streams marked as non-migratable.
   bool HasNonMigratableStreams() const;
 
-  bool HandlePromised(QuicStreamId associated_id,
-                      QuicStreamId promised_id,
+  bool HandlePromised(quic::QuicStreamId associated_id,
+                      quic::QuicStreamId promised_id,
                       const spdy::SpdyHeaderBlock& headers) override;
 
-  void DeletePromised(QuicClientPromisedInfo* promised) override;
+  void DeletePromised(quic::QuicClientPromisedInfo* promised) override;
 
-  void OnPushStreamTimedOut(QuicStreamId stream_id) override;
+  void OnPushStreamTimedOut(quic::QuicStreamId stream_id) override;
 
   // Cancels the push if the push stream for |url| has not been claimed and is
   // still active. Otherwise, no-op.
@@ -653,7 +658,7 @@
 
   const LoadTimingInfo::ConnectTiming& GetConnectTiming();
 
-  QuicTransportVersion GetQuicVersion() const;
+  quic::QuicTransportVersion GetQuicVersion() const;
 
   // Returns the estimate of dynamically allocated memory in bytes.
   // See base/trace_event/memory_usage_estimator.h.
@@ -663,12 +668,12 @@
   bool require_confirmation() const { return require_confirmation_; }
 
  protected:
-  // QuicSession methods:
-  bool ShouldCreateIncomingDynamicStream(QuicStreamId id) override;
+  // quic::QuicSession methods:
+  bool ShouldCreateIncomingDynamicStream(quic::QuicStreamId id) override;
   bool ShouldCreateOutgoingDynamicStream() override;
 
   QuicChromiumClientStream* CreateIncomingDynamicStream(
-      QuicStreamId id) override;
+      quic::QuicStreamId id) override;
 
  private:
   friend class test::QuicChromiumClientSessionPeer;
@@ -681,7 +686,7 @@
   QuicChromiumClientStream* CreateOutgoingReliableStreamImpl(
       const NetworkTrafficAnnotationTag& traffic_annotation);
   QuicChromiumClientStream* CreateIncomingReliableStreamImpl(
-      QuicStreamId id,
+      quic::QuicStreamId id,
       const NetworkTrafficAnnotationTag& traffic_annotation);
   // A completion callback invoked when a read completes.
   void OnReadComplete(int result);
@@ -720,10 +725,10 @@
   void LogHandshakeStatusOnConnectionMigrationSignal() const;
   void HistogramAndLogMigrationFailure(const NetLogWithSource& net_log,
                                        QuicConnectionMigrationStatus status,
-                                       QuicConnectionId connection_id,
+                                       quic::QuicConnectionId connection_id,
                                        const std::string& reason);
   void HistogramAndLogMigrationSuccess(const NetLogWithSource& net_log,
-                                       QuicConnectionId connection_id);
+                                       quic::QuicConnectionId connection_id);
 
   // Notifies the factory that this session is going away and no more streams
   // should be created from it.  This needs to be called before closing any
@@ -748,9 +753,9 @@
   // path degrading per default network.
   int max_migrations_to_non_default_network_on_path_degrading_;
   int current_migrations_to_non_default_network_on_path_degrading_;
-  QuicClock* clock_;  // Unowned.
+  quic::QuicClock* clock_;  // Unowned.
   int yield_after_packets_;
-  QuicTime::Delta yield_after_duration_;
+  quic::QuicTime::Delta yield_after_duration_;
 
   base::TimeTicks most_recent_path_degrading_timestamp_;
   base::TimeTicks most_recent_network_disconnected_timestamp_;
@@ -758,7 +763,7 @@
   int most_recent_write_error_;
   base::TimeTicks most_recent_write_error_timestamp_;
 
-  std::unique_ptr<QuicCryptoClientStream> crypto_stream_;
+  std::unique_ptr<quic::QuicCryptoClientStream> crypto_stream_;
   QuicStreamFactory* stream_factory_;
   std::vector<std::unique_ptr<DatagramClientSocket>> sockets_;
   TransportSecurityState* transport_security_state_;
diff --git a/net/quic/chromium/quic_chromium_client_session_peer.cc b/net/quic/chromium/quic_chromium_client_session_peer.cc
index 6d9e001..a0f9658e 100644
--- a/net/quic/chromium/quic_chromium_client_session_peer.cc
+++ b/net/quic/chromium/quic_chromium_client_session_peer.cc
@@ -22,8 +22,9 @@
 void QuicChromiumClientSessionPeer::SetHostname(
     QuicChromiumClientSession* session,
     const std::string& hostname) {
-  QuicServerId server_id(hostname, session->session_key_.server_id().port(),
-                         session->session_key_.privacy_mode());
+  quic::QuicServerId server_id(hostname,
+                               session->session_key_.server_id().port(),
+                               session->session_key_.privacy_mode());
   session->session_key_ = QuicSessionKey(server_id, SocketTag());
 }
 
diff --git a/net/quic/chromium/quic_chromium_client_session_test.cc b/net/quic/chromium/quic_chromium_client_session_test.cc
index 701dbad..6cfb3d0 100644
--- a/net/quic/chromium/quic_chromium_client_session_test.cc
+++ b/net/quic/chromium/quic_chromium_client_session_test.cc
@@ -86,14 +86,15 @@
 };
 
 class QuicChromiumClientSessionTest
-    : public ::testing::TestWithParam<std::tuple<QuicTransportVersion, bool>>,
+    : public ::testing::TestWithParam<
+          std::tuple<quic::QuicTransportVersion, bool>>,
       public WithScopedTaskEnvironment {
  public:
   QuicChromiumClientSessionTest()
       : version_(std::get<0>(GetParam())),
         client_headers_include_h2_stream_dependency_(std::get<1>(GetParam())),
-        crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
-                       TlsClientHandshaker::CreateSslCtx()),
+        crypto_config_(quic::test::crypto_test_utils::ProofVerifierForTesting(),
+                       quic::TlsClientHandshaker::CreateSslCtx()),
         default_read_(new MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)),
         socket_data_(
             new SequencedSocketData(base::make_span(default_read_.get(), 1),
@@ -109,17 +110,17 @@
                       0,
                       &clock_,
                       kServerHostname,
-                      Perspective::IS_CLIENT,
+                      quic::Perspective::IS_CLIENT,
                       client_headers_include_h2_stream_dependency_),
         server_maker_(version_,
                       0,
                       &clock_,
                       kServerHostname,
-                      Perspective::IS_SERVER,
+                      quic::Perspective::IS_SERVER,
                       false),
         migrate_session_early_v2_(false) {
     // Advance the time, because timers do not like uninitialized times.
-    clock_.AdvanceTime(QuicTime::Delta::FromSeconds(1));
+    clock_.AdvanceTime(quic::QuicTime::Delta::FromSeconds(1));
   }
 
   void ResetHandleOnError(
@@ -139,11 +140,11 @@
     socket->Connect(kIpEndPoint);
     QuicChromiumPacketWriter* writer = new net::QuicChromiumPacketWriter(
         socket.get(), base::ThreadTaskRunnerHandle::Get().get());
-    QuicConnection* connection = new QuicConnection(
-        0, QuicSocketAddress(QuicSocketAddressImpl(kIpEndPoint)), &helper_,
-        &alarm_factory_, writer, true, Perspective::IS_CLIENT,
-        SupportedVersions(
-            net::ParsedQuicVersion(net::PROTOCOL_QUIC_CRYPTO, version_)));
+    quic::QuicConnection* connection = new quic::QuicConnection(
+        0, quic::QuicSocketAddress(quic::QuicSocketAddressImpl(kIpEndPoint)),
+        &helper_, &alarm_factory_, writer, true, quic::Perspective::IS_CLIENT,
+        quic::test::SupportedVersions(
+            quic::ParsedQuicVersion(quic::PROTOCOL_QUIC_CRYPTO, version_)));
     session_.reset(new TestingQuicChromiumClientSession(
         connection, std::move(socket),
         /*stream_factory=*/nullptr, &crypto_client_stream_factory_, &clock_,
@@ -155,9 +156,10 @@
         base::TimeDelta::FromSeconds(kMaxTimeOnNonDefaultNetworkSecs),
         kMaxMigrationsToNonDefaultNetworkOnPathDegrading,
         kQuicYieldAfterPacketsRead,
-        QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
+        quic::QuicTime::Delta::FromMilliseconds(
+            kQuicYieldAfterDurationMilliseconds),
         /*cert_verify_flags=*/0, client_headers_include_h2_stream_dependency_,
-        DefaultQuicConfig(), &crypto_config_, "CONNECTION_UNKNOWN",
+        quic::test::DefaultQuicConfig(), &crypto_config_, "CONNECTION_UNKNOWN",
         base::TimeTicks::Now(), base::TimeTicks::Now(), &push_promise_index_,
         &test_push_delegate_, base::ThreadTaskRunnerHandle::Get().get(),
         /*socket_performance_watcher=*/nullptr, &net_log_));
@@ -173,7 +175,7 @@
 
   void TearDown() override {
     if (session_)
-      session_->CloseSessionOnError(ERR_ABORTED, QUIC_INTERNAL_ERROR);
+      session_->CloseSessionOnError(ERR_ABORTED, quic::QUIC_INTERNAL_ERROR);
   }
 
   void CompleteCryptoHandshake() {
@@ -190,35 +192,35 @@
     return writer.release();
   }
 
-  QuicStreamId GetNthClientInitiatedStreamId(int n) {
-    return test::GetNthClientInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthClientInitiatedStreamId(int n) {
+    return quic::test::GetNthClientInitiatedStreamId(version_, n);
   }
 
-  QuicStreamId GetNthServerInitiatedStreamId(int n) {
-    return test::GetNthServerInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthServerInitiatedStreamId(int n) {
+    return quic::test::GetNthServerInitiatedStreamId(version_, n);
   }
 
-  const QuicTransportVersion version_;
+  const quic::QuicTransportVersion version_;
   const bool client_headers_include_h2_stream_dependency_;
   QuicFlagSaver flags_;  // Save/restore all QUIC flag values.
-  QuicCryptoClientConfig crypto_config_;
+  quic::QuicCryptoClientConfig crypto_config_;
   TestNetLog net_log_;
   BoundTestNetLog bound_test_net_log_;
   MockClientSocketFactory socket_factory_;
   std::unique_ptr<MockRead> default_read_;
   std::unique_ptr<SequencedSocketData> socket_data_;
-  MockClock clock_;
-  MockRandom random_;
+  quic::MockClock clock_;
+  quic::test::MockRandom random_;
   QuicChromiumConnectionHelper helper_;
-  MockAlarmFactory alarm_factory_;
+  quic::test::MockAlarmFactory alarm_factory_;
   TransportSecurityState transport_security_state_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
-  QuicClientPushPromiseIndex push_promise_index_;
+  quic::QuicClientPushPromiseIndex push_promise_index_;
   QuicSessionKey session_key_;
   HostPortPair destination_;
   std::unique_ptr<TestingQuicChromiumClientSession> session_;
   TestServerPushDelegate test_push_delegate_;
-  QuicConnectionVisitorInterface* visitor_;
+  quic::QuicConnectionVisitorInterface* visitor_;
   TestCompletionCallback callback_;
   QuicTestPacketMaker client_maker_;
   QuicTestPacketMaker server_maker_;
@@ -229,12 +231,13 @@
 INSTANTIATE_TEST_CASE_P(
     VersionIncludeStreamDependencySequence,
     QuicChromiumClientSessionTest,
-    ::testing::Combine(::testing::ValuesIn(AllSupportedTransportVersions()),
-                       ::testing::Bool()));
+    ::testing::Combine(
+        ::testing::ValuesIn(quic::AllSupportedTransportVersions()),
+        ::testing::Bool()));
 
 TEST_P(QuicChromiumClientSessionTest, IsFatalErrorNotSetForNonFatalError) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -257,7 +260,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, IsFatalErrorSetForFatalError) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -279,7 +282,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, CryptoConnect) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -314,7 +317,7 @@
   IPEndPoint address;
   EXPECT_EQ(OK, handle->GetPeerAddress(&address));
   EXPECT_EQ(kIpEndPoint, address);
-  EXPECT_TRUE(handle->CreatePacketBundler(QuicConnection::NO_ACK).get() !=
+  EXPECT_TRUE(handle->CreatePacketBundler(quic::QuicConnection::NO_ACK).get() !=
               nullptr);
 
   CompleteCryptoHandshake();
@@ -341,7 +344,7 @@
   EXPECT_EQ(session_net_log.source().id, handle->net_log().source().id);
   EXPECT_EQ(session_net_log.net_log(), handle->net_log().net_log());
   EXPECT_EQ(ERR_CONNECTION_CLOSED, handle->GetPeerAddress(&address));
-  EXPECT_TRUE(handle->CreatePacketBundler(QuicConnection::NO_ACK).get() ==
+  EXPECT_TRUE(handle->CreatePacketBundler(quic::QuicConnection::NO_ACK).get() ==
               nullptr);
   {
     // Verify that CreateHandle() works even after the session is closed.
@@ -366,7 +369,7 @@
   EXPECT_EQ(session_net_log.source().id, handle->net_log().source().id);
   EXPECT_EQ(session_net_log.net_log(), handle->net_log().net_log());
   EXPECT_EQ(ERR_CONNECTION_CLOSED, handle->GetPeerAddress(&address));
-  EXPECT_TRUE(handle->CreatePacketBundler(QuicConnection::NO_ACK).get() ==
+  EXPECT_TRUE(handle->CreatePacketBundler(quic::QuicConnection::NO_ACK).get() ==
               nullptr);
   ASSERT_EQ(
       ERR_CONNECTION_CLOSED,
@@ -460,7 +463,7 @@
                      client_maker_.MakeInitialSettingsPacket(1, nullptr));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeRstPacket(
                                       2, true, GetNthClientInitiatedStreamId(0),
-                                      QUIC_STREAM_CANCELLED));
+                                      quic::QUIC_STREAM_CANCELLED));
   quic_data.AddRead(ASYNC, ERR_IO_PENDING);
   quic_data.AddRead(ASYNC, OK);  // EOF
   quic_data.AddSocketDataToFactory(&socket_factory_);
@@ -488,7 +491,7 @@
                      client_maker_.MakeInitialSettingsPacket(1, nullptr));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeRstPacket(
                                       2, true, GetNthClientInitiatedStreamId(0),
-                                      QUIC_RST_ACKNOWLEDGEMENT));
+                                      quic::QUIC_RST_ACKNOWLEDGEMENT));
   quic_data.AddRead(ASYNC, ERR_IO_PENDING);
   quic_data.AddRead(ASYNC, OK);  // EOF
   quic_data.AddSocketDataToFactory(&socket_factory_);
@@ -514,9 +517,9 @@
                             callback.callback(), TRAFFIC_ANNOTATION_FOR_TESTS));
 
   // Close a stream and ensure the stream request completes.
-  QuicRstStreamFrame rst(kInvalidControlFrameId,
-                         GetNthClientInitiatedStreamId(0),
-                         QUIC_STREAM_CANCELLED, 0);
+  quic::QuicRstStreamFrame rst(quic::kInvalidControlFrameId,
+                               GetNthClientInitiatedStreamId(0),
+                               quic::QUIC_STREAM_CANCELLED, 0);
   session_->OnRstStream(rst);
   ASSERT_TRUE(callback.have_result());
   EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -566,8 +569,8 @@
                                    TRAFFIC_ANNOTATION_FOR_TESTS));
 
   session_->connection()->CloseConnection(
-      QUIC_NETWORK_IDLE_TIMEOUT, "Timed out",
-      ConnectionCloseBehavior::SILENT_CLOSE);
+      quic::QUIC_NETWORK_IDLE_TIMEOUT, "Timed out",
+      quic::ConnectionCloseBehavior::SILENT_CLOSE);
 
   // Pump the message loop to read the connection close packet.
   base::RunLoop().RunUntilIdle();
@@ -583,7 +586,7 @@
                      client_maker_.MakeInitialSettingsPacket(1, nullptr));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeRstPacket(
                                       2, true, GetNthClientInitiatedStreamId(0),
-                                      QUIC_RST_ACKNOWLEDGEMENT));
+                                      quic::QUIC_RST_ACKNOWLEDGEMENT));
   quic_data.AddRead(ASYNC, ERR_IO_PENDING);
   quic_data.AddRead(ASYNC, OK);  // EOF
   quic_data.AddSocketDataToFactory(&socket_factory_);
@@ -612,9 +615,9 @@
   handle.reset();
 
   // Close a stream and ensure that no new stream is created.
-  QuicRstStreamFrame rst(kInvalidControlFrameId,
-                         GetNthClientInitiatedStreamId(0),
-                         QUIC_STREAM_CANCELLED, 0);
+  quic::QuicRstStreamFrame rst(quic::kInvalidControlFrameId,
+                               GetNthClientInitiatedStreamId(0),
+                               quic::QUIC_STREAM_CANCELLED, 0);
   session_->OnRstStream(rst);
   EXPECT_EQ(kMaxOpenStreams - 1, session_->GetNumOpenOutgoingStreams());
 
@@ -627,9 +630,10 @@
   MockQuicData quic_data;
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacket(1, nullptr));
-  quic_data.AddRead(ASYNC, server_maker_.MakeConnectionClosePacket(
-                               1, false, QUIC_CRYPTO_VERSION_NOT_SUPPORTED,
-                               "Time to panic!"));
+  quic_data.AddRead(
+      ASYNC,
+      server_maker_.MakeConnectionClosePacket(
+          1, false, quic::QUIC_CRYPTO_VERSION_NOT_SUPPORTED, "Time to panic!"));
   quic_data.AddSocketDataToFactory(&socket_factory_);
 
   Initialize();
@@ -654,9 +658,10 @@
 TEST_P(QuicChromiumClientSessionTest, ConnectionCloseBeforeHandshakeConfirmed) {
   MockQuicData quic_data;
   quic_data.AddRead(ASYNC, ERR_IO_PENDING);
-  quic_data.AddRead(ASYNC, server_maker_.MakeConnectionClosePacket(
-                               1, false, QUIC_CRYPTO_VERSION_NOT_SUPPORTED,
-                               "Time to panic!"));
+  quic_data.AddRead(
+      ASYNC,
+      server_maker_.MakeConnectionClosePacket(
+          1, false, quic::QUIC_CRYPTO_VERSION_NOT_SUPPORTED, "Time to panic!"));
   quic_data.AddSocketDataToFactory(&socket_factory_);
 
   Initialize();
@@ -686,9 +691,10 @@
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacket(1, nullptr));
   quic_data.AddRead(ASYNC, ERR_IO_PENDING);
-  quic_data.AddRead(ASYNC, server_maker_.MakeConnectionClosePacket(
-                               1, false, QUIC_CRYPTO_VERSION_NOT_SUPPORTED,
-                               "Time to panic!"));
+  quic_data.AddRead(
+      ASYNC,
+      server_maker_.MakeConnectionClosePacket(
+          1, false, quic::QUIC_CRYPTO_VERSION_NOT_SUPPORTED, "Time to panic!"));
   quic_data.AddSocketDataToFactory(&socket_factory_);
 
   Initialize();
@@ -724,10 +730,11 @@
 
 TEST_P(QuicChromiumClientSessionTest, MaxNumStreams) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
-  std::unique_ptr<QuicEncryptedPacket> client_rst(client_maker_.MakeRstPacket(
-      2, true, GetNthClientInitiatedStreamId(0), QUIC_RST_ACKNOWLEDGEMENT));
+  std::unique_ptr<quic::QuicEncryptedPacket> client_rst(
+      client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
+                                  quic::QUIC_RST_ACKNOWLEDGEMENT));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1),
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 2)};
@@ -751,13 +758,13 @@
   EXPECT_EQ(kMaxOpenStreams, session_->GetNumOpenOutgoingStreams());
 
   // Close a stream and ensure I can now open a new one.
-  QuicStreamId stream_id = streams[0]->id();
+  quic::QuicStreamId stream_id = streams[0]->id();
   session_->CloseStream(stream_id);
 
   EXPECT_FALSE(QuicChromiumClientSessionPeer::CreateOutgoingDynamicStream(
       session_.get()));
-  QuicRstStreamFrame rst1(kInvalidControlFrameId, stream_id,
-                          QUIC_STREAM_NO_ERROR, 0);
+  quic::QuicRstStreamFrame rst1(quic::kInvalidControlFrameId, stream_id,
+                                quic::QUIC_STREAM_NO_ERROR, 0);
   session_->OnRstStream(rst1);
   EXPECT_EQ(kMaxOpenStreams - 1, session_->GetNumOpenOutgoingStreams());
   EXPECT_TRUE(QuicChromiumClientSessionPeer::CreateOutgoingDynamicStream(
@@ -767,10 +774,11 @@
 TEST_P(QuicChromiumClientSessionTest, PushStreamTimedOutNoResponse) {
   base::HistogramTester histogram_tester;
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
-  std::unique_ptr<QuicEncryptedPacket> client_rst(client_maker_.MakeRstPacket(
-      2, true, GetNthServerInitiatedStreamId(0), QUIC_PUSH_STREAM_TIMED_OUT));
+  std::unique_ptr<quic::QuicEncryptedPacket> client_rst(
+      client_maker_.MakeRstPacket(2, true, GetNthServerInitiatedStreamId(0),
+                                  quic::QUIC_PUSH_STREAM_TIMED_OUT));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1),
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 2)};
@@ -800,11 +808,12 @@
   EXPECT_TRUE(session_->HandlePromised(
       stream->id(), GetNthServerInitiatedStreamId(0), promise_headers));
 
-  QuicClientPromisedInfo* promised =
+  quic::QuicClientPromisedInfo* promised =
       session_->GetPromisedById(GetNthServerInitiatedStreamId(0));
   EXPECT_TRUE(promised);
   // Fire alarm to time out the push stream.
-  alarm_factory_.FireAlarm(QuicClientPromisedInfoPeer::GetAlarm(promised));
+  alarm_factory_.FireAlarm(
+      quic::test::QuicClientPromisedInfoPeer::GetAlarm(promised));
   EXPECT_FALSE(
       session_->GetPromisedByUrl("https://www.example.org/pushed.jpg"));
   EXPECT_EQ(0u,
@@ -816,10 +825,11 @@
 TEST_P(QuicChromiumClientSessionTest, PushStreamTimedOutWithResponse) {
   base::HistogramTester histogram_tester;
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
-  std::unique_ptr<QuicEncryptedPacket> client_rst(client_maker_.MakeRstPacket(
-      2, true, GetNthServerInitiatedStreamId(0), QUIC_PUSH_STREAM_TIMED_OUT));
+  std::unique_ptr<quic::QuicEncryptedPacket> client_rst(
+      client_maker_.MakeRstPacket(2, true, GetNthServerInitiatedStreamId(0),
+                                  quic::QUIC_PUSH_STREAM_TIMED_OUT));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1),
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 2)};
@@ -852,15 +862,16 @@
   session_->OnInitialHeadersComplete(GetNthServerInitiatedStreamId(0),
                                      spdy::SpdyHeaderBlock());
   // Read data on the pushed stream.
-  QuicStreamFrame data(GetNthServerInitiatedStreamId(0), false, 0,
-                       QuicStringPiece("SP"));
+  quic::QuicStreamFrame data(GetNthServerInitiatedStreamId(0), false, 0,
+                             quic::QuicStringPiece("SP"));
   session_->OnStreamFrame(data);
 
-  QuicClientPromisedInfo* promised =
+  quic::QuicClientPromisedInfo* promised =
       session_->GetPromisedById(GetNthServerInitiatedStreamId(0));
   EXPECT_TRUE(promised);
   // Fire alarm to time out the push stream.
-  alarm_factory_.FireAlarm(QuicClientPromisedInfoPeer::GetAlarm(promised));
+  alarm_factory_.FireAlarm(
+      quic::test::QuicClientPromisedInfoPeer::GetAlarm(promised));
   EXPECT_EQ(2u,
             QuicChromiumClientSessionPeer::GetPushedBytesCount(session_.get()));
   EXPECT_EQ(2u, QuicChromiumClientSessionPeer::GetPushedAndUnclaimedBytesCount(
@@ -869,10 +880,11 @@
 
 TEST_P(QuicChromiumClientSessionTest, CancelPushWhenPendingValidation) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
-  std::unique_ptr<QuicEncryptedPacket> client_rst(client_maker_.MakeRstPacket(
-      2, true, GetNthClientInitiatedStreamId(0), QUIC_RST_ACKNOWLEDGEMENT));
+  std::unique_ptr<quic::QuicEncryptedPacket> client_rst(
+      client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
+                                  quic::QUIC_RST_ACKNOWLEDGEMENT));
 
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1),
@@ -903,13 +915,13 @@
   EXPECT_TRUE(session_->HandlePromised(
       stream->id(), GetNthServerInitiatedStreamId(0), promise_headers));
 
-  QuicClientPromisedInfo* promised =
+  quic::QuicClientPromisedInfo* promised =
       session_->GetPromisedById(GetNthServerInitiatedStreamId(0));
   EXPECT_TRUE(promised);
 
   // Initiate rendezvous.
   spdy::SpdyHeaderBlock client_request = promise_headers.Clone();
-  TestPushPromiseDelegate delegate(/*match=*/true);
+  quic::test::TestPushPromiseDelegate delegate(/*match=*/true);
   promised->HandleClientRequest(client_request, &delegate);
 
   // Cancel the push before receiving the response to the pushed request.
@@ -924,10 +936,11 @@
 TEST_P(QuicChromiumClientSessionTest, CancelPushBeforeReceivingResponse) {
   base::HistogramTester histogram_tester;
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
-  std::unique_ptr<QuicEncryptedPacket> client_rst(client_maker_.MakeRstPacket(
-      2, true, GetNthServerInitiatedStreamId(0), QUIC_STREAM_CANCELLED));
+  std::unique_ptr<quic::QuicEncryptedPacket> client_rst(
+      client_maker_.MakeRstPacket(2, true, GetNthServerInitiatedStreamId(0),
+                                  quic::QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1),
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 2)};
@@ -957,7 +970,7 @@
   EXPECT_TRUE(session_->HandlePromised(
       stream->id(), GetNthServerInitiatedStreamId(0), promise_headers));
 
-  QuicClientPromisedInfo* promised =
+  quic::QuicClientPromisedInfo* promised =
       session_->GetPromisedById(GetNthServerInitiatedStreamId(0));
   EXPECT_TRUE(promised);
   // Cancel the push before receiving the response to the pushed request.
@@ -974,10 +987,11 @@
 TEST_P(QuicChromiumClientSessionTest, CancelPushAfterReceivingResponse) {
   base::HistogramTester histogram_tester;
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
-  std::unique_ptr<QuicEncryptedPacket> client_rst(client_maker_.MakeRstPacket(
-      2, true, GetNthServerInitiatedStreamId(0), QUIC_STREAM_CANCELLED));
+  std::unique_ptr<quic::QuicEncryptedPacket> client_rst(
+      client_maker_.MakeRstPacket(2, true, GetNthServerInitiatedStreamId(0),
+                                  quic::QUIC_STREAM_CANCELLED));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1),
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 2)};
@@ -1010,11 +1024,11 @@
   session_->OnInitialHeadersComplete(GetNthServerInitiatedStreamId(0),
                                      spdy::SpdyHeaderBlock());
   // Read data on the pushed stream.
-  QuicStreamFrame data(GetNthServerInitiatedStreamId(0), false, 0,
-                       QuicStringPiece("SP"));
+  quic::QuicStreamFrame data(GetNthServerInitiatedStreamId(0), false, 0,
+                             quic::QuicStringPiece("SP"));
   session_->OnStreamFrame(data);
 
-  QuicClientPromisedInfo* promised =
+  quic::QuicClientPromisedInfo* promised =
       session_->GetPromisedById(GetNthServerInitiatedStreamId(0));
   EXPECT_TRUE(promised);
   // Cancel the push after receiving data on the push stream.
@@ -1030,10 +1044,11 @@
 
 TEST_P(QuicChromiumClientSessionTest, MaxNumStreamsViaRequest) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
-  std::unique_ptr<QuicEncryptedPacket> client_rst(client_maker_.MakeRstPacket(
-      2, true, GetNthClientInitiatedStreamId(0), QUIC_RST_ACKNOWLEDGEMENT));
+  std::unique_ptr<quic::QuicEncryptedPacket> client_rst(
+      client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
+                                  quic::QUIC_RST_ACKNOWLEDGEMENT));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1),
       MockWrite(ASYNC, client_rst->data(), client_rst->length(), 2)};
@@ -1061,10 +1076,10 @@
                             callback.callback(), TRAFFIC_ANNOTATION_FOR_TESTS));
 
   // Close a stream and ensure I can now open a new one.
-  QuicStreamId stream_id = streams[0]->id();
+  quic::QuicStreamId stream_id = streams[0]->id();
   session_->CloseStream(stream_id);
-  QuicRstStreamFrame rst1(kInvalidControlFrameId, stream_id,
-                          QUIC_STREAM_NO_ERROR, 0);
+  quic::QuicRstStreamFrame rst1(quic::kInvalidControlFrameId, stream_id,
+                                quic::QUIC_STREAM_NO_ERROR, 0);
   session_->OnRstStream(rst1);
   ASSERT_TRUE(callback.have_result());
   EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -1073,7 +1088,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, GoAwayReceived) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -1083,15 +1098,16 @@
 
   // After receiving a GoAway, I should no longer be able to create outgoing
   // streams.
-  session_->connection()->OnGoAwayFrame(QuicGoAwayFrame(
-      kInvalidControlFrameId, QUIC_PEER_GOING_AWAY, 1u, "Going away."));
+  session_->connection()->OnGoAwayFrame(
+      quic::QuicGoAwayFrame(quic::kInvalidControlFrameId,
+                            quic::QUIC_PEER_GOING_AWAY, 1u, "Going away."));
   EXPECT_EQ(nullptr, QuicChromiumClientSessionPeer::CreateOutgoingDynamicStream(
                          session_.get()));
 }
 
 TEST_P(QuicChromiumClientSessionTest, CanPool) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -1132,7 +1148,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, ConnectionPooledWithTlsChannelId) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -1165,7 +1181,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, ConnectionNotPooledWithDifferentPin) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -1198,7 +1214,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, ConnectionPooledWithMatchingPin) {
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -1230,7 +1246,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, MigrateToSocket) {
   MockRead old_reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite old_writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -1239,12 +1255,12 @@
   CompleteCryptoHandshake();
 
   char data[] = "ABCD";
-  std::unique_ptr<QuicEncryptedPacket> client_ping;
-  std::unique_ptr<QuicEncryptedPacket> ack_and_data_out;
-    client_ping = client_maker_.MakeAckAndPingPacket(2, false, 1, 1, 1);
-    ack_and_data_out = client_maker_.MakeDataPacket(3, 5, false, false, 0,
-                                                    QuicStringPiece(data));
-  std::unique_ptr<QuicEncryptedPacket> server_ping(
+  std::unique_ptr<quic::QuicEncryptedPacket> client_ping;
+  std::unique_ptr<quic::QuicEncryptedPacket> ack_and_data_out;
+  client_ping = client_maker_.MakeAckAndPingPacket(2, false, 1, 1, 1);
+  ack_and_data_out = client_maker_.MakeDataPacket(3, 5, false, false, 0,
+                                                  quic::QuicStringPiece(data));
+  std::unique_ptr<quic::QuicEncryptedPacket> server_ping(
       server_maker_.MakePingPacket(1, /*include_version=*/false));
   MockRead reads[] = {
       MockRead(SYNCHRONOUS, server_ping->data(), server_ping->length(), 0),
@@ -1265,7 +1281,7 @@
   std::unique_ptr<QuicChromiumPacketReader> new_reader(
       new QuicChromiumPacketReader(new_socket.get(), &clock_, session_.get(),
                                    kQuicYieldAfterPacketsRead,
-                                   QuicTime::Delta::FromMilliseconds(
+                                   quic::QuicTime::Delta::FromMilliseconds(
                                        kQuicYieldAfterDurationMilliseconds),
                                    bound_test_net_log_.bound()));
   std::unique_ptr<QuicChromiumPacketWriter> new_writer(
@@ -1284,9 +1300,9 @@
   struct iovec iov[1];
   iov[0].iov_base = data;
   iov[0].iov_len = 4;
-  QuicStreamPeer::SendBuffer(stream).SaveStreamData(iov, 1, 0, 4);
-  QuicStreamPeer::SetStreamBytesWritten(4, stream);
-  session_->WritevData(stream, stream->id(), 4, 0, NO_FIN);
+  quic::test::QuicStreamPeer::SendBuffer(stream).SaveStreamData(iov, 1, 0, 4);
+  quic::test::QuicStreamPeer::SetStreamBytesWritten(4, stream);
+  session_->WritevData(stream, stream->id(), 4, 0, quic::NO_FIN);
 
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
@@ -1294,7 +1310,7 @@
 
 TEST_P(QuicChromiumClientSessionTest, MigrateToSocketMaxReaders) {
   MockRead old_reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite old_writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 1)};
@@ -1304,7 +1320,7 @@
 
   for (size_t i = 0; i < kMaxReadersPerQuicSession; ++i) {
     MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 1)};
-    std::unique_ptr<QuicEncryptedPacket> ping_out(
+    std::unique_ptr<quic::QuicEncryptedPacket> ping_out(
         client_maker_.MakePingPacket(i + 2, /*include_version=*/true));
     MockWrite writes[] = {
         MockWrite(SYNCHRONOUS, ping_out->data(), ping_out->length(), i + 2)};
@@ -1321,7 +1337,7 @@
     std::unique_ptr<QuicChromiumPacketReader> new_reader(
         new QuicChromiumPacketReader(new_socket.get(), &clock_, session_.get(),
                                      kQuicYieldAfterPacketsRead,
-                                     QuicTime::Delta::FromMilliseconds(
+                                     quic::QuicTime::Delta::FromMilliseconds(
                                          kQuicYieldAfterDurationMilliseconds),
                                      bound_test_net_log_.bound()));
     std::unique_ptr<QuicChromiumPacketWriter> new_writer(
@@ -1346,11 +1362,11 @@
 }
 
 TEST_P(QuicChromiumClientSessionTest, MigrateToSocketReadError) {
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
-  std::unique_ptr<QuicEncryptedPacket> client_ping;
-    client_ping = client_maker_.MakeAckAndPingPacket(2, false, 1, 1, 1);
-  std::unique_ptr<QuicEncryptedPacket> server_ping(
+  std::unique_ptr<quic::QuicEncryptedPacket> client_ping;
+  client_ping = client_maker_.MakeAckAndPingPacket(2, false, 1, 1, 1);
+  std::unique_ptr<quic::QuicEncryptedPacket> server_ping(
       server_maker_.MakePingPacket(1, /*include_version=*/false));
   MockWrite old_writes[] = {
       MockWrite(ASYNC, settings_packet->data(), settings_packet->length(), 0)};
@@ -1381,7 +1397,7 @@
   std::unique_ptr<QuicChromiumPacketReader> new_reader(
       new QuicChromiumPacketReader(new_socket.get(), &clock_, session_.get(),
                                    kQuicYieldAfterPacketsRead,
-                                   QuicTime::Delta::FromMilliseconds(
+                                   quic::QuicTime::Delta::FromMilliseconds(
                                        kQuicYieldAfterDurationMilliseconds),
                                    bound_test_net_log_.bound()));
   std::unique_ptr<QuicChromiumPacketWriter> new_writer(
@@ -1429,7 +1445,7 @@
   Initialize();
   CompleteCryptoHandshake();
 
-  EXPECT_EQ(QuicTime::Delta::FromMilliseconds(100),
+  EXPECT_EQ(quic::QuicTime::Delta::FromMilliseconds(100),
             session_->connection()->retransmittable_on_wire_timeout());
 
   // Open a stream since the connection only sends PINGs to keep a
@@ -1437,8 +1453,9 @@
   EXPECT_TRUE(QuicChromiumClientSessionPeer::CreateOutgoingDynamicStream(
       session_.get()));
 
-  QuicAlarm* alarm =
-      QuicConnectionPeer::GetRetransmittableOnWireAlarm(session_->connection());
+  quic::QuicAlarm* alarm =
+      quic::test::QuicConnectionPeer::GetRetransmittableOnWireAlarm(
+          session_->connection());
   EXPECT_FALSE(alarm->IsSet());
 
   // Send PING, which will be ACKed by the server. After the ACK, there will be
@@ -1446,12 +1463,13 @@
   session_->SendPing();
   base::RunLoop().RunUntilIdle();
   EXPECT_TRUE(alarm->IsSet());
-  EXPECT_EQ(clock_.ApproximateNow() + QuicTime::Delta::FromMilliseconds(100),
-            alarm->deadline());
+  EXPECT_EQ(
+      clock_.ApproximateNow() + quic::QuicTime::Delta::FromMilliseconds(100),
+      alarm->deadline());
 
   // Advance clock and simulate the alarm firing. This should cause a PING to be
   // sent.
-  clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(100));
+  clock_.AdvanceTime(quic::QuicTime::Delta::FromMilliseconds(100));
   alarm_factory_.FireAlarm(alarm);
   base::RunLoop().RunUntilIdle();
 
diff --git a/net/quic/chromium/quic_chromium_client_stream.cc b/net/quic/chromium/quic_chromium_client_stream.cc
index 03886e23..bbfc4614 100644
--- a/net/quic/chromium/quic_chromium_client_stream.cc
+++ b/net/quic/chromium/quic_chromium_client_stream.cc
@@ -54,7 +54,7 @@
     stream_->ClearHandle();
     // TODO(rch): If stream_ is still valid, it should probably be Reset()
     // so that it does not leak.
-    // stream_->Reset(QUIC_STREAM_CANCELLED);
+    // stream_->Reset(quic::QUIC_STREAM_CANCELLED);
   }
 }
 
@@ -102,8 +102,9 @@
 
 void QuicChromiumClientStream::Handle::OnClose() {
   if (net_error_ == ERR_UNEXPECTED) {
-    if (stream_error() == QUIC_STREAM_NO_ERROR &&
-        connection_error() == QUIC_NO_ERROR && fin_sent() && fin_received()) {
+    if (stream_error() == quic::QUIC_STREAM_NO_ERROR &&
+        connection_error() == quic::QUIC_NO_ERROR && fin_sent() &&
+        fin_received()) {
       net_error_ = ERR_CONNECTION_CLOSED;
     } else {
       net_error_ = ERR_QUIC_PROTOCOL_ERROR;
@@ -197,7 +198,7 @@
 int QuicChromiumClientStream::Handle::WriteHeaders(
     spdy::SpdyHeaderBlock header_block,
     bool fin,
-    QuicReferenceCountedPointer<QuicAckListenerInterface>
+    quic::QuicReferenceCountedPointer<quic::QuicAckListenerInterface>
         ack_notifier_delegate) {
   if (!stream_)
     return 0;
@@ -260,24 +261,25 @@
 }
 
 void QuicChromiumClientStream::Handle::Reset(
-    QuicRstStreamErrorCode error_code) {
+    quic::QuicRstStreamErrorCode error_code) {
   if (stream_)
     stream_->Reset(error_code);
 }
 
-QuicStreamId QuicChromiumClientStream::Handle::id() const {
+quic::QuicStreamId QuicChromiumClientStream::Handle::id() const {
   if (!stream_)
     return id_;
   return stream_->id();
 }
 
-QuicErrorCode QuicChromiumClientStream::Handle::connection_error() const {
+quic::QuicErrorCode QuicChromiumClientStream::Handle::connection_error() const {
   if (!stream_)
     return connection_error_;
   return stream_->connection_error();
 }
 
-QuicRstStreamErrorCode QuicChromiumClientStream::Handle::stream_error() const {
+quic::QuicRstStreamErrorCode QuicChromiumClientStream::Handle::stream_error()
+    const {
   if (!stream_)
     return stream_error_;
   return stream_->stream_error();
@@ -332,9 +334,9 @@
 }
 
 void QuicChromiumClientStream::Handle::OnPromiseHeaderList(
-    QuicStreamId promised_id,
+    quic::QuicStreamId promised_id,
     size_t frame_len,
-    const QuicHeaderList& header_list) {
+    const quic::QuicHeaderList& header_list) {
   stream_->OnPromiseHeaderList(promised_id, frame_len, header_list);
 }
 
@@ -385,8 +387,8 @@
   if (rv < 0 || stream_)
     return rv;
 
-  if (stream_error_ == QUIC_STREAM_NO_ERROR &&
-      connection_error_ == QUIC_NO_ERROR && fin_sent_ && fin_received_) {
+  if (stream_error_ == quic::QUIC_STREAM_NO_ERROR &&
+      connection_error_ == quic::QUIC_NO_ERROR && fin_sent_ && fin_received_) {
     return rv;
   }
 
@@ -394,11 +396,11 @@
 }
 
 QuicChromiumClientStream::QuicChromiumClientStream(
-    QuicStreamId id,
-    QuicSpdyClientSessionBase* session,
+    quic::QuicStreamId id,
+    quic::QuicSpdyClientSessionBase* session,
     const NetLogWithSource& net_log,
     const NetworkTrafficAnnotationTag& traffic_annotation)
-    : QuicSpdyStream(id, session),
+    : quic::QuicSpdyStream(id, session),
       net_log_(net_log),
       handle_(nullptr),
       headers_delivered_(false),
@@ -417,15 +419,16 @@
 void QuicChromiumClientStream::OnInitialHeadersComplete(
     bool fin,
     size_t frame_len,
-    const QuicHeaderList& header_list) {
-  QuicSpdyStream::OnInitialHeadersComplete(fin, frame_len, header_list);
+    const quic::QuicHeaderList& header_list) {
+  quic::QuicSpdyStream::OnInitialHeadersComplete(fin, frame_len, header_list);
 
   spdy::SpdyHeaderBlock header_block;
   int64_t length = -1;
-  if (!SpdyUtils::CopyAndValidateHeaders(header_list, &length, &header_block)) {
+  if (!quic::SpdyUtils::CopyAndValidateHeaders(header_list, &length,
+                                               &header_block)) {
     DLOG(ERROR) << "Failed to parse header list: " << header_list.DebugString();
     ConsumeHeaderList();
-    Reset(QUIC_BAD_APPLICATION_PAYLOAD);
+    Reset(quic::QUIC_BAD_APPLICATION_PAYLOAD);
     return;
   }
 
@@ -445,8 +448,8 @@
 void QuicChromiumClientStream::OnTrailingHeadersComplete(
     bool fin,
     size_t frame_len,
-    const QuicHeaderList& header_list) {
-  QuicSpdyStream::OnTrailingHeadersComplete(fin, frame_len, header_list);
+    const quic::QuicHeaderList& header_list) {
+  quic::QuicSpdyStream::OnTrailingHeadersComplete(fin, frame_len, header_list);
   trailing_headers_frame_len_ = frame_len;
   if (handle_) {
     // The handle will be notified of the headers via a posted task.
@@ -455,16 +458,16 @@
 }
 
 void QuicChromiumClientStream::OnPromiseHeaderList(
-    QuicStreamId promised_id,
+    quic::QuicStreamId promised_id,
     size_t frame_len,
-    const QuicHeaderList& header_list) {
+    const quic::QuicHeaderList& header_list) {
   spdy::SpdyHeaderBlock promise_headers;
   int64_t content_length = -1;
-  if (!SpdyUtils::CopyAndValidateHeaders(header_list, &content_length,
-                                         &promise_headers)) {
+  if (!quic::SpdyUtils::CopyAndValidateHeaders(header_list, &content_length,
+                                               &promise_headers)) {
     DLOG(ERROR) << "Failed to parse header list: " << header_list.DebugString();
     ConsumeHeaderList();
-    Reset(QUIC_BAD_APPLICATION_PAYLOAD);
+    Reset(quic::QUIC_BAD_APPLICATION_PAYLOAD);
     return;
   }
   ConsumeHeaderList();
@@ -495,11 +498,11 @@
     handle_->OnClose();
     handle_ = nullptr;
   }
-  QuicStream::OnClose();
+  quic::QuicStream::OnClose();
 }
 
 void QuicChromiumClientStream::OnCanWrite() {
-  QuicStream::OnCanWrite();
+  quic::QuicStream::OnCanWrite();
 
   if (!HasBufferedData() && handle_)
     handle_->OnCanWrite();
@@ -508,7 +511,8 @@
 size_t QuicChromiumClientStream::WriteHeaders(
     spdy::SpdyHeaderBlock header_block,
     bool fin,
-    QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) {
+    quic::QuicReferenceCountedPointer<quic::QuicAckListenerInterface>
+        ack_listener) {
   if (!session()->IsCryptoHandshakeConfirmed()) {
     auto entry = header_block.find(":method");
     DCHECK(entry != header_block.end());
@@ -517,13 +521,14 @@
   net_log_.AddEvent(
       NetLogEventType::QUIC_CHROMIUM_CLIENT_STREAM_SEND_REQUEST_HEADERS,
       base::Bind(&QuicRequestNetLogCallback, id(), &header_block, priority()));
-  size_t len = QuicSpdyStream::WriteHeaders(std::move(header_block), fin,
-                                            std::move(ack_listener));
+  size_t len = quic::QuicSpdyStream::WriteHeaders(std::move(header_block), fin,
+                                                  std::move(ack_listener));
   initial_headers_sent_ = true;
   return len;
 }
 
-bool QuicChromiumClientStream::WriteStreamData(QuicStringPiece data, bool fin) {
+bool QuicChromiumClientStream::WriteStreamData(quic::QuicStringPiece data,
+                                               bool fin) {
   // Must not be called when data is buffered.
   DCHECK(!HasBufferedData());
   // Writes the data, or buffers it.
@@ -540,7 +545,7 @@
   // Writes the data, or buffers it.
     for (size_t i = 0; i < buffers.size(); ++i) {
       bool is_fin = fin && (i == buffers.size() - 1);
-      QuicStringPiece string_data(buffers[i]->data(), lengths[i]);
+      quic::QuicStringPiece string_data(buffers[i]->data(), lengths[i]);
       WriteOrBufferData(string_data, is_fin, nullptr);
     }
   return !HasBufferedData();  // Was all data written?
@@ -675,7 +680,7 @@
 }
 
 bool QuicChromiumClientStream::IsFirstStream() {
-  return id() == kHeadersStreamId + 2;
+  return id() == quic::kHeadersStreamId + 2;
 }
 
 }  // namespace net
diff --git a/net/quic/chromium/quic_chromium_client_stream.h b/net/quic/chromium/quic_chromium_client_stream.h
index 93a2063f..06db065 100644
--- a/net/quic/chromium/quic_chromium_client_stream.h
+++ b/net/quic/chromium/quic_chromium_client_stream.h
@@ -26,13 +26,15 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/traffic_annotation/network_traffic_annotation.h"
 
-namespace net {
-
+namespace quic {
 class QuicSpdyClientSessionBase;
+}  // namespace quic
+namespace net {
 
 // A client-initiated ReliableQuicStream.  Instances of this class
 // are owned by the QuicClientSession which created them.
-class NET_EXPORT_PRIVATE QuicChromiumClientStream : public QuicSpdyStream {
+class NET_EXPORT_PRIVATE QuicChromiumClientStream
+    : public quic::QuicSpdyStream {
  public:
   // Wrapper for interacting with the session in a restricted fashion.
   class NET_EXPORT_PRIVATE Handle {
@@ -74,10 +76,11 @@
     // headers are ACK'd by the peer. Returns a net error code if there is
     // an error writing the headers, or the number of bytes written on
     // success. Will not return ERR_IO_PENDING.
-    int WriteHeaders(spdy::SpdyHeaderBlock header_block,
-                     bool fin,
-                     QuicReferenceCountedPointer<QuicAckListenerInterface>
-                         ack_notifier_delegate);
+    int WriteHeaders(
+        spdy::SpdyHeaderBlock header_block,
+        bool fin,
+        quic::QuicReferenceCountedPointer<quic::QuicAckListenerInterface>
+            ack_notifier_delegate);
 
     // Writes |data| to the peer. Closes the write side if |fin| is true.
     // If the data could not be written immediately, returns ERR_IO_PENDING
@@ -108,11 +111,11 @@
     void SetPriority(spdy::SpdyPriority priority);
 
     // Sends a RST_STREAM frame to the peer and closes the streams.
-    void Reset(QuicRstStreamErrorCode error_code);
+    void Reset(quic::QuicRstStreamErrorCode error_code);
 
-    QuicStreamId id() const;
-    QuicErrorCode connection_error() const;
-    QuicRstStreamErrorCode stream_error() const;
+    quic::QuicStreamId id() const;
+    quic::QuicErrorCode connection_error() const;
+    quic::QuicRstStreamErrorCode stream_error() const;
     bool fin_sent() const;
     bool fin_received() const;
     uint64_t stream_bytes_read() const;
@@ -123,9 +126,9 @@
     bool IsFirstStream() const;
 
     // TODO(rch): Move these test-only methods to a peer, or else remove.
-    void OnPromiseHeaderList(QuicStreamId promised_id,
+    void OnPromiseHeaderList(quic::QuicStreamId promised_id,
                              size_t frame_len,
-                             const QuicHeaderList& header_list);
+                             const quic::QuicHeaderList& header_list);
     bool can_migrate();
 
     const NetLogWithSource& net_log() const;
@@ -174,9 +177,9 @@
     // asynchronously.
     CompletionCallback write_callback_;
 
-    QuicStreamId id_;
-    QuicErrorCode connection_error_;
-    QuicRstStreamErrorCode stream_error_;
+    quic::QuicStreamId id_;
+    quic::QuicErrorCode connection_error_;
+    quic::QuicRstStreamErrorCode stream_error_;
     bool fin_sent_;
     bool fin_received_;
     uint64_t stream_bytes_read_;
@@ -195,39 +198,42 @@
   };
 
   QuicChromiumClientStream(
-      QuicStreamId id,
-      QuicSpdyClientSessionBase* session,
+      quic::QuicStreamId id,
+      quic::QuicSpdyClientSessionBase* session,
       const NetLogWithSource& net_log,
       const NetworkTrafficAnnotationTag& traffic_annotation);
 
   ~QuicChromiumClientStream() override;
 
-  // QuicSpdyStream
-  void OnInitialHeadersComplete(bool fin,
-                                size_t frame_len,
-                                const QuicHeaderList& header_list) override;
-  void OnTrailingHeadersComplete(bool fin,
-                                 size_t frame_len,
-                                 const QuicHeaderList& header_list) override;
-  void OnPromiseHeaderList(QuicStreamId promised_id,
+  // quic::QuicSpdyStream
+  void OnInitialHeadersComplete(
+      bool fin,
+      size_t frame_len,
+      const quic::QuicHeaderList& header_list) override;
+  void OnTrailingHeadersComplete(
+      bool fin,
+      size_t frame_len,
+      const quic::QuicHeaderList& header_list) override;
+  void OnPromiseHeaderList(quic::QuicStreamId promised_id,
                            size_t frame_len,
-                           const QuicHeaderList& header_list) override;
+                           const quic::QuicHeaderList& header_list) override;
   void OnDataAvailable() override;
   void OnClose() override;
   void OnCanWrite() override;
-  size_t WriteHeaders(spdy::SpdyHeaderBlock header_block,
-                      bool fin,
-                      QuicReferenceCountedPointer<QuicAckListenerInterface>
-                          ack_listener) override;
+  size_t WriteHeaders(
+      spdy::SpdyHeaderBlock header_block,
+      bool fin,
+      quic::QuicReferenceCountedPointer<quic::QuicAckListenerInterface>
+          ack_listener) override;
 
   // While the server's set_priority shouldn't be called externally, the creator
   // of client-side streams should be able to set the priority.
-  using QuicSpdyStream::SetPriority;
+  using quic::QuicSpdyStream::SetPriority;
 
   // Writes |data| to the peer and closes the write side if |fin| is true.
   // Returns true if the data have been fully written. If the data was not fully
   // written, returns false and OnCanWrite() will be invoked later.
-  bool WriteStreamData(QuicStringPiece data, bool fin);
+  bool WriteStreamData(quic::QuicStringPiece data, bool fin);
   // Same as WriteStreamData except it writes data from a vector of IOBuffers,
   // with the length of each buffer at the corresponding index in |lengths|.
   bool WritevStreamData(const std::vector<scoped_refptr<IOBuffer>>& buffers,
@@ -262,8 +268,8 @@
   bool DeliverTrailingHeaders(spdy::SpdyHeaderBlock* header_block,
                               int* frame_len);
 
-  using QuicSpdyStream::HasBufferedData;
-  using QuicStream::sequencer;
+  using quic::QuicSpdyStream::HasBufferedData;
+  using quic::QuicStream::sequencer;
 
  private:
   void NotifyHandleOfInitialHeadersAvailableLater();
@@ -281,7 +287,7 @@
   // True when initial headers have been sent.
   bool initial_headers_sent_;
 
-  QuicSpdyClientSessionBase* session_;
+  quic::QuicSpdyClientSessionBase* session_;
 
   // Set to false if this stream to not be migrated during connection migration.
   bool can_migrate_;
diff --git a/net/quic/chromium/quic_chromium_client_stream_test.cc b/net/quic/chromium/quic_chromium_client_stream_test.cc
index 2b99f65..39a97df 100644
--- a/net/quic/chromium/quic_chromium_client_stream_test.cc
+++ b/net/quic/chromium/quic_chromium_client_stream_test.cc
@@ -39,133 +39,137 @@
 namespace test {
 namespace {
 
-const QuicStreamId kTestStreamId = 5u;
+const quic::QuicStreamId kTestStreamId = 5u;
 
-class MockQuicClientSessionBase : public QuicSpdyClientSessionBase {
+class MockQuicClientSessionBase : public quic::QuicSpdyClientSessionBase {
  public:
-  explicit MockQuicClientSessionBase(QuicConnection* connection,
-                                     QuicClientPushPromiseIndex* index);
+  explicit MockQuicClientSessionBase(quic::QuicConnection* connection,
+                                     quic::QuicClientPushPromiseIndex* index);
   ~MockQuicClientSessionBase() override;
 
-  const QuicCryptoStream* GetCryptoStream() const override {
+  const quic::QuicCryptoStream* GetCryptoStream() const override {
     return crypto_stream_.get();
   }
 
-  QuicCryptoStream* GetMutableCryptoStream() override {
+  quic::QuicCryptoStream* GetMutableCryptoStream() override {
     return crypto_stream_.get();
   }
 
-  // From QuicSession.
+  // From quic::QuicSession.
   MOCK_METHOD3(OnConnectionClosed,
-               void(QuicErrorCode error,
+               void(quic::QuicErrorCode error,
                     const std::string& error_details,
-                    ConnectionCloseSource source));
-  MOCK_METHOD1(CreateIncomingDynamicStream, QuicSpdyStream*(QuicStreamId id));
+                    quic::ConnectionCloseSource source));
+  MOCK_METHOD1(CreateIncomingDynamicStream,
+               quic::QuicSpdyStream*(quic::QuicStreamId id));
   MOCK_METHOD0(CreateOutgoingDynamicStream, QuicChromiumClientStream*());
   MOCK_METHOD5(WritevData,
-               QuicConsumedData(QuicStream* stream,
-                                QuicStreamId id,
-                                size_t write_length,
-                                QuicStreamOffset offset,
-                                StreamSendingState fin));
+               quic::QuicConsumedData(quic::QuicStream* stream,
+                                      quic::QuicStreamId id,
+                                      size_t write_length,
+                                      quic::QuicStreamOffset offset,
+                                      quic::StreamSendingState fin));
   MOCK_METHOD3(SendRstStream,
-               void(QuicStreamId stream_id,
-                    QuicRstStreamErrorCode error,
-                    QuicStreamOffset bytes_written));
+               void(quic::QuicStreamId stream_id,
+                    quic::QuicRstStreamErrorCode error,
+                    quic::QuicStreamOffset bytes_written));
 
   MOCK_METHOD2(OnStreamHeaders,
-               void(QuicStreamId stream_id, QuicStringPiece headers_data));
+               void(quic::QuicStreamId stream_id,
+                    quic::QuicStringPiece headers_data));
   MOCK_METHOD2(OnStreamHeadersPriority,
-               void(QuicStreamId stream_id, spdy::SpdyPriority priority));
+               void(quic::QuicStreamId stream_id, spdy::SpdyPriority priority));
   MOCK_METHOD3(OnStreamHeadersComplete,
-               void(QuicStreamId stream_id, bool fin, size_t frame_len));
+               void(quic::QuicStreamId stream_id, bool fin, size_t frame_len));
   MOCK_METHOD2(OnPromiseHeaders,
-               void(QuicStreamId stream_id, QuicStringPiece headers_data));
+               void(quic::QuicStreamId stream_id,
+                    quic::QuicStringPiece headers_data));
   MOCK_METHOD3(OnPromiseHeadersComplete,
-               void(QuicStreamId stream_id,
-                    QuicStreamId promised_stream_id,
+               void(quic::QuicStreamId stream_id,
+                    quic::QuicStreamId promised_stream_id,
                     size_t frame_len));
   MOCK_CONST_METHOD0(IsCryptoHandshakeConfirmed, bool());
   // Methods taking non-copyable types like spdy::SpdyHeaderBlock by value
   // cannot be mocked directly.
-  size_t WriteHeaders(QuicStreamId id,
-                      spdy::SpdyHeaderBlock headers,
-                      bool fin,
-                      spdy::SpdyPriority priority,
-                      QuicReferenceCountedPointer<QuicAckListenerInterface>
-                          ack_listener) override {
+  size_t WriteHeaders(
+      quic::QuicStreamId id,
+      spdy::SpdyHeaderBlock headers,
+      bool fin,
+      spdy::SpdyPriority priority,
+      quic::QuicReferenceCountedPointer<quic::QuicAckListenerInterface>
+          ack_listener) override {
     return WriteHeadersMock(id, headers, fin, priority,
                             std::move(ack_listener));
   }
-  MOCK_METHOD5(
-      WriteHeadersMock,
-      size_t(QuicStreamId id,
-             const spdy::SpdyHeaderBlock& headers,
-             bool fin,
-             spdy::SpdyPriority priority,
-             const QuicReferenceCountedPointer<QuicAckListenerInterface>&
-                 ack_listener));
-  MOCK_METHOD1(OnHeadersHeadOfLineBlocking, void(QuicTime::Delta delta));
+  MOCK_METHOD5(WriteHeadersMock,
+               size_t(quic::QuicStreamId id,
+                      const spdy::SpdyHeaderBlock& headers,
+                      bool fin,
+                      spdy::SpdyPriority priority,
+                      const quic::QuicReferenceCountedPointer<
+                          quic::QuicAckListenerInterface>& ack_listener));
+  MOCK_METHOD1(OnHeadersHeadOfLineBlocking, void(quic::QuicTime::Delta delta));
 
-  std::unique_ptr<QuicStream> CreateStream(QuicStreamId id) {
-    return QuicMakeUnique<QuicChromiumClientStream>(
+  std::unique_ptr<quic::QuicStream> CreateStream(quic::QuicStreamId id) {
+    return quic::QuicMakeUnique<QuicChromiumClientStream>(
         id, this, NetLogWithSource(), TRAFFIC_ANNOTATION_FOR_TESTS);
   }
 
-  using QuicSession::ActivateStream;
+  using quic::QuicSession::ActivateStream;
 
-  // Returns a QuicConsumedData that indicates all of |write_length| (and |fin|
-  // if set) has been consumed.
-  static QuicConsumedData ConsumeAllData(
-      QuicStreamId id,
+  // Returns a quic::QuicConsumedData that indicates all of |write_length| (and
+  // |fin| if set) has been consumed.
+  static quic::QuicConsumedData ConsumeAllData(
+      quic::QuicStreamId id,
       size_t write_length,
-      QuicStreamOffset offset,
+      quic::QuicStreamOffset offset,
       bool fin,
-      QuicAckListenerInterface* ack_listener);
+      quic::QuicAckListenerInterface* ack_listener);
 
   void OnProofValid(
-      const QuicCryptoClientConfig::CachedState& cached) override {}
+      const quic::QuicCryptoClientConfig::CachedState& cached) override {}
   void OnProofVerifyDetailsAvailable(
-      const ProofVerifyDetails& verify_details) override {}
+      const quic::ProofVerifyDetails& verify_details) override {}
   bool IsAuthorized(const std::string& hostname) override { return true; }
 
  protected:
-  MOCK_METHOD1(ShouldCreateIncomingDynamicStream, bool(QuicStreamId id));
+  MOCK_METHOD1(ShouldCreateIncomingDynamicStream, bool(quic::QuicStreamId id));
   MOCK_METHOD0(ShouldCreateOutgoingDynamicStream, bool());
 
  private:
-  std::unique_ptr<QuicCryptoStream> crypto_stream_;
+  std::unique_ptr<quic::QuicCryptoStream> crypto_stream_;
 
   DISALLOW_COPY_AND_ASSIGN(MockQuicClientSessionBase);
 };
 
 MockQuicClientSessionBase::MockQuicClientSessionBase(
-    QuicConnection* connection,
-    QuicClientPushPromiseIndex* push_promise_index)
-    : QuicSpdyClientSessionBase(connection,
-                                push_promise_index,
-                                DefaultQuicConfig()) {
-  crypto_stream_.reset(new MockQuicCryptoStream(this));
+    quic::QuicConnection* connection,
+    quic::QuicClientPushPromiseIndex* push_promise_index)
+    : quic::QuicSpdyClientSessionBase(connection,
+                                      push_promise_index,
+                                      quic::test::DefaultQuicConfig()) {
+  crypto_stream_.reset(new quic::test::MockQuicCryptoStream(this));
   Initialize();
   ON_CALL(*this, WritevData(_, _, _, _, _))
-      .WillByDefault(testing::Return(QuicConsumedData(0, false)));
+      .WillByDefault(testing::Return(quic::QuicConsumedData(0, false)));
 }
 
 MockQuicClientSessionBase::~MockQuicClientSessionBase() {}
 
 class QuicChromiumClientStreamTest
-    : public ::testing::TestWithParam<QuicTransportVersion>,
+    : public ::testing::TestWithParam<quic::QuicTransportVersion>,
       public WithScopedTaskEnvironment {
  public:
   QuicChromiumClientStreamTest()
-      : crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
-                       TlsClientHandshaker::CreateSslCtx()),
-        session_(new MockQuicConnection(
+      : crypto_config_(quic::test::crypto_test_utils::ProofVerifierForTesting(),
+                       quic::TlsClientHandshaker::CreateSslCtx()),
+        session_(new quic::test::MockQuicConnection(
                      &helper_,
                      &alarm_factory_,
-                     Perspective::IS_CLIENT,
-                     SupportedVersions(
-                         ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, GetParam()))),
+                     quic::Perspective::IS_CLIENT,
+                     quic::test::SupportedVersions(
+                         quic::ParsedQuicVersion(quic::PROTOCOL_QUIC_CRYPTO,
+                                                 GetParam()))),
                  &push_promise_index_) {
     stream_ = new QuicChromiumClientStream(kTestStreamId, &session_,
                                            NetLogWithSource(),
@@ -204,28 +208,29 @@
         "JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo ";
   }
 
-  void ReadData(QuicStringPiece expected_data) {
+  void ReadData(quic::QuicStringPiece expected_data) {
     scoped_refptr<IOBuffer> buffer(new IOBuffer(expected_data.length() + 1));
     EXPECT_EQ(static_cast<int>(expected_data.length()),
               stream_->Read(buffer.get(), expected_data.length() + 1));
     EXPECT_EQ(expected_data,
-              QuicStringPiece(buffer->data(), expected_data.length()));
+              quic::QuicStringPiece(buffer->data(), expected_data.length()));
   }
 
-  QuicHeaderList ProcessHeaders(const spdy::SpdyHeaderBlock& headers) {
-    QuicHeaderList h = AsHeaderList(headers);
+  quic::QuicHeaderList ProcessHeaders(const spdy::SpdyHeaderBlock& headers) {
+    quic::QuicHeaderList h = quic::test::AsHeaderList(headers);
     stream_->OnStreamHeaderList(false, h.uncompressed_header_bytes(), h);
     return h;
   }
 
-  QuicHeaderList ProcessTrailers(const spdy::SpdyHeaderBlock& headers) {
-    QuicHeaderList h = AsHeaderList(headers);
+  quic::QuicHeaderList ProcessTrailers(const spdy::SpdyHeaderBlock& headers) {
+    quic::QuicHeaderList h = quic::test::AsHeaderList(headers);
     stream_->OnStreamHeaderList(true, h.uncompressed_header_bytes(), h);
     return h;
   }
 
-  QuicHeaderList ProcessHeadersFull(const spdy::SpdyHeaderBlock& headers) {
-    QuicHeaderList h = ProcessHeaders(headers);
+  quic::QuicHeaderList ProcessHeadersFull(
+      const spdy::SpdyHeaderBlock& headers) {
+    quic::QuicHeaderList h = ProcessHeaders(headers);
     TestCompletionCallback callback;
     EXPECT_EQ(static_cast<int>(h.uncompressed_header_bytes()),
               handle_->ReadInitialHeaders(&headers_, callback.callback()));
@@ -234,39 +239,42 @@
     return h;
   }
 
-  QuicStreamId GetNthClientInitiatedStreamId(int n) {
-    return QuicSpdySessionPeer::GetNthClientInitiatedStreamId(session_, n);
+  quic::QuicStreamId GetNthClientInitiatedStreamId(int n) {
+    return quic::test::QuicSpdySessionPeer::GetNthClientInitiatedStreamId(
+        session_, n);
   }
 
-  QuicStreamId GetNthServerInitiatedStreamId(int n) {
-    return QuicSpdySessionPeer::GetNthServerInitiatedStreamId(session_, n);
+  quic::QuicStreamId GetNthServerInitiatedStreamId(int n) {
+    return quic::test::QuicSpdySessionPeer::GetNthServerInitiatedStreamId(
+        session_, n);
   }
 
   void ResetStreamCallback(QuicChromiumClientStream* stream, int /*rv*/) {
-    stream->Reset(QUIC_STREAM_CANCELLED);
+    stream->Reset(quic::QUIC_STREAM_CANCELLED);
   }
 
-  QuicCryptoClientConfig crypto_config_;
+  quic::QuicCryptoClientConfig crypto_config_;
   std::unique_ptr<QuicChromiumClientStream::Handle> handle_;
   std::unique_ptr<QuicChromiumClientStream::Handle> handle2_;
-  MockQuicConnectionHelper helper_;
-  MockAlarmFactory alarm_factory_;
+  quic::test::MockQuicConnectionHelper helper_;
+  quic::test::MockAlarmFactory alarm_factory_;
   MockQuicClientSessionBase session_;
   QuicChromiumClientStream* stream_;
   spdy::SpdyHeaderBlock headers_;
   spdy::SpdyHeaderBlock trailers_;
-  QuicClientPushPromiseIndex push_promise_index_;
+  quic::QuicClientPushPromiseIndex push_promise_index_;
 };
 
-INSTANTIATE_TEST_CASE_P(Version,
-                        QuicChromiumClientStreamTest,
-                        ::testing::ValuesIn(AllSupportedTransportVersions()));
+INSTANTIATE_TEST_CASE_P(
+    Version,
+    QuicChromiumClientStreamTest,
+    ::testing::ValuesIn(quic::AllSupportedTransportVersions()));
 
 TEST_P(QuicChromiumClientStreamTest, Handle) {
   EXPECT_TRUE(handle_->IsOpen());
   EXPECT_EQ(kTestStreamId, handle_->id());
-  EXPECT_EQ(QUIC_NO_ERROR, handle_->connection_error());
-  EXPECT_EQ(QUIC_STREAM_NO_ERROR, handle_->stream_error());
+  EXPECT_EQ(quic::QUIC_NO_ERROR, handle_->connection_error());
+  EXPECT_EQ(quic::QUIC_STREAM_NO_ERROR, handle_->stream_error());
   EXPECT_TRUE(handle_->IsFirstStream());
   EXPECT_FALSE(handle_->IsDoneReading());
   EXPECT_FALSE(handle_->fin_sent());
@@ -276,9 +284,10 @@
   EXPECT_EQ(0u, handle_->NumBytesConsumed());
 
   InitializeHeaders();
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessHeadersFull(headers_);
-  QuicStreamFrame frame2(kTestStreamId, true, offset, QuicStringPiece());
+  quic::QuicStreamFrame frame2(kTestStreamId, true, offset,
+                               quic::QuicStringPiece());
   stream_->OnStreamFrame(frame2);
   EXPECT_TRUE(handle_->fin_received());
   handle_->OnFinRead();
@@ -288,15 +297,16 @@
 
   // All data written.
   EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _))
-      .WillOnce(Return(QuicConsumedData(kDataLen, true)));
+      .WillOnce(Return(quic::QuicConsumedData(kDataLen, true)));
   TestCompletionCallback callback;
-  EXPECT_EQ(OK, handle_->WriteStreamData(QuicStringPiece(kData1, kDataLen),
-                                         true, callback.callback()));
+  EXPECT_EQ(OK,
+            handle_->WriteStreamData(quic::QuicStringPiece(kData1, kDataLen),
+                                     true, callback.callback()));
 
   EXPECT_FALSE(handle_->IsOpen());
   EXPECT_EQ(kTestStreamId, handle_->id());
-  EXPECT_EQ(QUIC_NO_ERROR, handle_->connection_error());
-  EXPECT_EQ(QUIC_STREAM_NO_ERROR, handle_->stream_error());
+  EXPECT_EQ(quic::QUIC_NO_ERROR, handle_->connection_error());
+  EXPECT_EQ(quic::QUIC_STREAM_NO_ERROR, handle_->stream_error());
   EXPECT_TRUE(handle_->IsFirstStream());
   EXPECT_TRUE(handle_->IsDoneReading());
   EXPECT_TRUE(handle_->fin_sent());
@@ -306,8 +316,8 @@
   EXPECT_EQ(0u, handle_->NumBytesConsumed());
 
   EXPECT_EQ(ERR_CONNECTION_CLOSED,
-            handle_->WriteStreamData(QuicStringPiece(kData1, kDataLen), true,
-                                     callback.callback()));
+            handle_->WriteStreamData(quic::QuicStringPiece(kData1, kDataLen),
+                                     true, callback.callback()));
 
   std::vector<scoped_refptr<IOBuffer>> buffers = {
       scoped_refptr<IOBuffer>(new IOBuffer(10))};
@@ -322,31 +332,32 @@
 
 TEST_P(QuicChromiumClientStreamTest, HandleAfterConnectionClose) {
   EXPECT_CALL(session_,
-              SendRstStream(kTestStreamId, QUIC_RST_ACKNOWLEDGEMENT, 0));
-  stream_->OnConnectionClosed(QUIC_INVALID_FRAME_DATA,
-                              ConnectionCloseSource::FROM_PEER);
+              SendRstStream(kTestStreamId, quic::QUIC_RST_ACKNOWLEDGEMENT, 0));
+  stream_->OnConnectionClosed(quic::QUIC_INVALID_FRAME_DATA,
+                              quic::ConnectionCloseSource::FROM_PEER);
 
   EXPECT_FALSE(handle_->IsOpen());
-  EXPECT_EQ(QUIC_INVALID_FRAME_DATA, handle_->connection_error());
+  EXPECT_EQ(quic::QUIC_INVALID_FRAME_DATA, handle_->connection_error());
 }
 
 TEST_P(QuicChromiumClientStreamTest, HandleAfterStreamReset) {
   // Verify that the Handle still behaves correctly after the stream is reset.
-  QuicRstStreamFrame rst(kInvalidControlFrameId, kTestStreamId,
-                         QUIC_STREAM_CANCELLED, 0);
+  quic::QuicRstStreamFrame rst(quic::kInvalidControlFrameId, kTestStreamId,
+                               quic::QUIC_STREAM_CANCELLED, 0);
   EXPECT_CALL(session_,
-              SendRstStream(kTestStreamId, QUIC_RST_ACKNOWLEDGEMENT, 0));
+              SendRstStream(kTestStreamId, quic::QUIC_RST_ACKNOWLEDGEMENT, 0));
   stream_->OnStreamReset(rst);
 
   EXPECT_FALSE(handle_->IsOpen());
-  EXPECT_EQ(QUIC_STREAM_CANCELLED, handle_->stream_error());
+  EXPECT_EQ(quic::QUIC_STREAM_CANCELLED, handle_->stream_error());
 }
 
 TEST_P(QuicChromiumClientStreamTest, OnFinRead) {
   InitializeHeaders();
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessHeadersFull(headers_);
-  QuicStreamFrame frame2(kTestStreamId, true, offset, QuicStringPiece());
+  quic::QuicStreamFrame frame2(kTestStreamId, true, offset,
+                               quic::QuicStringPiece());
   stream_->OnStreamFrame(frame2);
 }
 
@@ -356,15 +367,16 @@
 
   const char data[] = "hello world!";
   int data_len = strlen(data);
-  stream_->OnStreamFrame(QuicStreamFrame(kTestStreamId, /*fin=*/false,
-                                         /*offset=*/0, data));
+  stream_->OnStreamFrame(quic::QuicStreamFrame(kTestStreamId, /*fin=*/false,
+                                               /*offset=*/0, data));
 
   // Read the body and verify that it arrives correctly.
   TestCompletionCallback callback;
   scoped_refptr<IOBuffer> buffer(new IOBuffer(2 * data_len));
   EXPECT_EQ(data_len,
             handle_->ReadBody(buffer.get(), 2 * data_len, callback.callback()));
-  EXPECT_EQ(QuicStringPiece(data), QuicStringPiece(buffer->data(), data_len));
+  EXPECT_EQ(quic::QuicStringPiece(data),
+            quic::QuicStringPiece(buffer->data(), data_len));
 }
 
 TEST_P(QuicChromiumClientStreamTest, OnDataAvailableAfterReadBody) {
@@ -380,21 +392,22 @@
   EXPECT_EQ(ERR_IO_PENDING,
             handle_->ReadBody(buffer.get(), 2 * data_len, callback.callback()));
 
-  stream_->OnStreamFrame(QuicStreamFrame(kTestStreamId, /*fin=*/false,
-                                         /*offset=*/0, data));
+  stream_->OnStreamFrame(quic::QuicStreamFrame(kTestStreamId, /*fin=*/false,
+                                               /*offset=*/0, data));
 
   EXPECT_EQ(data_len, callback.WaitForResult());
-  EXPECT_EQ(QuicStringPiece(data), QuicStringPiece(buffer->data(), data_len));
+  EXPECT_EQ(quic::QuicStringPiece(data),
+            quic::QuicStringPiece(buffer->data(), data_len));
   base::RunLoop().RunUntilIdle();
 }
 
 TEST_P(QuicChromiumClientStreamTest, ProcessHeadersWithError) {
   spdy::SpdyHeaderBlock bad_headers;
   bad_headers["NAME"] = "...";
-  EXPECT_CALL(session_,
-              SendRstStream(kTestStreamId, QUIC_BAD_APPLICATION_PAYLOAD, 0));
+  EXPECT_CALL(session_, SendRstStream(kTestStreamId,
+                                      quic::QUIC_BAD_APPLICATION_PAYLOAD, 0));
 
-  auto headers = AsHeaderList(bad_headers);
+  auto headers = quic::test::AsHeaderList(bad_headers);
   stream_->OnStreamHeaderList(false, headers.uncompressed_header_bytes(),
                               headers);
 
@@ -403,9 +416,10 @@
 
 TEST_P(QuicChromiumClientStreamTest, OnDataAvailableWithError) {
   InitializeHeaders();
-  auto headers = AsHeaderList(headers_);
+  auto headers = quic::test::AsHeaderList(headers_);
   ProcessHeadersFull(headers_);
-  EXPECT_CALL(session_, SendRstStream(kTestStreamId, QUIC_STREAM_CANCELLED, 0));
+  EXPECT_CALL(session_,
+              SendRstStream(kTestStreamId, quic::QUIC_STREAM_CANCELLED, 0));
 
   const char data[] = "hello world!";
   int data_len = strlen(data);
@@ -420,8 +434,8 @@
                            base::Unretained(this), stream_)));
 
   // Receive the data and close the stream during the callback.
-  stream_->OnStreamFrame(QuicStreamFrame(kTestStreamId, /*fin=*/false,
-                                         /*offset=*/0, data));
+  stream_->OnStreamFrame(quic::QuicStreamFrame(kTestStreamId, /*fin=*/false,
+                                               /*offset=*/0, data));
 
   base::RunLoop().RunUntilIdle();
 }
@@ -439,19 +453,20 @@
 
   const char data[] = "hello world!";
   int data_len = strlen(data);
-  stream_->OnStreamFrame(QuicStreamFrame(kTestStreamId, /*fin=*/false,
-                                         /*offset=*/0, data));
+  stream_->OnStreamFrame(quic::QuicStreamFrame(kTestStreamId, /*fin=*/false,
+                                               /*offset=*/0, data));
 
   // Read the body and verify that it arrives correctly.
   TestCompletionCallback callback;
   scoped_refptr<IOBuffer> buffer(new IOBuffer(2 * data_len));
   EXPECT_EQ(data_len,
             handle_->ReadBody(buffer.get(), 2 * data_len, callback.callback()));
-  EXPECT_EQ(QuicStringPiece(data), QuicStringPiece(buffer->data(), data_len));
+  EXPECT_EQ(quic::QuicStringPiece(data),
+            quic::QuicStringPiece(buffer->data(), data_len));
 
   spdy::SpdyHeaderBlock trailers;
   trailers["bar"] = "foo";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(data));
+  trailers[quic::kFinalOffsetHeaderKey] = base::IntToString(strlen(data));
 
   auto t = ProcessTrailers(trailers);
 
@@ -464,8 +479,9 @@
   EXPECT_EQ(0,
             handle_->ReadBody(buffer.get(), 2 * data_len, callback.callback()));
 
-  // Make sure kFinalOffsetHeaderKey is gone from the delivered actual trailers.
-  trailers.erase(kFinalOffsetHeaderKey);
+  // Make sure quic::kFinalOffsetHeaderKey is gone from the delivered actual
+  // trailers.
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, trailers_);
   base::RunLoop().RunUntilIdle();
 }
@@ -478,15 +494,16 @@
 
   const char data[] = "hello world!";
   int data_len = strlen(data);
-  stream_->OnStreamFrame(QuicStreamFrame(kTestStreamId, /*fin=*/false,
-                                         /*offset=*/0, data));
+  stream_->OnStreamFrame(quic::QuicStreamFrame(kTestStreamId, /*fin=*/false,
+                                               /*offset=*/0, data));
 
   // Read the body and verify that it arrives correctly.
   TestCompletionCallback callback;
   scoped_refptr<IOBuffer> buffer(new IOBuffer(2 * data_len));
   EXPECT_EQ(data_len,
             handle_->ReadBody(buffer.get(), 2 * data_len, callback.callback()));
-  EXPECT_EQ(QuicStringPiece(data), QuicStringPiece(buffer->data(), data_len));
+  EXPECT_EQ(quic::QuicStringPiece(data),
+            quic::QuicStringPiece(buffer->data(), data_len));
 
   // Read again, and it will be pending.
   EXPECT_THAT(
@@ -495,8 +512,8 @@
 
   spdy::SpdyHeaderBlock trailers;
   trailers["bar"] = "foo";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(data));
-  QuicHeaderList t = ProcessTrailers(trailers);
+  trailers[quic::kFinalOffsetHeaderKey] = base::IntToString(strlen(data));
+  quic::QuicHeaderList t = ProcessTrailers(trailers);
   EXPECT_FALSE(stream_->IsDoneReading());
 
   EXPECT_EQ(static_cast<int>(t.uncompressed_header_bytes()),
@@ -508,8 +525,9 @@
   // Make sure the stream is properly closed since trailers and data are all
   // consumed.
   EXPECT_TRUE(stream_->IsDoneReading());
-  // Make sure kFinalOffsetHeaderKey is gone from the delivered actual trailers.
-  trailers.erase(kFinalOffsetHeaderKey);
+  // Make sure quic::kFinalOffsetHeaderKey is gone from the delivered actual
+  // trailers.
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, trailers_);
 
   base::RunLoop().RunUntilIdle();
@@ -524,22 +542,23 @@
 
   const char data[] = "hello world!";
   int data_len = strlen(data);
-  stream_->OnStreamFrame(QuicStreamFrame(kTestStreamId, /*fin=*/false,
-                                         /*offset=*/0, data));
+  stream_->OnStreamFrame(quic::QuicStreamFrame(kTestStreamId, /*fin=*/false,
+                                               /*offset=*/0, data));
 
   // Read the body and verify that it arrives correctly.
   TestCompletionCallback callback;
   scoped_refptr<IOBuffer> buffer(new IOBuffer(2 * data_len));
   EXPECT_EQ(data_len,
             handle_->ReadBody(buffer.get(), 2 * data_len, callback.callback()));
-  EXPECT_EQ(QuicStringPiece(data), QuicStringPiece(buffer->data(), data_len));
+  EXPECT_EQ(quic::QuicStringPiece(data),
+            quic::QuicStringPiece(buffer->data(), data_len));
 
   // Deliver trailers. Delegate notification is posted asynchronously.
   spdy::SpdyHeaderBlock trailers;
   trailers["bar"] = "foo";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(data));
+  trailers[quic::kFinalOffsetHeaderKey] = base::IntToString(strlen(data));
 
-  QuicHeaderList t = ProcessTrailers(trailers);
+  quic::QuicHeaderList t = ProcessTrailers(trailers);
 
   EXPECT_FALSE(stream_->IsDoneReading());
   // Read again, it return ERR_IO_PENDING.
@@ -562,8 +581,9 @@
   // consumed.
   EXPECT_TRUE(stream_->IsDoneReading());
 
-  // Make sure kFinalOffsetHeaderKey is gone from the delivered actual trailers.
-  trailers.erase(kFinalOffsetHeaderKey);
+  // Make sure quic::kFinalOffsetHeaderKey is gone from the delivered actual
+  // trailers.
+  trailers.erase(quic::kFinalOffsetHeaderKey);
   EXPECT_EQ(trailers, trailers_);
 
   base::RunLoop().RunUntilIdle();
@@ -575,10 +595,11 @@
 
   // All data written.
   EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _))
-      .WillOnce(Return(QuicConsumedData(kDataLen, true)));
+      .WillOnce(Return(quic::QuicConsumedData(kDataLen, true)));
   TestCompletionCallback callback;
-  EXPECT_EQ(OK, handle_->WriteStreamData(QuicStringPiece(kData1, kDataLen),
-                                         true, callback.callback()));
+  EXPECT_EQ(OK,
+            handle_->WriteStreamData(quic::QuicStringPiece(kData1, kDataLen),
+                                     true, callback.callback()));
 }
 
 TEST_P(QuicChromiumClientStreamTest, WriteStreamDataAsync) {
@@ -587,16 +608,16 @@
 
   // No data written.
   EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _))
-      .WillOnce(Return(QuicConsumedData(0, false)));
+      .WillOnce(Return(quic::QuicConsumedData(0, false)));
   TestCompletionCallback callback;
   EXPECT_EQ(ERR_IO_PENDING,
-            handle_->WriteStreamData(QuicStringPiece(kData1, kDataLen), true,
-                                     callback.callback()));
+            handle_->WriteStreamData(quic::QuicStringPiece(kData1, kDataLen),
+                                     true, callback.callback()));
   ASSERT_FALSE(callback.have_result());
 
   // All data written.
   EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _))
-      .WillOnce(Return(QuicConsumedData(kDataLen, true)));
+      .WillOnce(Return(quic::QuicConsumedData(kDataLen, true)));
   stream_->OnCanWrite();
   ASSERT_TRUE(callback.have_result());
   EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -608,9 +629,9 @@
       new StringIOBuffer("Just a small payload"));
 
   // All data written.
-    EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _))
-        .WillOnce(Return(QuicConsumedData(buf1->size(), false)))
-        .WillOnce(Return(QuicConsumedData(buf2->size(), true)));
+  EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _))
+      .WillOnce(Return(quic::QuicConsumedData(buf1->size(), false)))
+      .WillOnce(Return(quic::QuicConsumedData(buf2->size(), true)));
   TestCompletionCallback callback;
   EXPECT_EQ(
       OK, handle_->WritevStreamData({buf1, buf2}, {buf1->size(), buf2->size()},
@@ -623,11 +644,11 @@
       new StringIOBuffer("Just a small payload"));
 
   // Only a part of the data is written.
-    EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _))
-        // First piece of data is written.
-        .WillOnce(Return(QuicConsumedData(buf1->size(), false)))
-        // Second piece of data is queued.
-        .WillOnce(Return(QuicConsumedData(0, false)));
+  EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _))
+      // First piece of data is written.
+      .WillOnce(Return(quic::QuicConsumedData(buf1->size(), false)))
+      // Second piece of data is queued.
+      .WillOnce(Return(quic::QuicConsumedData(0, false)));
   TestCompletionCallback callback;
   EXPECT_EQ(ERR_IO_PENDING,
             handle_->WritevStreamData({buf1.get(), buf2.get()},
@@ -637,7 +658,7 @@
 
   // The second piece of data is written.
   EXPECT_CALL(session_, WritevData(stream_, stream_->id(), _, _, _))
-      .WillOnce(Return(QuicConsumedData(buf2->size(), true)));
+      .WillOnce(Return(quic::QuicConsumedData(buf2->size(), true)));
   stream_->OnCanWrite();
   ASSERT_TRUE(callback.have_result());
   EXPECT_THAT(callback.WaitForResult(), IsOk());
@@ -646,7 +667,7 @@
 TEST_P(QuicChromiumClientStreamTest, HeadersBeforeHandle) {
   // We don't use stream_ because we want an incoming server push
   // stream.
-  QuicStreamId stream_id = GetNthServerInitiatedStreamId(0);
+  quic::QuicStreamId stream_id = GetNthServerInitiatedStreamId(0);
   QuicChromiumClientStream* stream2 = new QuicChromiumClientStream(
       stream_id, &session_, NetLogWithSource(), TRAFFIC_ANNOTATION_FOR_TESTS);
   session_.ActivateStream(base::WrapUnique(stream2));
@@ -654,7 +675,7 @@
   InitializeHeaders();
 
   // Receive the headers before the delegate is set.
-  QuicHeaderList header_list = AsHeaderList(headers_);
+  quic::QuicHeaderList header_list = quic::test::AsHeaderList(headers_);
   stream2->OnStreamHeaderList(true, header_list.uncompressed_header_bytes(),
                               header_list);
 
@@ -669,7 +690,7 @@
 TEST_P(QuicChromiumClientStreamTest, HeadersAndDataBeforeHandle) {
   // We don't use stream_ because we want an incoming server push
   // stream.
-  QuicStreamId stream_id = GetNthServerInitiatedStreamId(0);
+  quic::QuicStreamId stream_id = GetNthServerInitiatedStreamId(0);
   QuicChromiumClientStream* stream2 = new QuicChromiumClientStream(
       stream_id, &session_, NetLogWithSource(), TRAFFIC_ANNOTATION_FOR_TESTS);
   session_.ActivateStream(base::WrapUnique(stream2));
@@ -677,12 +698,12 @@
   InitializeHeaders();
 
   // Receive the headers and data before the delegate is set.
-  QuicHeaderList header_list = AsHeaderList(headers_);
+  quic::QuicHeaderList header_list = quic::test::AsHeaderList(headers_);
   stream2->OnStreamHeaderList(false, header_list.uncompressed_header_bytes(),
                               header_list);
   const char data[] = "hello world!";
-  stream2->OnStreamFrame(QuicStreamFrame(stream_id, /*fin=*/false,
-                                         /*offset=*/0, data));
+  stream2->OnStreamFrame(quic::QuicStreamFrame(stream_id, /*fin=*/false,
+                                               /*offset=*/0, data));
 
   // Now set the delegate and verify that the headers are delivered, but
   // not the data, which needs to be read explicitly.
@@ -697,7 +718,8 @@
   int data_len = arraysize(data) - 1;
   scoped_refptr<IOBuffer> buffer(new IOBuffer(data_len + 1));
   ASSERT_EQ(data_len, stream2->Read(buffer.get(), data_len + 1));
-  EXPECT_EQ(QuicStringPiece(data), QuicStringPiece(buffer->data(), data_len));
+  EXPECT_EQ(quic::QuicStringPiece(data),
+            quic::QuicStringPiece(buffer->data(), data_len));
 }
 
 }  // namespace
diff --git a/net/quic/chromium/quic_chromium_connection_helper.cc b/net/quic/chromium/quic_chromium_connection_helper.cc
index f64ad32e..e2525809 100644
--- a/net/quic/chromium/quic_chromium_connection_helper.cc
+++ b/net/quic/chromium/quic_chromium_connection_helper.cc
@@ -7,21 +7,21 @@
 namespace net {
 
 QuicChromiumConnectionHelper::QuicChromiumConnectionHelper(
-    const QuicClock* clock,
-    QuicRandom* random_generator)
+    const quic::QuicClock* clock,
+    quic::QuicRandom* random_generator)
     : clock_(clock), random_generator_(random_generator) {}
 
 QuicChromiumConnectionHelper::~QuicChromiumConnectionHelper() {}
 
-const QuicClock* QuicChromiumConnectionHelper::GetClock() const {
+const quic::QuicClock* QuicChromiumConnectionHelper::GetClock() const {
   return clock_;
 }
 
-QuicRandom* QuicChromiumConnectionHelper::GetRandomGenerator() {
+quic::QuicRandom* QuicChromiumConnectionHelper::GetRandomGenerator() {
   return random_generator_;
 }
 
-QuicBufferAllocator*
+quic::QuicBufferAllocator*
 QuicChromiumConnectionHelper::GetStreamSendBufferAllocator() {
   return &buffer_allocator_;
 }
diff --git a/net/quic/chromium/quic_chromium_connection_helper.h b/net/quic/chromium/quic_chromium_connection_helper.h
index 006287a..a0ea0df 100644
--- a/net/quic/chromium/quic_chromium_connection_helper.h
+++ b/net/quic/chromium/quic_chromium_connection_helper.h
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
-// The Chrome-specific helper for QuicConnection which uses
+// The Chrome-specific helper for quic::QuicConnection which uses
 // a TaskRunner for alarms, and uses a DatagramClientSocket for writing data.
 
 #ifndef NET_QUIC_CHROMIUM_QUIC_CHROMIUM_CONNECTION_HELPER_H_
@@ -17,27 +17,29 @@
 #include "net/third_party/quic/core/quic_simple_buffer_allocator.h"
 #include "net/third_party/quic/core/quic_time.h"
 
+namespace quic {
+class QuicClock;
+
+class QuicRandom;
+}  // namespace quic
 namespace net {
 
-class QuicClock;
-class QuicRandom;
-
 class NET_EXPORT_PRIVATE QuicChromiumConnectionHelper
-    : public QuicConnectionHelperInterface {
+    : public quic::QuicConnectionHelperInterface {
  public:
-  QuicChromiumConnectionHelper(const QuicClock* clock,
-                               QuicRandom* random_generator);
+  QuicChromiumConnectionHelper(const quic::QuicClock* clock,
+                               quic::QuicRandom* random_generator);
   ~QuicChromiumConnectionHelper() override;
 
-  // QuicConnectionHelperInterface
-  const QuicClock* GetClock() const override;
-  QuicRandom* GetRandomGenerator() override;
-  QuicBufferAllocator* GetStreamSendBufferAllocator() override;
+  // quic::QuicConnectionHelperInterface
+  const quic::QuicClock* GetClock() const override;
+  quic::QuicRandom* GetRandomGenerator() override;
+  quic::QuicBufferAllocator* GetStreamSendBufferAllocator() override;
 
  private:
-  const QuicClock* clock_;
-  QuicRandom* random_generator_;
-  SimpleBufferAllocator buffer_allocator_;
+  const quic::QuicClock* clock_;
+  quic::QuicRandom* random_generator_;
+  quic::SimpleBufferAllocator buffer_allocator_;
 
   DISALLOW_COPY_AND_ASSIGN(QuicChromiumConnectionHelper);
 };
diff --git a/net/quic/chromium/quic_chromium_connection_helper_test.cc b/net/quic/chromium/quic_chromium_connection_helper_test.cc
index 67bad5d4..fd3783a 100644
--- a/net/quic/chromium/quic_chromium_connection_helper_test.cc
+++ b/net/quic/chromium/quic_chromium_connection_helper_test.cc
@@ -17,8 +17,8 @@
   QuicChromiumConnectionHelperTest() : helper_(&clock_, &random_generator_) {}
 
   QuicChromiumConnectionHelper helper_;
-  MockClock clock_;
-  MockRandom random_generator_;
+  quic::MockClock clock_;
+  quic::test::MockRandom random_generator_;
 };
 
 TEST_F(QuicChromiumConnectionHelperTest, GetClock) {
diff --git a/net/quic/chromium/quic_chromium_packet_reader.cc b/net/quic/chromium/quic_chromium_packet_reader.cc
index 060e98f..6584f5b2 100644
--- a/net/quic/chromium/quic_chromium_packet_reader.cc
+++ b/net/quic/chromium/quic_chromium_packet_reader.cc
@@ -15,10 +15,10 @@
 
 QuicChromiumPacketReader::QuicChromiumPacketReader(
     DatagramClientSocket* socket,
-    QuicClock* clock,
+    quic::QuicClock* clock,
     Visitor* visitor,
     int yield_after_packets,
-    QuicTime::Delta yield_after_duration,
+    quic::QuicTime::Delta yield_after_duration,
     const NetLogWithSource& net_log)
     : socket_(socket),
       visitor_(visitor),
@@ -27,8 +27,9 @@
       clock_(clock),
       yield_after_packets_(yield_after_packets),
       yield_after_duration_(yield_after_duration),
-      yield_after_(QuicTime::Infinite()),
-      read_buffer_(new IOBufferWithSize(static_cast<size_t>(kMaxPacketSize))),
+      yield_after_(quic::QuicTime::Infinite()),
+      read_buffer_(
+          new IOBufferWithSize(static_cast<size_t>(quic::kMaxPacketSize))),
       net_log_(net_log),
       weak_factory_(this) {}
 
@@ -73,7 +74,7 @@
 
 size_t QuicChromiumPacketReader::EstimateMemoryUsage() const {
   // Return the size of |read_buffer_|.
-  return kMaxPacketSize;
+  return quic::kMaxPacketSize;
 }
 
 bool QuicChromiumPacketReader::ProcessReadResult(int result) {
@@ -86,14 +87,15 @@
     return false;
   }
 
-  QuicReceivedPacket packet(read_buffer_->data(), result, clock_->Now());
+  quic::QuicReceivedPacket packet(read_buffer_->data(), result, clock_->Now());
   IPEndPoint local_address;
   IPEndPoint peer_address;
   socket_->GetLocalAddress(&local_address);
   socket_->GetPeerAddress(&peer_address);
   return visitor_->OnPacket(
-      packet, QuicSocketAddress(QuicSocketAddressImpl(local_address)),
-      QuicSocketAddress(QuicSocketAddressImpl(peer_address)));
+      packet,
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(local_address)),
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(peer_address)));
 }
 
 void QuicChromiumPacketReader::OnReadComplete(int result) {
diff --git a/net/quic/chromium/quic_chromium_packet_reader.h b/net/quic/chromium/quic_chromium_packet_reader.h
index d7f94b0..777aaf0 100644
--- a/net/quic/chromium/quic_chromium_packet_reader.h
+++ b/net/quic/chromium/quic_chromium_packet_reader.h
@@ -15,9 +15,10 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/core/quic_time.h"
 
-namespace net {
-
+namespace quic {
 class QuicClock;
+}  // namespace quic
+namespace net {
 
 // If more than this many packets have been read or more than that many
 // milliseconds have passed, QuicChromiumPacketReader::StartReading() yields by
@@ -32,21 +33,21 @@
     virtual ~Visitor() {}
     virtual void OnReadError(int result,
                              const DatagramClientSocket* socket) = 0;
-    virtual bool OnPacket(const QuicReceivedPacket& packet,
-                          const QuicSocketAddress& local_address,
-                          const QuicSocketAddress& peer_address) = 0;
+    virtual bool OnPacket(const quic::QuicReceivedPacket& packet,
+                          const quic::QuicSocketAddress& local_address,
+                          const quic::QuicSocketAddress& peer_address) = 0;
   };
 
   QuicChromiumPacketReader(DatagramClientSocket* socket,
-                           QuicClock* clock,
+                           quic::QuicClock* clock,
                            Visitor* visitor,
                            int yield_after_packets,
-                           QuicTime::Delta yield_after_duration,
+                           quic::QuicTime::Delta yield_after_duration,
                            const NetLogWithSource& net_log);
   virtual ~QuicChromiumPacketReader();
 
   // Causes the QuicConnectionHelper to start reading from the socket
-  // and passing the data along to the QuicConnection.
+  // and passing the data along to the quic::QuicConnection.
   void StartReading();
 
   // Returns the estimate of dynamically allocated memory in bytes.
@@ -62,10 +63,10 @@
   Visitor* visitor_;
   bool read_pending_;
   int num_packets_read_;
-  QuicClock* clock_;  // Owned by QuicStreamFactory
+  quic::QuicClock* clock_;  // Owned by QuicStreamFactory
   int yield_after_packets_;
-  QuicTime::Delta yield_after_duration_;
-  QuicTime yield_after_;
+  quic::QuicTime::Delta yield_after_duration_;
+  quic::QuicTime yield_after_;
   scoped_refptr<IOBufferWithSize> read_buffer_;
   NetLogWithSource net_log_;
 
diff --git a/net/quic/chromium/quic_chromium_packet_writer.cc b/net/quic/chromium/quic_chromium_packet_writer.cc
index 5786a7f0..c405ea8f 100644
--- a/net/quic/chromium/quic_chromium_packet_writer.cc
+++ b/net/quic/chromium/quic_chromium_packet_writer.cc
@@ -86,7 +86,7 @@
     base::SequencedTaskRunner* task_runner)
     : socket_(socket),
       delegate_(nullptr),
-      packet_(new ReusableIOBuffer(kMaxPacketSize)),
+      packet_(new ReusableIOBuffer(quic::kMaxPacketSize)),
       write_blocked_(false),
       retry_count_(0),
       weak_factory_(this) {
@@ -100,7 +100,7 @@
 void QuicChromiumPacketWriter::SetPacket(const char* buffer, size_t buf_len) {
   if (UNLIKELY(!packet_)) {
     packet_ = new ReusableIOBuffer(
-        std::max(buf_len, static_cast<size_t>(kMaxPacketSize)));
+        std::max(buf_len, static_cast<size_t>(quic::kMaxPacketSize)));
     RecordNotReusableReason(NOT_REUSABLE_NULLPTR);
   }
   if (UNLIKELY(packet_->capacity() < buf_len)) {
@@ -109,37 +109,37 @@
   }
   if (UNLIKELY(!packet_->HasOneRef())) {
     packet_ = new ReusableIOBuffer(
-        std::max(buf_len, static_cast<size_t>(kMaxPacketSize)));
+        std::max(buf_len, static_cast<size_t>(quic::kMaxPacketSize)));
     RecordNotReusableReason(NOT_REUSABLE_REF_COUNT);
   }
   packet_->Set(buffer, buf_len);
 }
 
-WriteResult QuicChromiumPacketWriter::WritePacket(
+quic::WriteResult QuicChromiumPacketWriter::WritePacket(
     const char* buffer,
     size_t buf_len,
-    const QuicIpAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    PerPacketOptions* /*options*/) {
+    const quic::QuicIpAddress& self_address,
+    const quic::QuicSocketAddress& peer_address,
+    quic::PerPacketOptions* /*options*/) {
   DCHECK(!IsWriteBlocked());
   SetPacket(buffer, buf_len);
   return WritePacketToSocketImpl();
 }
 
-WriteResult QuicChromiumPacketWriter::WritePacketToSocket(
+quic::WriteResult QuicChromiumPacketWriter::WritePacketToSocket(
     scoped_refptr<ReusableIOBuffer> packet) {
   packet_ = std::move(packet);
   return QuicChromiumPacketWriter::WritePacketToSocketImpl();
 }
 
-WriteResult QuicChromiumPacketWriter::WritePacketToSocketImpl() {
+quic::WriteResult QuicChromiumPacketWriter::WritePacketToSocketImpl() {
   base::TimeTicks now = base::TimeTicks::Now();
 
   int rv = socket_->Write(packet_.get(), packet_->size(), write_callback_,
                           kTrafficAnnotation);
 
   if (MaybeRetryAfterWriteError(rv))
-    return WriteResult(WRITE_STATUS_BLOCKED, ERR_IO_PENDING);
+    return quic::WriteResult(quic::WRITE_STATUS_BLOCKED, ERR_IO_PENDING);
 
   if (rv < 0 && rv != ERR_IO_PENDING && delegate_ != nullptr) {
     // If write error, then call delegate's HandleWriteError, which
@@ -149,29 +149,29 @@
     DCHECK(packet_ == nullptr);
   }
 
-  WriteStatus status = WRITE_STATUS_OK;
+  quic::WriteStatus status = quic::WRITE_STATUS_OK;
   if (rv < 0) {
     if (rv != ERR_IO_PENDING) {
-      status = WRITE_STATUS_ERROR;
+      status = quic::WRITE_STATUS_ERROR;
     } else {
-      status = WRITE_STATUS_BLOCKED;
+      status = quic::WRITE_STATUS_BLOCKED;
       write_blocked_ = true;
     }
   }
 
   base::TimeDelta delta = base::TimeTicks::Now() - now;
-  if (status == WRITE_STATUS_OK) {
+  if (status == quic::WRITE_STATUS_OK) {
     UMA_HISTOGRAM_TIMES("Net.QuicSession.PacketWriteTime.Synchronous", delta);
-  } else if (status == WRITE_STATUS_BLOCKED) {
+  } else if (status == quic::WRITE_STATUS_BLOCKED) {
     UMA_HISTOGRAM_TIMES("Net.QuicSession.PacketWriteTime.Asynchronous", delta);
   }
 
-  return WriteResult(status, rv);
+  return quic::WriteResult(status, rv);
 }
 
 void QuicChromiumPacketWriter::RetryPacketAfterNoBuffers() {
   DCHECK_GT(retry_count_, 0);
-  WriteResult result = WritePacketToSocketImpl();
+  quic::WriteResult result = WritePacketToSocketImpl();
   if (result.error_code != ERR_IO_PENDING)
     OnWriteComplete(result.error_code);
 }
@@ -235,9 +235,9 @@
   return true;
 }
 
-QuicByteCount QuicChromiumPacketWriter::GetMaxPacketSize(
-    const QuicSocketAddress& peer_address) const {
-  return kMaxPacketSize;
+quic::QuicByteCount QuicChromiumPacketWriter::GetMaxPacketSize(
+    const quic::QuicSocketAddress& peer_address) const {
+  return quic::kMaxPacketSize;
 }
 
 }  // namespace net
diff --git a/net/quic/chromium/quic_chromium_packet_writer.h b/net/quic/chromium/quic_chromium_packet_writer.h
index 242b0bde..42973bb 100644
--- a/net/quic/chromium/quic_chromium_packet_writer.h
+++ b/net/quic/chromium/quic_chromium_packet_writer.h
@@ -22,7 +22,8 @@
 namespace net {
 
 // Chrome specific packet writer which uses a datagram Socket for writing data.
-class NET_EXPORT_PRIVATE QuicChromiumPacketWriter : public QuicPacketWriter {
+class NET_EXPORT_PRIVATE QuicChromiumPacketWriter
+    : public quic::QuicPacketWriter {
  public:
   // Define a specific IO buffer that can be allocated once, but be
   // assigned new contents and reused, avoiding the alternative of
@@ -76,19 +77,19 @@
   void set_write_blocked(bool write_blocked) { write_blocked_ = write_blocked; }
 
   // Writes |packet| to the socket and returns the error code from the write.
-  WriteResult WritePacketToSocket(scoped_refptr<ReusableIOBuffer> packet);
+  quic::WriteResult WritePacketToSocket(scoped_refptr<ReusableIOBuffer> packet);
 
-  // QuicPacketWriter
-  WriteResult WritePacket(const char* buffer,
-                          size_t buf_len,
-                          const QuicIpAddress& self_address,
-                          const QuicSocketAddress& peer_address,
-                          PerPacketOptions* options) override;
+  // quic::QuicPacketWriter
+  quic::WriteResult WritePacket(const char* buffer,
+                                size_t buf_len,
+                                const quic::QuicIpAddress& self_address,
+                                const quic::QuicSocketAddress& peer_address,
+                                quic::PerPacketOptions* options) override;
   bool IsWriteBlockedDataBuffered() const override;
   bool IsWriteBlocked() const override;
   void SetWritable() override;
-  QuicByteCount GetMaxPacketSize(
-      const QuicSocketAddress& peer_address) const override;
+  quic::QuicByteCount GetMaxPacketSize(
+      const quic::QuicSocketAddress& peer_address) const override;
 
   void OnWriteComplete(int rv);
 
@@ -96,7 +97,7 @@
   void SetPacket(const char* buffer, size_t buf_len);
   bool MaybeRetryAfterWriteError(int rv);
   void RetryPacketAfterNoBuffers();
-  WriteResult WritePacketToSocketImpl();
+  quic::WriteResult WritePacketToSocketImpl();
   DatagramClientSocket* socket_;  // Unowned.
   Delegate* delegate_;  // Unowned.
   // Reused for every packet write for the lifetime of the writer.  Is
diff --git a/net/quic/chromium/quic_connection_logger.cc b/net/quic/chromium/quic_connection_logger.cc
index 3dd9d0b..9ee7ae91 100644
--- a/net/quic/chromium/quic_connection_logger.cc
+++ b/net/quic/chromium/quic_connection_logger.cc
@@ -49,9 +49,9 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicPacketSentCallback(
-    const SerializedPacket& serialized_packet,
-    TransmissionType transmission_type,
-    QuicTime sent_time,
+    const quic::SerializedPacket& serialized_packet,
+    quic::TransmissionType transmission_type,
+    quic::QuicTime sent_time,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("transmission_type", transmission_type);
@@ -64,8 +64,8 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicPacketRetransmittedCallback(
-    QuicPacketNumber old_packet_number,
-    QuicPacketNumber new_packet_number,
+    quic::QuicPacketNumber old_packet_number,
+    quic::QuicPacketNumber new_packet_number,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("old_packet_number", base::NumberToString(old_packet_number));
@@ -74,7 +74,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicDuplicatePacketCallback(
-    QuicPacketNumber packet_number,
+    quic::QuicPacketNumber packet_number,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("packet_number", base::NumberToString(packet_number));
@@ -82,7 +82,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicPacketHeaderCallback(
-    const QuicPacketHeader* header,
+    const quic::QuicPacketHeader* header,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("connection_id", base::NumberToString(header->connection_id));
@@ -93,7 +93,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicStreamFrameCallback(
-    const QuicStreamFrame* frame,
+    const quic::QuicStreamFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", frame->stream_id);
@@ -104,7 +104,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicAckFrameCallback(
-    const QuicAckFrame* frame,
+    const quic::QuicAckFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
   auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("largest_observed",
@@ -116,7 +116,7 @@
   if (!frame->packets.Empty()) {
     // V34 and above express acked packets, but only print
     // missing packets, because it's typically a shorter list.
-    for (QuicPacketNumber packet = frame->packets.Min();
+    for (quic::QuicPacketNumber packet = frame->packets.Min();
          packet < frame->largest_acked; ++packet) {
       if (!frame->packets.Contains(packet)) {
         missing->AppendString(base::NumberToString(packet));
@@ -126,8 +126,8 @@
   dict->Set("missing_packets", std::move(missing));
 
   auto received = std::make_unique<base::ListValue>();
-  const PacketTimeVector& received_times = frame->received_packet_times;
-  for (PacketTimeVector::const_iterator it = received_times.begin();
+  const quic::PacketTimeVector& received_times = frame->received_packet_times;
+  for (quic::PacketTimeVector::const_iterator it = received_times.begin();
        it != received_times.end(); ++it) {
     auto info = std::make_unique<base::DictionaryValue>();
     info->SetInteger("packet_number", static_cast<int>(it->first));
@@ -141,7 +141,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicRstStreamFrameCallback(
-    const QuicRstStreamFrame* frame,
+    const quic::QuicRstStreamFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", frame->stream_id);
@@ -150,7 +150,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicConnectionCloseFrameCallback(
-    const QuicConnectionCloseFrame* frame,
+    const quic::QuicConnectionCloseFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("quic_error", frame->error_code);
@@ -159,7 +159,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicWindowUpdateFrameCallback(
-    const QuicWindowUpdateFrame* frame,
+    const quic::QuicWindowUpdateFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", frame->stream_id);
@@ -168,7 +168,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicBlockedFrameCallback(
-    const QuicBlockedFrame* frame,
+    const quic::QuicBlockedFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("stream_id", frame->stream_id);
@@ -176,7 +176,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicGoAwayFrameCallback(
-    const QuicGoAwayFrame* frame,
+    const quic::QuicGoAwayFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("quic_error", frame->error_code);
@@ -186,7 +186,7 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicStopWaitingFrameCallback(
-    const QuicStopWaitingFrame* frame,
+    const quic::QuicStopWaitingFrame* frame,
     NetLogCaptureMode /* capture_mode */) {
   auto dict = std::make_unique<base::DictionaryValue>();
   auto sent_info = std::make_unique<base::DictionaryValue>();
@@ -197,11 +197,12 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicVersionNegotiationPacketCallback(
-    const QuicVersionNegotiationPacket* packet,
+    const quic::QuicVersionNegotiationPacket* packet,
     NetLogCaptureMode /* capture_mode */) {
   auto dict = std::make_unique<base::DictionaryValue>();
   auto versions = std::make_unique<base::ListValue>();
-  for (ParsedQuicVersionVector::const_iterator it = packet->versions.begin();
+  for (quic::ParsedQuicVersionVector::const_iterator it =
+           packet->versions.begin();
        it != packet->versions.end(); ++it) {
     versions->AppendString(ParsedQuicVersionToString(*it));
   }
@@ -220,22 +221,23 @@
 }
 
 std::unique_ptr<base::Value> NetLogQuicCryptoHandshakeMessageCallback(
-    const CryptoHandshakeMessage* message,
+    const quic::CryptoHandshakeMessage* message,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("quic_crypto_handshake_message",
-                  message->DebugString(Perspective::IS_CLIENT));
+                  message->DebugString(quic::Perspective::IS_CLIENT));
   return std::move(dict);
 }
 
 std::unique_ptr<base::Value> NetLogQuicOnConnectionClosedCallback(
-    QuicErrorCode error,
-    ConnectionCloseSource source,
+    quic::QuicErrorCode error,
+    quic::ConnectionCloseSource source,
     NetLogCaptureMode /* capture_mode */) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetInteger("quic_error", error);
-  dict->SetBoolean("from_peer",
-                   source == ConnectionCloseSource::FROM_PEER ? true : false);
+  dict->SetBoolean("from_peer", source == quic::ConnectionCloseSource::FROM_PEER
+                                    ? true
+                                    : false);
   return std::move(dict);
 }
 
@@ -279,7 +281,7 @@
 }  // namespace
 
 QuicConnectionLogger::QuicConnectionLogger(
-    QuicSpdySession* session,
+    quic::QuicSpdySession* session,
     const char* const connection_description,
     std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
     const NetLogWithSource& net_log)
@@ -323,7 +325,7 @@
   UMA_HISTOGRAM_COUNTS_1M("Net.QuicSession.BlockedFrames.Sent",
                           num_blocked_frames_sent_);
 
-  const QuicConnectionStats& stats = session_->connection()->GetStats();
+  const quic::QuicConnectionStats& stats = session_->connection()->GetStats();
   UMA_HISTOGRAM_TIMES("Net.QuicSession.MinRTT",
                       base::TimeDelta::FromMicroseconds(stats.min_rtt_us));
   UMA_HISTOGRAM_TIMES("Net.QuicSession.SmoothedRTT",
@@ -346,37 +348,37 @@
   RecordAggregatePacketLossRate();
 }
 
-void QuicConnectionLogger::OnFrameAddedToPacket(const QuicFrame& frame) {
+void QuicConnectionLogger::OnFrameAddedToPacket(const quic::QuicFrame& frame) {
   switch (frame.type) {
-    case PADDING_FRAME:
+    case quic::PADDING_FRAME:
       break;
-    case STREAM_FRAME:
+    case quic::STREAM_FRAME:
       break;
-    case ACK_FRAME: {
+    case quic::ACK_FRAME: {
       break;
     }
-    case RST_STREAM_FRAME:
+    case quic::RST_STREAM_FRAME:
       base::UmaHistogramSparse("Net.QuicSession.RstStreamErrorCodeClient",
                                frame.rst_stream_frame->error_code);
       break;
-    case CONNECTION_CLOSE_FRAME:
+    case quic::CONNECTION_CLOSE_FRAME:
       break;
-    case GOAWAY_FRAME:
+    case quic::GOAWAY_FRAME:
       break;
-    case WINDOW_UPDATE_FRAME:
+    case quic::WINDOW_UPDATE_FRAME:
       break;
-    case BLOCKED_FRAME:
+    case quic::BLOCKED_FRAME:
       ++num_blocked_frames_sent_;
       break;
-    case STOP_WAITING_FRAME:
+    case quic::STOP_WAITING_FRAME:
       break;
-    case PING_FRAME:
+    case quic::PING_FRAME:
       UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.ConnectionFlowControlBlocked",
                             session_->IsConnectionFlowControlBlocked());
       UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.StreamFlowControlBlocked",
                             session_->IsStreamFlowControlBlocked());
       break;
-    case MTU_DISCOVERY_FRAME:
+    case quic::MTU_DISCOVERY_FRAME:
       break;
     default:
       DCHECK(false) << "Illegal frame type: " << frame.type;
@@ -384,53 +386,53 @@
   if (!net_log_is_capturing_)
     return;
   switch (frame.type) {
-    case PADDING_FRAME:
+    case quic::PADDING_FRAME:
       break;
-    case STREAM_FRAME:
+    case quic::STREAM_FRAME:
       net_log_.AddEvent(
           NetLogEventType::QUIC_SESSION_STREAM_FRAME_SENT,
           base::Bind(&NetLogQuicStreamFrameCallback, frame.stream_frame));
       break;
-    case ACK_FRAME: {
+    case quic::ACK_FRAME: {
       net_log_.AddEvent(
           NetLogEventType::QUIC_SESSION_ACK_FRAME_SENT,
           base::Bind(&NetLogQuicAckFrameCallback, frame.ack_frame));
       break;
     }
-    case RST_STREAM_FRAME:
+    case quic::RST_STREAM_FRAME:
       base::UmaHistogramSparse("Net.QuicSession.RstStreamErrorCodeClient",
                                frame.rst_stream_frame->error_code);
       net_log_.AddEvent(NetLogEventType::QUIC_SESSION_RST_STREAM_FRAME_SENT,
                         base::Bind(&NetLogQuicRstStreamFrameCallback,
                                    frame.rst_stream_frame));
       break;
-    case CONNECTION_CLOSE_FRAME:
+    case quic::CONNECTION_CLOSE_FRAME:
       net_log_.AddEvent(
           NetLogEventType::QUIC_SESSION_CONNECTION_CLOSE_FRAME_SENT,
           base::Bind(&NetLogQuicConnectionCloseFrameCallback,
                      frame.connection_close_frame));
       break;
-    case GOAWAY_FRAME:
+    case quic::GOAWAY_FRAME:
       net_log_.AddEvent(
           NetLogEventType::QUIC_SESSION_GOAWAY_FRAME_SENT,
           base::Bind(&NetLogQuicGoAwayFrameCallback, frame.goaway_frame));
       break;
-    case WINDOW_UPDATE_FRAME:
+    case quic::WINDOW_UPDATE_FRAME:
       net_log_.AddEvent(NetLogEventType::QUIC_SESSION_WINDOW_UPDATE_FRAME_SENT,
                         base::Bind(&NetLogQuicWindowUpdateFrameCallback,
                                    frame.window_update_frame));
       break;
-    case BLOCKED_FRAME:
+    case quic::BLOCKED_FRAME:
       net_log_.AddEvent(
           NetLogEventType::QUIC_SESSION_BLOCKED_FRAME_SENT,
           base::Bind(&NetLogQuicBlockedFrameCallback, frame.blocked_frame));
       break;
-    case STOP_WAITING_FRAME:
+    case quic::STOP_WAITING_FRAME:
       net_log_.AddEvent(NetLogEventType::QUIC_SESSION_STOP_WAITING_FRAME_SENT,
                         base::Bind(&NetLogQuicStopWaitingFrameCallback,
                                    frame.stop_waiting_frame));
       break;
-    case PING_FRAME:
+    case quic::PING_FRAME:
       UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.ConnectionFlowControlBlocked",
                             session_->IsConnectionFlowControlBlocked());
       UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.StreamFlowControlBlocked",
@@ -438,7 +440,7 @@
       // PingFrame has no contents to log, so just record that it was sent.
       net_log_.AddEvent(NetLogEventType::QUIC_SESSION_PING_FRAME_SENT);
       break;
-    case MTU_DISCOVERY_FRAME:
+    case quic::MTU_DISCOVERY_FRAME:
       // MtuDiscoveryFrame is PingFrame on wire, it does not have any payload.
       net_log_.AddEvent(NetLogEventType::QUIC_SESSION_MTU_DISCOVERY_FRAME_SENT);
       break;
@@ -448,10 +450,10 @@
 }
 
 void QuicConnectionLogger::OnPacketSent(
-    const SerializedPacket& serialized_packet,
-    QuicPacketNumber original_packet_number,
-    TransmissionType transmission_type,
-    QuicTime sent_time) {
+    const quic::SerializedPacket& serialized_packet,
+    quic::QuicPacketNumber original_packet_number,
+    quic::TransmissionType transmission_type,
+    quic::QuicTime sent_time) {
   if (!net_log_is_capturing_)
     return;
   if (original_packet_number == 0) {
@@ -472,9 +474,9 @@
 }
 
 void QuicConnectionLogger::OnPacketReceived(
-    const QuicSocketAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    const QuicEncryptedPacket& packet) {
+    const quic::QuicSocketAddress& self_address,
+    const quic::QuicSocketAddress& peer_address,
+    const quic::QuicEncryptedPacket& packet) {
   if (local_address_from_self_.GetFamily() == ADDRESS_FAMILY_UNSPECIFIED) {
     local_address_from_self_ = self_address.impl().socket_address();
     UMA_HISTOGRAM_ENUMERATION(
@@ -495,7 +497,7 @@
 }
 
 void QuicConnectionLogger::OnUnauthenticatedHeader(
-    const QuicPacketHeader& header) {
+    const quic::QuicPacketHeader& header) {
   if (!net_log_is_capturing_)
     return;
   net_log_.AddEvent(
@@ -504,7 +506,7 @@
 }
 
 void QuicConnectionLogger::OnIncorrectConnectionId(
-    QuicConnectionId connection_id) {
+    quic::QuicConnectionId connection_id) {
   ++num_incorrect_connection_ids_;
 }
 
@@ -512,7 +514,8 @@
   ++num_undecryptable_packets_;
 }
 
-void QuicConnectionLogger::OnDuplicatePacket(QuicPacketNumber packet_number) {
+void QuicConnectionLogger::OnDuplicatePacket(
+    quic::QuicPacketNumber packet_number) {
   ++num_duplicate_packets_;
   if (!net_log_is_capturing_)
     return;
@@ -522,14 +525,15 @@
 }
 
 void QuicConnectionLogger::OnProtocolVersionMismatch(
-    ParsedQuicVersion received_version) {
+    quic::ParsedQuicVersion received_version) {
   // TODO(rtenneti): Add logging.
 }
 
-void QuicConnectionLogger::OnPacketHeader(const QuicPacketHeader& header) {
+void QuicConnectionLogger::OnPacketHeader(
+    const quic::QuicPacketHeader& header) {
   ++num_packets_received_;
   if (largest_received_packet_number_ < header.packet_number) {
-    QuicPacketNumber delta =
+    quic::QuicPacketNumber delta =
         header.packet_number - largest_received_packet_number_;
     if (delta > 1) {
       // There is a gap between the largest packet previously received and
@@ -565,15 +569,14 @@
   net_log_.AddEvent(NetLogEventType::QUIC_SESSION_PACKET_AUTHENTICATED);
 }
 
-void QuicConnectionLogger::OnStreamFrame(const QuicStreamFrame& frame) {
+void QuicConnectionLogger::OnStreamFrame(const quic::QuicStreamFrame& frame) {
   if (!net_log_is_capturing_)
     return;
   net_log_.AddEvent(NetLogEventType::QUIC_SESSION_STREAM_FRAME_RECEIVED,
                     base::Bind(&NetLogQuicStreamFrameCallback, &frame));
 }
 
-void QuicConnectionLogger::OnAckFrame(const QuicAckFrame& frame) {
-
+void QuicConnectionLogger::OnAckFrame(const quic::QuicAckFrame& frame) {
   const size_t kApproximateLargestSoloAckBytes = 100;
   if (last_received_packet_number_ < received_acks_.size() &&
       last_received_packet_size_ < kApproximateLargestSoloAckBytes) {
@@ -589,14 +592,15 @@
 }
 
 void QuicConnectionLogger::OnStopWaitingFrame(
-    const QuicStopWaitingFrame& frame) {
+    const quic::QuicStopWaitingFrame& frame) {
   if (!net_log_is_capturing_)
     return;
   net_log_.AddEvent(NetLogEventType::QUIC_SESSION_STOP_WAITING_FRAME_RECEIVED,
                     base::Bind(&NetLogQuicStopWaitingFrameCallback, &frame));
 }
 
-void QuicConnectionLogger::OnRstStreamFrame(const QuicRstStreamFrame& frame) {
+void QuicConnectionLogger::OnRstStreamFrame(
+    const quic::QuicRstStreamFrame& frame) {
   base::UmaHistogramSparse("Net.QuicSession.RstStreamErrorCodeServer",
                            frame.error_code);
   if (!net_log_is_capturing_)
@@ -606,7 +610,7 @@
 }
 
 void QuicConnectionLogger::OnConnectionCloseFrame(
-    const QuicConnectionCloseFrame& frame) {
+    const quic::QuicConnectionCloseFrame& frame) {
   if (!net_log_is_capturing_)
     return;
   net_log_.AddEvent(
@@ -615,15 +619,15 @@
 }
 
 void QuicConnectionLogger::OnWindowUpdateFrame(
-    const QuicWindowUpdateFrame& frame,
-    const QuicTime& receive_time) {
+    const quic::QuicWindowUpdateFrame& frame,
+    const quic::QuicTime& receive_time) {
   if (!net_log_is_capturing_)
     return;
   net_log_.AddEvent(NetLogEventType::QUIC_SESSION_WINDOW_UPDATE_FRAME_RECEIVED,
                     base::Bind(&NetLogQuicWindowUpdateFrameCallback, &frame));
 }
 
-void QuicConnectionLogger::OnBlockedFrame(const QuicBlockedFrame& frame) {
+void QuicConnectionLogger::OnBlockedFrame(const quic::QuicBlockedFrame& frame) {
   ++num_blocked_frames_received_;
   if (!net_log_is_capturing_)
     return;
@@ -631,9 +635,9 @@
                     base::Bind(&NetLogQuicBlockedFrameCallback, &frame));
 }
 
-void QuicConnectionLogger::OnGoAwayFrame(const QuicGoAwayFrame& frame) {
+void QuicConnectionLogger::OnGoAwayFrame(const quic::QuicGoAwayFrame& frame) {
   UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.GoAwayReceivedForConnectionMigration",
-                        frame.error_code == QUIC_ERROR_MIGRATING_PORT);
+                        frame.error_code == quic::QUIC_ERROR_MIGRATING_PORT);
 
   if (!net_log_is_capturing_)
     return;
@@ -641,7 +645,7 @@
                     base::Bind(&NetLogQuicGoAwayFrameCallback, &frame));
 }
 
-void QuicConnectionLogger::OnPingFrame(const QuicPingFrame& frame) {
+void QuicConnectionLogger::OnPingFrame(const quic::QuicPingFrame& frame) {
   // PingFrame has no contents to log, so just record that it was received.
   if (!net_log_is_capturing_)
     return;
@@ -649,7 +653,7 @@
 }
 
 void QuicConnectionLogger::OnPublicResetPacket(
-    const QuicPublicResetPacket& packet) {
+    const quic::QuicPublicResetPacket& packet) {
   UpdatePublicResetAddressMismatchHistogram(
       local_address_from_shlo_, packet.client_address.impl().socket_address());
   if (!net_log_is_capturing_)
@@ -661,7 +665,7 @@
 }
 
 void QuicConnectionLogger::OnVersionNegotiationPacket(
-    const QuicVersionNegotiationPacket& packet) {
+    const quic::QuicVersionNegotiationPacket& packet) {
   if (!net_log_is_capturing_)
     return;
   net_log_.AddEvent(
@@ -670,11 +674,11 @@
 }
 
 void QuicConnectionLogger::OnCryptoHandshakeMessageReceived(
-    const CryptoHandshakeMessage& message) {
-  if (message.tag() == kSHLO) {
-    QuicStringPiece address;
-    QuicSocketAddressCoder decoder;
-    if (message.GetStringPiece(kCADR, &address) &&
+    const quic::CryptoHandshakeMessage& message) {
+  if (message.tag() == quic::kSHLO) {
+    quic::QuicStringPiece address;
+    quic::QuicSocketAddressCoder decoder;
+    if (message.GetStringPiece(quic::kCADR, &address) &&
         decoder.Decode(address.data(), address.size())) {
       local_address_from_shlo_ =
           IPEndPoint(decoder.ip().impl().ip_address(), decoder.port());
@@ -692,7 +696,7 @@
 }
 
 void QuicConnectionLogger::OnCryptoHandshakeMessageSent(
-    const CryptoHandshakeMessage& message) {
+    const quic::CryptoHandshakeMessage& message) {
   if (!net_log_is_capturing_)
     return;
   net_log_.AddEvent(
@@ -700,9 +704,10 @@
       base::Bind(&NetLogQuicCryptoHandshakeMessageCallback, &message));
 }
 
-void QuicConnectionLogger::OnConnectionClosed(QuicErrorCode error,
-                                              const string& error_details,
-                                              ConnectionCloseSource source) {
+void QuicConnectionLogger::OnConnectionClosed(
+    quic::QuicErrorCode error,
+    const string& error_details,
+    quic::ConnectionCloseSource source) {
   if (!net_log_is_capturing_)
     return;
   net_log_.AddEvent(
@@ -711,7 +716,7 @@
 }
 
 void QuicConnectionLogger::OnSuccessfulVersionNegotiation(
-    const ParsedQuicVersion& version) {
+    const quic::ParsedQuicVersion& version) {
   if (!net_log_is_capturing_)
     return;
   string quic_version = QuicVersionToString(version.transport_version);
@@ -720,10 +725,10 @@
 }
 
 void QuicConnectionLogger::UpdateReceivedFrameCounts(
-    QuicStreamId stream_id,
+    quic::QuicStreamId stream_id,
     int num_frames_received,
     int num_duplicate_frames_received) {
-  if (stream_id != kCryptoStreamId) {
+  if (stream_id != quic::kCryptoStreamId) {
     num_frames_received_ += num_frames_received;
     num_duplicate_frames_received_ += num_duplicate_frames_received;
   }
@@ -759,7 +764,7 @@
   return num_received / largest_received_packet_number_;
 }
 
-void QuicConnectionLogger::OnRttChanged(QuicTime::Delta rtt) const {
+void QuicConnectionLogger::OnRttChanged(quic::QuicTime::Delta rtt) const {
   // Notify socket performance watcher of the updated RTT value.
   if (!socket_performance_watcher_)
     return;
diff --git a/net/quic/chromium/quic_connection_logger.h b/net/quic/chromium/quic_connection_logger.h
index 0691f1e6..9716677 100644
--- a/net/quic/chromium/quic_connection_logger.h
+++ b/net/quic/chromium/quic_connection_logger.h
@@ -28,61 +28,64 @@
 
 namespace net {
 
-// This class is a debug visitor of a QuicConnection which logs
+// This class is a debug visitor of a quic::QuicConnection which logs
 // events to |net_log|.
 class NET_EXPORT_PRIVATE QuicConnectionLogger
-    : public QuicConnectionDebugVisitor,
-      public QuicPacketCreator::DebugDelegate {
+    : public quic::QuicConnectionDebugVisitor,
+      public quic::QuicPacketCreator::DebugDelegate {
  public:
   QuicConnectionLogger(
-      QuicSpdySession* session,
+      quic::QuicSpdySession* session,
       const char* const connection_description,
       std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher,
       const NetLogWithSource& net_log);
 
   ~QuicConnectionLogger() override;
 
-  // QuicPacketCreator::DebugDelegateInterface
-  void OnFrameAddedToPacket(const QuicFrame& frame) override;
+  // quic::QuicPacketCreator::DebugDelegateInterface
+  void OnFrameAddedToPacket(const quic::QuicFrame& frame) override;
 
   // QuicConnectionDebugVisitorInterface
-  void OnPacketSent(const SerializedPacket& serialized_packet,
-                    QuicPacketNumber original_packet_number,
-                    TransmissionType transmission_type,
-                    QuicTime sent_time) override;
+  void OnPacketSent(const quic::SerializedPacket& serialized_packet,
+                    quic::QuicPacketNumber original_packet_number,
+                    quic::TransmissionType transmission_type,
+                    quic::QuicTime sent_time) override;
   void OnPingSent() override;
-  void OnPacketReceived(const QuicSocketAddress& self_address,
-                        const QuicSocketAddress& peer_address,
-                        const QuicEncryptedPacket& packet) override;
-  void OnUnauthenticatedHeader(const QuicPacketHeader& header) override;
-  void OnIncorrectConnectionId(QuicConnectionId connection_id) override;
+  void OnPacketReceived(const quic::QuicSocketAddress& self_address,
+                        const quic::QuicSocketAddress& peer_address,
+                        const quic::QuicEncryptedPacket& packet) override;
+  void OnUnauthenticatedHeader(const quic::QuicPacketHeader& header) override;
+  void OnIncorrectConnectionId(quic::QuicConnectionId connection_id) override;
   void OnUndecryptablePacket() override;
-  void OnDuplicatePacket(QuicPacketNumber packet_number) override;
-  void OnProtocolVersionMismatch(ParsedQuicVersion version) override;
-  void OnPacketHeader(const QuicPacketHeader& header) override;
-  void OnStreamFrame(const QuicStreamFrame& frame) override;
-  void OnAckFrame(const QuicAckFrame& frame) override;
-  void OnStopWaitingFrame(const QuicStopWaitingFrame& frame) override;
-  void OnRstStreamFrame(const QuicRstStreamFrame& frame) override;
-  void OnConnectionCloseFrame(const QuicConnectionCloseFrame& frame) override;
-  void OnWindowUpdateFrame(const QuicWindowUpdateFrame& frame,
-                           const QuicTime& receive_time) override;
-  void OnBlockedFrame(const QuicBlockedFrame& frame) override;
-  void OnGoAwayFrame(const QuicGoAwayFrame& frame) override;
-  void OnPingFrame(const QuicPingFrame& frame) override;
-  void OnPublicResetPacket(const QuicPublicResetPacket& packet) override;
+  void OnDuplicatePacket(quic::QuicPacketNumber packet_number) override;
+  void OnProtocolVersionMismatch(quic::ParsedQuicVersion version) override;
+  void OnPacketHeader(const quic::QuicPacketHeader& header) override;
+  void OnStreamFrame(const quic::QuicStreamFrame& frame) override;
+  void OnAckFrame(const quic::QuicAckFrame& frame) override;
+  void OnStopWaitingFrame(const quic::QuicStopWaitingFrame& frame) override;
+  void OnRstStreamFrame(const quic::QuicRstStreamFrame& frame) override;
+  void OnConnectionCloseFrame(
+      const quic::QuicConnectionCloseFrame& frame) override;
+  void OnWindowUpdateFrame(const quic::QuicWindowUpdateFrame& frame,
+                           const quic::QuicTime& receive_time) override;
+  void OnBlockedFrame(const quic::QuicBlockedFrame& frame) override;
+  void OnGoAwayFrame(const quic::QuicGoAwayFrame& frame) override;
+  void OnPingFrame(const quic::QuicPingFrame& frame) override;
+  void OnPublicResetPacket(const quic::QuicPublicResetPacket& packet) override;
   void OnVersionNegotiationPacket(
-      const QuicVersionNegotiationPacket& packet) override;
-  void OnConnectionClosed(QuicErrorCode error,
+      const quic::QuicVersionNegotiationPacket& packet) override;
+  void OnConnectionClosed(quic::QuicErrorCode error,
                           const std::string& error_details,
-                          ConnectionCloseSource source) override;
+                          quic::ConnectionCloseSource source) override;
   void OnSuccessfulVersionNegotiation(
-      const ParsedQuicVersion& version) override;
-  void OnRttChanged(QuicTime::Delta rtt) const override;
+      const quic::ParsedQuicVersion& version) override;
+  void OnRttChanged(quic::QuicTime::Delta rtt) const override;
 
-  void OnCryptoHandshakeMessageReceived(const CryptoHandshakeMessage& message);
-  void OnCryptoHandshakeMessageSent(const CryptoHandshakeMessage& message);
-  void UpdateReceivedFrameCounts(QuicStreamId stream_id,
+  void OnCryptoHandshakeMessageReceived(
+      const quic::CryptoHandshakeMessage& message);
+  void OnCryptoHandshakeMessageSent(
+      const quic::CryptoHandshakeMessage& message);
+  void UpdateReceivedFrameCounts(quic::QuicStreamId stream_id,
                                  int num_frames_received,
                                  int num_duplicate_frames_received);
   void OnCertificateVerified(const CertVerifyResult& result);
@@ -103,9 +106,9 @@
   void UpdateIsCapturing();
 
   NetLogWithSource net_log_;
-  QuicSpdySession* session_;  // Unowned.
+  quic::QuicSpdySession* session_;  // Unowned.
   // The last packet number received.
-  QuicPacketNumber last_received_packet_number_;
+  quic::QuicPacketNumber last_received_packet_number_;
   // The size of the most recently received packet.
   size_t last_received_packet_size_;
   // True if a PING frame has been sent and no packet has been received.
@@ -114,7 +117,7 @@
   size_t previous_received_packet_size_;
   // The largest packet number received.  In the case where a packet is
   // received late (out of order), this value will not be updated.
-  QuicPacketNumber largest_received_packet_number_;
+  quic::QuicPacketNumber largest_received_packet_number_;
   // Number of times that the current received packet number is
   // smaller than the last received packet number.
   size_t num_out_of_order_received_packets_;
@@ -126,8 +129,8 @@
   // The number of times that OnPacketHeader was called.
   // If the network replicates packets, then this number may be slightly
   // different from the real number of distinct packets received.
-  QuicPacketCount num_packets_received_;
-  // The kCADR value provided by the server in ServerHello.
+  quic::QuicPacketCount num_packets_received_;
+  // The quic::kCADR value provided by the server in ServerHello.
   IPEndPoint local_address_from_shlo_;
   // The first local address from which a packet was received.
   IPEndPoint local_address_from_self_;
diff --git a/net/quic/chromium/quic_connectivity_probing_manager.cc b/net/quic/chromium/quic_connectivity_probing_manager.cc
index deb6cfd..fed1c9e 100644
--- a/net/quic/chromium/quic_connectivity_probing_manager.cc
+++ b/net/quic/chromium/quic_connectivity_probing_manager.cc
@@ -30,7 +30,7 @@
 std::unique_ptr<base::Value> NetLogQuicConnectivityProbingResponseCallback(
     NetworkChangeNotifier::NetworkHandle network,
     IPEndPoint* self_address,
-    QuicSocketAddress* peer_address,
+    quic::QuicSocketAddress* peer_address,
     NetLogCaptureMode capture_mode) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("network", base::Int64ToString(network));
@@ -91,7 +91,7 @@
         NetLog::Int64Callback("network", network_));
   }
   network_ = NetworkChangeNotifier::kInvalidNetworkHandle;
-  peer_address_ = QuicSocketAddress();
+  peer_address_ = quic::QuicSocketAddress();
   socket_.reset();
   writer_.reset();
   reader_.reset();
@@ -103,7 +103,7 @@
 
 void QuicConnectivityProbingManager::StartProbing(
     NetworkChangeNotifier::NetworkHandle network,
-    const QuicSocketAddress& peer_address,
+    const quic::QuicSocketAddress& peer_address,
     std::unique_ptr<DatagramClientSocket> socket,
     std::unique_ptr<QuicChromiumPacketWriter> writer,
     std::unique_ptr<QuicChromiumPacketReader> reader,
@@ -141,8 +141,8 @@
 }
 
 void QuicConnectivityProbingManager::OnConnectivityProbingReceived(
-    const QuicSocketAddress& self_address,
-    const QuicSocketAddress& peer_address) {
+    const quic::QuicSocketAddress& self_address,
+    const quic::QuicSocketAddress& peer_address) {
   if (!socket_) {
     DVLOG(1) << "Probing response is ignored as probing was cancelled "
              << "or succeeded.";
@@ -156,7 +156,7 @@
            << local_address.ToString() << ", to peer ip:port "
            << peer_address_.ToString();
 
-  if (QuicSocketAddressImpl(local_address) != self_address.impl() ||
+  if (quic::QuicSocketAddressImpl(local_address) != self_address.impl() ||
       peer_address_ != peer_address) {
     DVLOG(1) << "Received probing response from peer ip:port "
              << peer_address.ToString() << ", to self ip:port "
diff --git a/net/quic/chromium/quic_connectivity_probing_manager.h b/net/quic/chromium/quic_connectivity_probing_manager.h
index 24910d0..7e8bdcb 100644
--- a/net/quic/chromium/quic_connectivity_probing_manager.h
+++ b/net/quic/chromium/quic_connectivity_probing_manager.h
@@ -29,7 +29,7 @@
     // of |socket|, |writer| and |reader| for |network| to delegate.
     virtual void OnProbeNetworkSucceeded(
         NetworkChangeNotifier::NetworkHandle network,
-        const QuicSocketAddress& self_address,
+        const quic::QuicSocketAddress& self_address,
         std::unique_ptr<DatagramClientSocket> socket,
         std::unique_ptr<QuicChromiumPacketWriter> writer,
         std::unique_ptr<QuicChromiumPacketReader> reader) = 0;
@@ -43,7 +43,7 @@
     // written by the |writer|.
     virtual bool OnSendConnectivityProbingPacket(
         QuicChromiumPacketWriter* writer,
-        const QuicSocketAddress& peer_address) = 0;
+        const quic::QuicSocketAddress& peer_address) = 0;
   };
 
   QuicConnectivityProbingManager(Delegate* delegate,
@@ -65,7 +65,7 @@
   // probing packet response is received from the peer by |reader| or final
   // time out.
   void StartProbing(NetworkChangeNotifier::NetworkHandle network,
-                    const QuicSocketAddress& peer_address,
+                    const quic::QuicSocketAddress& peer_address,
                     std::unique_ptr<DatagramClientSocket> socket,
                     std::unique_ptr<QuicChromiumPacketWriter> writer,
                     std::unique_ptr<QuicChromiumPacketReader> reader,
@@ -78,13 +78,14 @@
 
   // Called when a connectivity probing packet has been received from
   // |peer_address| on a socket with |self_address|.
-  void OnConnectivityProbingReceived(const QuicSocketAddress& self_address,
-                                     const QuicSocketAddress& peer_address);
+  void OnConnectivityProbingReceived(
+      const quic::QuicSocketAddress& self_address,
+      const quic::QuicSocketAddress& peer_address);
 
   // Returns true if the manager is currently probing |network| to
   // |peer_address|.
   bool IsUnderProbing(NetworkChangeNotifier::NetworkHandle network,
-                      const QuicSocketAddress& peer_address) {
+                      const quic::QuicSocketAddress& peer_address) {
     return (network == network_ && peer_address == peer_address_);
   }
 
@@ -110,7 +111,7 @@
   // NetworkChangeNotifier::kInvalidNetwork when probing results has been
   // delivered to |delegate_|.
   NetworkChangeNotifier::NetworkHandle network_;
-  QuicSocketAddress peer_address_;
+  quic::QuicSocketAddress peer_address_;
 
   std::unique_ptr<DatagramClientSocket> socket_;
   std::unique_ptr<QuicChromiumPacketWriter> writer_;
diff --git a/net/quic/chromium/quic_connectivity_probing_manager_test.cc b/net/quic/chromium/quic_connectivity_probing_manager_test.cc
index 1752668e..3dddaaf 100644
--- a/net/quic/chromium/quic_connectivity_probing_manager_test.cc
+++ b/net/quic/chromium/quic_connectivity_probing_manager_test.cc
@@ -21,11 +21,12 @@
 namespace test {
 namespace {
 
-const IPEndPoint kIpEndPoint = IPEndPoint(IPAddress::IPv4AllZeros(), kTestPort);
+const IPEndPoint kIpEndPoint =
+    IPEndPoint(IPAddress::IPv4AllZeros(), quic::test::kTestPort);
 
 const NetworkChangeNotifier::NetworkHandle testNetworkHandle = 1;
-const QuicSocketAddress testPeerAddress =
-    QuicSocketAddress(QuicSocketAddressImpl(kIpEndPoint));
+const quic::QuicSocketAddress testPeerAddress =
+    quic::QuicSocketAddress(quic::QuicSocketAddressImpl(kIpEndPoint));
 
 }  // anonymous namespace
 
@@ -42,20 +43,20 @@
                void(int result, const DatagramClientSocket* socket));
 
   MOCK_METHOD3(OnPacket,
-               bool(const QuicReceivedPacket& packet,
-                    const QuicSocketAddress& local_address,
-                    const QuicSocketAddress& peer_address));
+               bool(const quic::QuicReceivedPacket& packet,
+                    const quic::QuicSocketAddress& local_address,
+                    const quic::QuicSocketAddress& peer_address));
 
   MOCK_METHOD1(OnProbeNetworkFailed,
                void(NetworkChangeNotifier::NetworkHandle network));
 
   MOCK_METHOD2(OnSendConnectivityProbingPacket,
                bool(QuicChromiumPacketWriter* writer,
-                    const QuicSocketAddress& peer_address));
+                    const quic::QuicSocketAddress& peer_address));
 
   void OnProbeNetworkSucceeded(
       NetworkChangeNotifier::NetworkHandle network,
-      const QuicSocketAddress& self_address,
+      const quic::QuicSocketAddress& self_address,
       std::unique_ptr<DatagramClientSocket> socket,
       std::unique_ptr<QuicChromiumPacketWriter> writer,
       std::unique_ptr<QuicChromiumPacketReader> reader) override {
@@ -89,13 +90,15 @@
     EXPECT_THAT(socket_->Connect(kIpEndPoint), IsOk());
     IPEndPoint self_address;
     socket_->GetLocalAddress(&self_address);
-    self_address_ = QuicSocketAddress(QuicSocketAddressImpl(self_address));
+    self_address_ =
+        quic::QuicSocketAddress(quic::QuicSocketAddressImpl(self_address));
     // Create packet writer and reader for probing.
     writer_.reset(
         new QuicChromiumPacketWriter(socket_.get(), test_task_runner_.get()));
     reader_.reset(new QuicChromiumPacketReader(
         socket_.get(), &clock_, &session_, kQuicYieldAfterPacketsRead,
-        QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
+        quic::QuicTime::Delta::FromMilliseconds(
+            kQuicYieldAfterDurationMilliseconds),
         bound_test_net_log_.bound()));
   }
 
@@ -112,9 +115,9 @@
   std::unique_ptr<DatagramClientSocket> socket_;
   std::unique_ptr<QuicChromiumPacketWriter> writer_;
   std::unique_ptr<QuicChromiumPacketReader> reader_;
-  QuicSocketAddress self_address_;
+  quic::QuicSocketAddress self_address_;
 
-  MockClock clock_;
+  quic::MockClock clock_;
   MockClientSocketFactory socket_factory_;
   TestNetLog net_log_;
   BoundTestNetLog bound_test_net_log_;
@@ -204,7 +207,7 @@
   // probing response and continue waiting.
   EXPECT_CALL(session_, OnSendConnectivityProbingPacket(_, testPeerAddress))
       .Times(0);
-  probing_manager_.OnConnectivityProbingReceived(QuicSocketAddress(),
+  probing_manager_.OnConnectivityProbingReceived(quic::QuicSocketAddress(),
                                                  testPeerAddress);
   EXPECT_NE(session_.successful_network(), testNetworkHandle);
   EXPECT_EQ(1u, test_task_runner_->GetPendingTaskCount());
diff --git a/net/quic/chromium/quic_crypto_client_stream_factory.cc b/net/quic/chromium/quic_crypto_client_stream_factory.cc
index d2401c9..84327a51 100644
--- a/net/quic/chromium/quic_crypto_client_stream_factory.cc
+++ b/net/quic/chromium/quic_crypto_client_stream_factory.cc
@@ -15,14 +15,14 @@
 
 class DefaultCryptoStreamFactory : public QuicCryptoClientStreamFactory {
  public:
-  QuicCryptoClientStream* CreateQuicCryptoClientStream(
-      const QuicServerId& server_id,
+  quic::QuicCryptoClientStream* CreateQuicCryptoClientStream(
+      const quic::QuicServerId& server_id,
       QuicChromiumClientSession* session,
-      std::unique_ptr<ProofVerifyContext> proof_verify_context,
-      QuicCryptoClientConfig* crypto_config) override {
-    return new QuicCryptoClientStream(server_id, session,
-                                      proof_verify_context.release(),
-                                      crypto_config, session);
+      std::unique_ptr<quic::ProofVerifyContext> proof_verify_context,
+      quic::QuicCryptoClientConfig* crypto_config) override {
+    return new quic::QuicCryptoClientStream(server_id, session,
+                                            proof_verify_context.release(),
+                                            crypto_config, session);
   }
 };
 
diff --git a/net/quic/chromium/quic_crypto_client_stream_factory.h b/net/quic/chromium/quic_crypto_client_stream_factory.h
index d68d051..d049b33 100644
--- a/net/quic/chromium/quic_crypto_client_stream_factory.h
+++ b/net/quic/chromium/quic_crypto_client_stream_factory.h
@@ -11,24 +11,30 @@
 #include "net/base/net_export.h"
 #include "net/third_party/quic/core/quic_server_id.h"
 
+namespace quic {
+class ProofVerifyContext;
+}  // namespace quic
+namespace net {
+class QuicChromiumClientSession;
+}  // namespace net
+namespace quic {
+class QuicCryptoClientConfig;
+
+class QuicCryptoClientStream;
+}  // namespace quic
 namespace net {
 
-class ProofVerifyContext;
-class QuicChromiumClientSession;
-class QuicCryptoClientConfig;
-class QuicCryptoClientStream;
-
-// An interface used to instantiate QuicCryptoClientStream objects. Used to
-// facilitate testing code with mock implementations.
+// An interface used to instantiate quic::QuicCryptoClientStream objects. Used
+// to facilitate testing code with mock implementations.
 class NET_EXPORT QuicCryptoClientStreamFactory {
  public:
   virtual ~QuicCryptoClientStreamFactory() {}
 
-  virtual QuicCryptoClientStream* CreateQuicCryptoClientStream(
-      const QuicServerId& server_id,
+  virtual quic::QuicCryptoClientStream* CreateQuicCryptoClientStream(
+      const quic::QuicServerId& server_id,
       QuicChromiumClientSession* session,
-      std::unique_ptr<ProofVerifyContext> proof_verify_context,
-      QuicCryptoClientConfig* crypto_config) = 0;
+      std::unique_ptr<quic::ProofVerifyContext> proof_verify_context,
+      quic::QuicCryptoClientConfig* crypto_config) = 0;
 
   static QuicCryptoClientStreamFactory* GetDefaultFactory();
 };
diff --git a/net/quic/chromium/quic_end_to_end_unittest.cc b/net/quic/chromium/quic_end_to_end_unittest.cc
index b8de7ac..9ac0eb2 100644
--- a/net/quic/chromium/quic_end_to_end_unittest.cc
+++ b/net/quic/chromium/quic_end_to_end_unittest.cc
@@ -117,7 +117,7 @@
 
     session_params_.enable_quic = true;
     if (GetParam().use_stateless_rejects) {
-      session_params_.quic_connection_options.push_back(kSREJ);
+      session_params_.quic_connection_options.push_back(quic::kSREJ);
     }
 
     session_context_.quic_random = nullptr;
@@ -175,14 +175,15 @@
   void StartServer() {
     server_address_ = IPEndPoint(IPAddress(127, 0, 0, 1), 0);
     server_config_.SetInitialStreamFlowControlWindowToSend(
-        kInitialStreamFlowControlWindowForTest);
+        quic::test::kInitialStreamFlowControlWindowForTest);
     server_config_.SetInitialSessionFlowControlWindowToSend(
-        kInitialSessionFlowControlWindowForTest);
-    server_config_options_.token_binding_params = QuicTagVector{kTB10, kP256};
-    server_.reset(
-        new QuicSimpleServer(crypto_test_utils::ProofSourceForTesting(),
-                             server_config_, server_config_options_,
-                             AllSupportedVersions(), &memory_cache_backend_));
+        quic::test::kInitialSessionFlowControlWindowForTest);
+    server_config_options_.token_binding_params =
+        quic::QuicTagVector{quic::kTB10, quic::kP256};
+    server_.reset(new QuicSimpleServer(
+        quic::test::crypto_test_utils::ProofSourceForTesting(), server_config_,
+        server_config_options_, quic::AllSupportedVersions(),
+        &memory_cache_backend_));
     server_->Listen(server_address_);
     server_address_ = server_->server_address();
     server_->StartReading();
@@ -191,10 +192,10 @@
 
   // Adds an entry to the cache used by the QUIC server to serve
   // responses.
-  void AddToCache(QuicStringPiece path,
+  void AddToCache(quic::QuicStringPiece path,
                   int response_code,
-                  QuicStringPiece response_detail,
-                  QuicStringPiece body) {
+                  quic::QuicStringPiece response_detail,
+                  quic::QuicStringPiece body) {
     memory_cache_backend_.AddSimpleResponse("test.example.com", path,
                                             response_code, body);
   }
@@ -252,11 +253,11 @@
   std::string request_body_;
   std::unique_ptr<UploadDataStream> upload_data_stream_;
   std::unique_ptr<QuicSimpleServer> server_;
-  QuicMemoryCacheBackend memory_cache_backend_;
+  quic::QuicMemoryCacheBackend memory_cache_backend_;
   IPEndPoint server_address_;
   std::string server_hostname_;
-  QuicConfig server_config_;
-  QuicCryptoServerConfig::ConfigOptions server_config_options_;
+  quic::QuicConfig server_config_;
+  quic::QuicCryptoServerConfig::ConfigOptions server_config_options_;
   bool server_started_;
   bool strike_register_no_startup_period_;
 };
diff --git a/net/quic/chromium/quic_http_stream.cc b/net/quic/chromium/quic_http_stream.cc
index 2b186235..1a21a529 100644
--- a/net/quic/chromium/quic_http_stream.cc
+++ b/net/quic/chromium/quic_http_stream.cc
@@ -34,7 +34,7 @@
 namespace {
 
 std::unique_ptr<base::Value> NetLogQuicPushStreamCallback(
-    QuicStreamId stream_id,
+    quic::QuicStreamId stream_id,
     const GURL* url,
     NetLogCaptureMode capture_mode) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
@@ -76,25 +76,25 @@
 }
 
 HttpResponseInfo::ConnectionInfo QuicHttpStream::ConnectionInfoFromQuicVersion(
-    QuicTransportVersion quic_version) {
+    quic::QuicTransportVersion quic_version) {
   switch (quic_version) {
-    case QUIC_VERSION_UNSUPPORTED:
+    case quic::QUIC_VERSION_UNSUPPORTED:
       return HttpResponseInfo::CONNECTION_INFO_QUIC_UNKNOWN_VERSION;
-    case QUIC_VERSION_35:
+    case quic::QUIC_VERSION_35:
       return HttpResponseInfo::CONNECTION_INFO_QUIC_35;
-    case QUIC_VERSION_37:
+    case quic::QUIC_VERSION_37:
       return HttpResponseInfo::CONNECTION_INFO_QUIC_37;
-    case QUIC_VERSION_38:
+    case quic::QUIC_VERSION_38:
       return HttpResponseInfo::CONNECTION_INFO_QUIC_38;
-    case QUIC_VERSION_39:
+    case quic::QUIC_VERSION_39:
       return HttpResponseInfo::CONNECTION_INFO_QUIC_39;
-    case QUIC_VERSION_41:
+    case quic::QUIC_VERSION_41:
       return HttpResponseInfo::CONNECTION_INFO_QUIC_41;
-    case QUIC_VERSION_42:
+    case quic::QUIC_VERSION_42:
       return HttpResponseInfo::CONNECTION_INFO_QUIC_42;
-    case QUIC_VERSION_43:
+    case quic::QUIC_VERSION_43:
       return HttpResponseInfo::CONNECTION_INFO_QUIC_43;
-    case QUIC_VERSION_99:
+    case quic::QUIC_VERSION_99:
       return HttpResponseInfo::CONNECTION_INFO_QUIC_99;
   }
   NOTREACHED();
@@ -135,7 +135,7 @@
   SaveSSLInfo();
 
   std::string url(request_info->url.spec());
-  QuicClientPromisedInfo* promised =
+  quic::QuicClientPromisedInfo* promised =
       quic_session()->GetPushPromiseIndex()->GetPromised(url);
   if (promised) {
     found_promise_ = true;
@@ -228,10 +228,11 @@
     // promised stream and request a new stream.
     if (found_promise_) {
       std::string url(request_info_->url.spec());
-      QuicClientPromisedInfo* promised =
+      quic::QuicClientPromisedInfo* promised =
           quic_session()->GetPushPromiseIndex()->GetPromised(url);
       if (promised != nullptr) {
-        quic_session()->ResetPromised(promised->id(), QUIC_STREAM_CANCELLED);
+        quic_session()->ResetPromised(promised->id(),
+                                      quic::QUIC_STREAM_CANCELLED);
       }
     }
 
@@ -241,11 +242,11 @@
     //   && (request_body_stream_->size() ||
     //       request_body_stream_->is_chunked()))
     // Set the body buffer size to be the size of the body clamped
-    // into the range [10 * kMaxPacketSize, 256 * kMaxPacketSize].
+    // into the range [10 * quic::kMaxPacketSize, 256 * quic::kMaxPacketSize].
     // With larger bodies, larger buffers reduce CPU usage.
     raw_request_body_buf_ = new IOBufferWithSize(static_cast<size_t>(std::max(
-        10 * kMaxPacketSize,
-        std::min(request_body_stream_->size(), 256 * kMaxPacketSize))));
+        10 * quic::kMaxPacketSize,
+        std::min(request_body_stream_->size(), 256 * quic::kMaxPacketSize))));
     // The request body buffer is empty at first.
     request_body_buf_ = new DrainableIOBuffer(raw_request_body_buf_.get(), 0);
   }
@@ -339,7 +340,7 @@
   SaveResponseStatus();
   // Note: the not_reusable flag has no meaning for QUIC streams.
   if (stream_)
-    stream_->Reset(QUIC_STREAM_CANCELLED);
+    stream_->Reset(quic::QUIC_STREAM_CANCELLED);
   ResetStream();
 }
 
@@ -469,9 +470,9 @@
 int QuicHttpStream::DoLoop(int rv) {
   CHECK(!in_loop_);
   base::AutoReset<bool> auto_reset_in_loop(&in_loop_, true);
-  std::unique_ptr<QuicConnection::ScopedPacketFlusher> packet_flusher =
+  std::unique_ptr<quic::QuicConnection::ScopedPacketFlusher> packet_flusher =
       quic_session()->CreatePacketBundler(
-          QuicConnection::AckBundling::SEND_ACK_IF_QUEUED);
+          quic::QuicConnection::AckBundling::SEND_ACK_IF_QUEUED);
   do {
     State state = next_state_;
     next_state_ = STATE_NONE;
@@ -617,7 +618,7 @@
   // |rv| is the result of read from the request body from the last call to
   // DoSendBody().
   if (rv < 0) {
-    stream_->Reset(QUIC_ERROR_PROCESSING_STREAM);
+    stream_->Reset(quic::QUIC_ERROR_PROCESSING_STREAM);
     ResetStream();
     return rv;
   }
@@ -638,7 +639,7 @@
   int len = request_body_buf_->BytesRemaining();
   if (len > 0 || eof) {
     next_state_ = STATE_SEND_BODY_COMPLETE;
-    QuicStringPiece data(request_body_buf_->data(), len);
+    quic::QuicStringPiece data(request_body_buf_->data(), len);
     return stream_->WriteStreamData(
         data, eof,
         base::Bind(&QuicHttpStream::OnIOComplete, weak_factory_.GetWeakPtr()));
@@ -779,8 +780,8 @@
     return ERR_CONNECTION_CLOSED;
 
   // Explicit stream error are always fatal.
-  if (stream_->stream_error() != QUIC_STREAM_NO_ERROR &&
-      stream_->stream_error() != QUIC_STREAM_CONNECTION_ERROR) {
+  if (stream_->stream_error() != quic::QUIC_STREAM_NO_ERROR &&
+      stream_->stream_error() != quic::QUIC_STREAM_CONNECTION_ERROR) {
     return ERR_QUIC_PROTOCOL_ERROR;
   }
 
diff --git a/net/quic/chromium/quic_http_stream.h b/net/quic/chromium/quic_http_stream.h
index 801cfc8..38c805c6 100644
--- a/net/quic/chromium/quic_http_stream.h
+++ b/net/quic/chromium/quic_http_stream.h
@@ -68,7 +68,7 @@
   void SetPriority(RequestPriority priority) override;
 
   static HttpResponseInfo::ConnectionInfo ConnectionInfoFromQuicVersion(
-      QuicTransportVersion quic_version);
+      quic::QuicTransportVersion quic_version);
 
  private:
   friend class test::QuicHttpStreamPeer;
diff --git a/net/quic/chromium/quic_http_stream_test.cc b/net/quic/chromium/quic_http_stream_test.cc
index 5e838fbc..7fa0ed4 100644
--- a/net/quic/chromium/quic_http_stream_test.cc
+++ b/net/quic/chromium/quic_http_stream_test.cc
@@ -79,25 +79,26 @@
 const char kDefaultServerHostName[] = "www.example.org";
 const uint16_t kDefaultServerPort = 443;
 
-class TestQuicConnection : public QuicConnection {
+class TestQuicConnection : public quic::QuicConnection {
  public:
-  TestQuicConnection(const ParsedQuicVersionVector& versions,
-                     QuicConnectionId connection_id,
+  TestQuicConnection(const quic::ParsedQuicVersionVector& versions,
+                     quic::QuicConnectionId connection_id,
                      IPEndPoint address,
                      QuicChromiumConnectionHelper* helper,
                      QuicChromiumAlarmFactory* alarm_factory,
-                     QuicPacketWriter* writer)
-      : QuicConnection(connection_id,
-                       QuicSocketAddress(QuicSocketAddressImpl(address)),
-                       helper,
-                       alarm_factory,
-                       writer,
-                       true /* owns_writer */,
-                       Perspective::IS_CLIENT,
-                       versions) {}
+                     quic::QuicPacketWriter* writer)
+      : quic::QuicConnection(
+            connection_id,
+            quic::QuicSocketAddress(quic::QuicSocketAddressImpl(address)),
+            helper,
+            alarm_factory,
+            writer,
+            true /* owns_writer */,
+            quic::Perspective::IS_CLIENT,
+            versions) {}
 
-  void SetSendAlgorithm(SendAlgorithmInterface* send_algorithm) {
-    QuicConnectionPeer::SetSendAlgorithm(this, send_algorithm);
+  void SetSendAlgorithm(quic::SendAlgorithmInterface* send_algorithm) {
+    quic::test::QuicConnectionPeer::SetSendAlgorithm(this, send_algorithm);
   }
 };
 
@@ -165,9 +166,9 @@
   }
 };
 
-class QuicHttpStreamTest
-    : public ::testing::TestWithParam<std::tuple<QuicTransportVersion, bool>>,
-      public WithScopedTaskEnvironment {
+class QuicHttpStreamTest : public ::testing::TestWithParam<
+                               std::tuple<quic::QuicTransportVersion, bool>>,
+                           public WithScopedTaskEnvironment {
  public:
   void CloseStream(QuicHttpStream* stream, int /*rv*/) { stream->Close(false); }
 
@@ -179,19 +180,19 @@
   // Holds a packet to be written to the wire, and the IO mode that should
   // be used by the mock socket when performing the write.
   struct PacketToWrite {
-    PacketToWrite(IoMode mode, QuicReceivedPacket* packet)
+    PacketToWrite(IoMode mode, quic::QuicReceivedPacket* packet)
         : mode(mode), packet(packet) {}
     PacketToWrite(IoMode mode, int rv) : mode(mode), packet(nullptr), rv(rv) {}
     IoMode mode;
-    QuicReceivedPacket* packet;
+    quic::QuicReceivedPacket* packet;
     int rv;
   };
 
   QuicHttpStreamTest()
       : version_(std::get<0>(GetParam())),
         client_headers_include_h2_stream_dependency_(std::get<1>(GetParam())),
-        crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
-                       TlsClientHandshaker::CreateSslCtx()),
+        crypto_config_(quic::test::crypto_test_utils::ProofVerifierForTesting(),
+                       quic::TlsClientHandshaker::CreateSslCtx()),
         read_buffer_(new IOBufferWithSize(4096)),
         promise_id_(GetNthServerInitiatedStreamId(0)),
         stream_id_(GetNthClientInitiatedStreamId(0)),
@@ -200,33 +201,33 @@
                       connection_id_,
                       &clock_,
                       kDefaultServerHostName,
-                      Perspective::IS_CLIENT,
+                      quic::Perspective::IS_CLIENT,
                       client_headers_include_h2_stream_dependency_),
         server_maker_(version_,
                       connection_id_,
                       &clock_,
                       kDefaultServerHostName,
-                      Perspective::IS_SERVER,
+                      quic::Perspective::IS_SERVER,
                       false),
         random_generator_(0),
         response_offset_(0) {
     IPAddress ip(192, 0, 2, 33);
     peer_addr_ = IPEndPoint(ip, 443);
     self_addr_ = IPEndPoint(ip, 8435);
-    clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20));
+    clock_.AdvanceTime(quic::QuicTime::Delta::FromMilliseconds(20));
     request_.traffic_annotation =
         MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
   }
 
   ~QuicHttpStreamTest() {
-    session_->CloseSessionOnError(ERR_ABORTED, QUIC_INTERNAL_ERROR);
+    session_->CloseSessionOnError(ERR_ABORTED, quic::QUIC_INTERNAL_ERROR);
     for (size_t i = 0; i < writes_.size(); i++) {
       delete writes_[i].packet;
     }
   }
 
   // Adds a packet to the list of expected writes.
-  void AddWrite(std::unique_ptr<QuicReceivedPacket> packet) {
+  void AddWrite(std::unique_ptr<quic::QuicReceivedPacket> packet) {
     writes_.push_back(PacketToWrite(SYNCHRONOUS, packet.release()));
   }
 
@@ -235,17 +236,18 @@
   }
 
   // Returns the packet to be written at position |pos|.
-  QuicReceivedPacket* GetWrite(size_t pos) { return writes_[pos].packet; }
+  quic::QuicReceivedPacket* GetWrite(size_t pos) { return writes_[pos].packet; }
 
   bool AtEof() {
     return socket_data_->AllReadDataConsumed() &&
            socket_data_->AllWriteDataConsumed();
   }
 
-  void ProcessPacket(std::unique_ptr<QuicReceivedPacket> packet) {
+  void ProcessPacket(std::unique_ptr<quic::QuicReceivedPacket> packet) {
     connection_->ProcessUdpPacket(
-        QuicSocketAddress(QuicSocketAddressImpl(self_addr_)),
-        QuicSocketAddress(QuicSocketAddressImpl(peer_addr_)), *packet);
+        quic::QuicSocketAddress(quic::QuicSocketAddressImpl(self_addr_)),
+        quic::QuicSocketAddress(quic::QuicSocketAddressImpl(peer_addr_)),
+        *packet);
   }
 
   // Configures the test fixture to use the list of expected writes.
@@ -268,18 +270,18 @@
         socket_data_.get(), net_log_.bound().net_log()));
     socket->Connect(peer_addr_);
     runner_ = new TestTaskRunner(&clock_);
-    send_algorithm_ = new MockSendAlgorithm();
+    send_algorithm_ = new quic::test::MockSendAlgorithm();
     EXPECT_CALL(*send_algorithm_, InRecovery()).WillRepeatedly(Return(false));
     EXPECT_CALL(*send_algorithm_, InSlowStart()).WillRepeatedly(Return(false));
     EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
         .Times(testing::AtLeast(1));
     EXPECT_CALL(*send_algorithm_, GetCongestionWindow())
-        .WillRepeatedly(Return(kMaxPacketSize));
+        .WillRepeatedly(Return(quic::kMaxPacketSize));
     EXPECT_CALL(*send_algorithm_, PacingRate(_))
-        .WillRepeatedly(Return(QuicBandwidth::Zero()));
+        .WillRepeatedly(Return(quic::QuicBandwidth::Zero()));
     EXPECT_CALL(*send_algorithm_, CanSend(_)).WillRepeatedly(Return(true));
     EXPECT_CALL(*send_algorithm_, BandwidthEstimate())
-        .WillRepeatedly(Return(QuicBandwidth::Zero()));
+        .WillRepeatedly(Return(quic::QuicBandwidth::Zero()));
     EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber());
     EXPECT_CALL(*send_algorithm_, OnApplicationLimited(_)).Times(AnyNumber());
     EXPECT_CALL(*send_algorithm_, GetCongestionControlType())
@@ -289,8 +291,8 @@
     alarm_factory_.reset(new QuicChromiumAlarmFactory(runner_.get(), &clock_));
 
     connection_ = new TestQuicConnection(
-        SupportedVersions(
-            net::ParsedQuicVersion(net::PROTOCOL_QUIC_CRYPTO, version_)),
+        quic::test::SupportedVersions(
+            quic::ParsedQuicVersion(quic::PROTOCOL_QUIC_CRYPTO, version_)),
         connection_id_, peer_addr_, helper_.get(), alarm_factory_.get(),
         new QuicChromiumPacketWriter(
             socket.get(), base::ThreadTaskRunnerHandle::Get().get()));
@@ -322,10 +324,11 @@
         base::TimeDelta::FromSeconds(kMaxTimeOnNonDefaultNetworkSecs),
         kMaxMigrationsToNonDefaultNetworkOnPathDegrading,
         kQuicYieldAfterPacketsRead,
-        QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
+        quic::QuicTime::Delta::FromMilliseconds(
+            kQuicYieldAfterDurationMilliseconds),
         client_headers_include_h2_stream_dependency_, /*cert_verify_flags=*/0,
-        DefaultQuicConfig(), &crypto_config_, "CONNECTION_UNKNOWN", dns_start,
-        dns_end, &push_promise_index_, nullptr,
+        quic::test::DefaultQuicConfig(), &crypto_config_, "CONNECTION_UNKNOWN",
+        dns_start, dns_end, &push_promise_index_, nullptr,
         base::ThreadTaskRunnerHandle::Get().get(),
         /*socket_performance_watcher=*/nullptr, net_log_.bound().net_log()));
     session_->Initialize();
@@ -346,7 +349,7 @@
     promised_response_[":version"] = "HTTP/1.1";
     promised_response_["content-type"] = "text/plain";
 
-    promise_url_ = SpdyUtils::GetPromisedUrlFromHeaders(push_promise_);
+    promise_url_ = quic::SpdyUtils::GetPromisedUrlFromHeaders(push_promise_);
   }
 
   void SetRequest(const string& method,
@@ -360,62 +363,62 @@
     response_data_ = body;
   }
 
-  std::unique_ptr<QuicReceivedPacket> InnerConstructDataPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> InnerConstructDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data,
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data,
       QuicTestPacketMaker* maker) {
     return maker->MakeDataPacket(packet_number, stream_id,
                                  should_include_version, fin, offset, data);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientDataPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructClientDataPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data) {
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data) {
     return InnerConstructDataPacket(packet_number, stream_id_,
                                     should_include_version, fin, offset, data,
                                     &client_maker_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerDataPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerDataPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data) {
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data) {
     return InnerConstructDataPacket(packet_number, stream_id_,
                                     should_include_version, fin, offset, data,
                                     &server_maker_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> InnerConstructRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> InnerConstructRequestHeadersPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       RequestPriority request_priority,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     return InnerConstructRequestHeadersPacket(
         packet_number, stream_id, should_include_version, fin, request_priority,
         0, spdy_headers_frame_length, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket> InnerConstructRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> InnerConstructRequestHeadersPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       RequestPriority request_priority,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId parent_stream_id,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     spdy::SpdyPriority priority =
         ConvertRequestPriorityToQuicPriority(request_priority);
     return client_maker_.MakeRequestHeadersPacket(
@@ -424,15 +427,15 @@
         spdy_headers_frame_length, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket>
+  std::unique_ptr<quic::QuicReceivedPacket>
   ConstructRequestHeadersAndDataFramesPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       RequestPriority request_priority,
-      QuicStreamId parent_stream_id,
-      QuicStreamOffset* offset,
+      quic::QuicStreamId parent_stream_id,
+      quic::QuicStreamOffset* offset,
       size_t* spdy_headers_frame_length,
       const std::vector<std::string>& data_writes) {
     spdy::SpdyPriority priority =
@@ -443,16 +446,16 @@
         spdy_headers_frame_length, data_writes);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructRequestAndRstPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructRequestAndRstPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       RequestPriority request_priority,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId parent_stream_id,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* header_stream_offset,
-      QuicRstStreamErrorCode error_code,
+      quic::QuicStreamOffset* header_stream_offset,
+      quic::QuicRstStreamErrorCode error_code,
       size_t bytes_written) {
     spdy::SpdyPriority priority =
         ConvertRequestPriorityToQuicPriority(request_priority);
@@ -463,8 +466,8 @@
         bytes_written);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructRequestHeadersPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructRequestHeadersPacket(
+      quic::QuicPacketNumber packet_number,
       bool fin,
       RequestPriority request_priority,
       size_t* spdy_headers_frame_length) {
@@ -473,9 +476,9 @@
         spdy_headers_frame_length, nullptr);
   }
 
-  std::unique_ptr<QuicReceivedPacket> InnerConstructResponseHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> InnerConstructResponseHeadersPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool fin,
       size_t* spdy_headers_frame_length) {
     return server_maker_.MakeResponseHeadersPacket(
@@ -484,117 +487,120 @@
         &response_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructResponseHeadersPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructResponseHeadersPacket(
+      quic::QuicPacketNumber packet_number,
       bool fin,
       size_t* spdy_headers_frame_length) {
     return InnerConstructResponseHeadersPacket(packet_number, stream_id_, fin,
                                                spdy_headers_frame_length);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructResponseHeadersPacketWithOffset(
-      QuicPacketNumber packet_number,
-      bool fin,
-      size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset) {
+  std::unique_ptr<quic::QuicReceivedPacket>
+  ConstructResponseHeadersPacketWithOffset(quic::QuicPacketNumber packet_number,
+                                           bool fin,
+                                           size_t* spdy_headers_frame_length,
+                                           quic::QuicStreamOffset* offset) {
     return server_maker_.MakeResponseHeadersPacket(
         packet_number, stream_id_, !kIncludeVersion, fin,
         std::move(response_headers_), spdy_headers_frame_length, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructResponseTrailersPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructResponseTrailersPacket(
+      quic::QuicPacketNumber packet_number,
       bool fin,
       spdy::SpdyHeaderBlock trailers,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     return server_maker_.MakeResponseHeadersPacket(
         packet_number, stream_id_, !kIncludeVersion, fin, std::move(trailers),
         spdy_headers_frame_length, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientRstStreamPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructClientRstStreamPacket(
+      quic::QuicPacketNumber packet_number) {
     return client_maker_.MakeRstPacket(packet_number, true, stream_id_,
-                                       QUIC_RST_ACKNOWLEDGEMENT);
+                                       quic::QUIC_RST_ACKNOWLEDGEMENT);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientRstStreamCancelledPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket>
+  ConstructClientRstStreamCancelledPacket(
+      quic::QuicPacketNumber packet_number) {
     return client_maker_.MakeRstPacket(packet_number, !kIncludeVersion,
-                                       stream_id_, QUIC_STREAM_CANCELLED);
+                                       stream_id_, quic::QUIC_STREAM_CANCELLED);
   }
 
-  std::unique_ptr<QuicReceivedPacket>
-  ConstructClientRstStreamVaryMismatchPacket(QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket>
+  ConstructClientRstStreamVaryMismatchPacket(
+      quic::QuicPacketNumber packet_number) {
     return client_maker_.MakeRstPacket(packet_number, !kIncludeVersion,
-                                       promise_id_, QUIC_PROMISE_VARY_MISMATCH);
+                                       promise_id_,
+                                       quic::QUIC_PROMISE_VARY_MISMATCH);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructAckAndRstStreamPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructAckAndRstStreamPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckAndRstPacket(
-        packet_number, !kIncludeVersion, stream_id_, QUIC_STREAM_CANCELLED,
-        largest_received, smallest_received, least_unacked,
-        !kIncludeCongestionFeedback);
+        packet_number, !kIncludeVersion, stream_id_,
+        quic::QUIC_STREAM_CANCELLED, largest_received, smallest_received,
+        least_unacked, !kIncludeCongestionFeedback);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientRstStreamErrorPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructClientRstStreamErrorPacket(
+      quic::QuicPacketNumber packet_number,
       bool include_version) {
     return client_maker_.MakeRstPacket(packet_number, include_version,
                                        stream_id_,
-                                       QUIC_ERROR_PROCESSING_STREAM);
+                                       quic::QUIC_ERROR_PROCESSING_STREAM);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructAckAndRstStreamPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructAckAndRstStreamPacket(
+      quic::QuicPacketNumber packet_number) {
     return ConstructAckAndRstStreamPacket(packet_number, 2, 1, 1);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructClientAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckPacket(packet_number, largest_received,
                                        smallest_received, least_unacked,
                                        !kIncludeCongestionFeedback);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return server_maker_.MakeAckPacket(packet_number, largest_received,
                                        smallest_received, least_unacked,
                                        !kIncludeCongestionFeedback);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientPriorityPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructClientPriorityPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
-      QuicStreamId id,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId id,
+      quic::QuicStreamId parent_stream_id,
       RequestPriority request_priority,
-      QuicStreamOffset* header_stream_offset) {
+      quic::QuicStreamOffset* header_stream_offset) {
     return client_maker_.MakePriorityPacket(
         packet_number, should_include_version, id, parent_stream_id,
         ConvertRequestPriorityToQuicPriority(request_priority),
         header_stream_offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructInitialSettingsPacket(
-      QuicStreamOffset* offset) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructInitialSettingsPacket(
+      quic::QuicStreamOffset* offset) {
     return client_maker_.MakeInitialSettingsPacket(1, offset);
   }
 
-  void ReceivePromise(QuicStreamId id) {
-    auto headers = AsHeaderList(push_promise_);
+  void ReceivePromise(quic::QuicStreamId id) {
+    auto headers = quic::test::AsHeaderList(push_promise_);
     QuicChromiumClientStream::Handle* stream =
         QuicHttpStreamPeer::GetQuicChromiumClientStream(stream_.get());
     stream->OnPromiseHeaderList(id, headers.uncompressed_header_bytes(),
@@ -614,31 +620,31 @@
     ExpectLoadTimingHasOnlyConnectionTimes(load_timing_info);
   }
 
-  QuicStreamId GetNthClientInitiatedStreamId(int n) {
-    return test::GetNthClientInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthClientInitiatedStreamId(int n) {
+    return quic::test::GetNthClientInitiatedStreamId(version_, n);
   }
 
-  QuicStreamId GetNthServerInitiatedStreamId(int n) {
-    return test::GetNthServerInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthServerInitiatedStreamId(int n) {
+    return quic::test::GetNthServerInitiatedStreamId(version_, n);
   }
 
-  const QuicTransportVersion version_;
+  const quic::QuicTransportVersion version_;
   const bool client_headers_include_h2_stream_dependency_;
 
   BoundTestNetLog net_log_;
-  MockSendAlgorithm* send_algorithm_;
+  quic::test::MockSendAlgorithm* send_algorithm_;
   scoped_refptr<TestTaskRunner> runner_;
   std::unique_ptr<MockWrite[]> mock_writes_;
-  MockClock clock_;
+  quic::MockClock clock_;
   TestQuicConnection* connection_;
   std::unique_ptr<QuicChromiumConnectionHelper> helper_;
   std::unique_ptr<QuicChromiumAlarmFactory> alarm_factory_;
-  testing::StrictMock<MockQuicConnectionVisitor> visitor_;
+  testing::StrictMock<quic::test::MockQuicConnectionVisitor> visitor_;
   std::unique_ptr<UploadDataStream> upload_data_stream_;
   std::unique_ptr<QuicHttpStream> stream_;
   TransportSecurityState transport_security_state_;
   std::unique_ptr<QuicChromiumClientSession> session_;
-  QuicCryptoClientConfig crypto_config_;
+  quic::QuicCryptoClientConfig crypto_config_;
   TestCompletionCallback callback_;
   HttpRequestInfo request_;
   HttpRequestHeaders headers_;
@@ -648,34 +654,35 @@
   spdy::SpdyHeaderBlock response_headers_;
   string request_data_;
   string response_data_;
-  QuicClientPushPromiseIndex push_promise_index_;
+  quic::QuicClientPushPromiseIndex push_promise_index_;
 
   // For server push testing
   std::unique_ptr<QuicHttpStream> promised_stream_;
   spdy::SpdyHeaderBlock push_promise_;
   spdy::SpdyHeaderBlock promised_response_;
-  const QuicStreamId promise_id_;
+  const quic::QuicStreamId promise_id_;
   string promise_url_;
-  const QuicStreamId stream_id_;
+  const quic::QuicStreamId stream_id_;
 
-  const QuicConnectionId connection_id_;
+  const quic::QuicConnectionId connection_id_;
   QuicTestPacketMaker client_maker_;
   QuicTestPacketMaker server_maker_;
   IPEndPoint self_addr_;
   IPEndPoint peer_addr_;
-  MockRandom random_generator_;
+  quic::test::MockRandom random_generator_;
   ProofVerifyDetailsChromium verify_details_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
   std::unique_ptr<StaticSocketDataProvider> socket_data_;
   std::vector<PacketToWrite> writes_;
-  QuicStreamOffset response_offset_;
+  quic::QuicStreamOffset response_offset_;
 };
 
 INSTANTIATE_TEST_CASE_P(
     VersionIncludeStreamDependencySequence,
     QuicHttpStreamTest,
-    ::testing::Combine(::testing::ValuesIn(AllSupportedTransportVersions()),
-                       ::testing::Bool()));
+    ::testing::Combine(
+        ::testing::ValuesIn(quic::AllSupportedTransportVersions()),
+        ::testing::Bool()));
 
 TEST_P(QuicHttpStreamTest, RenewStreamForAuth) {
   Initialize();
@@ -701,7 +708,7 @@
 TEST_P(QuicHttpStreamTest, GetRequest) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_header_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin,
@@ -764,7 +771,7 @@
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_header_frame_length;
 
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin,
@@ -851,7 +858,7 @@
 TEST_P(QuicHttpStreamTest, GetRequestWithTrailers) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_header_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin,
@@ -880,7 +887,7 @@
 
   // Send the response headers.
   size_t spdy_response_header_frame_length;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   ProcessPacket(ConstructResponseHeadersPacketWithOffset(
       2, !kFin, &spdy_response_header_frame_length, &offset));
   // Now that the headers have been processed, the callback will return.
@@ -898,7 +905,8 @@
   spdy::SpdyHeaderBlock trailers;
   size_t spdy_trailers_frame_length;
   trailers["foo"] = "bar";
-  trailers[kFinalOffsetHeaderKey] = base::IntToString(strlen(kResponseBody));
+  trailers[quic::kFinalOffsetHeaderKey] =
+      base::IntToString(strlen(kResponseBody));
   ProcessPacket(ConstructResponseTrailersPacket(
       4, kFin, std::move(trailers), &spdy_trailers_frame_length, &offset));
 
@@ -946,7 +954,7 @@
 TEST_P(QuicHttpStreamTest, GetRequestLargeResponse) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin,
@@ -1012,7 +1020,7 @@
                                       net_log_.bound(), callback_.callback()));
 
   session_->connection()->CloseConnection(
-      QUIC_NO_ERROR, "test", ConnectionCloseBehavior::SILENT_CLOSE);
+      quic::QUIC_NO_ERROR, "test", quic::ConnectionCloseBehavior::SILENT_CLOSE);
 
   EXPECT_EQ(ERR_CONNECTION_CLOSED,
             stream_->SendRequest(headers_, &response_, callback_.callback()));
@@ -1039,7 +1047,7 @@
   EXPECT_TRUE(ssl_info.is_valid());
 
   session_->connection()->CloseConnection(
-      QUIC_NO_ERROR, "test", ConnectionCloseBehavior::SILENT_CLOSE);
+      quic::QUIC_NO_ERROR, "test", quic::ConnectionCloseBehavior::SILENT_CLOSE);
 
   SSLInfo ssl_info2;
   stream_->GetSSLInfo(&ssl_info2);
@@ -1063,7 +1071,7 @@
             alternative_service);
 
   session_->connection()->CloseConnection(
-      QUIC_NO_ERROR, "test", ConnectionCloseBehavior::SILENT_CLOSE);
+      quic::QUIC_NO_ERROR, "test", quic::ConnectionCloseBehavior::SILENT_CLOSE);
 
   AlternativeService alternative_service2;
   EXPECT_TRUE(stream_->GetAlternativeService(&alternative_service2));
@@ -1074,7 +1082,7 @@
 TEST_P(QuicHttpStreamTest, LogGranularQuicConnectionError) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin,
@@ -1097,27 +1105,27 @@
   EXPECT_THAT(stream_->ReadResponseHeaders(callback_.callback()),
               IsError(ERR_IO_PENDING));
 
-  QuicConnectionCloseFrame frame;
-  frame.error_code = QUIC_PEER_GOING_AWAY;
+  quic::QuicConnectionCloseFrame frame;
+  frame.error_code = quic::QUIC_PEER_GOING_AWAY;
   session_->connection()->OnConnectionCloseFrame(frame);
 
   NetErrorDetails details;
-  EXPECT_EQ(QUIC_NO_ERROR, details.quic_connection_error);
+  EXPECT_EQ(quic::QUIC_NO_ERROR, details.quic_connection_error);
   stream_->PopulateNetErrorDetails(&details);
-  EXPECT_EQ(QUIC_PEER_GOING_AWAY, details.quic_connection_error);
+  EXPECT_EQ(quic::QUIC_PEER_GOING_AWAY, details.quic_connection_error);
 }
 
 TEST_P(QuicHttpStreamTest, LogGranularQuicErrorIfHandshakeNotConfirmed) {
   // By default the test setup defaults handshake to be confirmed. Manually set
   // it to be not confirmed.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::ZERO_RTT);
+      quic::MockCryptoClientStream::ZERO_RTT);
 
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  quic::QuicStreamOffset header_stream_offset = 0;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   AddWrite(InnerConstructRequestHeadersPacket(
       1, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin,
       DEFAULT_PRIORITY, &spdy_request_headers_frame_length,
@@ -1138,20 +1146,20 @@
   EXPECT_THAT(stream_->ReadResponseHeaders(callback_.callback()),
               IsError(ERR_IO_PENDING));
 
-  QuicConnectionCloseFrame frame;
-  frame.error_code = QUIC_PEER_GOING_AWAY;
+  quic::QuicConnectionCloseFrame frame;
+  frame.error_code = quic::QUIC_PEER_GOING_AWAY;
   session_->connection()->OnConnectionCloseFrame(frame);
 
   NetErrorDetails details;
   stream_->PopulateNetErrorDetails(&details);
-  EXPECT_EQ(QUIC_PEER_GOING_AWAY, details.quic_connection_error);
+  EXPECT_EQ(quic::QUIC_PEER_GOING_AWAY, details.quic_connection_error);
 }
 
 // Regression test for http://crbug.com/409871
 TEST_P(QuicHttpStreamTest, SessionClosedBeforeReadResponseHeaders) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin,
@@ -1170,7 +1178,7 @@
             stream_->SendRequest(headers_, &response_, callback_.callback()));
 
   session_->connection()->CloseConnection(
-      QUIC_NO_ERROR, "test", ConnectionCloseBehavior::SILENT_CLOSE);
+      quic::QUIC_NO_ERROR, "test", quic::ConnectionCloseBehavior::SILENT_CLOSE);
 
   EXPECT_NE(OK, stream_->ReadResponseHeaders(callback_.callback()));
 
@@ -1184,7 +1192,7 @@
 TEST_P(QuicHttpStreamTest, SendPostRequest) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
 
   AddWrite(ConstructRequestHeadersAndDataFramesPacket(
@@ -1256,7 +1264,7 @@
 TEST_P(QuicHttpStreamTest, SendPostRequestAndReceiveSoloFin) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(ConstructRequestHeadersAndDataFramesPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin,
@@ -1329,7 +1337,7 @@
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t chunk_size = strlen(kUploadData);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(ConstructRequestHeadersAndDataFramesPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, !kFin,
@@ -1402,7 +1410,7 @@
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t chunk_size = strlen(kUploadData);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(ConstructRequestHeadersAndDataFramesPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, !kFin,
@@ -1471,7 +1479,7 @@
 TEST_P(QuicHttpStreamTest, SendChunkedPostRequestWithOneEmptyDataPacket) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, !kFin,
@@ -1539,7 +1547,7 @@
 TEST_P(QuicHttpStreamTest, DestroyedEarly) {
   SetRequest("GET", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin,
@@ -1586,7 +1594,7 @@
 TEST_P(QuicHttpStreamTest, Priority) {
   SetRequest("GET", "/", MEDIUM);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, kFin, MEDIUM,
@@ -1628,7 +1636,7 @@
 TEST_P(QuicHttpStreamTest, SessionClosedDuringDoLoop) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(ConstructRequestHeadersAndDataFramesPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, !kFin,
@@ -1671,7 +1679,7 @@
 
 TEST_P(QuicHttpStreamTest, SessionClosedBeforeSendHeadersComplete) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(SYNCHRONOUS, ERR_FAILED);
   Initialize();
@@ -1703,7 +1711,7 @@
 
 TEST_P(QuicHttpStreamTest, SessionClosedBeforeSendHeadersCompleteReadResponse) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(SYNCHRONOUS, ERR_FAILED);
   Initialize();
@@ -1739,7 +1747,7 @@
 TEST_P(QuicHttpStreamTest, SessionClosedBeforeSendBodyComplete) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, !kFin,
@@ -1780,7 +1788,7 @@
 TEST_P(QuicHttpStreamTest, SessionClosedBeforeSendBundledBodyComplete) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(ConstructRequestHeadersAndDataFramesPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, !kFin,
@@ -2020,7 +2028,7 @@
   // packet, but does it matter?
 
   push_promise_[":authority"] = "mail.example.org";
-  promise_url_ = SpdyUtils::GetPromisedUrlFromHeaders(push_promise_);
+  promise_url_ = quic::SpdyUtils::GetPromisedUrlFromHeaders(push_promise_);
 
   ReceivePromise(promise_id_);
   EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr);
@@ -2089,7 +2097,7 @@
   // TODO(ckrasic) - could do this via constructing a PUSH_PROMISE
   // packet, but does it matter?
   push_promise_[":authority"] = "www.notexample.org";
-  promise_url_ = SpdyUtils::GetPromisedUrlFromHeaders(push_promise_);
+  promise_url_ = quic::SpdyUtils::GetPromisedUrlFromHeaders(push_promise_);
 
   ReceivePromise(promise_id_);
   // The promise will have been rejected because the cert doesn't
@@ -2182,12 +2190,12 @@
   request_headers_["accept-encoding"] = "sdch";
 
   size_t spdy_request_header_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
 
-  QuicPacketNumber client_packet_number = 2;
+  quic::QuicPacketNumber client_packet_number = 2;
   if (client_headers_include_h2_stream_dependency_ &&
-      version_ > QUIC_VERSION_42) {
+      version_ > quic::QUIC_VERSION_42) {
     AddWrite(ConstructClientPriorityPacket(
         client_packet_number++, kIncludeVersion, promise_id_, 0,
         DEFAULT_PRIORITY, &header_stream_offset));
@@ -2303,12 +2311,12 @@
 TEST_P(QuicHttpStreamTest, DataReadErrorSynchronous) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(ConstructRequestAndRstPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, !kFin,
       DEFAULT_PRIORITY, 0, &spdy_request_headers_frame_length,
-      &header_stream_offset, QUIC_ERROR_PROCESSING_STREAM, 0));
+      &header_stream_offset, quic::QUIC_ERROR_PROCESSING_STREAM, 0));
 
   Initialize();
 
@@ -2338,7 +2346,7 @@
 TEST_P(QuicHttpStreamTest, DataReadErrorAsynchronous) {
   SetRequest("POST", "/", DEFAULT_PRIORITY);
   size_t spdy_request_headers_frame_length;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   AddWrite(ConstructInitialSettingsPacket(&header_stream_offset));
   AddWrite(InnerConstructRequestHeadersPacket(
       2, GetNthClientInitiatedStreamId(0), kIncludeVersion, !kFin,
diff --git a/net/quic/chromium/quic_http_utils.cc b/net/quic/chromium/quic_http_utils.cc
index e255b6aa..05101467 100644
--- a/net/quic/chromium/quic_http_utils.cc
+++ b/net/quic/chromium/quic_http_utils.cc
@@ -37,7 +37,7 @@
 }
 
 std::unique_ptr<base::Value> QuicRequestNetLogCallback(
-    QuicStreamId stream_id,
+    quic::QuicStreamId stream_id,
     const spdy::SpdyHeaderBlock* headers,
     spdy::SpdyPriority priority,
     NetLogCaptureMode capture_mode) {
@@ -49,17 +49,17 @@
   return std::move(dict);
 }
 
-QuicTransportVersionVector FilterSupportedAltSvcVersions(
+quic::QuicTransportVersionVector FilterSupportedAltSvcVersions(
     const spdy::SpdyAltSvcWireFormat::AlternativeService& quic_alt_svc,
-    const QuicTransportVersionVector& supported_versions,
+    const quic::QuicTransportVersionVector& supported_versions,
     bool support_ietf_format_quic_altsvc) {
-  QuicTransportVersionVector supported_alt_svc_versions;
+  quic::QuicTransportVersionVector supported_alt_svc_versions;
   if (support_ietf_format_quic_altsvc && quic_alt_svc.protocol_id == "hq") {
     // Using IETF format for advertising QUIC. In this case,
     // |alternative_service_entry.version| will store QUIC version labels.
     for (uint32_t quic_version_label : quic_alt_svc.version) {
-      for (QuicTransportVersion supported : supported_versions) {
-        QuicVersionLabel supported_version_label_network_order =
+      for (quic::QuicTransportVersion supported : supported_versions) {
+        quic::QuicVersionLabel supported_version_label_network_order =
             QuicVersionToQuicVersionLabel(supported);
         if (supported_version_label_network_order == quic_version_label) {
           supported_alt_svc_versions.push_back(supported);
@@ -69,7 +69,7 @@
     }
   } else if (quic_alt_svc.protocol_id == "quic") {
     for (uint32_t quic_version : quic_alt_svc.version) {
-      for (QuicTransportVersion supported : supported_versions) {
+      for (quic::QuicTransportVersion supported : supported_versions) {
         if (static_cast<uint32_t>(supported) == quic_version) {
           supported_alt_svc_versions.push_back(supported);
           RecordAltSvcFormat(GOOGLE_FORMAT);
diff --git a/net/quic/chromium/quic_http_utils.h b/net/quic/chromium/quic_http_utils.h
index 009b6f1b..3ad30f8 100644
--- a/net/quic/chromium/quic_http_utils.h
+++ b/net/quic/chromium/quic_http_utils.h
@@ -23,16 +23,16 @@
 
 // Converts a spdy::SpdyHeaderBlock and priority into NetLog event parameters.
 NET_EXPORT std::unique_ptr<base::Value> QuicRequestNetLogCallback(
-    QuicStreamId stream_id,
+    quic::QuicStreamId stream_id,
     const spdy::SpdyHeaderBlock* headers,
     spdy::SpdyPriority priority,
     NetLogCaptureMode capture_mode);
 
-// Parses |alt_svc_versions| into a QuicTransportVersionVector and removes
+// Parses |alt_svc_versions| into a quic::QuicTransportVersionVector and removes
 // all entries that aren't found in |supported_versions|.
-NET_EXPORT QuicTransportVersionVector FilterSupportedAltSvcVersions(
+NET_EXPORT quic::QuicTransportVersionVector FilterSupportedAltSvcVersions(
     const spdy::SpdyAltSvcWireFormat::AlternativeService& quic_alt_svc,
-    const QuicTransportVersionVector& supported_versions,
+    const quic::QuicTransportVersionVector& supported_versions,
     bool support_ietf_format_quic_altsvc);
 
 }  // namespace net
diff --git a/net/quic/chromium/quic_http_utils_test.cc b/net/quic/chromium/quic_http_utils_test.cc
index 7c9b376c4..416604f 100644
--- a/net/quic/chromium/quic_http_utils_test.cc
+++ b/net/quic/chromium/quic_http_utils_test.cc
@@ -38,18 +38,19 @@
 }
 
 TEST(QuicHttpUtilsTest, FilterSupportedAltSvcVersions) {
-  QuicTransportVersionVector supported_versions = {
-      QUIC_VERSION_37, QUIC_VERSION_38, QUIC_VERSION_39, QUIC_VERSION_41};
+  quic::QuicTransportVersionVector supported_versions = {
+      quic::QUIC_VERSION_37, quic::QUIC_VERSION_38, quic::QUIC_VERSION_39,
+      quic::QUIC_VERSION_41};
 
   std::vector<uint32_t> alt_svc_versions_google = {
-      QUIC_VERSION_38, QUIC_VERSION_41, QUIC_VERSION_42};
+      quic::QUIC_VERSION_38, quic::QUIC_VERSION_41, quic::QUIC_VERSION_42};
   std::vector<uint32_t> alt_svc_versions_ietf = {
-      QuicVersionToQuicVersionLabel(QUIC_VERSION_38),
-      QuicVersionToQuicVersionLabel(QUIC_VERSION_41),
-      QuicVersionToQuicVersionLabel(QUIC_VERSION_42)};
+      QuicVersionToQuicVersionLabel(quic::QUIC_VERSION_38),
+      QuicVersionToQuicVersionLabel(quic::QUIC_VERSION_41),
+      QuicVersionToQuicVersionLabel(quic::QUIC_VERSION_42)};
 
-  QuicTransportVersionVector supported_alt_svc_versions = {QUIC_VERSION_38,
-                                                           QUIC_VERSION_41};
+  quic::QuicTransportVersionVector supported_alt_svc_versions = {
+      quic::QUIC_VERSION_38, quic::QUIC_VERSION_41};
   spdy::SpdyAltSvcWireFormat::AlternativeService altsvc;
 
   altsvc.protocol_id = "quic";
@@ -63,14 +64,14 @@
   altsvc.version = alt_svc_versions_ietf;
   EXPECT_EQ(supported_alt_svc_versions,
             FilterSupportedAltSvcVersions(altsvc, supported_versions, true));
-  EXPECT_EQ(QuicTransportVersionVector(),
+  EXPECT_EQ(quic::QuicTransportVersionVector(),
             FilterSupportedAltSvcVersions(altsvc, supported_versions, false));
 
   altsvc.protocol_id = "invalid_protocol";
   altsvc.version = alt_svc_versions_ietf;
-  EXPECT_EQ(QuicTransportVersionVector(),
+  EXPECT_EQ(quic::QuicTransportVersionVector(),
             FilterSupportedAltSvcVersions(altsvc, supported_versions, true));
-  EXPECT_EQ(QuicTransportVersionVector(),
+  EXPECT_EQ(quic::QuicTransportVersionVector(),
             FilterSupportedAltSvcVersions(altsvc, supported_versions, false));
 }
 
diff --git a/net/quic/chromium/quic_network_transaction_unittest.cc b/net/quic/chromium/quic_network_transaction_unittest.cc
index 4346c56..1c9d860 100644
--- a/net/quic/chromium/quic_network_transaction_unittest.cc
+++ b/net/quic/chromium/quic_network_transaction_unittest.cc
@@ -132,15 +132,15 @@
     return os;
   }
 
-  QuicTransportVersion version;
+  quic::QuicTransportVersion version;
   DestinationType destination_type;
   bool client_headers_include_h2_stream_dependency;
 };
 
 std::string GenerateQuicVersionsListForAltSvcHeader(
-    const QuicTransportVersionVector& versions) {
+    const quic::QuicTransportVersionVector& versions) {
   std::string result = "";
-  for (const QuicTransportVersion& version : versions) {
+  for (const quic::QuicTransportVersion& version : versions) {
     if (!result.empty())
       result.append(",");
     result.append(base::IntToString(version));
@@ -150,9 +150,9 @@
 
 std::vector<PoolingTestParams> GetPoolingTestParams() {
   std::vector<PoolingTestParams> params;
-  QuicTransportVersionVector all_supported_versions =
-      AllSupportedTransportVersions();
-  for (const QuicTransportVersion version : all_supported_versions) {
+  quic::QuicTransportVersionVector all_supported_versions =
+      quic::AllSupportedTransportVersions();
+  for (const quic::QuicTransportVersion version : all_supported_versions) {
     params.push_back(PoolingTestParams{version, SAME_AS_FIRST, false});
     params.push_back(PoolingTestParams{version, SAME_AS_FIRST, true});
     params.push_back(PoolingTestParams{version, SAME_AS_SECOND, false});
@@ -247,26 +247,27 @@
   DISALLOW_COPY_AND_ASSIGN(TestSocketPerformanceWatcherFactory);
 };
 
-class QuicNetworkTransactionTest : public PlatformTest,
-                                   public ::testing::WithParamInterface<
-                                       std::tuple<QuicTransportVersion, bool>>,
-                                   public WithScopedTaskEnvironment {
+class QuicNetworkTransactionTest
+    : public PlatformTest,
+      public ::testing::WithParamInterface<
+          std::tuple<quic::QuicTransportVersion, bool>>,
+      public WithScopedTaskEnvironment {
  protected:
   QuicNetworkTransactionTest()
       : version_(std::get<0>(GetParam())),
         client_headers_include_h2_stream_dependency_(std::get<1>(GetParam())),
-        supported_versions_(SupportedTransportVersions(version_)),
+        supported_versions_(quic::test::SupportedTransportVersions(version_)),
         client_maker_(version_,
                       0,
                       &clock_,
                       kDefaultServerHostName,
-                      Perspective::IS_CLIENT,
+                      quic::Perspective::IS_CLIENT,
                       client_headers_include_h2_stream_dependency_),
         server_maker_(version_,
                       0,
                       &clock_,
                       kDefaultServerHostName,
-                      Perspective::IS_SERVER,
+                      quic::Perspective::IS_SERVER,
                       false),
         cert_transparency_verifier_(new MultiLogCTVerifier()),
         ssl_config_service_(new SSLConfigServiceDefaults),
@@ -282,7 +283,7 @@
     request_.load_flags = 0;
     request_.traffic_annotation =
         net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
-    clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20));
+    clock_.AdvanceTime(quic::QuicTime::Delta::FromMilliseconds(20));
 
     scoped_refptr<X509Certificate> cert(
         ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
@@ -306,135 +307,136 @@
     session_.reset();
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientConnectionClosePacket(
-      QuicPacketNumber num) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientConnectionClosePacket(quic::QuicPacketNumber num) {
     return client_maker_.MakeConnectionClosePacket(
-        num, false, QUIC_CRYPTO_VERSION_NOT_SUPPORTED, "Time to panic!");
+        num, false, quic::QUIC_CRYPTO_VERSION_NOT_SUPPORTED, "Time to panic!");
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerConnectionClosePacket(
-      QuicPacketNumber num) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructServerConnectionClosePacket(quic::QuicPacketNumber num) {
     return server_maker_.MakeConnectionClosePacket(
-        num, false, QUIC_CRYPTO_VERSION_NOT_SUPPORTED, "Time to panic!");
+        num, false, quic::QUIC_CRYPTO_VERSION_NOT_SUPPORTED, "Time to panic!");
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerGoAwayPacket(
-      QuicPacketNumber num,
-      QuicErrorCode error_code,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructServerGoAwayPacket(
+      quic::QuicPacketNumber num,
+      quic::QuicErrorCode error_code,
       std::string reason_phrase) {
     return server_maker_.MakeGoAwayPacket(num, error_code, reason_phrase);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructClientAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckPacket(packet_number, largest_received,
                                        smallest_received, least_unacked, true);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
-      QuicTime::Delta ack_delay_time) {
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructClientAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
+      quic::QuicTime::Delta ack_delay_time) {
     return client_maker_.MakeAckPacket(packet_number, largest_received,
                                        smallest_received, least_unacked, true,
                                        ack_delay_time);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientAckAndRstPacket(
-      QuicPacketNumber num,
-      QuicStreamId stream_id,
-      QuicRstStreamErrorCode error_code,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructClientAckAndRstPacket(
+      quic::QuicPacketNumber num,
+      quic::QuicStreamId stream_id,
+      quic::QuicRstStreamErrorCode error_code,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckAndRstPacket(
         num, false, stream_id, error_code, largest_received, smallest_received,
         least_unacked, true);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientRstPacket(
-      QuicPacketNumber num,
-      QuicStreamId stream_id,
-      QuicRstStreamErrorCode error_code,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructClientRstPacket(
+      quic::QuicPacketNumber num,
+      quic::QuicStreamId stream_id,
+      quic::QuicRstStreamErrorCode error_code,
       size_t bytes_written) {
     return client_maker_.MakeRstPacket(num, false, stream_id, error_code,
                                        bytes_written);
   }
 
-  std::unique_ptr<QuicEncryptedPacket>
-  ConstructClientAckAndConnectionClosePacket(QuicPacketNumber packet_number,
-                                             QuicPacketNumber largest_received,
-                                             QuicPacketNumber smallest_received,
-                                             QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientAckAndConnectionClosePacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckPacket(packet_number, largest_received,
                                        smallest_received, least_unacked, true);
   }
 
-  std::unique_ptr<QuicEncryptedPacket>
+  std::unique_ptr<quic::QuicEncryptedPacket>
   ConstructClientAckAndConnectionClosePacket(
-      QuicPacketNumber num,
-      QuicTime::Delta delta_time_largest_observed,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
-      QuicErrorCode quic_error,
+      quic::QuicPacketNumber num,
+      quic::QuicTime::Delta delta_time_largest_observed,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
+      quic::QuicErrorCode quic_error,
       const std::string& quic_error_details) {
     return client_maker_.MakeAckAndConnectionClosePacket(
         num, false, delta_time_largest_observed, largest_received,
         smallest_received, least_unacked, quic_error, quic_error_details);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerRstPacket(
-      QuicPacketNumber num,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructServerRstPacket(
+      quic::QuicPacketNumber num,
       bool include_version,
-      QuicStreamId stream_id,
-      QuicRstStreamErrorCode error_code) {
+      quic::QuicStreamId stream_id,
+      quic::QuicRstStreamErrorCode error_code) {
     return server_maker_.MakeRstPacket(num, include_version, stream_id,
                                        error_code);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructInitialSettingsPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamOffset* offset) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructInitialSettingsPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamOffset* offset) {
     return client_maker_.MakeInitialSettingsPacket(packet_number, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return server_maker_.MakeAckPacket(packet_number, largest_received,
                                        smallest_received, least_unacked, false);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructClientPriorityPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructClientPriorityPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
-      QuicStreamId id,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId id,
+      quic::QuicStreamId parent_stream_id,
       RequestPriority request_priority,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     return client_maker_.MakePriorityPacket(
         packet_number, should_include_version, id, parent_stream_id,
         ConvertRequestPriorityToQuicPriority(request_priority), offset);
   }
 
-  std::unique_ptr<QuicEncryptedPacket>
+  std::unique_ptr<quic::QuicEncryptedPacket>
   ConstructClientAckAndPriorityFramesPacket(
-      QuicPacketNumber packet_number,
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       const std::vector<QuicTestPacketMaker::Http2StreamDependency>&
           priority_frames,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     return client_maker_.MakeAckAndMultiplePriorityFramesPacket(
         packet_number, should_include_version, largest_received,
         smallest_received, least_unacked, priority_frames, offset);
@@ -469,99 +471,99 @@
     return server_maker_.GetResponseHeaders(status, alt_svc);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerDataPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructServerDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data) {
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data) {
     return server_maker_.MakeDataPacket(
         packet_number, stream_id, should_include_version, fin, offset, data);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientDataPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructClientDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data) {
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data) {
     return client_maker_.MakeDataPacket(
         packet_number, stream_id, should_include_version, fin, offset, data);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientAckAndDataPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructClientAckAndDataPacket(
+      quic::QuicPacketNumber packet_number,
       bool include_version,
-      QuicStreamId stream_id,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+      quic::QuicStreamId stream_id,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data) {
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data) {
     return client_maker_.MakeAckAndDataPacket(
         packet_number, include_version, stream_id, largest_received,
         smallest_received, least_unacked, fin, offset, data);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientForceHolDataPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructClientForceHolDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset* offset,
-      QuicStringPiece data) {
+      quic::QuicStreamOffset* offset,
+      quic::QuicStringPiece data) {
     return client_maker_.MakeForceHolDataPacket(
         packet_number, stream_id, should_include_version, fin, offset, data);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      bool fin,
-      spdy::SpdyHeaderBlock headers) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientRequestHeadersPacket(quic::QuicPacketNumber packet_number,
+                                      quic::QuicStreamId stream_id,
+                                      bool should_include_version,
+                                      bool fin,
+                                      spdy::SpdyHeaderBlock headers) {
     return ConstructClientRequestHeadersPacket(packet_number, stream_id,
                                                should_include_version, fin,
                                                std::move(headers), nullptr);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      bool fin,
-      spdy::SpdyHeaderBlock headers,
-      QuicStreamOffset* offset) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientRequestHeadersPacket(quic::QuicPacketNumber packet_number,
+                                      quic::QuicStreamId stream_id,
+                                      bool should_include_version,
+                                      bool fin,
+                                      spdy::SpdyHeaderBlock headers,
+                                      quic::QuicStreamOffset* offset) {
     return ConstructClientRequestHeadersPacket(packet_number, stream_id,
                                                should_include_version, fin,
                                                std::move(headers), 0, offset);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      bool fin,
-      spdy::SpdyHeaderBlock headers,
-      QuicStreamId parent_stream_id,
-      QuicStreamOffset* offset) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientRequestHeadersPacket(quic::QuicPacketNumber packet_number,
+                                      quic::QuicStreamId stream_id,
+                                      bool should_include_version,
+                                      bool fin,
+                                      spdy::SpdyHeaderBlock headers,
+                                      quic::QuicStreamId parent_stream_id,
+                                      quic::QuicStreamOffset* offset) {
     return ConstructClientRequestHeadersPacket(
         packet_number, stream_id, should_include_version, fin, DEFAULT_PRIORITY,
         std::move(headers), parent_stream_id, offset);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      bool fin,
-      RequestPriority request_priority,
-      spdy::SpdyHeaderBlock headers,
-      QuicStreamId parent_stream_id,
-      QuicStreamOffset* offset) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientRequestHeadersPacket(quic::QuicPacketNumber packet_number,
+                                      quic::QuicStreamId stream_id,
+                                      bool should_include_version,
+                                      bool fin,
+                                      RequestPriority request_priority,
+                                      spdy::SpdyHeaderBlock headers,
+                                      quic::QuicStreamId parent_stream_id,
+                                      quic::QuicStreamOffset* offset) {
     spdy::SpdyPriority priority =
         ConvertRequestPriorityToQuicPriority(request_priority);
     return client_maker_.MakeRequestHeadersPacketWithOffsetTracking(
@@ -569,16 +571,16 @@
         std::move(headers), parent_stream_id, offset);
   }
 
-  std::unique_ptr<QuicReceivedPacket>
+  std::unique_ptr<quic::QuicReceivedPacket>
   ConstructClientRequestHeadersAndDataFramesPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       RequestPriority request_priority,
       spdy::SpdyHeaderBlock headers,
-      QuicStreamId parent_stream_id,
-      QuicStreamOffset* offset,
+      quic::QuicStreamId parent_stream_id,
+      quic::QuicStreamOffset* offset,
       size_t* spdy_headers_frame_length,
       const std::vector<std::string>& data_writes) {
     spdy::SpdyPriority priority =
@@ -589,54 +591,55 @@
         data_writes);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientMultipleDataFramesPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      bool fin,
-      const std::vector<std::string>& data,
-      QuicStreamOffset offset) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientMultipleDataFramesPacket(quic::QuicPacketNumber packet_number,
+                                          quic::QuicStreamId stream_id,
+                                          bool should_include_version,
+                                          bool fin,
+                                          const std::vector<std::string>& data,
+                                          quic::QuicStreamOffset offset) {
     return client_maker_.MakeMultipleDataFramesPacket(
         packet_number, stream_id, should_include_version, fin, offset, data);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerPushPromisePacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      QuicStreamId promised_stream_id,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructServerPushPromisePacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
+      quic::QuicStreamId promised_stream_id,
       bool should_include_version,
       spdy::SpdyHeaderBlock headers,
-      QuicStreamOffset* offset,
+      quic::QuicStreamOffset* offset,
       QuicTestPacketMaker* maker) {
     return maker->MakePushPromisePacket(
         packet_number, stream_id, promised_stream_id, should_include_version,
         false, std::move(headers), nullptr, offset);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerResponseHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      bool fin,
-      spdy::SpdyHeaderBlock headers) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructServerResponseHeadersPacket(quic::QuicPacketNumber packet_number,
+                                       quic::QuicStreamId stream_id,
+                                       bool should_include_version,
+                                       bool fin,
+                                       spdy::SpdyHeaderBlock headers) {
     return ConstructServerResponseHeadersPacket(packet_number, stream_id,
                                                 should_include_version, fin,
                                                 std::move(headers), nullptr);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerResponseHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      bool fin,
-      spdy::SpdyHeaderBlock headers,
-      QuicStreamOffset* offset) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructServerResponseHeadersPacket(quic::QuicPacketNumber packet_number,
+                                       quic::QuicStreamId stream_id,
+                                       bool should_include_version,
+                                       bool fin,
+                                       spdy::SpdyHeaderBlock headers,
+                                       quic::QuicStreamOffset* offset) {
     return server_maker_.MakeResponseHeadersPacketWithOffsetTracking(
         packet_number, stream_id, should_include_version, fin,
         std::move(headers), offset);
   }
 
-  void CreateSession(const QuicTransportVersionVector& supported_versions) {
+  void CreateSession(
+      const quic::QuicTransportVersionVector& supported_versions) {
     session_params_.enable_quic = true;
     session_params_.quic_supported_versions = supported_versions;
     session_params_.quic_headers_include_h2_stream_dependency =
@@ -760,7 +763,7 @@
   }
 
   void AddQuicAlternateProtocolMapping(
-      MockCryptoClientStream::HandshakeMode handshake_mode) {
+      quic::MockCryptoClientStream::HandshakeMode handshake_mode) {
     crypto_client_stream_factory_.set_handshake_mode(handshake_mode);
     url::SchemeHostPort server(request_.url);
     AlternativeService alternative_service(kProtoQUIC, server.host(), 443);
@@ -770,7 +773,7 @@
   }
 
   void AddQuicRemoteAlternativeServiceMapping(
-      MockCryptoClientStream::HandshakeMode handshake_mode,
+      quic::MockCryptoClientStream::HandshakeMode handshake_mode,
       const HostPortPair& alternative) {
     crypto_client_stream_factory_.set_handshake_mode(handshake_mode);
     url::SchemeHostPort server(request_.url);
@@ -873,12 +876,12 @@
     SendRequestAndExpectHttpResponseFromProxy("hello from http", true, 443);
   }
 
-  QuicStreamId GetNthClientInitiatedStreamId(int n) {
-    return test::GetNthClientInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthClientInitiatedStreamId(int n) {
+    return quic::test::GetNthClientInitiatedStreamId(version_, n);
   }
 
-  QuicStreamId GetNthServerInitiatedStreamId(int n) {
-    return test::GetNthServerInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthServerInitiatedStreamId(int n) {
+    return quic::test::GetNthServerInitiatedStreamId(version_, n);
   }
 
   static void AddCertificate(SSLSocketDataProvider* ssl_data) {
@@ -887,11 +890,11 @@
     ASSERT_TRUE(ssl_data->ssl_info.cert);
   }
 
-  const QuicTransportVersion version_;
+  const quic::QuicTransportVersion version_;
   const bool client_headers_include_h2_stream_dependency_;
-  QuicTransportVersionVector supported_versions_;
+  quic::QuicTransportVersionVector supported_versions_;
   QuicFlagSaver flags_;  // Save/restore all QUIC flag values.
-  MockClock clock_;
+  quic::MockClock clock_;
   QuicTestPacketMaker client_maker_;
   QuicTestPacketMaker server_maker_;
   std::unique_ptr<HttpNetworkSession> session_;
@@ -907,7 +910,7 @@
   scoped_refptr<SSLConfigServiceDefaults> ssl_config_service_;
   std::unique_ptr<ProxyResolutionService> proxy_resolution_service_;
   std::unique_ptr<HttpAuthHandlerFactory> auth_handler_factory_;
-  MockRandom random_generator_;
+  quic::test::MockRandom random_generator_;
   HttpServerPropertiesImpl http_server_properties_;
   HttpNetworkSession::Params session_params_;
   HttpNetworkSession::Context session_context_;
@@ -942,8 +945,9 @@
 INSTANTIATE_TEST_CASE_P(
     VersionIncludeStreamDependencySequence,
     QuicNetworkTransactionTest,
-    ::testing::Combine(::testing::ValuesIn(AllSupportedTransportVersions()),
-                       ::testing::Bool()));
+    ::testing::Combine(
+        ::testing::ValuesIn(quic::AllSupportedTransportVersions()),
+        ::testing::Bool()));
 
 TEST_P(QuicNetworkTransactionTest, WriteErrorHandshakeConfirmed) {
   session_params_.retry_without_alt_svc_on_quic_errors = false;
@@ -951,10 +955,10 @@
   session_params_.origins_to_force_quic_on.insert(
       HostPortPair::FromString("mail.example.org:443"));
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::CONFIRM_HANDSHAKE);
+      quic::MockCryptoClientStream::CONFIRM_HANDSHAKE);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(SYNCHRONOUS, ERR_INTERNET_DISCONNECTED);
@@ -983,10 +987,10 @@
   session_params_.origins_to_force_quic_on.insert(
       HostPortPair::FromString("mail.example.org:443"));
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::CONFIRM_HANDSHAKE);
+      quic::MockCryptoClientStream::CONFIRM_HANDSHAKE);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(ASYNC, ERR_INTERNET_DISCONNECTED);
@@ -1014,7 +1018,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1048,7 +1052,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1082,7 +1086,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1149,7 +1153,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1172,14 +1176,14 @@
   spdy::SpdySerializedFrame spdy_frame =
       response_framer.SerializeFrame(headers_frame);
 
-  QuicPacketNumber packet_number = 1;
+  quic::QuicPacketNumber packet_number = 1;
   size_t chunk_size = 1200;
   for (size_t offset = 0; offset < spdy_frame.size(); offset += chunk_size) {
     size_t len = std::min(chunk_size, spdy_frame.size() - offset);
     mock_quic_data.AddRead(
         ASYNC, ConstructServerDataPacket(
-                   packet_number++, kHeadersStreamId, false, false, offset,
-                   base::StringPiece(spdy_frame.data() + offset, len)));
+                   packet_number++, quic::kHeadersStreamId, false, false,
+                   offset, base::StringPiece(spdy_frame.data() + offset, len)));
   }
 
   mock_quic_data.AddRead(
@@ -1204,7 +1208,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1228,14 +1232,14 @@
   spdy::SpdySerializedFrame spdy_frame =
       response_framer.SerializeFrame(headers_frame);
 
-  QuicPacketNumber packet_number = 1;
+  quic::QuicPacketNumber packet_number = 1;
   size_t chunk_size = 1200;
   for (size_t offset = 0; offset < spdy_frame.size(); offset += chunk_size) {
     size_t len = std::min(chunk_size, spdy_frame.size() - offset);
     mock_quic_data.AddRead(
         ASYNC, ConstructServerDataPacket(
-                   packet_number++, kHeadersStreamId, false, false, offset,
-                   base::StringPiece(spdy_frame.data() + offset, len)));
+                   packet_number++, quic::kHeadersStreamId, false, false,
+                   offset, base::StringPiece(spdy_frame.data() + offset, len)));
   }
 
   mock_quic_data.AddRead(
@@ -1246,7 +1250,7 @@
   mock_quic_data.AddWrite(ASYNC, ConstructClientAckPacket(3, 2, 1, 1));
   mock_quic_data.AddWrite(
       ASYNC, ConstructClientAckAndRstPacket(4, GetNthClientInitiatedStreamId(0),
-                                            QUIC_HEADERS_TOO_LARGE,
+                                            quic::QUIC_HEADERS_TOO_LARGE,
                                             packet_number, 3, 1));
 
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
@@ -1263,10 +1267,11 @@
 TEST_P(QuicNetworkTransactionTest, ForceQuicForAll) {
   session_params_.origins_to_force_quic_on.insert(HostPortPair());
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::CONFIRM_HANDSHAKE);
+  AddQuicAlternateProtocolMapping(
+      quic::MockCryptoClientStream::CONFIRM_HANDSHAKE);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1298,7 +1303,7 @@
       "QUIC mail.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1344,7 +1349,7 @@
 
   client_maker_.set_hostname(origin_host);
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1379,7 +1384,8 @@
   request_.url = GURL("http://" + origin_host);
   AddHangingNonAlternateProtocolSocketData();
   CreateSession();
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::CONFIRM_HANDSHAKE);
+  AddQuicAlternateProtocolMapping(
+      quic::MockCryptoClientStream::CONFIRM_HANDSHAKE);
   SendRequestAndExpectQuicResponseFromProxyOnPort("hello!", 70);
 }
 
@@ -1402,7 +1408,7 @@
 
   client_maker_.set_hostname(origin.host());
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1423,7 +1429,7 @@
 
   request_.url = GURL("https://" + origin.host());
   AddQuicRemoteAlternativeServiceMapping(
-      MockCryptoClientStream::CONFIRM_HANDSHAKE, alternative);
+      quic::MockCryptoClientStream::CONFIRM_HANDSHAKE, alternative);
   AddHangingNonAlternateProtocolSocketData();
   CreateSession();
 
@@ -1431,10 +1437,12 @@
 }
 
 TEST_P(QuicNetworkTransactionTest, DoNotUseQuicForUnsupportedVersion) {
-  QuicTransportVersion unsupported_version = QUIC_VERSION_UNSUPPORTED;
+  quic::QuicTransportVersion unsupported_version =
+      quic::QUIC_VERSION_UNSUPPORTED;
   // Add support for another QUIC version besides |version_|. Also find a
   // unsupported version.
-  for (const QuicTransportVersion& version : AllSupportedTransportVersions()) {
+  for (const quic::QuicTransportVersion& version :
+       quic::AllSupportedTransportVersions()) {
     if (version == version_)
       continue;
     if (supported_versions_.size() != 2) {
@@ -1444,7 +1452,7 @@
     unsupported_version = version;
     break;
   }
-  DCHECK_NE(unsupported_version, QUIC_VERSION_UNSUPPORTED);
+  DCHECK_NE(unsupported_version, quic::QUIC_VERSION_UNSUPPORTED);
 
   // Set up alternative service to use QUIC with a version that is not
   // supported.
@@ -1468,7 +1476,8 @@
   // the response from the server will advertise new Alt-Svc with supported
   // versions.
   std::string advertised_versions_list_str =
-      GenerateQuicVersionsListForAltSvcHeader(AllSupportedTransportVersions());
+      GenerateQuicVersionsListForAltSvcHeader(
+          quic::AllSupportedTransportVersions());
   std::string altsvc_header =
       base::StringPrintf("Alt-Svc: quic=\":443\"; v=\"%s\"\r\n\r\n",
                          advertised_versions_list_str.c_str());
@@ -1486,7 +1495,7 @@
   // Second request should be sent via QUIC as a new list of verions supported
   // by the client has been advertised by the server.
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1551,7 +1560,7 @@
   // deterministic. The first main job gets aborted without the socket pool ever
   // dispensing the socket, making it available for the second try.
   MockQuicData mock_quic_data;
-  QuicStreamOffset request_header_offset = 0;
+  quic::QuicStreamOffset request_header_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &request_header_offset));
   mock_quic_data.AddWrite(
@@ -1610,7 +1619,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data1;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data1.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data1.AddRead(ASYNC, ERR_SOCKET_NOT_CONNECTED);
@@ -1638,7 +1647,7 @@
 
     NetErrorDetails details;
     trans.PopulateNetErrorDetails(&details);
-    EXPECT_EQ(QUIC_PACKET_READ_ERROR, details.quic_connection_error);
+    EXPECT_EQ(quic::QUIC_PACKET_READ_ERROR, details.quic_connection_error);
   }
 }
 
@@ -1676,7 +1685,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1711,8 +1720,10 @@
 
   // Add support for another QUIC version besides |version_| on the client side.
   // Also find a different version advertised by the server.
-  QuicTransportVersion advertised_version_2 = QUIC_VERSION_UNSUPPORTED;
-  for (const QuicTransportVersion& version : AllSupportedTransportVersions()) {
+  quic::QuicTransportVersion advertised_version_2 =
+      quic::QUIC_VERSION_UNSUPPORTED;
+  for (const quic::QuicTransportVersion& version :
+       quic::AllSupportedTransportVersions()) {
     if (version == version_)
       continue;
     if (supported_versions_.size() != 2) {
@@ -1722,7 +1733,7 @@
     advertised_version_2 = version;
     break;
   }
-  DCHECK_NE(advertised_version_2, QUIC_VERSION_UNSUPPORTED);
+  DCHECK_NE(advertised_version_2, quic::QUIC_VERSION_UNSUPPORTED);
 
   std::string QuicAltSvcWithVersionHeader =
       base::StringPrintf("Alt-Svc: quic=\":443\";v=\"%d,%d\"\r\n\r\n",
@@ -1740,7 +1751,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1772,14 +1783,15 @@
   // The QuicStreamFactoy will pick the preferred QUIC_VERSION: |version_|,
   // which is verified as the PacketMakers are using |version_|.
 
-  QuicTransportVersion common_version_2 = QUIC_VERSION_UNSUPPORTED;
-  for (const QuicTransportVersion& version : AllSupportedTransportVersions()) {
+  quic::QuicTransportVersion common_version_2 = quic::QUIC_VERSION_UNSUPPORTED;
+  for (const quic::QuicTransportVersion& version :
+       quic::AllSupportedTransportVersions()) {
     if (version == version_)
       continue;
     common_version_2 = version;
     break;
   }
-  DCHECK_NE(common_version_2, QUIC_VERSION_UNSUPPORTED);
+  DCHECK_NE(common_version_2, quic::QUIC_VERSION_UNSUPPORTED);
 
   supported_versions_.push_back(
       common_version_2);  // Supported but unpreferred.
@@ -1799,7 +1811,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1841,7 +1853,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -1937,7 +1949,8 @@
 TEST_P(QuicNetworkTransactionTest,
        StoreMutuallySupportedVersionsWhenProcessAltSvc) {
   // Add support for another QUIC version besides |version_|.
-  for (const QuicTransportVersion& version : AllSupportedTransportVersions()) {
+  for (const quic::QuicTransportVersion& version :
+       quic::AllSupportedTransportVersions()) {
     if (version == version_)
       continue;
     supported_versions_.push_back(version);
@@ -1945,7 +1958,8 @@
   }
 
   std::string advertised_versions_list_str =
-      GenerateQuicVersionsListForAltSvcHeader(AllSupportedTransportVersions());
+      GenerateQuicVersionsListForAltSvcHeader(
+          quic::AllSupportedTransportVersions());
   std::string altsvc_header =
       base::StringPrintf("Alt-Svc: quic=\":443\"; v=\"%s\"\r\n\r\n",
                          advertised_versions_list_str.c_str());
@@ -1961,7 +1975,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -2019,7 +2033,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -2048,7 +2062,7 @@
 
 TEST_P(QuicNetworkTransactionTest, GoAwayWithConnectionMigrationOnPortsOnly) {
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -2060,18 +2074,19 @@
                                     1, GetNthClientInitiatedStreamId(0), false,
                                     false, GetResponseHeaders("200 OK")));
   // Read a GoAway packet with
-  // QuicErrorCode: QUIC_ERROR_MIGRATING_PORT from the peer.
+  // quic::QuicErrorCode: quic::QUIC_ERROR_MIGRATING_PORT from the peer.
   mock_quic_data.AddRead(SYNCHRONOUS,
                          ConstructServerGoAwayPacket(
-                             2, QUIC_ERROR_MIGRATING_PORT,
+                             2, quic::QUIC_ERROR_MIGRATING_PORT,
                              "connection migration with port change only"));
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(3, 2, 1, 1));
   mock_quic_data.AddRead(SYNCHRONOUS, ConstructServerDataPacket(
                                           3, GetNthClientInitiatedStreamId(0),
                                           false, true, 0, "hello!"));
-  mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckAndRstPacket(
-                                           4, GetNthClientInitiatedStreamId(0),
-                                           QUIC_STREAM_CANCELLED, 3, 3, 1));
+  mock_quic_data.AddWrite(
+      SYNCHRONOUS,
+      ConstructClientAckAndRstPacket(4, GetNthClientInitiatedStreamId(0),
+                                     quic::QUIC_STREAM_CANCELLED, 3, 3, 1));
   mock_quic_data.AddRead(ASYNC, ERR_IO_PENDING);  // No more data to read
   mock_quic_data.AddRead(ASYNC, 0);               // EOF
 
@@ -2097,7 +2112,7 @@
 
   CreateSession();
   session_->quic_stream_factory()->set_require_confirmation(true);
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -2105,7 +2120,7 @@
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
   EXPECT_THAT(callback.WaitForResult(), IsOk());
 
   // Check whether this transaction is correctly marked as received a go-away
@@ -2124,13 +2139,13 @@
 
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
 
   std::string request_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeRequestHeadersPacketAndSaveData(
                          1, GetNthClientInitiatedStreamId(0), true, true,
@@ -2138,43 +2153,43 @@
                          nullptr, &header_stream_offset, &request_data));
 
   std::string settings_data;
-  QuicStreamOffset settings_offset = header_stream_offset;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  quic::QuicStreamOffset settings_offset = header_stream_offset;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacketAndSaveData(
                          2, &header_stream_offset, &settings_data));
   // TLP 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(3, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(3, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   // TLP 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      4, kHeadersStreamId, true, false,
+                                      4, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(5, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(5, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      6, kHeadersStreamId, true, false,
+                                      6, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 2
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(7, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(7, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      8, kHeadersStreamId, true, false,
+                                      8, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 3
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(9, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(9, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      10, kHeadersStreamId, true, false,
+                                      10, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
 
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeConnectionClosePacket(
-                                      11, true, QUIC_NETWORK_IDLE_TIMEOUT,
+                                      11, true, quic::QUIC_NETWORK_IDLE_TIMEOUT,
                                       "No recent network activity."));
 
   quic_data.AddRead(ASYNC, ERR_IO_PENDING);
@@ -2203,7 +2218,7 @@
       std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -2214,7 +2229,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Run the QUIC session to completion.
   quic_task_runner_->RunUntilIdle();
@@ -2228,17 +2243,17 @@
 // return QUIC_PROTOCOL_ERROR.
 TEST_P(QuicNetworkTransactionTest, TooManyRtosAfterHandshakeConfirmed) {
   session_params_.retry_without_alt_svc_on_quic_errors = false;
-  session_params_.quic_connection_options.push_back(k5RTO);
+  session_params_.quic_connection_options.push_back(quic::k5RTO);
 
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
 
   std::string request_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeRequestHeadersPacketAndSaveData(
                          1, GetNthClientInitiatedStreamId(0), true, true,
@@ -2246,50 +2261,50 @@
                          nullptr, &header_stream_offset, &request_data));
 
   std::string settings_data;
-  QuicStreamOffset settings_offset = header_stream_offset;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  quic::QuicStreamOffset settings_offset = header_stream_offset;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacketAndSaveData(
                          2, &header_stream_offset, &settings_data));
   // TLP 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(3, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(3, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   // TLP 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      4, kHeadersStreamId, true, false,
+                                      4, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(5, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(5, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      6, kHeadersStreamId, true, false,
+                                      6, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 2
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(7, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(7, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      8, kHeadersStreamId, true, false,
+                                      8, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 3
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(9, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(9, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      10, kHeadersStreamId, true, false,
+                                      10, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 4
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(11, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(11, quic::kHeadersStreamId,
+                                                true, false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      12, kHeadersStreamId, true, false,
+                                      12, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 5
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeConnectionClosePacket(
-                                      13, true, QUIC_TOO_MANY_RTOS,
+                                      13, true, quic::QUIC_TOO_MANY_RTOS,
                                       "5 consecutive retransmission timeouts"));
 
   quic_data.AddRead(ASYNC, OK);
@@ -2317,7 +2332,7 @@
       std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -2328,7 +2343,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Run the QUIC session to completion.
   quic_task_runner_->RunUntilIdle();
@@ -2342,17 +2357,17 @@
 // QUIC will not be marked as broken.
 TEST_P(QuicNetworkTransactionTest,
        TooManyRtosAfterHandshakeConfirmedAndStreamReset) {
-  session_params_.quic_connection_options.push_back(k5RTO);
+  session_params_.quic_connection_options.push_back(quic::k5RTO);
 
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
 
   std::string request_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeRequestHeadersPacketAndSaveData(
                          1, GetNthClientInitiatedStreamId(0), true, true,
@@ -2360,55 +2375,55 @@
                          nullptr, &header_stream_offset, &request_data));
 
   std::string settings_data;
-  QuicStreamOffset settings_offset = header_stream_offset;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  quic::QuicStreamOffset settings_offset = header_stream_offset;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacketAndSaveData(
                          2, &header_stream_offset, &settings_data));
 
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeRstPacket(
                                       3, true, GetNthClientInitiatedStreamId(0),
-                                      QUIC_STREAM_CANCELLED));
+                                      quic::QUIC_STREAM_CANCELLED));
   // TLP 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(4, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(4, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   // TLP 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      5, kHeadersStreamId, true, false,
+                                      5, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 1
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeRstPacket(
                                       6, true, GetNthClientInitiatedStreamId(0),
-                                      QUIC_STREAM_CANCELLED));
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(7, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+                                      quic::QUIC_STREAM_CANCELLED));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(7, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   // RTO 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      8, kHeadersStreamId, true, false,
+                                      8, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeRstPacket(
                                       9, true, GetNthClientInitiatedStreamId(0),
-                                      QUIC_STREAM_CANCELLED));
+                                      quic::QUIC_STREAM_CANCELLED));
   // RTO 3
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(10, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(10, quic::kHeadersStreamId,
+                                                true, false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      11, kHeadersStreamId, true, false,
+                                      11, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 4
   quic_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(12, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_STREAM_CANCELLED));
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(13, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+                                  quic::QUIC_STREAM_CANCELLED));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(13, quic::kHeadersStreamId,
+                                                true, false, 0, request_data));
   // RTO 5
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeConnectionClosePacket(
-                                      14, true, QUIC_TOO_MANY_RTOS,
+                                      14, true, quic::QUIC_TOO_MANY_RTOS,
                                       "5 consecutive retransmission timeouts"));
 
   quic_data.AddRead(ASYNC, OK);
@@ -2436,7 +2451,7 @@
       std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   auto trans = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
                                                         session_.get());
@@ -2448,7 +2463,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Now cancel the request.
   trans.reset();
@@ -2467,26 +2482,26 @@
   session_params_.retry_without_alt_svc_on_quic_errors = false;
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  quic::QuicStreamOffset header_stream_offset = 0;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(
       SYNCHRONOUS,
       ConstructClientRequestHeadersPacket(
           1, GetNthClientInitiatedStreamId(0), true, true,
           GetRequestHeaders("GET", "https", "/"), &header_stream_offset));
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      ConstructInitialSettingsPacket(2, &header_stream_offset));
   // Peer sending data from an non-existing stream causes this end to raise
   // error and close connection.
-  quic_data.AddRead(
-      ASYNC, ConstructServerRstPacket(1, false, 99, QUIC_STREAM_LAST_ERROR));
+  quic_data.AddRead(ASYNC, ConstructServerRstPacket(
+                               1, false, 99, quic::QUIC_STREAM_LAST_ERROR));
   std::string quic_error_details = "Data for nonexistent stream";
   quic_data.AddWrite(SYNCHRONOUS,
                      ConstructClientAckAndConnectionClosePacket(
-                         3, QuicTime::Delta::Zero(), 1, 1, 1,
-                         QUIC_INVALID_STREAM_ID, quic_error_details));
+                         3, quic::QuicTime::Delta::Zero(), 1, 1, 1,
+                         quic::QUIC_INVALID_STREAM_ID, quic_error_details));
   quic_data.AddSocketDataToFactory(&socket_factory_);
 
   // In order for a new QUIC session to be established via alternate-protocol
@@ -2505,7 +2520,7 @@
 
   CreateSession();
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -2516,7 +2531,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   ASSERT_FALSE(quic_data.AllReadDataConsumed());
 
@@ -2539,13 +2554,13 @@
 
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
 
   std::string request_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeRequestHeadersPacketAndSaveData(
                          1, GetNthClientInitiatedStreamId(0), true, true,
@@ -2553,43 +2568,43 @@
                          nullptr, &header_stream_offset, &request_data));
 
   std::string settings_data;
-  QuicStreamOffset settings_offset = header_stream_offset;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  quic::QuicStreamOffset settings_offset = header_stream_offset;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacketAndSaveData(
                          2, &header_stream_offset, &settings_data));
   // TLP 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(3, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(3, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   // TLP 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      4, kHeadersStreamId, true, false,
+                                      4, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(5, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(5, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      6, kHeadersStreamId, true, false,
+                                      6, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 2
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(7, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(7, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      8, kHeadersStreamId, true, false,
+                                      8, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 3
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(9, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(9, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      10, kHeadersStreamId, true, false,
+                                      10, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
 
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeConnectionClosePacket(
-                                      11, true, QUIC_NETWORK_IDLE_TIMEOUT,
+                                      11, true, quic::QUIC_NETWORK_IDLE_TIMEOUT,
                                       "No recent network activity."));
 
   quic_data.AddRead(ASYNC, ERR_IO_PENDING);
@@ -2632,7 +2647,7 @@
       std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -2643,7 +2658,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Run the QUIC session to completion.
   quic_task_runner_->RunUntilIdle();
@@ -2671,13 +2686,13 @@
 
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
 
   std::string request_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeRequestHeadersPacketAndSaveData(
                          1, GetNthClientInitiatedStreamId(0), true, true,
@@ -2685,43 +2700,43 @@
                          nullptr, &header_stream_offset, &request_data));
 
   std::string settings_data;
-  QuicStreamOffset settings_offset = header_stream_offset;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  quic::QuicStreamOffset settings_offset = header_stream_offset;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacketAndSaveData(
                          2, &header_stream_offset, &settings_data));
   // TLP 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(3, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(3, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   // TLP 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      4, kHeadersStreamId, true, false,
+                                      4, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(5, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(5, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      6, kHeadersStreamId, true, false,
+                                      6, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 2
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(7, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(7, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      8, kHeadersStreamId, true, false,
+                                      8, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 3
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(9, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(9, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      10, kHeadersStreamId, true, false,
+                                      10, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
 
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeConnectionClosePacket(
-                                      11, true, QUIC_NETWORK_IDLE_TIMEOUT,
+                                      11, true, quic::QUIC_NETWORK_IDLE_TIMEOUT,
                                       "No recent network activity."));
 
   quic_data.AddRead(ASYNC, ERR_IO_PENDING);
@@ -2764,7 +2779,7 @@
       std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -2775,7 +2790,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Run the QUIC session to completion.
   quic_task_runner_->RunUntilIdle();
@@ -2807,13 +2822,13 @@
 
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
 
   std::string request_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeRequestHeadersPacketAndSaveData(
                          1, GetNthClientInitiatedStreamId(0), true, true,
@@ -2821,8 +2836,8 @@
                          nullptr, &header_stream_offset, &request_data));
 
   std::string settings_data;
-  QuicStreamOffset settings_offset = header_stream_offset;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  quic::QuicStreamOffset settings_offset = header_stream_offset;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacketAndSaveData(
                          2, &header_stream_offset, &settings_data));
@@ -2831,45 +2846,46 @@
                                1, GetNthClientInitiatedStreamId(0), false,
                                false, GetResponseHeaders("200 OK")));
   // quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(3, 1, 1));
-  quic_data.AddWrite(SYNCHRONOUS,
-                     ConstructClientAckPacket(
-                         3, 1, 1, 1, QuicTime::Delta::FromMilliseconds(25)));
+  quic_data.AddWrite(
+      SYNCHRONOUS,
+      ConstructClientAckPacket(3, 1, 1, 1,
+                               quic::QuicTime::Delta::FromMilliseconds(25)));
 
   // TLP 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(4, kHeadersStreamId, false,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(4, quic::kHeadersStreamId,
+                                                false, false, 0, request_data));
   // TLP 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      5, kHeadersStreamId, false, false,
+                                      5, quic::kHeadersStreamId, false, false,
                                       settings_offset, settings_data));
   // RTO 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(6, kHeadersStreamId, false,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(6, quic::kHeadersStreamId,
+                                                false, false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      7, kHeadersStreamId, false, false,
+                                      7, quic::kHeadersStreamId, false, false,
                                       settings_offset, settings_data));
   // RTO 2
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(8, kHeadersStreamId, false,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(8, quic::kHeadersStreamId,
+                                                false, false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      9, kHeadersStreamId, false, false,
+                                      9, quic::kHeadersStreamId, false, false,
                                       settings_offset, settings_data));
   // RTO 3
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(10, kHeadersStreamId, false,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(10, quic::kHeadersStreamId,
+                                                false, false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      11, kHeadersStreamId, false, false,
+                                      11, quic::kHeadersStreamId, false, false,
                                       settings_offset, settings_data));
 
   quic_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeAckAndConnectionClosePacket(
-          12, false, QuicTime::Delta::FromMilliseconds(4200), 1, 1, 1,
-          QUIC_NETWORK_IDLE_TIMEOUT, "No recent network activity."));
+          12, false, quic::QuicTime::Delta::FromMilliseconds(4200), 1, 1, 1,
+          quic::QUIC_NETWORK_IDLE_TIMEOUT, "No recent network activity."));
 
   quic_data.AddRead(ASYNC, ERR_IO_PENDING);
   quic_data.AddRead(ASYNC, OK);
@@ -2897,7 +2913,7 @@
       std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -2908,7 +2924,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Pump the message loop to get the request started.
   base::RunLoop().RunUntilIdle();
@@ -2935,17 +2951,17 @@
 TEST_P(QuicNetworkTransactionTest,
        TooManyRtosAfterHandshakeConfirmedThenBroken) {
   session_params_.mark_quic_broken_when_network_blackholes = true;
-  session_params_.quic_connection_options.push_back(k5RTO);
+  session_params_.quic_connection_options.push_back(quic::k5RTO);
 
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
 
   std::string request_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeRequestHeadersPacketAndSaveData(
                          1, GetNthClientInitiatedStreamId(0), true, true,
@@ -2953,50 +2969,50 @@
                          nullptr, &header_stream_offset, &request_data));
 
   std::string settings_data;
-  QuicStreamOffset settings_offset = header_stream_offset;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  quic::QuicStreamOffset settings_offset = header_stream_offset;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacketAndSaveData(
                          2, &header_stream_offset, &settings_data));
   // TLP 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(3, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(3, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   // TLP 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      4, kHeadersStreamId, true, false,
+                                      4, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(5, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(5, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      6, kHeadersStreamId, true, false,
+                                      6, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 2
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(7, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(7, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      8, kHeadersStreamId, true, false,
+                                      8, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 3
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(9, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(9, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      10, kHeadersStreamId, true, false,
+                                      10, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 4
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(11, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(11, quic::kHeadersStreamId,
+                                                true, false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      12, kHeadersStreamId, true, false,
+                                      12, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
 
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeConnectionClosePacket(
-                                      13, true, QUIC_TOO_MANY_RTOS,
+                                      13, true, quic::QUIC_TOO_MANY_RTOS,
                                       "5 consecutive retransmission timeouts"));
 
   quic_data.AddRead(ASYNC, OK);
@@ -3038,7 +3054,7 @@
       std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -3049,7 +3065,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Run the QUIC session to completion.
   quic_task_runner_->RunUntilIdle();
@@ -3074,17 +3090,17 @@
 TEST_P(QuicNetworkTransactionTest,
        TooManyRtosAfterHandshakeConfirmedAndStreamResetThenBroken) {
   session_params_.mark_quic_broken_when_network_blackholes = true;
-  session_params_.quic_connection_options.push_back(k5RTO);
+  session_params_.quic_connection_options.push_back(quic::k5RTO);
 
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
 
   std::string request_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeRequestHeadersPacketAndSaveData(
                          1, GetNthClientInitiatedStreamId(0), true, true,
@@ -3092,55 +3108,55 @@
                          nullptr, &header_stream_offset, &request_data));
 
   std::string settings_data;
-  QuicStreamOffset settings_offset = header_stream_offset;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  quic::QuicStreamOffset settings_offset = header_stream_offset;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacketAndSaveData(
                          2, &header_stream_offset, &settings_data));
 
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeRstPacket(
                                       3, true, GetNthClientInitiatedStreamId(0),
-                                      QUIC_STREAM_CANCELLED));
+                                      quic::QUIC_STREAM_CANCELLED));
   // TLP 1
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(4, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(4, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   // TLP 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      5, kHeadersStreamId, true, false,
+                                      5, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 1
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeRstPacket(
                                       6, true, GetNthClientInitiatedStreamId(0),
-                                      QUIC_STREAM_CANCELLED));
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(7, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+                                      quic::QUIC_STREAM_CANCELLED));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(7, quic::kHeadersStreamId, true,
+                                                false, 0, request_data));
   // RTO 2
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      8, kHeadersStreamId, true, false,
+                                      8, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeRstPacket(
                                       9, true, GetNthClientInitiatedStreamId(0),
-                                      QUIC_STREAM_CANCELLED));
+                                      quic::QUIC_STREAM_CANCELLED));
   // RTO 3
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(10, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(10, quic::kHeadersStreamId,
+                                                true, false, 0, request_data));
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeDataPacket(
-                                      11, kHeadersStreamId, true, false,
+                                      11, quic::kHeadersStreamId, true, false,
                                       settings_offset, settings_data));
   // RTO 4
   quic_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(12, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_STREAM_CANCELLED));
-  quic_data.AddWrite(SYNCHRONOUS,
-                     client_maker_.MakeDataPacket(13, kHeadersStreamId, true,
-                                                  false, 0, request_data));
+                                  quic::QUIC_STREAM_CANCELLED));
+  quic_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeDataPacket(13, quic::kHeadersStreamId,
+                                                true, false, 0, request_data));
   // RTO 5
   quic_data.AddWrite(SYNCHRONOUS, client_maker_.MakeConnectionClosePacket(
-                                      14, true, QUIC_TOO_MANY_RTOS,
+                                      14, true, quic::QUIC_TOO_MANY_RTOS,
                                       "5 consecutive retransmission timeouts"));
 
   quic_data.AddRead(ASYNC, OK);
@@ -3168,7 +3184,7 @@
       std::make_unique<QuicChromiumAlarmFactory>(quic_task_runner_.get(),
                                                  &clock_));
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   auto trans = std::make_unique<HttpNetworkTransaction>(DEFAULT_PRIORITY,
                                                         session_.get());
@@ -3180,7 +3196,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Now cancel the request.
   trans.reset();
@@ -3202,26 +3218,26 @@
 
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  quic::QuicStreamOffset header_stream_offset = 0;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(
       SYNCHRONOUS,
       ConstructClientRequestHeadersPacket(
           1, GetNthClientInitiatedStreamId(0), true, true,
           GetRequestHeaders("GET", "https", "/"), &header_stream_offset));
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      ConstructInitialSettingsPacket(2, &header_stream_offset));
   // Peer sending data from an non-existing stream causes this end to raise
   // error and close connection.
-  quic_data.AddRead(
-      ASYNC, ConstructServerRstPacket(1, false, 99, QUIC_STREAM_LAST_ERROR));
+  quic_data.AddRead(ASYNC, ConstructServerRstPacket(
+                               1, false, 99, quic::QUIC_STREAM_LAST_ERROR));
   std::string quic_error_details = "Data for nonexistent stream";
   quic_data.AddWrite(SYNCHRONOUS,
                      ConstructClientAckAndConnectionClosePacket(
-                         3, QuicTime::Delta::Zero(), 1, 1, 1,
-                         QUIC_INVALID_STREAM_ID, quic_error_details));
+                         3, quic::QuicTime::Delta::Zero(), 1, 1, 1,
+                         quic::QUIC_INVALID_STREAM_ID, quic_error_details));
   quic_data.AddSocketDataToFactory(&socket_factory_);
 
   // After that fails, it will be resent via TCP.
@@ -3254,7 +3270,7 @@
 
   CreateSession();
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -3265,7 +3281,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Run the QUIC session to completion.
   base::RunLoop().RunUntilIdle();
@@ -3293,13 +3309,13 @@
 TEST_P(QuicNetworkTransactionTest, ResetAfterHandshakeConfirmedThenBroken) {
   // The request will initially go out over QUIC.
   MockQuicData quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   spdy::SpdyPriority priority =
       ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
 
   std::string request_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeRequestHeadersPacketAndSaveData(
                          1, GetNthClientInitiatedStreamId(0), true, true,
@@ -3307,15 +3323,15 @@
                          nullptr, &header_stream_offset, &request_data));
 
   std::string settings_data;
-  // QuicStreamOffset settings_offset = header_stream_offset;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
+  // quic::QuicStreamOffset settings_offset = header_stream_offset;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_FORWARD_SECURE);
   quic_data.AddWrite(SYNCHRONOUS,
                      client_maker_.MakeInitialSettingsPacketAndSaveData(
                          2, &header_stream_offset, &settings_data));
 
   quic_data.AddRead(ASYNC, ConstructServerRstPacket(
                                1, false, GetNthClientInitiatedStreamId(0),
-                               QUIC_HEADERS_TOO_LARGE));
+                               quic::QUIC_HEADERS_TOO_LARGE));
 
   quic_data.AddRead(ASYNC, OK);
   quic_data.AddSocketDataToFactory(&socket_factory_);
@@ -3350,7 +3366,7 @@
 
   CreateSession();
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -3361,7 +3377,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   // Run the QUIC session to completion.
   ASSERT_TRUE(quic_data.AllWriteDataConsumed());
@@ -3404,8 +3420,8 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset request_header_offset(0);
-  QuicStreamOffset response_header_offset(0);
+  quic::QuicStreamOffset request_header_offset(0);
+  quic::QuicStreamOffset response_header_offset(0);
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &request_header_offset));
   mock_quic_data.AddWrite(
@@ -3466,8 +3482,8 @@
   ASSERT_NE(origin1.host(), origin2.host());
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset request_header_offset(0);
-  QuicStreamOffset response_header_offset(0);
+  quic::QuicStreamOffset request_header_offset(0);
+  quic::QuicStreamOffset response_header_offset(0);
 
   scoped_refptr<X509Certificate> cert(
       ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem"));
@@ -3499,10 +3515,10 @@
   // Second request will go over the pooled QUIC connection, but will be
   // reset by the server.
   QuicTestPacketMaker client_maker2(
-      version_, 0, &clock_, origin2.host(), Perspective::IS_CLIENT,
+      version_, 0, &clock_, origin2.host(), quic::Perspective::IS_CLIENT,
       client_headers_include_h2_stream_dependency_);
   QuicTestPacketMaker server_maker2(version_, 0, &clock_, origin2.host(),
-                                    Perspective::IS_SERVER, false);
+                                    quic::Perspective::IS_SERVER, false);
   mock_quic_data.AddWrite(
       SYNCHRONOUS,
       ConstructClientRequestHeadersPacket(
@@ -3511,7 +3527,7 @@
           GetNthClientInitiatedStreamId(0), &request_header_offset));
   mock_quic_data.AddRead(ASYNC, ConstructServerRstPacket(
                                     3, false, GetNthClientInitiatedStreamId(1),
-                                    QUIC_HEADERS_TOO_LARGE));
+                                    quic::QUIC_HEADERS_TOO_LARGE));
   mock_quic_data.AddRead(ASYNC, ERR_IO_PENDING);  // No more data to read
   mock_quic_data.AddRead(ASYNC, 0);               // EOF
 
@@ -3551,11 +3567,11 @@
       supported_versions_);
 
   // First request opens connection to |destination1|
-  // with QuicServerId.host() == origin1.host().
+  // with quic::QuicServerId.host() == origin1.host().
   SendRequestAndExpectQuicResponse("hello!");
 
   // Second request pools to existing connection with same destination,
-  // because certificate matches, even though QuicServerId is different.
+  // because certificate matches, even though quic::QuicServerId is different.
   // After it is reset, it will fail back to QUIC and mark QUIC as broken.
   request_.url = origin2;
   SendRequestAndExpectHttpResponse("hello world");
@@ -3609,8 +3625,8 @@
   AddCertificate(&ssl_data_);
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
-  QuicStreamOffset request_header_offset = 0;
-  QuicStreamOffset response_header_offset = 0;
+  quic::QuicStreamOffset request_header_offset = 0;
+  quic::QuicStreamOffset response_header_offset = 0;
   // First QUIC request data.
   // Open a session to foo.example.org:443 using the first entry of the
   // alternative service list.
@@ -3673,8 +3689,8 @@
 TEST_P(QuicNetworkTransactionTest, UseExistingQUICAlternativeProxy) {
   base::HistogramTester histogram_tester;
 
-  QuicStreamOffset request_header_offset = 0;
-  QuicStreamOffset response_header_offset = 0;
+  quic::QuicStreamOffset request_header_offset = 0;
+  quic::QuicStreamOffset response_header_offset = 0;
   // First QUIC request data.
   // Open a session to foo.example.org:443 using the first entry of the
   // alternative service list.
@@ -3748,13 +3764,13 @@
                                      1);
 }
 
-// Pool to existing session with matching QuicServerId
+// Pool to existing session with matching quic::QuicServerId
 // even if alternative service destination is different.
 TEST_P(QuicNetworkTransactionTest, PoolByOrigin) {
   session_params_.quic_allow_remote_alt_svc = true;
   MockQuicData mock_quic_data;
-  QuicStreamOffset request_header_offset(0);
-  QuicStreamOffset response_header_offset(0);
+  quic::QuicStreamOffset request_header_offset(0);
+  quic::QuicStreamOffset response_header_offset(0);
 
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &request_header_offset));
@@ -3809,14 +3825,14 @@
   http_server_properties_.SetQuicAlternativeService(
       server, alternative_service, expiration, supported_versions_);
   // First request opens connection to |destination1|
-  // with QuicServerId.host() == kDefaultServerHostName.
+  // with quic::QuicServerId.host() == kDefaultServerHostName.
   SendRequestAndExpectQuicResponse("hello!");
 
   // Set up alternative service entry to a different destination.
   alternative_service = AlternativeService(kProtoQUIC, destination2, 443);
   http_server_properties_.SetQuicAlternativeService(
       server, alternative_service, expiration, supported_versions_);
-  // Second request pools to existing connection with same QuicServerId,
+  // Second request pools to existing connection with same quic::QuicServerId,
   // even though alternative service destination is different.
   SendRequestAndExpectQuicResponse("hello!");
 }
@@ -3831,8 +3847,8 @@
   ASSERT_NE(origin1.host(), origin2.host());
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset request_header_offset(0);
-  QuicStreamOffset response_header_offset(0);
+  quic::QuicStreamOffset request_header_offset(0);
+  quic::QuicStreamOffset response_header_offset(0);
 
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &request_header_offset));
@@ -3853,10 +3869,10 @@
 
   // Second request.
   QuicTestPacketMaker client_maker2(
-      version_, 0, &clock_, origin2.host(), Perspective::IS_CLIENT,
+      version_, 0, &clock_, origin2.host(), quic::Perspective::IS_CLIENT,
       client_headers_include_h2_stream_dependency_);
   QuicTestPacketMaker server_maker2(version_, 0, &clock_, origin2.host(),
-                                    Perspective::IS_SERVER, false);
+                                    quic::Perspective::IS_SERVER, false);
   mock_quic_data.AddWrite(
       SYNCHRONOUS,
       ConstructClientRequestHeadersPacket(
@@ -3909,11 +3925,11 @@
   http_server_properties_.SetAlternativeServices(url::SchemeHostPort(origin2),
                                                  alternative_services);
   // First request opens connection to |destination1|
-  // with QuicServerId.host() == origin1.host().
+  // with quic::QuicServerId.host() == origin1.host().
   SendRequestAndExpectQuicResponse("hello!");
 
   // Second request pools to existing connection with same destination,
-  // because certificate matches, even though QuicServerId is different.
+  // because certificate matches, even though quic::QuicServerId is different.
   request_.url = origin2;
 
   SendRequestAndExpectQuicResponse("hello!");
@@ -3953,11 +3969,11 @@
   socket_factory_.AddSocketDataProvider(&http_data2);
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
-  QuicStreamOffset request_header_offset = 0;
-  QuicStreamOffset response_header_offset = 0;
+  quic::QuicStreamOffset request_header_offset = 0;
+  quic::QuicStreamOffset response_header_offset = 0;
 
   QuicTestPacketMaker client_maker(
-      version_, 0, &clock_, "mail.example.org", Perspective::IS_CLIENT,
+      version_, 0, &clock_, "mail.example.org", quic::Perspective::IS_CLIENT,
       client_headers_include_h2_stream_dependency_);
   server_maker_.set_hostname("www.example.org");
   client_maker_.set_hostname("www.example.org");
@@ -4061,7 +4077,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -4115,7 +4131,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -4149,7 +4165,7 @@
       "HTTPS mail.example.org:443", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -4200,7 +4216,7 @@
 
 TEST_P(QuicNetworkTransactionTest, HungAlternativeService) {
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
 
   MockWrite http_writes[] = {
       MockWrite(SYNCHRONOUS, 0, "GET / HTTP/1.1\r\n"),
@@ -4249,9 +4265,9 @@
 
 TEST_P(QuicNetworkTransactionTest, ZeroRTTWithHttpRace) {
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  quic::QuicStreamOffset header_stream_offset = 0;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   mock_quic_data.AddWrite(
       SYNCHRONOUS,
       ConstructClientRequestHeadersPacket(
@@ -4274,7 +4290,7 @@
   AddHangingNonAlternateProtocolSocketData();
 
   CreateSession();
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
   SendRequestAndExpectQuicResponse("hello!");
 
   EXPECT_EQ(nullptr,
@@ -4284,8 +4300,8 @@
 
 TEST_P(QuicNetworkTransactionTest, ZeroRTTWithNoHttpRace) {
   MockQuicData mock_quic_data;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   mock_quic_data.AddWrite(SYNCHRONOUS,
                           ConstructClientRequestHeadersPacket(
                               1, GetNthClientInitiatedStreamId(0), true, true,
@@ -4315,7 +4331,7 @@
 
   AddHangingNonAlternateProtocolSocketData();
   CreateSession();
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
   SendRequestAndExpectQuicResponse("hello!");
 }
 
@@ -4351,13 +4367,13 @@
 
   request_.url = GURL("http://mail.example.org/");
   CreateSession();
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
   SendRequestAndExpectHttpResponse("hello world");
 }
 
 TEST_P(QuicNetworkTransactionTest, ZeroRTTWithConfirmationRequired) {
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -4395,7 +4411,7 @@
 
   CreateSession();
   session_->quic_stream_factory()->set_require_confirmation(true);
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -4403,7 +4419,7 @@
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
   EXPECT_THAT(callback.WaitForResult(), IsOk());
 
   CheckWasQuicResponse(&trans);
@@ -4414,7 +4430,7 @@
        LogGranularQuicErrorCodeOnQuicProtocolErrorLocal) {
   session_params_.retry_without_alt_svc_on_quic_errors = false;
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -4423,7 +4439,7 @@
           2, GetNthClientInitiatedStreamId(0), true, true,
           GetRequestHeaders("GET", "https", "/"), &header_stream_offset));
   // Read a close connection packet with
-  // QuicErrorCode: QUIC_CRYPTO_VERSION_NOT_SUPPORTED from the peer.
+  // quic::QuicErrorCode: quic::QUIC_CRYPTO_VERSION_NOT_SUPPORTED from the peer.
   mock_quic_data.AddRead(ASYNC, ConstructServerConnectionClosePacket(1));
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
 
@@ -4447,7 +4463,7 @@
 
   CreateSession();
   session_->quic_stream_factory()->set_require_confirmation(true);
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -4455,22 +4471,23 @@
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
   EXPECT_THAT(callback.WaitForResult(), IsError(ERR_QUIC_PROTOCOL_ERROR));
 
   NetErrorDetails details;
-  EXPECT_EQ(QUIC_NO_ERROR, details.quic_connection_error);
+  EXPECT_EQ(quic::QUIC_NO_ERROR, details.quic_connection_error);
 
   trans.PopulateNetErrorDetails(&details);
   // Verify the error code logged is what sent by the peer.
-  EXPECT_EQ(QUIC_CRYPTO_VERSION_NOT_SUPPORTED, details.quic_connection_error);
+  EXPECT_EQ(quic::QUIC_CRYPTO_VERSION_NOT_SUPPORTED,
+            details.quic_connection_error);
 }
 
 TEST_P(QuicNetworkTransactionTest,
        LogGranularQuicErrorCodeOnQuicProtocolErrorRemote) {
   session_params_.retry_without_alt_svc_on_quic_errors = false;
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -4481,12 +4498,13 @@
   // Peer sending data from an non-existing stream causes this end to raise
   // error and close connection.
   mock_quic_data.AddRead(
-      ASYNC, ConstructServerRstPacket(1, false, 99, QUIC_STREAM_LAST_ERROR));
+      ASYNC,
+      ConstructServerRstPacket(1, false, 99, quic::QUIC_STREAM_LAST_ERROR));
   std::string quic_error_details = "Data for nonexistent stream";
-  mock_quic_data.AddWrite(SYNCHRONOUS,
-                          ConstructClientAckAndConnectionClosePacket(
-                              3, QuicTime::Delta::Zero(), 1, 1, 1,
-                              QUIC_INVALID_STREAM_ID, quic_error_details));
+  mock_quic_data.AddWrite(
+      SYNCHRONOUS, ConstructClientAckAndConnectionClosePacket(
+                       3, quic::QuicTime::Delta::Zero(), 1, 1, 1,
+                       quic::QUIC_INVALID_STREAM_ID, quic_error_details));
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
 
   // The non-alternate protocol job needs to hang in order to guarantee that
@@ -4509,7 +4527,7 @@
 
   CreateSession();
   session_->quic_stream_factory()->set_require_confirmation(true);
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -4517,18 +4535,18 @@
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
   EXPECT_THAT(callback.WaitForResult(), IsError(ERR_QUIC_PROTOCOL_ERROR));
   NetErrorDetails details;
-  EXPECT_EQ(QUIC_NO_ERROR, details.quic_connection_error);
+  EXPECT_EQ(quic::QUIC_NO_ERROR, details.quic_connection_error);
 
   trans.PopulateNetErrorDetails(&details);
-  EXPECT_EQ(QUIC_INVALID_STREAM_ID, details.quic_connection_error);
+  EXPECT_EQ(quic::QUIC_INVALID_STREAM_ID, details.quic_connection_error);
 }
 
 TEST_P(QuicNetworkTransactionTest, RstSteamErrorHandling) {
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -4542,7 +4560,7 @@
                                     false, GetResponseHeaders("200 OK")));
   mock_quic_data.AddRead(ASYNC, ConstructServerRstPacket(
                                     2, false, GetNthClientInitiatedStreamId(0),
-                                    QUIC_STREAM_CANCELLED));
+                                    quic::QUIC_STREAM_CANCELLED));
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(3, 2, 1, 1));
   mock_quic_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more read data.
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
@@ -4567,7 +4585,7 @@
 
   CreateSession();
   session_->quic_stream_factory()->set_require_confirmation(true);
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -4575,7 +4593,7 @@
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
   // Read the headers.
   EXPECT_THAT(callback.WaitForResult(), IsOk());
 
@@ -4595,7 +4613,7 @@
 TEST_P(QuicNetworkTransactionTest, RstSteamBeforeHeaders) {
   session_params_.retry_without_alt_svc_on_quic_errors = false;
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -4605,7 +4623,7 @@
           GetRequestHeaders("GET", "https", "/"), &header_stream_offset));
   mock_quic_data.AddRead(ASYNC, ConstructServerRstPacket(
                                     1, false, GetNthClientInitiatedStreamId(0),
-                                    QUIC_STREAM_CANCELLED));
+                                    quic::QUIC_STREAM_CANCELLED));
   mock_quic_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more read data.
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
 
@@ -4629,7 +4647,7 @@
 
   CreateSession();
   session_->quic_stream_factory()->set_require_confirmation(true);
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
@@ -4637,14 +4655,14 @@
   EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
 
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
   // Read the headers.
   EXPECT_THAT(callback.WaitForResult(), IsError(ERR_QUIC_PROTOCOL_ERROR));
 }
 
 TEST_P(QuicNetworkTransactionTest, BrokenAlternateProtocol) {
   // Alternate-protocol job
-  std::unique_ptr<QuicEncryptedPacket> close(
+  std::unique_ptr<quic::QuicEncryptedPacket> close(
       ConstructServerConnectionClosePacket(1));
   MockRead quic_reads[] = {
       MockRead(ASYNC, close->data(), close->length()),
@@ -4665,7 +4683,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   CreateSession();
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::COLD_START);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::COLD_START);
   SendRequestAndExpectHttpResponse("hello from http");
   ExpectBrokenAlternateProtocolMapping();
 }
@@ -4690,7 +4708,7 @@
 
   CreateSession();
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::COLD_START);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::COLD_START);
   SendRequestAndExpectHttpResponse("hello from http");
   ExpectBrokenAlternateProtocolMapping();
 }
@@ -4716,7 +4734,7 @@
   AddHangingNonAlternateProtocolSocketData();
   CreateSession();
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::COLD_START);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::COLD_START);
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
   int rv = trans.Start(&request_, callback.callback(), net_log_.bound());
@@ -4735,9 +4753,9 @@
   http_server_properties_.SetSupportsQuic(true, IPAddress(192, 0, 2, 33));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
-  client_maker_.SetEncryptionLevel(ENCRYPTION_INITIAL);
-  client_maker_.SetLongHeaderType(ZERO_RTT_PROTECTED);
+  quic::QuicStreamOffset header_stream_offset = 0;
+  client_maker_.SetEncryptionLevel(quic::ENCRYPTION_INITIAL);
+  client_maker_.SetLongHeaderType(quic::ZERO_RTT_PROTECTED);
   mock_quic_data.AddWrite(
       SYNCHRONOUS,
       ConstructClientRequestHeadersPacket(
@@ -4760,7 +4778,7 @@
   // QuicStreamFactory by default requires confirmation on construction.
   session_->quic_stream_factory()->set_require_confirmation(true);
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   // Stall host resolution so that QUIC job will not succeed synchronously.
   // Socket will not be configured immediately and QUIC support is not sorted
@@ -4792,7 +4810,7 @@
   http_server_properties_.SetSupportsQuic(true, IPAddress(1, 2, 3, 4));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -4813,7 +4831,7 @@
 
   CreateSession();
   session_->quic_stream_factory()->set_require_confirmation(true);
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   // Stall host resolution so that QUIC job could not proceed and unblocks TCP.
   // Socket will not be configured immediately and QUIC support is not sorted
@@ -4831,7 +4849,7 @@
   base::RunLoop().RunUntilIdle();
   // Explicitly confirm the handshake so that QUIC job could succeed.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
   EXPECT_THAT(callback.WaitForResult(), IsOk());
 
   CheckWasQuicResponse(&trans);
@@ -4865,7 +4883,7 @@
   // job to fail before it starts.
   session_->quic_stream_factory()->set_require_confirmation(true);
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::COLD_START);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::COLD_START);
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
   int rv = trans.Start(&request_, callback.callback(), net_log_.bound());
@@ -4878,7 +4896,7 @@
   ExpectQuicAlternateProtocolMapping();
   NetErrorDetails details;
   trans.PopulateNetErrorDetails(&details);
-  EXPECT_EQ(QUIC_PACKET_READ_ERROR, details.quic_connection_error);
+  EXPECT_EQ(quic::QUIC_PACKET_READ_ERROR, details.quic_connection_error);
 }
 
 TEST_P(QuicNetworkTransactionTest, FailedZeroRttBrokenAlternateProtocol) {
@@ -4906,7 +4924,7 @@
   AddHangingNonAlternateProtocolSocketData();
   CreateSession();
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   SendRequestAndExpectHttpResponse("hello from http");
 
@@ -4936,7 +4954,7 @@
   AddHangingNonAlternateProtocolSocketData();
   CreateSession();
 
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
 
   SendRequestAndExpectHttpResponse("hello from http");
 }
@@ -4958,7 +4976,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   CreateSession();
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::COLD_START);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::COLD_START);
   SendRequestAndExpectHttpResponse("hello from http");
 
   ExpectBrokenAlternateProtocolMapping();
@@ -4998,7 +5016,7 @@
                          &request, net_log_.bound());
 
   CreateSession();
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::ZERO_RTT);
+  AddQuicAlternateProtocolMapping(quic::MockCryptoClientStream::ZERO_RTT);
   SendRequestAndExpectHttpResponse("hello world");
 }
 
@@ -5084,7 +5102,7 @@
   EXPECT_FALSE(
       test_socket_performance_watcher_factory_.rtt_notification_received());
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -5105,7 +5123,8 @@
   request_.url = GURL("https://www.example.org:443");
   AddHangingNonAlternateProtocolSocketData();
   CreateSession();
-  AddQuicAlternateProtocolMapping(MockCryptoClientStream::CONFIRM_HANDSHAKE);
+  AddQuicAlternateProtocolMapping(
+      quic::MockCryptoClientStream::CONFIRM_HANDSHAKE);
   SendRequestAndExpectQuicResponse("hello!");
   EXPECT_TRUE(
       test_socket_performance_watcher_factory_.rtt_notification_received());
@@ -5202,7 +5221,7 @@
 
   MockQuicData socket_data;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket(1, &offset));
   socket_data.AddWrite(SYNCHRONOUS,
                        ConstructClientRequestHeadersPacket(
@@ -5245,7 +5264,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData socket_data;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket(1, &offset));
   socket_data.AddWrite(ASYNC, ERR_NO_BUFFER_SPACE);
   socket_data.AddWrite(SYNCHRONOUS,
@@ -5274,7 +5293,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData socket_data;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket(1, &offset));
   socket_data.AddWrite(SYNCHRONOUS, ERR_NO_BUFFER_SPACE);
   socket_data.AddWrite(SYNCHRONOUS,
@@ -5304,7 +5323,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData socket_data;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more data to read
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket(1, &offset));
   for (int i = 0; i < 13; ++i) {  // 12 retries then one final failure.
@@ -5318,7 +5337,7 @@
   QuicStreamFactoryPeer::SetTaskRunner(session_->quic_stream_factory(),
                                        quic_task_runner_.get());
 
-  QuicTime start = clock_.Now();
+  quic::QuicTime start = clock_.Now();
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
   int rv = trans.Start(&request_, callback.callback(), net_log_.bound());
@@ -5332,8 +5351,8 @@
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
   // Backoff should take between 4 - 5 seconds.
-  EXPECT_TRUE(clock_.Now() - start > QuicTime::Delta::FromSeconds(4));
-  EXPECT_TRUE(clock_.Now() - start < QuicTime::Delta::FromSeconds(5));
+  EXPECT_TRUE(clock_.Now() - start > quic::QuicTime::Delta::FromSeconds(4));
+  EXPECT_TRUE(clock_.Now() - start < quic::QuicTime::Delta::FromSeconds(5));
 }
 
 TEST_P(QuicNetworkTransactionTest, MaxRetriesAfterSynchronousNoBufferSpace) {
@@ -5342,7 +5361,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData socket_data;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more data to read
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket(1, &offset));
   for (int i = 0; i < 13; ++i) {  // 12 retries then one final failure.
@@ -5356,7 +5375,7 @@
   QuicStreamFactoryPeer::SetTaskRunner(session_->quic_stream_factory(),
                                        quic_task_runner_.get());
 
-  QuicTime start = clock_.Now();
+  quic::QuicTime start = clock_.Now();
   HttpNetworkTransaction trans(DEFAULT_PRIORITY, session_.get());
   TestCompletionCallback callback;
   int rv = trans.Start(&request_, callback.callback(), net_log_.bound());
@@ -5370,27 +5389,27 @@
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
   EXPECT_TRUE(socket_data.AllWriteDataConsumed());
   // Backoff should take between 4 - 5 seconds.
-  EXPECT_TRUE(clock_.Now() - start > QuicTime::Delta::FromSeconds(4));
-  EXPECT_TRUE(clock_.Now() - start < QuicTime::Delta::FromSeconds(5));
+  EXPECT_TRUE(clock_.Now() - start > quic::QuicTime::Delta::FromSeconds(4));
+  EXPECT_TRUE(clock_.Now() - start < quic::QuicTime::Delta::FromSeconds(5));
 }
 
 TEST_P(QuicNetworkTransactionTest, NoMigrationForMsgTooBig) {
   session_params_.retry_without_alt_svc_on_quic_errors = false;
   session_params_.origins_to_force_quic_on.insert(
       HostPortPair::FromString("mail.example.org:443"));
-  const QuicString error_details =
-      QuicStrCat("Write failed with error: ", ERR_MSG_TOO_BIG, " (",
-                 strerror(ERR_MSG_TOO_BIG), ")");
+  const quic::QuicString error_details =
+      quic::QuicStrCat("Write failed with error: ", ERR_MSG_TOO_BIG, " (",
+                       strerror(ERR_MSG_TOO_BIG), ")");
 
   MockQuicData socket_data;
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket(1, &offset));
   socket_data.AddWrite(SYNCHRONOUS, ERR_MSG_TOO_BIG);
   // Connection close packet will be sent for MSG_TOO_BIG.
-  socket_data.AddWrite(SYNCHRONOUS,
-                       client_maker_.MakeConnectionClosePacket(
-                           3, true, QUIC_PACKET_WRITE_ERROR, error_details));
+  socket_data.AddWrite(
+      SYNCHRONOUS, client_maker_.MakeConnectionClosePacket(
+                       3, true, quic::QUIC_PACKET_WRITE_ERROR, error_details));
   socket_data.AddSocketDataToFactory(&socket_factory_);
 
   CreateSession();
@@ -5412,8 +5431,8 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
-  QuicPacketNumber client_packet_number = 1;
+  quic::QuicStreamOffset header_stream_offset = 0;
+  quic::QuicPacketNumber client_packet_number = 1;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(client_packet_number++,
                                                   &header_stream_offset));
@@ -5422,7 +5441,7 @@
       ConstructClientRequestHeadersPacket(
           client_packet_number++, GetNthClientInitiatedStreamId(0), true, true,
           GetRequestHeaders("GET", "https", "/"), &header_stream_offset));
-  QuicStreamOffset server_header_offset = 0;
+  quic::QuicStreamOffset server_header_offset = 0;
   mock_quic_data.AddRead(
       ASYNC,
       ConstructServerPushPromisePacket(
@@ -5430,7 +5449,7 @@
           false, GetRequestHeaders("GET", "https", "/pushed.jpg"),
           &server_header_offset, &server_maker_));
   if (client_headers_include_h2_stream_dependency_ &&
-      version_ > QUIC_VERSION_42) {
+      version_ > quic::QUIC_VERSION_42) {
     mock_quic_data.AddWrite(
         SYNCHRONOUS,
         ConstructClientPriorityPacket(client_packet_number++, false,
@@ -5459,7 +5478,7 @@
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructClientAckAndRstPacket(
                        client_packet_number++, GetNthServerInitiatedStreamId(0),
-                       QUIC_RST_ACKNOWLEDGEMENT, 5, 5, 1));
+                       quic::QUIC_RST_ACKNOWLEDGEMENT, 5, 5, 1));
   mock_quic_data.AddRead(ASYNC, ERR_IO_PENDING);  // No more data to read
   mock_quic_data.AddRead(ASYNC, 0);               // EOF
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
@@ -5497,8 +5516,8 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
-  QuicPacketNumber client_packet_number = 1;
+  quic::QuicStreamOffset header_stream_offset = 0;
+  quic::QuicPacketNumber client_packet_number = 1;
   // Initial SETTINGS frame.
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(client_packet_number++,
@@ -5509,7 +5528,7 @@
       ConstructClientRequestHeadersPacket(
           client_packet_number++, GetNthClientInitiatedStreamId(0), true, true,
           GetRequestHeaders("GET", "https", "/"), &header_stream_offset));
-  QuicStreamOffset server_header_offset = 0;
+  quic::QuicStreamOffset server_header_offset = 0;
   // Server promise for: https://mail.example.org/pushed.jpg
   mock_quic_data.AddRead(
       ASYNC,
@@ -5518,7 +5537,7 @@
           false, GetRequestHeaders("GET", "https", "/pushed.jpg"),
           &server_header_offset, &server_maker_));
   if (client_headers_include_h2_stream_dependency_ &&
-      version_ > QUIC_VERSION_42) {
+      version_ > quic::QUIC_VERSION_42) {
     mock_quic_data.AddWrite(
         SYNCHRONOUS,
         ConstructClientPriorityPacket(client_packet_number++, false,
@@ -5586,7 +5605,7 @@
 
   MockQuicData mock_quic_data;
 
-  QuicStreamOffset offset = 0;
+  quic::QuicStreamOffset offset = 0;
   mock_quic_data.AddWrite(SYNCHRONOUS,
                           ConstructInitialSettingsPacket(1, &offset));
 
@@ -5663,7 +5682,7 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   spdy::SpdyHeaderBlock headers(GetRequestHeaders("GET", "https", "/"));
@@ -5674,7 +5693,7 @@
                               2, GetNthClientInitiatedStreamId(0), true, true,
                               std::move(headers), &header_stream_offset));
 
-  QuicStreamOffset expected_raw_header_response_size = 0;
+  quic::QuicStreamOffset expected_raw_header_response_size = 0;
   mock_quic_data.AddRead(ASYNC, ConstructServerResponseHeadersPacket(
                                     1, GetNthClientInitiatedStreamId(0), false,
                                     false, GetResponseHeaders("200 OK"),
@@ -5724,8 +5743,8 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
-  QuicPacketNumber client_packet_number = 1;
+  quic::QuicStreamOffset header_stream_offset = 0;
+  quic::QuicPacketNumber client_packet_number = 1;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(client_packet_number++,
                                                   &header_stream_offset));
@@ -5737,8 +5756,8 @@
                        client_packet_number++, GetNthClientInitiatedStreamId(0),
                        true, true, std::move(headers), &header_stream_offset));
 
-  QuicStreamOffset server_header_offset = 0;
-  QuicStreamOffset expected_raw_header_response_size = 0;
+  quic::QuicStreamOffset server_header_offset = 0;
+  quic::QuicStreamOffset expected_raw_header_response_size = 0;
 
   mock_quic_data.AddRead(
       ASYNC,
@@ -5748,7 +5767,7 @@
           &server_header_offset, &server_maker_));
 
   if (client_headers_include_h2_stream_dependency_ &&
-      version_ > QUIC_VERSION_42) {
+      version_ > quic::QUIC_VERSION_42) {
     mock_quic_data.AddWrite(
         SYNCHRONOUS,
         ConstructClientPriorityPacket(client_packet_number++, false,
@@ -5831,7 +5850,7 @@
   socket_factory_.AddSSLSocketDataProvider(&ssl_data_);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -5891,7 +5910,7 @@
       : version_(GetParam().version),
         client_headers_include_h2_stream_dependency_(
             GetParam().client_headers_include_h2_stream_dependency),
-        supported_versions_(SupportedTransportVersions(version_)),
+        supported_versions_(quic::test::SupportedTransportVersions(version_)),
         destination_type_(GetParam().destination_type),
         cert_transparency_verifier_(new MultiLogCTVerifier()),
         ssl_config_service_(new SSLConfigServiceDefaults),
@@ -5914,11 +5933,11 @@
 
     HttpNetworkSession::Context session_context;
 
-    clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20));
+    clock_.AdvanceTime(quic::QuicTime::Delta::FromMilliseconds(20));
     session_context.quic_clock = &clock_;
 
     crypto_client_stream_factory_.set_handshake_mode(
-        MockCryptoClientStream::CONFIRM_HANDSHAKE);
+        quic::MockCryptoClientStream::CONFIRM_HANDSHAKE);
     session_context.quic_crypto_client_stream_factory =
         &crypto_client_stream_factory_;
 
@@ -5970,23 +5989,23 @@
         url::SchemeHostPort("https", origin, 443), alternative_service,
         expiration, supported_versions_);
   }
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      QuicStreamOffset* offset,
-      QuicTestPacketMaker* maker) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientRequestHeadersPacket(quic::QuicPacketNumber packet_number,
+                                      quic::QuicStreamId stream_id,
+                                      bool should_include_version,
+                                      quic::QuicStreamOffset* offset,
+                                      QuicTestPacketMaker* maker) {
     return ConstructClientRequestHeadersPacket(
         packet_number, stream_id, should_include_version, 0, offset, maker);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      QuicStreamId parent_stream_id,
-      QuicStreamOffset* offset,
-      QuicTestPacketMaker* maker) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientRequestHeadersPacket(quic::QuicPacketNumber packet_number,
+                                      quic::QuicStreamId stream_id,
+                                      bool should_include_version,
+                                      quic::QuicStreamId parent_stream_id,
+                                      quic::QuicStreamOffset* offset,
+                                      QuicTestPacketMaker* maker) {
     spdy::SpdyPriority priority =
         ConvertRequestPriorityToQuicPriority(DEFAULT_PRIORITY);
     spdy::SpdyHeaderBlock headers(
@@ -5996,54 +6015,54 @@
         std::move(headers), parent_stream_id, offset);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      bool should_include_version,
-      QuicTestPacketMaker* maker) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientRequestHeadersPacket(quic::QuicPacketNumber packet_number,
+                                      quic::QuicStreamId stream_id,
+                                      bool should_include_version,
+                                      QuicTestPacketMaker* maker) {
     return ConstructClientRequestHeadersPacket(
         packet_number, stream_id, should_include_version, nullptr, maker);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerResponseHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      QuicStreamOffset* offset,
-      QuicTestPacketMaker* maker) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructServerResponseHeadersPacket(quic::QuicPacketNumber packet_number,
+                                       quic::QuicStreamId stream_id,
+                                       quic::QuicStreamOffset* offset,
+                                       QuicTestPacketMaker* maker) {
     spdy::SpdyHeaderBlock headers(maker->GetResponseHeaders("200 OK"));
     return maker->MakeResponseHeadersPacketWithOffsetTracking(
         packet_number, stream_id, false, false, std::move(headers), offset);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerResponseHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      QuicTestPacketMaker* maker) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructServerResponseHeadersPacket(quic::QuicPacketNumber packet_number,
+                                       quic::QuicStreamId stream_id,
+                                       QuicTestPacketMaker* maker) {
     return ConstructServerResponseHeadersPacket(packet_number, stream_id,
                                                 nullptr, maker);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructServerDataPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructServerDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       QuicTestPacketMaker* maker) {
     return maker->MakeDataPacket(packet_number, stream_id, false, true, 0,
                                  "hello");
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructClientAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       QuicTestPacketMaker* maker) {
     return maker->MakeAckPacket(packet_number, largest_received,
                                 smallest_received, least_unacked, true);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructInitialSettingsPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamOffset* offset,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructInitialSettingsPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamOffset* offset,
       QuicTestPacketMaker* maker) {
     return maker->MakeInitialSettingsPacket(packet_number, offset);
   }
@@ -6106,14 +6125,14 @@
     EXPECT_EQ(443, response->socket_address.port());
   }
 
-  QuicStreamId GetNthClientInitiatedStreamId(int n) {
-    return test::GetNthClientInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthClientInitiatedStreamId(int n) {
+    return quic::test::GetNthClientInitiatedStreamId(version_, n);
   }
 
-  MockClock clock_;
-  const QuicTransportVersion version_;
+  quic::MockClock clock_;
+  const quic::QuicTransportVersion version_;
   const bool client_headers_include_h2_stream_dependency_;
-  QuicTransportVersionVector supported_versions_;
+  quic::QuicTransportVersionVector supported_versions_;
   DestinationType destination_type_;
   std::string origin1_;
   std::string origin2_;
@@ -6128,7 +6147,7 @@
   scoped_refptr<SSLConfigServiceDefaults> ssl_config_service_;
   std::unique_ptr<ProxyResolutionService> proxy_resolution_service_;
   std::unique_ptr<HttpAuthHandlerFactory> auth_handler_factory_;
-  MockRandom random_generator_;
+  quic::test::MockRandom random_generator_;
   HttpServerPropertiesImpl http_server_properties_;
   BoundTestNetLog net_log_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
@@ -6189,7 +6208,7 @@
 
 // First request opens QUIC session to alternative service.  Second request
 // pools to it, because destination matches and certificate is valid, even
-// though QuicServerId is different.
+// though quic::QuicServerId is different.
 TEST_P(QuicNetworkTransactionWithDestinationTest, PoolIfCertificateValid) {
   origin1_ = "mail.example.org";
   origin2_ = "news.example.org";
@@ -6209,13 +6228,13 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   QuicTestPacketMaker client_maker(
-      version_, 0, &clock_, origin1_, Perspective::IS_CLIENT,
+      version_, 0, &clock_, origin1_, quic::Perspective::IS_CLIENT,
       client_headers_include_h2_stream_dependency_);
   QuicTestPacketMaker server_maker(version_, 0, &clock_, origin1_,
-                                   Perspective::IS_SERVER, false);
+                                   quic::Perspective::IS_SERVER, false);
 
-  QuicStreamOffset request_header_offset(0);
-  QuicStreamOffset response_header_offset(0);
+  quic::QuicStreamOffset request_header_offset(0);
+  quic::QuicStreamOffset response_header_offset(0);
 
   MockQuicData mock_quic_data;
   mock_quic_data.AddWrite(
@@ -6267,7 +6286,7 @@
 // First request opens QUIC session to alternative service.  Second request does
 // not pool to it, even though destination matches, because certificate is not
 // valid.  Instead, a new QUIC session is opened to the same destination with a
-// different QuicServerId.
+// different quic::QuicServerId.
 TEST_P(QuicNetworkTransactionWithDestinationTest,
        DoNotPoolIfCertificateInvalid) {
   origin1_ = "news.example.org";
@@ -6298,13 +6317,13 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details2);
 
   QuicTestPacketMaker client_maker1(
-      version_, 0, &clock_, origin1_, Perspective::IS_CLIENT,
+      version_, 0, &clock_, origin1_, quic::Perspective::IS_CLIENT,
       client_headers_include_h2_stream_dependency_);
   QuicTestPacketMaker server_maker1(version_, 0, &clock_, origin1_,
-                                    Perspective::IS_SERVER, false);
+                                    quic::Perspective::IS_SERVER, false);
 
   MockQuicData mock_quic_data1;
-  QuicStreamOffset header_stream_offset1 = 0;
+  quic::QuicStreamOffset header_stream_offset1 = 0;
   mock_quic_data1.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset1,
                                                   &client_maker1));
@@ -6326,13 +6345,13 @@
   mock_quic_data1.AddSocketDataToFactory(&socket_factory_);
 
   QuicTestPacketMaker client_maker2(
-      version_, 0, &clock_, origin2_, Perspective::IS_CLIENT,
+      version_, 0, &clock_, origin2_, quic::Perspective::IS_CLIENT,
       client_headers_include_h2_stream_dependency_);
   QuicTestPacketMaker server_maker2(version_, 0, &clock_, origin2_,
-                                    Perspective::IS_SERVER, false);
+                                    quic::Perspective::IS_SERVER, false);
 
   MockQuicData mock_quic_data2;
-  QuicStreamOffset header_stream_offset2 = 0;
+  quic::QuicStreamOffset header_stream_offset2 = 0;
   mock_quic_data2.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset2,
                                                   &client_maker2));
@@ -6366,8 +6385,8 @@
       HostPortPair::FromString("mail.example.org:443"));
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
-  QuicPacketNumber client_packet_number = 1;
+  quic::QuicStreamOffset header_stream_offset = 0;
+  quic::QuicPacketNumber client_packet_number = 1;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(client_packet_number++,
                                                   &header_stream_offset));
@@ -6376,7 +6395,7 @@
       ConstructClientRequestHeadersPacket(
           client_packet_number++, GetNthClientInitiatedStreamId(0), true, true,
           GetRequestHeaders("GET", "https", "/"), &header_stream_offset));
-  QuicStreamOffset server_header_offset = 0;
+  quic::QuicStreamOffset server_header_offset = 0;
   mock_quic_data.AddRead(
       ASYNC,
       ConstructServerPushPromisePacket(
@@ -6384,7 +6403,7 @@
           false, GetRequestHeaders("GET", "https", "/pushed.jpg"),
           &server_header_offset, &server_maker_));
   if (client_headers_include_h2_stream_dependency_ &&
-      version_ > QUIC_VERSION_42) {
+      version_ > quic::QUIC_VERSION_42) {
     mock_quic_data.AddWrite(
         SYNCHRONOUS,
         ConstructClientPriorityPacket(client_packet_number++, false,
@@ -6417,7 +6436,7 @@
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructClientAckAndRstPacket(
                        client_packet_number++, GetNthServerInitiatedStreamId(0),
-                       QUIC_STREAM_CANCELLED, 5, 5, 1));
+                       quic::QUIC_STREAM_CANCELLED, 5, 5, 1));
   const char kBody[] = "1";
   mock_quic_data.AddWrite(
       SYNCHRONOUS,
@@ -6474,7 +6493,7 @@
 
   MockQuicData mock_quic_data;
 
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -6483,7 +6502,7 @@
           2, GetNthClientInitiatedStreamId(0), true, true,
           GetRequestHeaders("GET", "https", "/"), &header_stream_offset));
 
-  QuicStreamOffset server_header_offset = 0;
+  quic::QuicStreamOffset server_header_offset = 0;
   mock_quic_data.AddRead(ASYNC, ConstructServerPushPromisePacket(
                                     1, GetNthClientInitiatedStreamId(0),
                                     GetNthServerInitiatedStreamId(0), false,
@@ -6491,7 +6510,7 @@
                                     &server_header_offset, &server_maker_));
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructClientRstPacket(3, GetNthServerInitiatedStreamId(0),
-                                            QUIC_INVALID_PROMISE_URL, 0));
+                                            quic::QUIC_INVALID_PROMISE_URL, 0));
 
   mock_quic_data.AddRead(
       ASYNC, ConstructServerResponseHeadersPacket(
@@ -6531,7 +6550,7 @@
       "QUIC proxy.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(SYNCHRONOUS,
@@ -6550,25 +6569,26 @@
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructClientAckAndDataPacket(
                        3, false, GetNthClientInitiatedStreamId(0), 1, 1, 1,
-                       false, 0, QuicStringPiece(get_request)));
+                       false, 0, quic::QuicStringPiece(get_request)));
   const char get_response[] =
       "HTTP/1.1 200 OK\r\n"
       "Content-Length: 10\r\n\r\n";
-  mock_quic_data.AddRead(ASYNC, ConstructServerDataPacket(
-                                    2, GetNthClientInitiatedStreamId(0), false,
-                                    false, 0, QuicStringPiece(get_response)));
-
   mock_quic_data.AddRead(
-      SYNCHRONOUS, ConstructServerDataPacket(
-                       3, GetNthClientInitiatedStreamId(0), false, false,
-                       strlen(get_response), QuicStringPiece("0123456789")));
+      ASYNC,
+      ConstructServerDataPacket(2, GetNthClientInitiatedStreamId(0), false,
+                                false, 0, quic::QuicStringPiece(get_response)));
+
+  mock_quic_data.AddRead(SYNCHRONOUS, ConstructServerDataPacket(
+                                          3, GetNthClientInitiatedStreamId(0),
+                                          false, false, strlen(get_response),
+                                          quic::QuicStringPiece("0123456789")));
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(4, 3, 2, 1));
   mock_quic_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more data to read
 
   mock_quic_data.AddWrite(
-      SYNCHRONOUS,
-      ConstructClientRstPacket(5, GetNthClientInitiatedStreamId(0),
-                               QUIC_STREAM_CANCELLED, strlen(get_request)));
+      SYNCHRONOUS, ConstructClientRstPacket(5, GetNthClientInitiatedStreamId(0),
+                                            quic::QUIC_STREAM_CANCELLED,
+                                            strlen(get_request)));
 
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
 
@@ -6605,7 +6625,7 @@
       "QUIC proxy.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(SYNCHRONOUS,
@@ -6625,13 +6645,13 @@
       SYNCHRONOUS,
       ConstructClientAckAndDataPacket(
           3, false, GetNthClientInitiatedStreamId(0), 1, 1, 1, false, 0,
-          QuicStringPiece(get_frame.data(), get_frame.size())));
+          quic::QuicStringPiece(get_frame.data(), get_frame.size())));
   spdy::SpdySerializedFrame resp_frame =
       spdy_util.ConstructSpdyGetReply(nullptr, 0, 1);
   mock_quic_data.AddRead(
       ASYNC, ConstructServerDataPacket(
                  2, GetNthClientInitiatedStreamId(0), false, false, 0,
-                 QuicStringPiece(resp_frame.data(), resp_frame.size())));
+                 quic::QuicStringPiece(resp_frame.data(), resp_frame.size())));
 
   spdy::SpdySerializedFrame data_frame =
       spdy_util.ConstructSpdyDataFrame(1, "0123456789", true);
@@ -6639,14 +6659,14 @@
       SYNCHRONOUS,
       ConstructServerDataPacket(
           3, GetNthClientInitiatedStreamId(0), false, false, resp_frame.size(),
-          QuicStringPiece(data_frame.data(), data_frame.size())));
+          quic::QuicStringPiece(data_frame.data(), data_frame.size())));
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(4, 3, 2, 1));
   mock_quic_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more data to read
 
   mock_quic_data.AddWrite(
       SYNCHRONOUS,
       ConstructClientRstPacket(5, GetNthClientInitiatedStreamId(0),
-                               QUIC_STREAM_CANCELLED, get_frame.size()));
+                               quic::QUIC_STREAM_CANCELLED, get_frame.size()));
 
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
 
@@ -6686,7 +6706,7 @@
       "QUIC proxy.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(SYNCHRONOUS,
@@ -6698,8 +6718,8 @@
                                     1, GetNthClientInitiatedStreamId(0), false,
                                     false, GetResponseHeaders("200 OK")));
 
-  QuicStreamOffset client_data_offset = 0;
-  QuicStreamOffset server_data_offset = 0;
+  quic::QuicStreamOffset client_data_offset = 0;
+  quic::QuicStreamOffset server_data_offset = 0;
   const char get_request_1[] =
       "GET / HTTP/1.1\r\n"
       "Host: mail.example.org\r\n"
@@ -6708,7 +6728,7 @@
       SYNCHRONOUS,
       ConstructClientAckAndDataPacket(
           3, false, GetNthClientInitiatedStreamId(0), 1, 1, 1, false,
-          client_data_offset, QuicStringPiece(get_request_1)));
+          client_data_offset, quic::QuicStringPiece(get_request_1)));
   client_data_offset += strlen(get_request_1);
 
   const char get_response_1[] =
@@ -6717,13 +6737,13 @@
   mock_quic_data.AddRead(
       ASYNC, ConstructServerDataPacket(2, GetNthClientInitiatedStreamId(0),
                                        false, false, server_data_offset,
-                                       QuicStringPiece(get_response_1)));
+                                       quic::QuicStringPiece(get_response_1)));
   server_data_offset += strlen(get_response_1);
 
-  mock_quic_data.AddRead(
-      SYNCHRONOUS, ConstructServerDataPacket(
-                       3, GetNthClientInitiatedStreamId(0), false, false,
-                       server_data_offset, QuicStringPiece("0123456789")));
+  mock_quic_data.AddRead(SYNCHRONOUS, ConstructServerDataPacket(
+                                          3, GetNthClientInitiatedStreamId(0),
+                                          false, false, server_data_offset,
+                                          quic::QuicStringPiece("0123456789")));
   server_data_offset += 10;
 
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(4, 3, 2, 1));
@@ -6733,9 +6753,10 @@
       "Host: mail.example.org\r\n"
       "Connection: keep-alive\r\n\r\n";
   mock_quic_data.AddWrite(
-      SYNCHRONOUS, ConstructClientDataPacket(
-                       5, GetNthClientInitiatedStreamId(0), false, false,
-                       client_data_offset, QuicStringPiece(get_request_2)));
+      SYNCHRONOUS,
+      ConstructClientDataPacket(5, GetNthClientInitiatedStreamId(0), false,
+                                false, client_data_offset,
+                                quic::QuicStringPiece(get_request_2)));
   client_data_offset += strlen(get_request_2);
 
   const char get_response_2[] =
@@ -6744,22 +6765,22 @@
   mock_quic_data.AddRead(
       ASYNC, ConstructServerDataPacket(4, GetNthClientInitiatedStreamId(0),
                                        false, false, server_data_offset,
-                                       QuicStringPiece(get_response_2)));
+                                       quic::QuicStringPiece(get_response_2)));
   server_data_offset += strlen(get_response_2);
 
-  mock_quic_data.AddRead(SYNCHRONOUS,
-                         ConstructServerDataPacket(
-                             5, GetNthClientInitiatedStreamId(0), false, false,
-                             server_data_offset, QuicStringPiece("0123456")));
+  mock_quic_data.AddRead(
+      SYNCHRONOUS, ConstructServerDataPacket(
+                       5, GetNthClientInitiatedStreamId(0), false, false,
+                       server_data_offset, quic::QuicStringPiece("0123456")));
   server_data_offset += 7;
 
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(6, 5, 4, 1));
   mock_quic_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more data to read
 
   mock_quic_data.AddWrite(
-      SYNCHRONOUS,
-      ConstructClientRstPacket(7, GetNthClientInitiatedStreamId(0),
-                               QUIC_STREAM_CANCELLED, client_data_offset));
+      SYNCHRONOUS, ConstructClientRstPacket(7, GetNthClientInitiatedStreamId(0),
+                                            quic::QUIC_STREAM_CANCELLED,
+                                            client_data_offset));
 
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
 
@@ -6811,8 +6832,8 @@
       "QUIC proxy.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset client_header_stream_offset = 0;
-  QuicStreamOffset server_header_stream_offset = 0;
+  quic::QuicStreamOffset client_header_stream_offset = 0;
+  quic::QuicStreamOffset server_header_stream_offset = 0;
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket(
                                            1, &client_header_stream_offset));
 
@@ -6835,17 +6856,18 @@
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructClientAckAndDataPacket(
                        3, false, GetNthClientInitiatedStreamId(0), 1, 1, 1,
-                       false, 0, QuicStringPiece(get_request)));
+                       false, 0, quic::QuicStringPiece(get_request)));
   const char get_response[] =
       "HTTP/1.1 200 OK\r\n"
       "Content-Length: 10\r\n\r\n";
-  mock_quic_data.AddRead(ASYNC, ConstructServerDataPacket(
-                                    2, GetNthClientInitiatedStreamId(0), false,
-                                    false, 0, QuicStringPiece(get_response)));
   mock_quic_data.AddRead(
-      SYNCHRONOUS, ConstructServerDataPacket(
-                       3, GetNthClientInitiatedStreamId(0), false, false,
-                       strlen(get_response), QuicStringPiece("0123456789")));
+      ASYNC,
+      ConstructServerDataPacket(2, GetNthClientInitiatedStreamId(0), false,
+                                false, 0, quic::QuicStringPiece(get_response)));
+  mock_quic_data.AddRead(SYNCHRONOUS, ConstructServerDataPacket(
+                                          3, GetNthClientInitiatedStreamId(0),
+                                          false, false, strlen(get_response),
+                                          quic::QuicStringPiece("0123456789")));
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(4, 3, 2, 1));
 
   // CONNECT request and response for second request
@@ -6868,14 +6890,14 @@
       SYNCHRONOUS,
       ConstructClientAckAndDataPacket(
           6, false, GetNthClientInitiatedStreamId(1), 4, 4, 1, false, 0,
-          QuicStringPiece(get_frame.data(), get_frame.size())));
+          quic::QuicStringPiece(get_frame.data(), get_frame.size())));
 
   spdy::SpdySerializedFrame resp_frame =
       spdy_util.ConstructSpdyGetReply(nullptr, 0, 1);
   mock_quic_data.AddRead(
       ASYNC, ConstructServerDataPacket(
                  5, GetNthClientInitiatedStreamId(1), false, false, 0,
-                 QuicStringPiece(resp_frame.data(), resp_frame.size())));
+                 quic::QuicStringPiece(resp_frame.data(), resp_frame.size())));
 
   spdy::SpdySerializedFrame data_frame =
       spdy_util.ConstructSpdyDataFrame(1, "0123456", true);
@@ -6883,19 +6905,19 @@
       ASYNC,
       ConstructServerDataPacket(
           6, GetNthClientInitiatedStreamId(1), false, false, resp_frame.size(),
-          QuicStringPiece(data_frame.data(), data_frame.size())));
+          quic::QuicStringPiece(data_frame.data(), data_frame.size())));
 
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(7, 6, 5, 1));
   mock_quic_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more data to read
 
   mock_quic_data.AddWrite(
-      SYNCHRONOUS,
-      ConstructClientRstPacket(8, GetNthClientInitiatedStreamId(0),
-                               QUIC_STREAM_CANCELLED, strlen(get_request)));
+      SYNCHRONOUS, ConstructClientRstPacket(8, GetNthClientInitiatedStreamId(0),
+                                            quic::QUIC_STREAM_CANCELLED,
+                                            strlen(get_request)));
   mock_quic_data.AddWrite(
       SYNCHRONOUS,
       ConstructClientRstPacket(9, GetNthClientInitiatedStreamId(1),
-                               QUIC_STREAM_CANCELLED, get_frame.size()));
+                               quic::QUIC_STREAM_CANCELLED, get_frame.size()));
 
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
 
@@ -6949,7 +6971,7 @@
       "QUIC proxy.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(SYNCHRONOUS,
@@ -6961,9 +6983,10 @@
                                     1, GetNthClientInitiatedStreamId(0), false,
                                     true, GetResponseHeaders("500")));
   mock_quic_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more data to read
-  mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckAndRstPacket(
-                                           3, GetNthClientInitiatedStreamId(0),
-                                           QUIC_STREAM_CANCELLED, 1, 1, 1));
+  mock_quic_data.AddWrite(
+      SYNCHRONOUS,
+      ConstructClientAckAndRstPacket(3, GetNthClientInitiatedStreamId(0),
+                                     quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
 
@@ -6994,7 +7017,7 @@
       "QUIC proxy.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(SYNCHRONOUS,
@@ -7031,8 +7054,8 @@
       "QUIC proxy.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset client_header_stream_offset = 0;
-  QuicStreamOffset server_header_stream_offset = 0;
+  quic::QuicStreamOffset client_header_stream_offset = 0;
+  quic::QuicStreamOffset server_header_stream_offset = 0;
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket(
                                            1, &client_header_stream_offset));
   mock_quic_data.AddWrite(SYNCHRONOUS,
@@ -7044,9 +7067,10 @@
       ASYNC, ConstructServerResponseHeadersPacket(
                  1, GetNthClientInitiatedStreamId(0), false, false,
                  GetResponseHeaders("200 OK"), &server_header_stream_offset));
-  mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckAndRstPacket(
-                                           3, GetNthClientInitiatedStreamId(0),
-                                           QUIC_STREAM_CANCELLED, 1, 1, 1));
+  mock_quic_data.AddWrite(
+      SYNCHRONOUS,
+      ConstructClientAckAndRstPacket(3, GetNthClientInitiatedStreamId(0),
+                                     quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   mock_quic_data.AddWrite(
       SYNCHRONOUS,
@@ -7066,25 +7090,26 @@
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructClientAckAndDataPacket(
                        5, false, GetNthClientInitiatedStreamId(1), 2, 2, 1,
-                       false, 0, QuicStringPiece(get_request)));
+                       false, 0, quic::QuicStringPiece(get_request)));
   const char get_response[] =
       "HTTP/1.1 200 OK\r\n"
       "Content-Length: 10\r\n\r\n";
-  mock_quic_data.AddRead(ASYNC, ConstructServerDataPacket(
-                                    3, GetNthClientInitiatedStreamId(1), false,
-                                    false, 0, QuicStringPiece(get_response)));
-
   mock_quic_data.AddRead(
-      SYNCHRONOUS, ConstructServerDataPacket(
-                       4, GetNthClientInitiatedStreamId(1), false, false,
-                       strlen(get_response), QuicStringPiece("0123456789")));
+      ASYNC,
+      ConstructServerDataPacket(3, GetNthClientInitiatedStreamId(1), false,
+                                false, 0, quic::QuicStringPiece(get_response)));
+
+  mock_quic_data.AddRead(SYNCHRONOUS, ConstructServerDataPacket(
+                                          4, GetNthClientInitiatedStreamId(1),
+                                          false, false, strlen(get_response),
+                                          quic::QuicStringPiece("0123456789")));
   mock_quic_data.AddWrite(SYNCHRONOUS, ConstructClientAckPacket(6, 4, 3, 1));
   mock_quic_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // No more data to read
 
   mock_quic_data.AddWrite(
-      SYNCHRONOUS,
-      ConstructClientRstPacket(7, GetNthClientInitiatedStreamId(1),
-                               QUIC_STREAM_CANCELLED, strlen(get_request)));
+      SYNCHRONOUS, ConstructClientRstPacket(7, GetNthClientInitiatedStreamId(1),
+                                            quic::QUIC_STREAM_CANCELLED,
+                                            strlen(get_request)));
 
   mock_quic_data.AddSocketDataToFactory(&socket_factory_);
 
@@ -7134,7 +7159,7 @@
       "QUIC proxy.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
 
@@ -7179,7 +7204,7 @@
   const RequestPriority request_priority = MEDIUM;
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   mock_quic_data.AddWrite(
@@ -7222,12 +7247,13 @@
   // IsConnectedAndIdle returns false.  The socket should still be drained and
   // reused. See http://crbug.com/544255.
   for (int i = 0; i < 2; ++i) {
-    client_maker.reset(new QuicTestPacketMaker(
-        version_, 0, &clock_, kDefaultServerHostName, Perspective::IS_CLIENT,
-        client_headers_include_h2_stream_dependency_));
-    server_maker.reset(new QuicTestPacketMaker(version_, 0, &clock_,
-                                               kDefaultServerHostName,
-                                               Perspective::IS_SERVER, false));
+    client_maker.reset(
+        new QuicTestPacketMaker(version_, 0, &clock_, kDefaultServerHostName,
+                                quic::Perspective::IS_CLIENT,
+                                client_headers_include_h2_stream_dependency_));
+    server_maker.reset(
+        new QuicTestPacketMaker(version_, 0, &clock_, kDefaultServerHostName,
+                                quic::Perspective::IS_SERVER, false));
 
     session_params_.enable_quic = true;
     proxy_resolution_service_ =
@@ -7235,10 +7261,10 @@
             "QUIC proxy.example.org:70", TRAFFIC_ANNOTATION_FOR_TESTS);
 
     MockQuicData mock_quic_data;
-    QuicStreamOffset client_header_stream_offset = 0;
-    QuicStreamOffset server_header_stream_offset = 0;
-    QuicStreamOffset client_data_offset = 0;
-    QuicStreamOffset server_data_offset = 0;
+    quic::QuicStreamOffset client_header_stream_offset = 0;
+    quic::QuicStreamOffset server_header_stream_offset = 0;
+    quic::QuicStreamOffset client_data_offset = 0;
+    quic::QuicStreamOffset server_data_offset = 0;
 
     mock_quic_data.AddWrite(SYNCHRONOUS,
                             client_maker->MakeInitialSettingsPacket(
@@ -7277,9 +7303,9 @@
                             client_maker->MakeAckPacket(3, 2, 1, 1, true));
 
     mock_quic_data.AddWrite(
-        SYNCHRONOUS,
-        client_maker->MakeRstPacket(4, false, GetNthClientInitiatedStreamId(0),
-                                    QUIC_STREAM_CANCELLED, client_data_offset));
+        SYNCHRONOUS, client_maker->MakeRstPacket(
+                         4, false, GetNthClientInitiatedStreamId(0),
+                         quic::QUIC_STREAM_CANCELLED, client_data_offset));
 
     headers = client_maker->ConnectRequestHeaders("mail.example.org:443");
     headers["proxy-authorization"] = "Basic Zm9vOmJheg==";
@@ -7305,7 +7331,7 @@
     mock_quic_data.AddWrite(SYNCHRONOUS,
                             client_maker->MakeAckAndRstPacket(
                                 6, false, GetNthClientInitiatedStreamId(1),
-                                QUIC_STREAM_CANCELLED, 3, 3, 1, true));
+                                quic::QUIC_STREAM_CANCELLED, 3, 3, 1, true));
 
     mock_quic_data.AddSocketDataToFactory(&socket_factory_);
     mock_quic_data.GetSequencedSocketData()->set_busy_before_sync_reads(true);
@@ -7375,7 +7401,7 @@
 TEST_P(QuicNetworkTransactionTest, QuicServerPushUpdatesPriority) {
   // Only run this test if HTTP/2 stream dependency info is sent by client (sent
   // in HEADERS frames for requests and PRIORITY frames).
-  if (version_ <= QUIC_VERSION_42 ||
+  if (version_ <= quic::QUIC_VERSION_42 ||
       !client_headers_include_h2_stream_dependency_) {
     return;
   }
@@ -7383,15 +7409,15 @@
   session_params_.origins_to_force_quic_on.insert(
       HostPortPair::FromString("mail.example.org:443"));
 
-  const QuicStreamId client_stream_0 = GetNthClientInitiatedStreamId(0);
-  const QuicStreamId client_stream_1 = GetNthClientInitiatedStreamId(1);
-  const QuicStreamId client_stream_2 = GetNthClientInitiatedStreamId(2);
-  const QuicStreamId push_stream_0 = GetNthServerInitiatedStreamId(0);
-  const QuicStreamId push_stream_1 = GetNthServerInitiatedStreamId(1);
+  const quic::QuicStreamId client_stream_0 = GetNthClientInitiatedStreamId(0);
+  const quic::QuicStreamId client_stream_1 = GetNthClientInitiatedStreamId(1);
+  const quic::QuicStreamId client_stream_2 = GetNthClientInitiatedStreamId(2);
+  const quic::QuicStreamId push_stream_0 = GetNthServerInitiatedStreamId(0);
+  const quic::QuicStreamId push_stream_1 = GetNthServerInitiatedStreamId(1);
 
   MockQuicData mock_quic_data;
-  QuicStreamOffset header_stream_offset = 0;
-  QuicStreamOffset server_header_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset server_header_offset = 0;
   mock_quic_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
 
@@ -7496,8 +7522,9 @@
                                        "and hello 1!"));
 
   mock_quic_data.AddWrite(
-      SYNCHRONOUS, ConstructClientAckAndRstPacket(
-                       12, push_stream_0, QUIC_RST_ACKNOWLEDGEMENT, 12, 12, 1));
+      SYNCHRONOUS,
+      ConstructClientAckAndRstPacket(
+          12, push_stream_0, quic::QUIC_RST_ACKNOWLEDGEMENT, 12, 12, 1));
 
   mock_quic_data.AddRead(ASYNC, ERR_IO_PENDING);  // No more data to read
   mock_quic_data.AddRead(ASYNC, 0);               // EOF
diff --git a/net/quic/chromium/quic_proxy_client_socket.cc b/net/quic/chromium/quic_proxy_client_socket.cc
index 4d2325d..ff15292 100644
--- a/net/quic/chromium/quic_proxy_client_socket.cc
+++ b/net/quic/chromium/quic_proxy_client_socket.cc
@@ -115,7 +115,7 @@
 
   next_state_ = STATE_DISCONNECTED;
 
-  stream_->Reset(QUIC_STREAM_CANCELLED);
+  stream_->Reset(quic::QUIC_STREAM_CANCELLED);
 }
 
 bool QuicProxyClientSocket::IsConnected() const {
@@ -221,7 +221,7 @@
                                 buf->data());
 
   int rv = stream_->WriteStreamData(
-      QuicStringPiece(buf->data(), buf_len), false,
+      quic::QuicStringPiece(buf->data(), buf_len), false,
       base::Bind(&QuicProxyClientSocket::OnWriteComplete,
                  weak_factory_.GetWeakPtr()));
   if (rv == OK)
diff --git a/net/quic/chromium/quic_proxy_client_socket_unittest.cc b/net/quic/chromium/quic_proxy_client_socket_unittest.cc
index 24daa88f..8f7bf018 100644
--- a/net/quic/chromium/quic_proxy_client_socket_unittest.cc
+++ b/net/quic/chromium/quic_proxy_client_socket_unittest.cc
@@ -74,11 +74,12 @@
 namespace test {
 
 namespace {
-const QuicStreamId kClientDataStreamId1 = kHeadersStreamId + 2;
+const quic::QuicStreamId kClientDataStreamId1 = quic::kHeadersStreamId + 2;
 }  // namespace
 
 class QuicProxyClientSocketTest
-    : public ::testing::TestWithParam<std::tuple<QuicTransportVersion, bool>>,
+    : public ::testing::TestWithParam<
+          std::tuple<quic::QuicTransportVersion, bool>>,
       public WithScopedTaskEnvironment {
  protected:
   static const bool kFin = true;
@@ -88,19 +89,19 @@
   static const bool kSendFeedback = true;
 
   static size_t GetStreamFrameDataLengthFromPacketLength(
-      QuicByteCount packet_length,
-      QuicTransportVersion version,
+      quic::QuicByteCount packet_length,
+      quic::QuicTransportVersion version,
       bool include_version,
       bool include_diversification_nonce,
-      QuicConnectionIdLength connection_id_length,
-      QuicPacketNumberLength packet_number_length,
-      QuicStreamOffset offset) {
+      quic::QuicConnectionIdLength connection_id_length,
+      quic::QuicPacketNumberLength packet_number_length,
+      quic::QuicStreamOffset offset) {
     size_t min_data_length = 1;
     size_t min_packet_length =
-        NullEncrypter(Perspective::IS_CLIENT)
+        quic::NullEncrypter(quic::Perspective::IS_CLIENT)
             .GetCiphertextSize(min_data_length) +
-        QuicPacketCreator::StreamFramePacketOverhead(
-            version, PACKET_8BYTE_CONNECTION_ID, include_version,
+        quic::QuicPacketCreator::StreamFramePacketOverhead(
+            version, quic::PACKET_8BYTE_CONNECTION_ID, include_version,
             include_diversification_nonce, packet_number_length, offset);
 
     DCHECK(packet_length >= min_packet_length);
@@ -110,20 +111,20 @@
   QuicProxyClientSocketTest()
       : version_(std::get<0>(GetParam())),
         client_headers_include_h2_stream_dependency_(std::get<1>(GetParam())),
-        crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
-                       TlsClientHandshaker::CreateSslCtx()),
+        crypto_config_(quic::test::crypto_test_utils::ProofVerifierForTesting(),
+                       quic::TlsClientHandshaker::CreateSslCtx()),
         connection_id_(2),
         client_maker_(version_,
                       connection_id_,
                       &clock_,
                       kProxyHost,
-                      Perspective::IS_CLIENT,
+                      quic::Perspective::IS_CLIENT,
                       client_headers_include_h2_stream_dependency_),
         server_maker_(version_,
                       connection_id_,
                       &clock_,
                       kProxyHost,
-                      Perspective::IS_SERVER,
+                      quic::Perspective::IS_SERVER,
                       false),
         random_generator_(0),
         header_stream_offset_(0),
@@ -136,7 +137,7 @@
             HttpAuthHandlerFactory::CreateDefault(host_resolver_.get())) {
     IPAddress ip(192, 0, 2, 33);
     peer_addr_ = IPEndPoint(ip, 443);
-    clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20));
+    clock_.AdvanceTime(quic::QuicTime::Delta::FromMilliseconds(20));
   }
 
   void SetUp() override {}
@@ -153,18 +154,18 @@
         net_log_.bound().net_log()));
     socket->Connect(peer_addr_);
     runner_ = new TestTaskRunner(&clock_);
-    send_algorithm_ = new MockSendAlgorithm();
+    send_algorithm_ = new quic::test::MockSendAlgorithm();
     EXPECT_CALL(*send_algorithm_, InRecovery()).WillRepeatedly(Return(false));
     EXPECT_CALL(*send_algorithm_, InSlowStart()).WillRepeatedly(Return(false));
     EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _))
         .Times(testing::AtLeast(1));
     EXPECT_CALL(*send_algorithm_, GetCongestionWindow())
-        .WillRepeatedly(Return(kMaxPacketSize));
+        .WillRepeatedly(Return(quic::kMaxPacketSize));
     EXPECT_CALL(*send_algorithm_, PacingRate(_))
-        .WillRepeatedly(Return(QuicBandwidth::Zero()));
+        .WillRepeatedly(Return(quic::QuicBandwidth::Zero()));
     EXPECT_CALL(*send_algorithm_, CanSend(_)).WillRepeatedly(Return(true));
     EXPECT_CALL(*send_algorithm_, BandwidthEstimate())
-        .WillRepeatedly(Return(QuicBandwidth::Zero()));
+        .WillRepeatedly(Return(quic::QuicBandwidth::Zero()));
     EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _)).Times(AnyNumber());
     EXPECT_CALL(*send_algorithm_, OnApplicationLimited(_)).Times(AnyNumber());
     EXPECT_CALL(*send_algorithm_, GetCongestionControlType())
@@ -175,14 +176,16 @@
 
     QuicChromiumPacketWriter* writer = new QuicChromiumPacketWriter(
         socket.get(), base::ThreadTaskRunnerHandle::Get().get());
-    QuicConnection* connection = new QuicConnection(
-        connection_id_, QuicSocketAddress(QuicSocketAddressImpl(peer_addr_)),
+    quic::QuicConnection* connection = new quic::QuicConnection(
+        connection_id_,
+        quic::QuicSocketAddress(quic::QuicSocketAddressImpl(peer_addr_)),
         helper_.get(), alarm_factory_.get(), writer, true /* owns_writer */,
-        Perspective::IS_CLIENT,
-        SupportedVersions(
-            net::ParsedQuicVersion(net::PROTOCOL_QUIC_CRYPTO, version_)));
+        quic::Perspective::IS_CLIENT,
+        quic::test::SupportedVersions(
+            quic::ParsedQuicVersion(quic::PROTOCOL_QUIC_CRYPTO, version_)));
     connection->set_visitor(&visitor_);
-    QuicConnectionPeer::SetSendAlgorithm(connection, send_algorithm_);
+    quic::test::QuicConnectionPeer::SetSendAlgorithm(connection,
+                                                     send_algorithm_);
 
     // Load a certificate that is valid for *.example.org
     scoped_refptr<X509Certificate> test_cert(
@@ -210,10 +213,11 @@
         base::TimeDelta::FromSeconds(kMaxTimeOnNonDefaultNetworkSecs),
         kMaxMigrationsToNonDefaultNetworkOnPathDegrading,
         kQuicYieldAfterPacketsRead,
-        QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
+        quic::QuicTime::Delta::FromMilliseconds(
+            kQuicYieldAfterDurationMilliseconds),
         client_headers_include_h2_stream_dependency_, /*cert_verify_flags=*/0,
-        DefaultQuicConfig(), &crypto_config_, "CONNECTION_UNKNOWN", dns_start,
-        dns_end, &push_promise_index_, nullptr,
+        quic::test::DefaultQuicConfig(), &crypto_config_, "CONNECTION_UNKNOWN",
+        dns_start, dns_end, &push_promise_index_, nullptr,
         base::ThreadTaskRunnerHandle::Get().get(),
         /*socket_performance_watcher=*/nullptr, net_log_.bound().net_log()));
 
@@ -253,29 +257,29 @@
 
   // Helper functions for constructing packets sent by the client
 
-  std::unique_ptr<QuicReceivedPacket> ConstructSettingsPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructSettingsPacket(
+      quic::QuicPacketNumber packet_number) {
     return client_maker_.MakeInitialSettingsPacket(packet_number,
                                                    &header_stream_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructAckAndRstPacket(
-      QuicPacketNumber packet_number,
-      QuicRstStreamErrorCode error_code,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructAckAndRstPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicRstStreamErrorCode error_code,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckAndRstPacket(
         packet_number, !kIncludeVersion, kClientDataStreamId1, error_code,
         largest_received, smallest_received, least_unacked, kSendFeedback);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructAckAndRstPacket(
-      QuicPacketNumber packet_number,
-      QuicRstStreamErrorCode error_code,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructAckAndRstPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicRstStreamErrorCode error_code,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       size_t bytes_written) {
     return client_maker_.MakeAckAndRstPacket(
         packet_number, !kIncludeVersion, kClientDataStreamId1, error_code,
@@ -283,17 +287,17 @@
         bytes_written);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructRstPacket(
-      QuicPacketNumber packet_number,
-      QuicRstStreamErrorCode error_code,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructRstPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicRstStreamErrorCode error_code,
       size_t bytes_written) {
     return client_maker_.MakeRstPacket(packet_number, !kIncludeVersion,
                                        kClientDataStreamId1, error_code,
                                        bytes_written);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructConnectRequestPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructConnectRequestPacket(
+      quic::QuicPacketNumber packet_number) {
     spdy::SpdyHeaderBlock block;
     PopulateConnectRequestIR(&block);
     return client_maker_.MakeRequestHeadersPacket(
@@ -302,8 +306,8 @@
         nullptr, &header_stream_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructConnectAuthRequestPacket(
-      QuicPacketNumber packet_number) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructConnectAuthRequestPacket(
+      quic::QuicPacketNumber packet_number) {
     spdy::SpdyHeaderBlock block;
     PopulateConnectRequestIR(&block);
     block["proxy-authorization"] = "Basic Zm9vOmJhcg==";
@@ -313,35 +317,35 @@
         nullptr, &header_stream_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructDataPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamOffset offset,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamOffset offset,
       const char* data,
       int length) {
     return client_maker_.MakeDataPacket(packet_number, kClientDataStreamId1,
                                         !kIncludeVersion, !kFin, offset,
-                                        QuicStringPiece(data, length));
+                                        quic::QuicStringPiece(data, length));
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructAckAndDataPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
-      QuicStreamOffset offset,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructAckAndDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
+      quic::QuicStreamOffset offset,
       const char* data,
       int length) {
     return client_maker_.MakeAckAndDataPacket(
         packet_number, !kIncludeVersion, kClientDataStreamId1, largest_received,
         smallest_received, least_unacked, !kFin, offset,
-        QuicStringPiece(data, length));
+        quic::QuicStringPiece(data, length));
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked) {
     return client_maker_.MakeAckPacket(packet_number, largest_received,
                                        smallest_received, least_unacked,
                                        kSendFeedback);
@@ -349,37 +353,37 @@
 
   // Helper functions for constructing packets sent by the server
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerRstPacket(
-      QuicPacketNumber packet_number,
-      QuicRstStreamErrorCode error_code,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerRstPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicRstStreamErrorCode error_code,
       size_t bytes_written) {
     return server_maker_.MakeRstPacket(packet_number, !kIncludeVersion,
                                        kClientDataStreamId1, error_code,
                                        bytes_written);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerDataPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamOffset offset,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamOffset offset,
       const char* data,
       int length) {
     return server_maker_.MakeDataPacket(packet_number, kClientDataStreamId1,
                                         !kIncludeVersion, !kFin, offset,
-                                        QuicStringPiece(data, length));
+                                        quic::QuicStringPiece(data, length));
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerDataFinPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamOffset offset,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerDataFinPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamOffset offset,
       const char* data,
       int length) {
     return server_maker_.MakeDataPacket(packet_number, kClientDataStreamId1,
                                         !kIncludeVersion, kFin, offset,
-                                        QuicStringPiece(data, length));
+                                        quic::QuicStringPiece(data, length));
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerConnectReplyPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructServerConnectReplyPacket(
+      quic::QuicPacketNumber packet_number,
       bool fin) {
     spdy::SpdyHeaderBlock block;
     block[":status"] = "200";
@@ -389,9 +393,9 @@
         std::move(block), nullptr, &response_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerConnectAuthReplyPacket(
-      QuicPacketNumber packet_number,
-      bool fin) {
+  std::unique_ptr<quic::QuicReceivedPacket>
+  ConstructServerConnectAuthReplyPacket(quic::QuicPacketNumber packet_number,
+                                        bool fin) {
     spdy::SpdyHeaderBlock block;
     block[":status"] = "407";
     block["proxy-authenticate"] = "Basic realm=\"MyRealm1\"";
@@ -400,8 +404,9 @@
         std::move(block), nullptr, &response_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerConnectRedirectReplyPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket>
+  ConstructServerConnectRedirectReplyPacket(
+      quic::QuicPacketNumber packet_number,
       bool fin) {
     spdy::SpdyHeaderBlock block;
     block[":status"] = "302";
@@ -412,9 +417,9 @@
         std::move(block), nullptr, &response_offset_);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructServerConnectErrorReplyPacket(
-      QuicPacketNumber packet_number,
-      bool fin) {
+  std::unique_ptr<quic::QuicReceivedPacket>
+  ConstructServerConnectErrorReplyPacket(quic::QuicPacketNumber packet_number,
+                                         bool fin) {
     spdy::SpdyHeaderBlock block;
     block[":status"] = "500";
 
@@ -495,11 +500,11 @@
               spdy::SpdyString(read_buf_->data(), len));
   }
 
-  const QuicTransportVersion version_;
+  const quic::QuicTransportVersion version_;
   const bool client_headers_include_h2_stream_dependency_;
 
   // order of destruction of these members matter
-  MockClock clock_;
+  quic::MockClock clock_;
   MockQuicData mock_quic_data_;
   std::unique_ptr<QuicChromiumConnectionHelper> helper_;
   std::unique_ptr<QuicChromiumClientSession> session_;
@@ -508,24 +513,24 @@
 
   BoundTestNetLog net_log_;
 
-  MockSendAlgorithm* send_algorithm_;
+  quic::test::MockSendAlgorithm* send_algorithm_;
   scoped_refptr<TestTaskRunner> runner_;
 
   std::unique_ptr<QuicChromiumAlarmFactory> alarm_factory_;
-  testing::StrictMock<MockQuicConnectionVisitor> visitor_;
+  testing::StrictMock<quic::test::MockQuicConnectionVisitor> visitor_;
   TransportSecurityState transport_security_state_;
-  QuicCryptoClientConfig crypto_config_;
-  QuicClientPushPromiseIndex push_promise_index_;
+  quic::QuicCryptoClientConfig crypto_config_;
+  quic::QuicClientPushPromiseIndex push_promise_index_;
 
-  const QuicConnectionId connection_id_;
+  const quic::QuicConnectionId connection_id_;
   QuicTestPacketMaker client_maker_;
   QuicTestPacketMaker server_maker_;
   IPEndPoint peer_addr_;
-  MockRandom random_generator_;
+  quic::test::MockRandom random_generator_;
   ProofVerifyDetailsChromium verify_details_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
-  QuicStreamOffset header_stream_offset_;
-  QuicStreamOffset response_offset_;
+  quic::QuicStreamOffset header_stream_offset_;
+  quic::QuicStreamOffset response_offset_;
 
   std::string user_agent_;
   HostPortPair proxy_host_port_;
@@ -548,7 +553,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerConnectReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   Initialize();
 
@@ -568,7 +574,8 @@
                           ConstructServerConnectAuthReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   Initialize();
 
@@ -585,7 +592,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerConnectReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   Initialize();
 
@@ -610,7 +618,8 @@
                           ConstructServerConnectRedirectReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   Initialize();
 
@@ -649,7 +658,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerConnectReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   Initialize();
 
@@ -695,8 +705,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerDataPacket(2, 0, kMsg1, kLen1));
   mock_quic_data_.AddWrite(SYNCHRONOUS, ConstructAckPacket(3, 2, 1, 1));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
-  mock_quic_data_.AddWrite(SYNCHRONOUS,
-                           ConstructRstPacket(4, QUIC_STREAM_CANCELLED, 0));
+  mock_quic_data_.AddWrite(
+      SYNCHRONOUS, ConstructRstPacket(4, quic::QUIC_STREAM_CANCELLED, 0));
 
   Initialize();
 
@@ -726,8 +736,8 @@
                           ConstructServerDataPacket(2, 0, kMsg333, kLen333));
   mock_quic_data_.AddWrite(SYNCHRONOUS, ConstructAckPacket(3, 2, 1, 1));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
-  mock_quic_data_.AddWrite(SYNCHRONOUS,
-                           ConstructRstPacket(4, QUIC_STREAM_CANCELLED, 0));
+  mock_quic_data_.AddWrite(
+      SYNCHRONOUS, ConstructRstPacket(4, quic::QUIC_STREAM_CANCELLED, 0));
 
   Initialize();
 
@@ -765,7 +775,8 @@
   mock_quic_data_.AddWrite(SYNCHRONOUS,
                            ConstructDataPacket(4, kLen1, kMsg2, kLen2));
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructRstPacket(5, QUIC_STREAM_CANCELLED, kLen1 + kLen2));
+      SYNCHRONOUS,
+      ConstructRstPacket(5, quic::QUIC_STREAM_CANCELLED, kLen1 + kLen2));
 
   Initialize();
 
@@ -786,14 +797,14 @@
   // Expect |kNumDataPackets| data packets, each containing the max possible
   // amount of data.
   const int kNumDataPackets = 3;
-  std::string data(kNumDataPackets * kDefaultMaxPacketSize, 'x');
-  QuicStreamOffset offset = kLen1;
+  std::string data(kNumDataPackets * quic::kDefaultMaxPacketSize, 'x');
+  quic::QuicStreamOffset offset = kLen1;
   size_t total_data_length = 0;
   for (int i = 0; i < kNumDataPackets; ++i) {
     size_t max_packet_data_length = GetStreamFrameDataLengthFromPacketLength(
-        kDefaultMaxPacketSize, version_, !kIncludeVersion,
-        !kIncludeDiversificationNonce, PACKET_8BYTE_CONNECTION_ID,
-        PACKET_1BYTE_PACKET_NUMBER, offset);
+        quic::kDefaultMaxPacketSize, version_, !kIncludeVersion,
+        !kIncludeDiversificationNonce, quic::PACKET_8BYTE_CONNECTION_ID,
+        quic::PACKET_1BYTE_PACKET_NUMBER, offset);
     mock_quic_data_.AddWrite(SYNCHRONOUS,
                              ConstructDataPacket(4 + i, offset, data.c_str(),
                                                  max_packet_data_length));
@@ -801,8 +812,8 @@
     total_data_length += max_packet_data_length;
   }
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS,
-      ConstructRstPacket(4 + kNumDataPackets, QUIC_STREAM_CANCELLED, offset));
+      SYNCHRONOUS, ConstructRstPacket(4 + kNumDataPackets,
+                                      quic::QUIC_STREAM_CANCELLED, offset));
 
   Initialize();
 
@@ -829,8 +840,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerDataPacket(2, 0, kMsg1, kLen1));
   mock_quic_data_.AddWrite(SYNCHRONOUS, ConstructAckPacket(3, 2, 1, 1));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
-  mock_quic_data_.AddWrite(SYNCHRONOUS,
-                           ConstructRstPacket(4, QUIC_STREAM_CANCELLED, 0));
+  mock_quic_data_.AddWrite(
+      SYNCHRONOUS, ConstructRstPacket(4, quic::QUIC_STREAM_CANCELLED, 0));
 
   Initialize();
 
@@ -855,7 +866,8 @@
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
 
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(4, QUIC_STREAM_CANCELLED, 3, 3, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(4, quic::QUIC_STREAM_CANCELLED, 3, 3, 1));
 
   Initialize();
 
@@ -881,7 +893,8 @@
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
 
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(4, QUIC_STREAM_CANCELLED, 3, 3, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(4, quic::QUIC_STREAM_CANCELLED, 3, 3, 1));
 
   Initialize();
 
@@ -907,7 +920,8 @@
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
 
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(4, QUIC_STREAM_CANCELLED, 3, 3, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(4, quic::QUIC_STREAM_CANCELLED, 3, 3, 1));
 
   Initialize();
 
@@ -947,7 +961,8 @@
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
 
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(5, QUIC_STREAM_CANCELLED, 5, 5, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(5, quic::QUIC_STREAM_CANCELLED, 5, 5, 1));
 
   Initialize();
 
@@ -976,7 +991,8 @@
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
 
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(4, QUIC_STREAM_CANCELLED, 3, 3, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(4, quic::QUIC_STREAM_CANCELLED, 3, 3, 1));
 
   Initialize();
 
@@ -1003,8 +1019,8 @@
   mock_quic_data_.AddWrite(SYNCHRONOUS, ConstructAckPacket(3, 2, 1, 1));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
 
-  mock_quic_data_.AddWrite(SYNCHRONOUS,
-                           ConstructRstPacket(4, QUIC_STREAM_CANCELLED, 0));
+  mock_quic_data_.AddWrite(
+      SYNCHRONOUS, ConstructRstPacket(4, quic::QUIC_STREAM_CANCELLED, 0));
 
   Initialize();
 
@@ -1039,7 +1055,8 @@
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
 
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(4, QUIC_STREAM_CANCELLED, 3, 3, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(4, quic::QUIC_STREAM_CANCELLED, 3, 3, 1));
 
   Initialize();
 
@@ -1065,7 +1082,8 @@
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
 
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(4, QUIC_STREAM_CANCELLED, 3, 3, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(4, quic::QUIC_STREAM_CANCELLED, 3, 3, 1));
   Initialize();
 
   AssertConnectFails(ERR_TUNNEL_CONNECTION_FAILED);
@@ -1093,7 +1111,7 @@
 
   mock_quic_data_.AddWrite(
       SYNCHRONOUS,
-      ConstructAckAndRstPacket(5, QUIC_STREAM_CANCELLED, 3, 3, 1, kLen2));
+      ConstructAckAndRstPacket(5, quic::QUIC_STREAM_CANCELLED, 3, 3, 1, kLen2));
 
   Initialize();
 
@@ -1136,7 +1154,8 @@
       SYNCHRONOUS, ConstructAckAndDataPacket(5, 3, 3, 1, kLen2, kMsg2, kLen2));
 
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructRstPacket(6, QUIC_STREAM_CANCELLED, kLen2 + kLen2));
+      SYNCHRONOUS,
+      ConstructRstPacket(6, quic::QUIC_STREAM_CANCELLED, kLen2 + kLen2));
 
   Initialize();
 
@@ -1213,7 +1232,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerConnectReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   Initialize();
 
@@ -1237,8 +1257,8 @@
                           ConstructServerDataFinPacket(2, 0, kMsg1, kLen1));
   mock_quic_data_.AddWrite(SYNCHRONOUS, ConstructAckPacket(3, 2, 1, 1));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
-  mock_quic_data_.AddWrite(SYNCHRONOUS,
-                           ConstructRstPacket(4, QUIC_STREAM_CANCELLED, 0));
+  mock_quic_data_.AddWrite(
+      SYNCHRONOUS, ConstructRstPacket(4, quic::QUIC_STREAM_CANCELLED, 0));
 
   Initialize();
 
@@ -1280,7 +1300,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerConnectReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   Initialize();
 
@@ -1317,7 +1338,8 @@
   // Make sure the write actually starts.
   base::RunLoop().RunUntilIdle();
 
-  session_->CloseSessionOnError(ERR_CONNECTION_CLOSED, QUIC_INTERNAL_ERROR);
+  session_->CloseSessionOnError(ERR_CONNECTION_CLOSED,
+                                quic::QUIC_INTERNAL_ERROR);
 
   EXPECT_THAT(write_callback_.WaitForResult(), IsError(ERR_CONNECTION_CLOSED));
 }
@@ -1363,7 +1385,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerConnectReplyPacket(1, !kFin));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS, ConstructAckAndRstPacket(3, QUIC_STREAM_CANCELLED, 1, 1, 1));
+      SYNCHRONOUS,
+      ConstructAckAndRstPacket(3, quic::QUIC_STREAM_CANCELLED, 1, 1, 1));
 
   Initialize();
 
@@ -1391,13 +1414,13 @@
   mock_quic_data_.AddRead(ASYNC, ERR_IO_PENDING);  // Pause
 
   mock_quic_data_.AddRead(
-      ASYNC, ConstructServerRstPacket(2, QUIC_STREAM_CANCELLED, 0));
+      ASYNC, ConstructServerRstPacket(2, quic::QUIC_STREAM_CANCELLED, 0));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
       ASYNC, ConstructAckAndDataPacket(3, 1, 1, 1, 0, kMsg2, kLen2));
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS,
-      ConstructAckAndRstPacket(4, QUIC_RST_ACKNOWLEDGEMENT, 2, 2, 1, kLen2));
+      SYNCHRONOUS, ConstructAckAndRstPacket(4, quic::QUIC_RST_ACKNOWLEDGEMENT,
+                                            2, 2, 1, kLen2));
 
   Initialize();
 
@@ -1432,8 +1455,8 @@
   mock_quic_data_.AddRead(ASYNC, ConstructServerDataPacket(2, 0, kMsg1, kLen1));
   mock_quic_data_.AddWrite(SYNCHRONOUS, ConstructAckPacket(3, 2, 1, 1));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
-  mock_quic_data_.AddWrite(SYNCHRONOUS,
-                           ConstructRstPacket(4, QUIC_STREAM_CANCELLED, 0));
+  mock_quic_data_.AddWrite(
+      SYNCHRONOUS, ConstructRstPacket(4, quic::QUIC_STREAM_CANCELLED, 0));
 
   Initialize();
 
@@ -1511,13 +1534,13 @@
   mock_quic_data_.AddRead(ASYNC, ERR_IO_PENDING);  // Pause
 
   mock_quic_data_.AddRead(
-      ASYNC, ConstructServerRstPacket(2, QUIC_STREAM_CANCELLED, 0));
+      ASYNC, ConstructServerRstPacket(2, quic::QUIC_STREAM_CANCELLED, 0));
   mock_quic_data_.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   mock_quic_data_.AddWrite(
       ASYNC, ConstructAckAndDataPacket(3, 1, 1, 1, 0, kMsg1, kLen1));
   mock_quic_data_.AddWrite(
-      SYNCHRONOUS,
-      ConstructAckAndRstPacket(4, QUIC_RST_ACKNOWLEDGEMENT, 2, 2, 1, kLen1));
+      SYNCHRONOUS, ConstructAckAndRstPacket(4, quic::QUIC_RST_ACKNOWLEDGEMENT,
+                                            2, 2, 1, kLen1));
 
   Initialize();
 
@@ -1548,8 +1571,9 @@
 INSTANTIATE_TEST_CASE_P(
     VersionIncludeStreamDependencySequence,
     QuicProxyClientSocketTest,
-    ::testing::Combine(::testing::ValuesIn(AllSupportedTransportVersions()),
-                       ::testing::Bool()));
+    ::testing::Combine(
+        ::testing::ValuesIn(quic::AllSupportedTransportVersions()),
+        ::testing::Bool()));
 
 }  // namespace test
 }  // namespace net
diff --git a/net/quic/chromium/quic_server_info.cc b/net/quic/chromium/quic_server_info.cc
index 021cdee4..4b6bcbd 100644
--- a/net/quic/chromium/quic_server_info.cc
+++ b/net/quic/chromium/quic_server_info.cc
@@ -32,7 +32,7 @@
   base::STLClearObject(&certs);
 }
 
-QuicServerInfo::QuicServerInfo(const QuicServerId& server_id)
+QuicServerInfo::QuicServerInfo(const quic::QuicServerId& server_id)
     : server_id_(server_id) {}
 
 QuicServerInfo::~QuicServerInfo() {}
diff --git a/net/quic/chromium/quic_server_info.h b/net/quic/chromium/quic_server_info.h
index f17553a3..dd4fadd 100644
--- a/net/quic/chromium/quic_server_info.h
+++ b/net/quic/chromium/quic_server_info.h
@@ -42,7 +42,7 @@
     NUM_OF_FAILURES = 12,
   };
 
-  explicit QuicServerInfo(const QuicServerId& server_id);
+  explicit QuicServerInfo(const quic::QuicServerId& server_id);
   virtual ~QuicServerInfo();
 
   // Fetches the server config from the backing store, and returns true
@@ -90,7 +90,7 @@
 
   // This is the QUIC server (hostname, port, is_https, privacy_mode) tuple for
   // which we restore the crypto_config.
-  const QuicServerId server_id_;
+  const quic::QuicServerId server_id_;
 
  private:
   // ParseInner is a helper function for Parse.
diff --git a/net/quic/chromium/quic_session_key.cc b/net/quic/chromium/quic_session_key.cc
index 3018cee..dc3fc19 100644
--- a/net/quic/chromium/quic_session_key.cc
+++ b/net/quic/chromium/quic_session_key.cc
@@ -9,15 +9,17 @@
 QuicSessionKey::QuicSessionKey(const HostPortPair& host_port_pair,
                                PrivacyMode privacy_mode,
                                const SocketTag& socket_tag)
-    : QuicSessionKey(QuicServerId(host_port_pair, privacy_mode), socket_tag) {}
+    : QuicSessionKey(quic::QuicServerId(host_port_pair, privacy_mode),
+                     socket_tag) {}
 
 QuicSessionKey::QuicSessionKey(const std::string& host,
                                uint16_t port,
                                PrivacyMode privacy_mode,
                                const SocketTag& socket_tag)
-    : QuicSessionKey(QuicServerId(host, port, privacy_mode), socket_tag) {}
+    : QuicSessionKey(quic::QuicServerId(host, port, privacy_mode), socket_tag) {
+}
 
-QuicSessionKey::QuicSessionKey(const QuicServerId& server_id,
+QuicSessionKey::QuicSessionKey(const quic::QuicServerId& server_id,
                                const SocketTag& socket_tag)
     : server_id_(server_id), socket_tag_(socket_tag) {}
 
diff --git a/net/quic/chromium/quic_session_key.h b/net/quic/chromium/quic_session_key.h
index 318843671..c2628804 100644
--- a/net/quic/chromium/quic_session_key.h
+++ b/net/quic/chromium/quic_session_key.h
@@ -10,7 +10,8 @@
 
 namespace net {
 
-// The key used to identify sessions. Includes the QuicServerId and socket tag.
+// The key used to identify sessions. Includes the quic::QuicServerId and socket
+// tag.
 class QUIC_EXPORT_PRIVATE QuicSessionKey {
  public:
   QuicSessionKey() = default;
@@ -21,7 +22,8 @@
                  uint16_t port,
                  PrivacyMode privacy_mode,
                  const SocketTag& socket_tag);
-  QuicSessionKey(const QuicServerId& server_id, const SocketTag& socket_tag);
+  QuicSessionKey(const quic::QuicServerId& server_id,
+                 const SocketTag& socket_tag);
   ~QuicSessionKey() = default;
 
   // Needed to be an element of std::set.
@@ -32,14 +34,14 @@
 
   PrivacyMode privacy_mode() const { return server_id_.privacy_mode(); }
 
-  const QuicServerId& server_id() const { return server_id_; }
+  const quic::QuicServerId& server_id() const { return server_id_; }
 
   SocketTag socket_tag() const { return socket_tag_; }
 
   size_t EstimateMemoryUsage() const;
 
  private:
-  QuicServerId server_id_;
+  quic::QuicServerId server_id_;
   SocketTag socket_tag_;
 };
 
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc
index 267f460..ad9707c 100644
--- a/net/quic/chromium/quic_stream_factory.cc
+++ b/net/quic/chromium/quic_stream_factory.cc
@@ -104,7 +104,7 @@
 const int32_t kMaxUndecryptablePackets = 100;
 
 std::unique_ptr<base::Value> NetLogQuicStreamFactoryJobCallback(
-    const QuicServerId* server_id,
+    const quic::QuicServerId* server_id,
     NetLogCaptureMode capture_mode) {
   std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
   dict->SetString("server_id", server_id->ToString());
@@ -154,41 +154,44 @@
 
 void SetInitialRttEstimate(base::TimeDelta estimate,
                            enum InitialRttEstimateSource source,
-                           QuicConfig* config) {
+                           quic::QuicConfig* config) {
   UMA_HISTOGRAM_ENUMERATION("Net.QuicSession.InitialRttEsitmateSource", source,
                             INITIAL_RTT_SOURCE_MAX);
   if (estimate != base::TimeDelta())
     config->SetInitialRoundTripTimeUsToSend(estimate.InMicroseconds());
 }
 
-QuicConfig InitializeQuicConfig(
-    const QuicTagVector& connection_options,
-    const QuicTagVector& client_connection_options,
+quic::QuicConfig InitializeQuicConfig(
+    const quic::QuicTagVector& connection_options,
+    const quic::QuicTagVector& client_connection_options,
     int idle_connection_timeout_seconds,
     int max_time_before_crypto_handshake_seconds,
     int max_idle_time_before_crypto_handshake_seconds) {
   DCHECK_GT(idle_connection_timeout_seconds, 0);
-  QuicConfig config;
+  quic::QuicConfig config;
   config.SetIdleNetworkTimeout(
-      QuicTime::Delta::FromSeconds(idle_connection_timeout_seconds),
-      QuicTime::Delta::FromSeconds(idle_connection_timeout_seconds));
+      quic::QuicTime::Delta::FromSeconds(idle_connection_timeout_seconds),
+      quic::QuicTime::Delta::FromSeconds(idle_connection_timeout_seconds));
   config.set_max_time_before_crypto_handshake(
-      QuicTime::Delta::FromSeconds(max_time_before_crypto_handshake_seconds));
-  config.set_max_idle_time_before_crypto_handshake(QuicTime::Delta::FromSeconds(
-      max_idle_time_before_crypto_handshake_seconds));
+      quic::QuicTime::Delta::FromSeconds(
+          max_time_before_crypto_handshake_seconds));
+  config.set_max_idle_time_before_crypto_handshake(
+      quic::QuicTime::Delta::FromSeconds(
+          max_idle_time_before_crypto_handshake_seconds));
   config.SetConnectionOptionsToSend(connection_options);
   config.SetClientConnectionOptions(client_connection_options);
   return config;
 }
 
-// An implementation of QuicCryptoClientConfig::ServerIdFilter that wraps
+// An implementation of quic::QuicCryptoClientConfig::ServerIdFilter that wraps
 // an |origin_filter|.
-class ServerIdOriginFilter : public QuicCryptoClientConfig::ServerIdFilter {
+class ServerIdOriginFilter
+    : public quic::QuicCryptoClientConfig::ServerIdFilter {
  public:
   ServerIdOriginFilter(const base::Callback<bool(const GURL&)> origin_filter)
       : origin_filter_(origin_filter) {}
 
-  bool Matches(const QuicServerId& server_id) const override {
+  bool Matches(const quic::QuicServerId& server_id) const override {
     if (origin_filter_.is_null())
       return true;
 
@@ -204,21 +207,21 @@
 };
 
 // Returns the estimate of dynamically allocated memory of |server_id|.
-size_t EstimateServerIdMemoryUsage(const QuicServerId& server_id) {
+size_t EstimateServerIdMemoryUsage(const quic::QuicServerId& server_id) {
   return base::trace_event::EstimateMemoryUsage(server_id.host_port_pair());
 }
 
 }  // namespace
 
 // Responsible for verifying the certificates saved in
-// QuicCryptoClientConfig, and for notifying any associated requests when
+// quic::QuicCryptoClientConfig, and for notifying any associated requests when
 // complete. Results from cert verification are ignored.
 class QuicStreamFactory::CertVerifierJob {
  public:
   // ProofVerifierCallbackImpl is passed as the callback method to
-  // VerifyCertChain. The ProofVerifier calls this class with the result of cert
-  // verification when verification is performed asynchronously.
-  class ProofVerifierCallbackImpl : public ProofVerifierCallback {
+  // VerifyCertChain. The quic::ProofVerifier calls this class with the result
+  // of cert verification when verification is performed asynchronously.
+  class ProofVerifierCallbackImpl : public quic::ProofVerifierCallback {
    public:
     explicit ProofVerifierCallbackImpl(CertVerifierJob* job) : job_(job) {}
 
@@ -226,7 +229,7 @@
 
     void Run(bool ok,
              const std::string& error_details,
-             std::unique_ptr<ProofVerifyDetails>* details) override {
+             std::unique_ptr<quic::ProofVerifyDetails>* details) override {
       if (job_ == nullptr)
         return;
       job_->verify_callback_ = nullptr;
@@ -239,7 +242,7 @@
     CertVerifierJob* job_;
   };
 
-  CertVerifierJob(const QuicServerId& server_id,
+  CertVerifierJob(const quic::QuicServerId& server_id,
                   int cert_verify_flags,
                   const NetLogWithSource& net_log)
       : server_id_(server_id),
@@ -257,18 +260,19 @@
   }
 
   // Starts verification of certs cached in the |crypto_config|.
-  QuicAsyncStatus Run(QuicCryptoClientConfig* crypto_config,
-                      const CompletionCallback& callback) {
-    QuicCryptoClientConfig::CachedState* cached =
+  quic::QuicAsyncStatus Run(quic::QuicCryptoClientConfig* crypto_config,
+                            const CompletionCallback& callback) {
+    quic::QuicCryptoClientConfig::CachedState* cached =
         crypto_config->LookupOrCreate(server_id_);
-    ProofVerifierCallbackImpl* verify_callback =
-        new ProofVerifierCallbackImpl(this);
-    QuicAsyncStatus status = crypto_config->proof_verifier()->VerifyCertChain(
-        server_id_.host(), cached->certs(), verify_context_.get(),
-        &verify_error_details_, &verify_details_,
-        std::unique_ptr<ProofVerifierCallback>(verify_callback));
-    if (status == QUIC_PENDING) {
-      verify_callback_ = verify_callback;
+    auto verify_callback = std::make_unique<ProofVerifierCallbackImpl>(this);
+    auto* verify_callback_ptr = verify_callback.get();
+    quic::QuicAsyncStatus status =
+        crypto_config->proof_verifier()->VerifyCertChain(
+            server_id_.host(), cached->certs(), verify_context_.get(),
+            &verify_error_details_, &verify_details_,
+            std::move(verify_callback));
+    if (status == quic::QUIC_PENDING) {
+      verify_callback_ = verify_callback_ptr;
       callback_ = callback;
     }
     return status;
@@ -281,7 +285,7 @@
       base::ResetAndReturn(&callback_).Run(OK);
   }
 
-  const QuicServerId& server_id() const { return server_id_; }
+  const quic::QuicServerId& server_id() const { return server_id_; }
 
   size_t EstimateMemoryUsage() const {
     // TODO(xunjieli): crbug.com/669108. Track |verify_context_| and
@@ -290,10 +294,10 @@
   }
 
  private:
-  const QuicServerId server_id_;
+  const quic::QuicServerId server_id_;
   ProofVerifierCallbackImpl* verify_callback_;
-  std::unique_ptr<ProofVerifyContext> verify_context_;
-  std::unique_ptr<ProofVerifyDetails> verify_details_;
+  std::unique_ptr<quic::ProofVerifyContext> verify_context_;
+  std::unique_ptr<quic::ProofVerifyDetails> verify_details_;
   std::string verify_error_details_;
   const base::TimeTicks start_time_;
   const NetLogWithSource net_log_;
@@ -308,7 +312,7 @@
 class QuicStreamFactory::Job {
  public:
   Job(QuicStreamFactory* factory,
-      const QuicTransportVersion& quic_version,
+      const quic::QuicTransportVersion& quic_version,
       HostResolver* host_resolver,
       const QuicSessionAliasKey& key,
       bool was_alternative_service_recently_broken,
@@ -376,7 +380,7 @@
 
   IoState io_state_;
   QuicStreamFactory* factory_;
-  QuicTransportVersion quic_version_;
+  quic::QuicTransportVersion quic_version_;
   HostResolver* host_resolver_;
   std::unique_ptr<HostResolver::Request> request_;
   const QuicSessionAliasKey key_;
@@ -398,7 +402,7 @@
 };
 
 QuicStreamFactory::Job::Job(QuicStreamFactory* factory,
-                            const QuicTransportVersion& quic_version,
+                            const quic::QuicTransportVersion& quic_version,
                             HostResolver* host_resolver,
                             const QuicSessionAliasKey& key,
                             bool was_alternative_service_recently_broken,
@@ -546,7 +550,7 @@
       NetLogEventType::QUIC_STREAM_FACTORY_JOB_CONNECT,
       NetLog::BoolCallback("require_confirmation", require_confirmation));
 
-  DCHECK_NE(quic_version_, QUIC_VERSION_UNSUPPORTED);
+  DCHECK_NE(quic_version_, quic::QUIC_VERSION_UNSUPPORTED);
   int rv = factory_->CreateSession(
       key_, quic_version_, cert_verify_flags_, require_confirmation,
       address_list_, dns_resolution_start_time_, dns_resolution_end_time_,
@@ -568,7 +572,7 @@
       base::Bind(&QuicStreamFactory::Job::OnConnectComplete, GetWeakPtr()));
 
   if (!session_->connection()->connected() &&
-      session_->error() == QUIC_PROOF_INVALID) {
+      session_->error() == quic::QUIC_PROOF_INVALID) {
     return ERR_QUIC_HANDSHAKE_FAILED;
   }
 
@@ -582,9 +586,11 @@
 
 int QuicStreamFactory::Job::DoConfirmConnection(int rv) {
   net_log_.EndEvent(NetLogEventType::QUIC_STREAM_FACTORY_JOB_CONNECT);
-  if (session_ && session_->error() == QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT) {
+  if (session_ &&
+      session_->error() == quic::QUIC_CRYPTO_HANDSHAKE_STATELESS_REJECT) {
     num_sent_client_hellos_ += session_->GetNumSentClientHellos();
-    if (num_sent_client_hellos_ >= QuicCryptoClientStream::kMaxClientHellos)
+    if (num_sent_client_hellos_ >=
+        quic::QuicCryptoClientStream::kMaxClientHellos)
       return ERR_QUIC_HANDSHAKE_FAILED;
     // The handshake was rejected statelessly, so create another connection
     // to resume the handshake.
@@ -605,8 +611,9 @@
       session_->connection()->peer_address().impl().socket_address());
   if (factory_->HasMatchingIpSession(key_, address)) {
     session_->connection()->CloseConnection(
-        QUIC_CONNECTION_IP_POOLED, "An active session exists for the given IP.",
-        ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
+        quic::QUIC_CONNECTION_IP_POOLED,
+        "An active session exists for the given IP.",
+        quic::ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
     session_ = nullptr;
     return OK;
   }
@@ -625,7 +632,7 @@
 }
 
 int QuicStreamRequest::Request(const HostPortPair& destination,
-                               QuicTransportVersion quic_version,
+                               quic::QuicTransportVersion quic_version,
                                PrivacyMode privacy_mode,
                                RequestPriority priority,
                                const SocketTag& socket_tag,
@@ -634,7 +641,7 @@
                                const NetLogWithSource& net_log,
                                NetErrorDetails* net_error_details,
                                const CompletionCallback& callback) {
-  DCHECK_NE(quic_version, QUIC_VERSION_UNSUPPORTED);
+  DCHECK_NE(quic_version, quic::QUIC_VERSION_UNSUPPORTED);
   DCHECK(net_error_details);
   DCHECK(callback_.is_null());
   DCHECK(host_resolution_callback_.is_null());
@@ -717,8 +724,8 @@
     CTVerifier* cert_transparency_verifier,
     SocketPerformanceWatcherFactory* socket_performance_watcher_factory,
     QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory,
-    QuicRandom* random_generator,
-    QuicClock* clock,
+    quic::QuicRandom* random_generator,
+    quic::QuicClock* clock,
     size_t max_packet_length,
     const std::string& user_agent_id,
     bool store_server_configs_in_properties,
@@ -738,8 +745,8 @@
     bool race_cert_verification,
     bool estimate_initial_rtt,
     bool headers_include_h2_stream_dependency,
-    const QuicTagVector& connection_options,
-    const QuicTagVector& client_connection_options,
+    const quic::QuicTagVector& connection_options,
+    const quic::QuicTagVector& client_connection_options,
     bool enable_token_binding,
     bool enable_channel_id,
     bool enable_socket_recv_optimization)
@@ -768,15 +775,15 @@
                                                   ct_policy_enforcer,
                                                   transport_security_state,
                                                   cert_transparency_verifier),
-          TlsClientHandshaker::CreateSslCtx()),
+          quic::TlsClientHandshaker::CreateSslCtx()),
       mark_quic_broken_when_network_blackholes_(
           mark_quic_broken_when_network_blackholes),
       store_server_configs_in_properties_(store_server_configs_in_properties),
-      ping_timeout_(QuicTime::Delta::FromSeconds(kPingTimeoutSecs)),
+      ping_timeout_(quic::QuicTime::Delta::FromSeconds(quic::kPingTimeoutSecs)),
       reduced_ping_timeout_(
-          QuicTime::Delta::FromSeconds(reduced_ping_timeout_seconds)),
+          quic::QuicTime::Delta::FromSeconds(reduced_ping_timeout_seconds)),
       yield_after_packets_(kQuicYieldAfterPacketsRead),
-      yield_after_duration_(QuicTime::Delta::FromMilliseconds(
+      yield_after_duration_(quic::QuicTime::Delta::FromMilliseconds(
           kQuicYieldAfterDurationMilliseconds)),
       close_sessions_on_ip_change_(close_sessions_on_ip_change),
       migrate_sessions_on_network_change_v2_(
@@ -822,7 +829,7 @@
         new ChannelIDSourceChromium(channel_id_service));
   }
   if (enable_token_binding && channel_id_service)
-    crypto_config_.tb_key_params.push_back(kTB10);
+    crypto_config_.tb_key_params.push_back(quic::kTB10);
   crypto::EnsureOpenSSLInit();
   bool has_aes_hardware_support = !!EVP_has_aes_hardware();
   UMA_HISTOGRAM_BOOLEAN("Net.QuicSession.PreferAesGcm",
@@ -857,7 +864,7 @@
 QuicStreamFactory::~QuicStreamFactory() {
   UMA_HISTOGRAM_COUNTS_1000("Net.NumQuicSessionsAtShutdown",
                             all_sessions_.size());
-  CloseAllSessions(ERR_ABORTED, QUIC_CONNECTION_CANCELLED);
+  CloseAllSessions(ERR_ABORTED, quic::QUIC_CONNECTION_CANCELLED);
   while (!all_sessions_.empty()) {
     delete all_sessions_.begin()->first;
     all_sessions_.erase(all_sessions_.begin());
@@ -884,7 +891,7 @@
 }
 
 base::TimeDelta QuicStreamFactory::GetTimeDelayForWaitingJob(
-    const QuicServerId& server_id) {
+    const quic::QuicServerId& server_id) {
   if (require_confirmation_) {
     IPAddress last_address;
     if (!need_to_check_persisted_supports_quic_ ||
@@ -897,7 +904,7 @@
       1.5 * GetServerNetworkStatsSmoothedRttInMicroseconds(server_id);
   // Picked 300ms based on mean time from
   // Net.QuicSession.HostResolution.HandshakeConfirmedTime histogram.
-  const int kDefaultRTT = 300 * kNumMicrosPerMilli;
+  const int kDefaultRTT = 300 * quic::kNumMicrosPerMilli;
   if (!srtt)
     srtt = kDefaultRTT;
   return base::TimeDelta::FromMicroseconds(srtt);
@@ -964,7 +971,7 @@
 
 int QuicStreamFactory::Create(const QuicSessionKey& session_key,
                               const HostPortPair& destination,
-                              QuicTransportVersion quic_version,
+                              quic::QuicTransportVersion quic_version,
                               RequestPriority priority,
                               int cert_verify_flags,
                               const GURL& url,
@@ -977,7 +984,7 @@
   DCHECK(session_key.server_id().host_port_pair().Equals(
       HostPortPair::FromURL(url)));
   // Enforce session affinity for promised streams.
-  QuicClientPromisedInfo* promised =
+  quic::QuicClientPromisedInfo* promised =
       push_promise_index_.GetPromised(url.spec());
   if (promised) {
     QuicChromiumClientSession* session =
@@ -1096,7 +1103,7 @@
 
 bool QuicStreamFactory::HasMatchingIpSession(const QuicSessionAliasKey& key,
                                              const AddressList& address_list) {
-  const QuicServerId& server_id(key.server_id());
+  const quic::QuicServerId& server_id(key.server_id());
   DCHECK(!HasActiveSession(key.session_key()));
   for (const IPEndPoint& address : address_list) {
     if (!base::ContainsKey(ip_aliases_, address))
@@ -1209,7 +1216,8 @@
   job_iter->second->RemoveRequest(request);
 }
 
-void QuicStreamFactory::CloseAllSessions(int error, QuicErrorCode quic_error) {
+void QuicStreamFactory::CloseAllSessions(int error,
+                                         quic::QuicErrorCode quic_error) {
   base::UmaHistogramSparse("Net.QuicSession.CloseAllSessionsError", -error);
   while (!active_sessions_.empty()) {
     size_t initial_size = active_sessions_.size();
@@ -1230,7 +1238,7 @@
 
   for (SessionMap::const_iterator it = active_sessions_.begin();
        it != active_sessions_.end(); ++it) {
-    const QuicServerId& server_id = it->first.server_id();
+    const quic::QuicServerId& server_id = it->first.server_id();
     QuicChromiumClientSession* session = it->second;
     const AliasSet& aliases = session_aliases_.find(session)->second;
     // Only add a session to the list once.
@@ -1258,7 +1266,7 @@
   if (migrate_sessions_on_network_change_ ||
       migrate_sessions_on_network_change_v2_)
     return;
-  CloseAllSessions(ERR_NETWORK_CHANGED, QUIC_IP_ADDRESS_CHANGED);
+  CloseAllSessions(ERR_NETWORK_CHANGED, quic::QUIC_IP_ADDRESS_CHANGED);
   set_require_confirmation(true);
 }
 
@@ -1352,7 +1360,7 @@
 }
 
 void QuicStreamFactory::OnSSLConfigChanged() {
-  CloseAllSessions(ERR_CERT_DATABASE_CHANGED, QUIC_CONNECTION_CANCELLED);
+  CloseAllSessions(ERR_CERT_DATABASE_CHANGED, quic::QUIC_CONNECTION_CANCELLED);
 }
 
 void QuicStreamFactory::OnCertDBChanged() {
@@ -1381,7 +1389,7 @@
 }
 
 bool QuicStreamFactory::HasActiveCertVerifierJob(
-    const QuicServerId& server_id) const {
+    const quic::QuicServerId& server_id) const {
   return base::ContainsKey(active_cert_verifier_jobs_, server_id);
 }
 
@@ -1426,7 +1434,7 @@
   // Set a buffer large enough to contain the initial CWND's worth of packet
   // to work around the problem with CHLO packets being sent out with the
   // wrong encryption level, when the send buffer is full.
-  rv = socket->SetSendBufferSize(kMaxPacketSize * 20);
+  rv = socket->SetSendBufferSize(quic::kMaxPacketSize * 20);
   if (rv != OK) {
     HistogramCreateSessionFailure(CREATION_ERROR_SETTING_SEND_BUFFER);
     return rv;
@@ -1449,18 +1457,19 @@
   return OK;
 }
 
-int QuicStreamFactory::CreateSession(const QuicSessionAliasKey& key,
-                                     const QuicTransportVersion& quic_version,
-                                     int cert_verify_flags,
-                                     bool require_confirmation,
-                                     const AddressList& address_list,
-                                     base::TimeTicks dns_resolution_start_time,
-                                     base::TimeTicks dns_resolution_end_time,
-                                     const NetLogWithSource& net_log,
-                                     QuicChromiumClientSession** session) {
+int QuicStreamFactory::CreateSession(
+    const QuicSessionAliasKey& key,
+    const quic::QuicTransportVersion& quic_version,
+    int cert_verify_flags,
+    bool require_confirmation,
+    const AddressList& address_list,
+    base::TimeTicks dns_resolution_start_time,
+    base::TimeTicks dns_resolution_end_time,
+    const NetLogWithSource& net_log,
+    QuicChromiumClientSession** session) {
   TRACE_EVENT0(kNetTracingCategory, "QuicStreamFactory::CreateSession");
   IPEndPoint addr = *address_list.begin();
-  const QuicServerId& server_id = key.server_id();
+  const quic::QuicServerId& server_id = key.server_id();
   std::unique_ptr<DatagramClientSocket> socket(
       CreateSocket(net_log.net_log(), net_log.source()));
 
@@ -1492,7 +1501,7 @@
         base::ThreadTaskRunnerHandle::Get().get(), clock_));
   }
 
-  QuicConnectionId connection_id = random_generator_->RandUint64();
+  quic::QuicConnectionId connection_id = random_generator_->RandUint64();
   std::unique_ptr<QuicServerInfo> server_info;
   if (store_server_configs_in_properties_) {
     server_info = std::make_unique<PropertiesBasedQuicServerInfo>(
@@ -1502,16 +1511,16 @@
 
   QuicChromiumPacketWriter* writer =
       new QuicChromiumPacketWriter(socket.get(), task_runner_);
-  QuicConnection* connection = new QuicConnection(
-      connection_id, QuicSocketAddress(QuicSocketAddressImpl(addr)),
+  quic::QuicConnection* connection = new quic::QuicConnection(
+      connection_id, quic::QuicSocketAddress(quic::QuicSocketAddressImpl(addr)),
       helper_.get(), alarm_factory_.get(), writer, true /* owns_writer */,
-      Perspective::IS_CLIENT,
-      ParsedQuicVersionVector{
-          ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, quic_version)});
+      quic::Perspective::IS_CLIENT,
+      quic::ParsedQuicVersionVector{
+          quic::ParsedQuicVersion(quic::PROTOCOL_QUIC_CRYPTO, quic_version)});
   connection->set_ping_timeout(ping_timeout_);
   connection->SetMaxPacketLength(max_packet_length_);
 
-  QuicConfig config = config_;
+  quic::QuicConfig config = config_;
   config.set_max_undecryptable_packets(kMaxUndecryptablePackets);
   config.SetInitialSessionFlowControlWindowToSend(
       kQuicSessionMaxRecvWindowSize);
@@ -1578,8 +1587,8 @@
 }
 
 void QuicStreamFactory::ConfigureInitialRttEstimate(
-    const QuicServerId& server_id,
-    QuicConfig* config) {
+    const quic::QuicServerId& server_id,
+    quic::QuicConfig* config) {
   const base::TimeDelta* srtt = GetServerNetworkStatsSmoothedRtt(server_id);
   if (srtt != nullptr) {
     SetInitialRttEstimate(*srtt, INITIAL_RTT_CACHED, config);
@@ -1604,7 +1613,7 @@
 }
 
 const base::TimeDelta* QuicStreamFactory::GetServerNetworkStatsSmoothedRtt(
-    const QuicServerId& server_id) const {
+    const quic::QuicServerId& server_id) const {
   url::SchemeHostPort server("https", server_id.host_port_pair().host(),
                              server_id.host_port_pair().port());
   const ServerNetworkStats* stats =
@@ -1615,13 +1624,13 @@
 }
 
 int64_t QuicStreamFactory::GetServerNetworkStatsSmoothedRttInMicroseconds(
-    const QuicServerId& server_id) const {
+    const quic::QuicServerId& server_id) const {
   const base::TimeDelta* srtt = GetServerNetworkStatsSmoothedRtt(server_id);
   return srtt == nullptr ? 0 : srtt->InMicroseconds();
 }
 
 bool QuicStreamFactory::WasQuicRecentlyBroken(
-    const QuicServerId& server_id) const {
+    const quic::QuicServerId& server_id) const {
   const AlternativeService alternative_service(kProtoQUIC,
                                                server_id.host_port_pair());
   return http_server_properties_->WasAlternativeServiceRecentlyBroken(
@@ -1629,40 +1638,40 @@
 }
 
 bool QuicStreamFactory::CryptoConfigCacheIsEmpty(
-    const QuicServerId& server_id) {
-  QuicCryptoClientConfig::CachedState* cached =
+    const quic::QuicServerId& server_id) {
+  quic::QuicCryptoClientConfig::CachedState* cached =
       crypto_config_.LookupOrCreate(server_id);
   return cached->IsEmpty();
 }
 
-QuicAsyncStatus QuicStreamFactory::StartCertVerifyJob(
-    const QuicServerId& server_id,
+quic::QuicAsyncStatus QuicStreamFactory::StartCertVerifyJob(
+    const quic::QuicServerId& server_id,
     int cert_verify_flags,
     const NetLogWithSource& net_log) {
   if (!race_cert_verification_)
-    return QUIC_FAILURE;
-  QuicCryptoClientConfig::CachedState* cached =
+    return quic::QUIC_FAILURE;
+  quic::QuicCryptoClientConfig::CachedState* cached =
       crypto_config_.LookupOrCreate(server_id);
   if (!cached || cached->certs().empty() ||
       HasActiveCertVerifierJob(server_id)) {
-    return QUIC_FAILURE;
+    return quic::QUIC_FAILURE;
   }
   std::unique_ptr<CertVerifierJob> cert_verifier_job(
       new CertVerifierJob(server_id, cert_verify_flags, net_log));
-  QuicAsyncStatus status = cert_verifier_job->Run(
+  quic::QuicAsyncStatus status = cert_verifier_job->Run(
       &crypto_config_,
       base::Bind(&QuicStreamFactory::OnCertVerifyJobComplete,
                  base::Unretained(this), cert_verifier_job.get()));
-  if (status == QUIC_PENDING)
+  if (status == quic::QUIC_PENDING)
     active_cert_verifier_jobs_[server_id] = std::move(cert_verifier_job);
   return status;
 }
 
 void QuicStreamFactory::InitializeCachedStateInCryptoConfig(
-    const QuicServerId& server_id,
+    const quic::QuicServerId& server_id,
     const std::unique_ptr<QuicServerInfo>& server_info,
-    QuicConnectionId* connection_id) {
-  QuicCryptoClientConfig::CachedState* cached =
+    quic::QuicConnectionId* connection_id) {
+  quic::QuicCryptoClientConfig::CachedState* cached =
       crypto_config_.LookupOrCreate(server_id);
   if (cached->has_server_designated_connection_id())
     *connection_id = cached->GetNextServerDesignatedConnectionId();
@@ -1678,17 +1687,17 @@
                      server_info->state().certs, server_info->state().cert_sct,
                      server_info->state().chlo_hash,
                      server_info->state().server_config_sig, clock_->WallNow(),
-                     QuicWallTime::Zero());
+                     quic::QuicWallTime::Zero());
 }
 
 void QuicStreamFactory::ProcessGoingAwaySession(
     QuicChromiumClientSession* session,
-    const QuicServerId& server_id,
+    const quic::QuicServerId& server_id,
     bool session_was_active) {
   if (!http_server_properties_)
     return;
 
-  const QuicConnectionStats& stats = session->connection()->GetStats();
+  const quic::QuicConnectionStats& stats = session->connection()->GetStats();
   const AlternativeService alternative_service(kProtoQUIC,
                                                server_id.host_port_pair());
   url::SchemeHostPort server("https", server_id.host_port_pair().host(),
diff --git a/net/quic/chromium/quic_stream_factory.h b/net/quic/chromium/quic_stream_factory.h
index 2cdce3e..f42c38ca 100644
--- a/net/quic/chromium/quic_stream_factory.h
+++ b/net/quic/chromium/quic_stream_factory.h
@@ -59,11 +59,20 @@
 class HostResolver;
 class HttpServerProperties;
 class NetLog;
+}  // namespace net
+namespace quic {
 class QuicClock;
+
 class QuicAlarmFactory;
+}  // namespace quic
+namespace net {
 class QuicChromiumConnectionHelper;
 class QuicCryptoClientStreamFactory;
+}  // namespace net
+namespace quic {
 class QuicRandom;
+}  // namespace quic
+namespace net {
 class QuicServerInfo;
 class QuicStreamFactory;
 class SocketPerformanceWatcherFactory;
@@ -105,9 +114,10 @@
   // |cert_verify_flags| is bitwise OR'd of CertVerifier::VerifyFlags and it is
   // passed to CertVerifier::Verify.
   // |destination| will be resolved and resulting IPEndPoint used to open a
-  // QuicConnection.  This can be different than HostPortPair::FromURL(url).
+  // quic::QuicConnection.  This can be different than
+  // HostPortPair::FromURL(url).
   int Request(const HostPortPair& destination,
-              QuicTransportVersion quic_version,
+              quic::QuicTransportVersion quic_version,
               PrivacyMode privacy_mode,
               RequestPriority priority,
               const SocketTag& socket_tag,
@@ -178,7 +188,7 @@
  public:
   // This class encompasses |destination| and |server_id|.
   // |destination| is a HostPortPair which is resolved
-  // and a QuicConnection is made to the resulting IP address.
+  // and a quic::QuicConnection is made to the resulting IP address.
   // |server_id| identifies the origin of the request,
   // the crypto handshake advertises |server_id.host()| to the server,
   // and the certificate is also matched against |server_id.host()|.
@@ -194,7 +204,9 @@
     bool operator==(const QuicSessionAliasKey& other) const;
 
     const HostPortPair& destination() const { return destination_; }
-    const QuicServerId& server_id() const { return session_key_.server_id(); }
+    const quic::QuicServerId& server_id() const {
+      return session_key_.server_id();
+    }
     const QuicSessionKey& session_key() const { return session_key_; }
 
     // Returns the estimate of dynamically allocated memory in bytes.
@@ -218,8 +230,8 @@
       CTVerifier* cert_transparency_verifier,
       SocketPerformanceWatcherFactory* socket_performance_watcher_factory,
       QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory,
-      QuicRandom* random_generator,
-      QuicClock* clock,
+      quic::QuicRandom* random_generator,
+      quic::QuicClock* clock,
       size_t max_packet_length,
       const std::string& user_agent_id,
       bool store_server_configs_in_properties,
@@ -239,8 +251,8 @@
       bool race_cert_verification,
       bool estimate_initial_rtt,
       bool headers_include_h2_stream_dependency,
-      const QuicTagVector& connection_options,
-      const QuicTagVector& client_connection_options,
+      const quic::QuicTagVector& connection_options,
+      const quic::QuicTagVector& client_connection_options,
       bool enable_token_binding,
       bool enable_channel_id,
       bool enable_socket_recv_optimization);
@@ -259,7 +271,7 @@
   // OnRequestComplete asynchronously.
   int Create(const QuicSessionKey& session_key,
              const HostPortPair& destination,
-             QuicTransportVersion quic_version,
+             quic::QuicTransportVersion quic_version,
              RequestPriority priority,
              int cert_verify_flags,
              const GURL& url,
@@ -291,7 +303,7 @@
   void CancelRequest(QuicStreamRequest* request);
 
   // Closes all current sessions with specified network and QUIC error codes.
-  void CloseAllSessions(int error, QuicErrorCode quic_error);
+  void CloseAllSessions(int error, quic::QuicErrorCode quic_error);
 
   std::unique_ptr<base::Value> QuicStreamFactoryInfoToValue() const;
 
@@ -354,11 +366,12 @@
   void set_require_confirmation(bool require_confirmation);
 
   // It returns the amount of time waiting job should be delayed.
-  base::TimeDelta GetTimeDelayForWaitingJob(const QuicServerId& server_id);
+  base::TimeDelta GetTimeDelayForWaitingJob(
+      const quic::QuicServerId& server_id);
 
   QuicChromiumConnectionHelper* helper() { return helper_.get(); }
 
-  QuicAlarmFactory* alarm_factory() { return alarm_factory_.get(); }
+  quic::QuicAlarmFactory* alarm_factory() { return alarm_factory_.get(); }
 
   void set_server_push_delegate(ServerPushDelegate* push_delegate) {
     push_delegate_ = push_delegate;
@@ -392,7 +405,7 @@
   typedef std::map<IPEndPoint, SessionSet> IPAliasMap;
   typedef std::map<QuicChromiumClientSession*, IPEndPoint> SessionPeerIPMap;
   typedef std::map<QuicSessionKey, std::unique_ptr<Job>> JobMap;
-  typedef std::map<QuicServerId, std::unique_ptr<CertVerifierJob>>
+  typedef std::map<quic::QuicServerId, std::unique_ptr<CertVerifierJob>>
       CertVerifierJobMap;
 
   bool HasMatchingIpSession(const QuicSessionAliasKey& key,
@@ -402,9 +415,9 @@
   void OnCertVerifyJobComplete(CertVerifierJob* job, int rv);
   bool HasActiveSession(const QuicSessionKey& session_key) const;
   bool HasActiveJob(const QuicSessionKey& session_key) const;
-  bool HasActiveCertVerifierJob(const QuicServerId& server_id) const;
+  bool HasActiveCertVerifierJob(const quic::QuicServerId& server_id) const;
   int CreateSession(const QuicSessionAliasKey& key,
-                    const QuicTransportVersion& quic_version,
+                    const quic::QuicTransportVersion& quic_version,
                     int cert_verify_flags,
                     bool require_confirmation,
                     const AddressList& address_list,
@@ -416,44 +429,44 @@
                        QuicChromiumClientSession* session);
   void MarkAllActiveSessionsGoingAway();
 
-  void ConfigureInitialRttEstimate(const QuicServerId& server_id,
-                                   QuicConfig* config);
+  void ConfigureInitialRttEstimate(const quic::QuicServerId& server_id,
+                                   quic::QuicConfig* config);
 
   // Returns |srtt| in micro seconds from ServerNetworkStats. Returns 0 if there
   // is no |http_server_properties_| or if |http_server_properties_| doesn't
   // have ServerNetworkStats for the given |server_id|.
   int64_t GetServerNetworkStatsSmoothedRttInMicroseconds(
-      const QuicServerId& server_id) const;
+      const quic::QuicServerId& server_id) const;
 
   // Returns |srtt| from ServerNetworkStats. Returns null if there
   // is no |http_server_properties_| or if |http_server_properties_| doesn't
   // have ServerNetworkStats for the given |server_id|.
   const base::TimeDelta* GetServerNetworkStatsSmoothedRtt(
-      const QuicServerId& server_id) const;
+      const quic::QuicServerId& server_id) const;
 
   // Helper methods.
-  bool WasQuicRecentlyBroken(const QuicServerId& server_id) const;
+  bool WasQuicRecentlyBroken(const quic::QuicServerId& server_id) const;
 
-  bool CryptoConfigCacheIsEmpty(const QuicServerId& server_id);
+  bool CryptoConfigCacheIsEmpty(const quic::QuicServerId& server_id);
 
   // Starts an asynchronous job for cert verification if
   // |race_cert_verification_| is enabled and if there are cached certs for the
   // given |server_id|.
-  QuicAsyncStatus StartCertVerifyJob(const QuicServerId& server_id,
-                                     int cert_verify_flags,
-                                     const NetLogWithSource& net_log);
+  quic::QuicAsyncStatus StartCertVerifyJob(const quic::QuicServerId& server_id,
+                                           int cert_verify_flags,
+                                           const NetLogWithSource& net_log);
 
   // Initializes the cached state associated with |server_id| in
   // |crypto_config_| with the information in |server_info|. Populates
   // |connection_id| with the next server designated connection id,
   // if any, and otherwise leaves it unchanged.
   void InitializeCachedStateInCryptoConfig(
-      const QuicServerId& server_id,
+      const quic::QuicServerId& server_id,
       const std::unique_ptr<QuicServerInfo>& server_info,
-      QuicConnectionId* connection_id);
+      quic::QuicConnectionId* connection_id);
 
   void ProcessGoingAwaySession(QuicChromiumClientSession* session,
-                               const QuicServerId& server_id,
+                               const quic::QuicServerId& server_id,
                                bool was_session_active);
 
   bool require_confirmation_;
@@ -465,8 +478,8 @@
   TransportSecurityState* transport_security_state_;
   CTVerifier* cert_transparency_verifier_;
   QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory_;
-  QuicRandom* random_generator_;  // Unowned.
-  QuicClock* clock_;              // Unowned.
+  quic::QuicRandom* random_generator_;  // Unowned.
+  quic::QuicClock* clock_;              // Unowned.
   const size_t max_packet_length_;
   QuicClockSkewDetector clock_skew_detector_;
 
@@ -479,7 +492,7 @@
   std::unique_ptr<QuicChromiumConnectionHelper> helper_;
 
   // The alarm factory used for all connections.
-  std::unique_ptr<QuicAlarmFactory> alarm_factory_;
+  std::unique_ptr<quic::QuicAlarmFactory> alarm_factory_;
 
   // Contains owning pointers to all sessions that currently exist.
   SessionIdMap all_sessions_;
@@ -496,12 +509,12 @@
   // Origins which have gone away recently.
   AliasSet gone_away_aliases_;
 
-  const QuicConfig config_;
-  QuicCryptoClientConfig crypto_config_;
+  const quic::QuicConfig config_;
+  quic::QuicCryptoClientConfig crypto_config_;
 
   JobMap active_jobs_;
 
-  // Map of QuicServerId to owning CertVerifierJob.
+  // Map of quic::QuicServerId to owning CertVerifierJob.
   CertVerifierJobMap active_cert_verifier_jobs_;
 
   // True if QUIC should be marked as broken when a connection blackholes after
@@ -512,14 +525,14 @@
   bool store_server_configs_in_properties_;
 
   // PING timeout for connections.
-  QuicTime::Delta ping_timeout_;
-  QuicTime::Delta reduced_ping_timeout_;
+  quic::QuicTime::Delta ping_timeout_;
+  quic::QuicTime::Delta reduced_ping_timeout_;
 
   // If more than |yield_after_packets_| packets have been read or more than
   // |yield_after_duration_| time has passed, then
   // QuicChromiumPacketReader::StartReading() yields by doing a PostTask().
   int yield_after_packets_;
-  QuicTime::Delta yield_after_duration_;
+  quic::QuicTime::Delta yield_after_duration_;
 
   // Set if all sessions should be closed when any local IP address changes.
   const bool close_sessions_on_ip_change_;
@@ -575,7 +588,7 @@
 
   int num_push_streams_created_;
 
-  QuicClientPushPromiseIndex push_promise_index_;
+  quic::QuicClientPushPromiseIndex push_promise_index_;
 
   base::SequencedTaskRunner* task_runner_;
 
diff --git a/net/quic/chromium/quic_stream_factory_fuzzer.cc b/net/quic/chromium/quic_stream_factory_fuzzer.cc
index c8cdf7a..7026c8e9 100644
--- a/net/quic/chromium/quic_stream_factory_fuzzer.cc
+++ b/net/quic/chromium/quic_stream_factory_fuzzer.cc
@@ -54,7 +54,7 @@
 // Static initialization for persistent factory data
 struct Env {
   Env() : host_port_pair(kServerHostName, kServerPort), random_generator(0) {
-    clock.AdvanceTime(QuicTime::Delta::FromSeconds(1));
+    clock.AdvanceTime(quic::QuicTime::Delta::FromSeconds(1));
     ssl_config_service = base::MakeRefCounted<SSLConfigServiceDefaults>();
     crypto_client_stream_factory.set_use_mock_crypter(true);
     cert_verifier = std::make_unique<MockCertVerifier>();
@@ -67,18 +67,18 @@
     verify_details.cert_verify_result.is_issued_by_known_root = true;
   }
 
-  MockClock clock;
+  quic::MockClock clock;
   scoped_refptr<SSLConfigService> ssl_config_service;
   ProofVerifyDetailsChromium verify_details;
   MockCryptoClientStreamFactory crypto_client_stream_factory;
   HostPortPair host_port_pair;
-  MockRandom random_generator;
+  quic::test::MockRandom random_generator;
   NetLogWithSource net_log;
   std::unique_ptr<CertVerifier> cert_verifier;
   std::unique_ptr<ChannelIDService> channel_id_service;
   TransportSecurityState transport_security_state;
-  QuicTagVector connection_options;
-  QuicTagVector client_connection_options;
+  quic::QuicTagVector connection_options;
+  quic::QuicTagVector client_connection_options;
   std::unique_ptr<CTVerifier> cert_transparency_verifier;
   DefaultCTPolicyEnforcer ct_policy_enforcer;
 };
@@ -131,11 +131,11 @@
           &env->ct_policy_enforcer, env->channel_id_service.get(),
           &env->transport_security_state, env->cert_transparency_verifier.get(),
           nullptr, &env->crypto_client_stream_factory, &env->random_generator,
-          &env->clock, kDefaultMaxPacketSize, std::string(),
+          &env->clock, quic::kDefaultMaxPacketSize, std::string(),
           store_server_configs_in_properties, close_sessions_on_ip_change,
           mark_quic_broken_when_network_blackholes,
-          kIdleConnectionTimeoutSeconds, kPingTimeoutSecs,
-          kMaxTimeForCryptoHandshakeSecs, kInitialIdleTimeoutSecs,
+          kIdleConnectionTimeoutSeconds, quic::kPingTimeoutSecs,
+          quic::kMaxTimeForCryptoHandshakeSecs, quic::kInitialIdleTimeoutSecs,
           migrate_sessions_on_network_change, migrate_sessions_early,
           migrate_sessions_on_network_change_v2, migrate_sessions_early_v2,
           base::TimeDelta::FromSeconds(kMaxTimeOnNonDefaultNetworkSecs),
@@ -148,11 +148,11 @@
   QuicStreamRequest request(factory.get());
   TestCompletionCallback callback;
   NetErrorDetails net_error_details;
-  request.Request(env->host_port_pair,
-                  data_provider.PickValueInArray(kSupportedTransportVersions),
-                  PRIVACY_MODE_DISABLED, DEFAULT_PRIORITY, SocketTag(),
-                  kCertVerifyFlags, GURL(kUrl), env->net_log,
-                  &net_error_details, callback.callback());
+  request.Request(
+      env->host_port_pair,
+      data_provider.PickValueInArray(quic::kSupportedTransportVersions),
+      PRIVACY_MODE_DISABLED, DEFAULT_PRIORITY, SocketTag(), kCertVerifyFlags,
+      GURL(kUrl), env->net_log, &net_error_details, callback.callback());
 
   callback.WaitForResult();
   std::unique_ptr<QuicChromiumClientSession::Handle> session =
diff --git a/net/quic/chromium/quic_stream_factory_peer.cc b/net/quic/chromium/quic_stream_factory_peer.cc
index 25ed81c4..e942395 100644
--- a/net/quic/chromium/quic_stream_factory_peer.cc
+++ b/net/quic/chromium/quic_stream_factory_peer.cc
@@ -22,34 +22,36 @@
 namespace net {
 namespace test {
 
-const QuicConfig* QuicStreamFactoryPeer::GetConfig(QuicStreamFactory* factory) {
+const quic::QuicConfig* QuicStreamFactoryPeer::GetConfig(
+    QuicStreamFactory* factory) {
   return &factory->config_;
 }
 
-QuicCryptoClientConfig* QuicStreamFactoryPeer::GetCryptoConfig(
+quic::QuicCryptoClientConfig* QuicStreamFactoryPeer::GetCryptoConfig(
     QuicStreamFactory* factory) {
   return &factory->crypto_config_;
 }
 
-bool QuicStreamFactoryPeer::HasActiveSession(QuicStreamFactory* factory,
-                                             const QuicServerId& server_id) {
+bool QuicStreamFactoryPeer::HasActiveSession(
+    QuicStreamFactory* factory,
+    const quic::QuicServerId& server_id) {
   return factory->HasActiveSession(QuicSessionKey(server_id, SocketTag()));
 }
 
 bool QuicStreamFactoryPeer::HasActiveJob(QuicStreamFactory* factory,
-                                         const QuicServerId& server_id) {
+                                         const quic::QuicServerId& server_id) {
   return factory->HasActiveJob(QuicSessionKey(server_id, SocketTag()));
 }
 
 bool QuicStreamFactoryPeer::HasActiveCertVerifierJob(
     QuicStreamFactory* factory,
-    const QuicServerId& server_id) {
+    const quic::QuicServerId& server_id) {
   return factory->HasActiveCertVerifierJob(server_id);
 }
 
 QuicChromiumClientSession* QuicStreamFactoryPeer::GetActiveSession(
     QuicStreamFactory* factory,
-    const QuicServerId& server_id) {
+    const quic::QuicServerId& server_id) {
   QuicSessionKey session_key(server_id, SocketTag());
   DCHECK(factory->HasActiveSession(session_key));
   return factory->active_sessions_[session_key];
@@ -72,7 +74,7 @@
   factory->task_runner_ = task_runner;
 }
 
-QuicTime::Delta QuicStreamFactoryPeer::GetPingTimeout(
+quic::QuicTime::Delta QuicStreamFactoryPeer::GetPingTimeout(
     QuicStreamFactory* factory) {
   return factory->ping_timeout_;
 }
@@ -88,9 +90,9 @@
   factory->race_cert_verification_ = race_cert_verification;
 }
 
-QuicAsyncStatus QuicStreamFactoryPeer::StartCertVerifyJob(
+quic::QuicAsyncStatus QuicStreamFactoryPeer::StartCertVerifyJob(
     QuicStreamFactory* factory,
-    const QuicServerId& server_id,
+    const quic::QuicServerId& server_id,
     int cert_verify_flags,
     const NetLogWithSource& net_log) {
   return factory->StartCertVerifyJob(server_id, cert_verify_flags, net_log);
@@ -103,19 +105,19 @@
 
 void QuicStreamFactoryPeer::SetYieldAfterDuration(
     QuicStreamFactory* factory,
-    QuicTime::Delta yield_after_duration) {
+    quic::QuicTime::Delta yield_after_duration) {
   factory->yield_after_duration_ = yield_after_duration;
 }
 
 bool QuicStreamFactoryPeer::CryptoConfigCacheIsEmpty(
     QuicStreamFactory* factory,
-    const QuicServerId& quic_server_id) {
+    const quic::QuicServerId& quic_server_id) {
   return factory->CryptoConfigCacheIsEmpty(quic_server_id);
 }
 
 void QuicStreamFactoryPeer::CacheDummyServerConfig(
     QuicStreamFactory* factory,
-    const QuicServerId& quic_server_id) {
+    const quic::QuicServerId& quic_server_id) {
   // Minimum SCFG that passes config validation checks.
   const char scfg[] = {// SCFG
                        0x53, 0x43, 0x46, 0x47,
@@ -141,16 +143,16 @@
   DCHECK(cert);
   certs.emplace_back(x509_util::CryptoBufferAsStringPiece(cert->cert_buffer()));
 
-  QuicCryptoClientConfig* crypto_config = &factory->crypto_config_;
-  QuicCryptoClientConfig::CachedState* cached =
+  quic::QuicCryptoClientConfig* crypto_config = &factory->crypto_config_;
+  quic::QuicCryptoClientConfig::CachedState* cached =
       crypto_config->LookupOrCreate(quic_server_id);
-  QuicChromiumClock clock;
+  quic::QuicChromiumClock clock;
   cached->Initialize(server_config, source_address_token, certs, "", "",
-                     signature, clock.WallNow(), QuicWallTime::Zero());
+                     signature, clock.WallNow(), quic::QuicWallTime::Zero());
   DCHECK(!cached->certs().empty());
 }
 
-QuicClientPushPromiseIndex* QuicStreamFactoryPeer::GetPushPromiseIndex(
+quic::QuicClientPushPromiseIndex* QuicStreamFactoryPeer::GetPushPromiseIndex(
     QuicStreamFactory* factory) {
   return &factory->push_promise_index_;
 }
@@ -162,7 +164,7 @@
 
 void QuicStreamFactoryPeer::SetAlarmFactory(
     QuicStreamFactory* factory,
-    std::unique_ptr<QuicAlarmFactory> alarm_factory) {
+    std::unique_ptr<quic::QuicAlarmFactory> alarm_factory) {
   factory->alarm_factory_ = std::move(alarm_factory);
 }
 
diff --git a/net/quic/chromium/quic_stream_factory_peer.h b/net/quic/chromium/quic_stream_factory_peer.h
index 81389f9..ff39d91e 100644
--- a/net/quic/chromium/quic_stream_factory_peer.h
+++ b/net/quic/chromium/quic_stream_factory_peer.h
@@ -19,33 +19,44 @@
 namespace net {
 
 class NetLogWithSource;
+}  // namespace net
+namespace quic {
 class QuicAlarmFactory;
+}  // namespace quic
+namespace net {
 class QuicChromiumClientSession;
+}  // namespace net
+namespace quic {
 class QuicClientPushPromiseIndex;
+
 class QuicConfig;
+
 class QuicCryptoClientConfig;
+}  // namespace quic
+namespace net {
 class QuicStreamFactory;
 
 namespace test {
 
 class QuicStreamFactoryPeer {
  public:
-  static const QuicConfig* GetConfig(QuicStreamFactory* factory);
+  static const quic::QuicConfig* GetConfig(QuicStreamFactory* factory);
 
-  static QuicCryptoClientConfig* GetCryptoConfig(QuicStreamFactory* factory);
+  static quic::QuicCryptoClientConfig* GetCryptoConfig(
+      QuicStreamFactory* factory);
 
   static bool HasActiveSession(QuicStreamFactory* factory,
-                               const QuicServerId& server_id);
+                               const quic::QuicServerId& server_id);
 
   static bool HasActiveJob(QuicStreamFactory* factory,
-                           const QuicServerId& server_id);
+                           const quic::QuicServerId& server_id);
 
   static bool HasActiveCertVerifierJob(QuicStreamFactory* factory,
-                                       const QuicServerId& server_id);
+                                       const quic::QuicServerId& server_id);
 
   static QuicChromiumClientSession* GetActiveSession(
       QuicStreamFactory* factory,
-      const QuicServerId& server_id);
+      const quic::QuicServerId& server_id);
 
   static bool IsLiveSession(QuicStreamFactory* factory,
                             QuicChromiumClientSession* session);
@@ -53,41 +64,44 @@
   static void SetTaskRunner(QuicStreamFactory* factory,
                             base::SequencedTaskRunner* task_runner);
 
-  static QuicTime::Delta GetPingTimeout(QuicStreamFactory* factory);
+  static quic::QuicTime::Delta GetPingTimeout(QuicStreamFactory* factory);
 
   static bool GetRaceCertVerification(QuicStreamFactory* factory);
 
   static void SetRaceCertVerification(QuicStreamFactory* factory,
                                       bool race_cert_verification);
 
-  static QuicAsyncStatus StartCertVerifyJob(QuicStreamFactory* factory,
-                                            const QuicServerId& server_id,
-                                            int cert_verify_flags,
-                                            const NetLogWithSource& net_log);
+  static quic::QuicAsyncStatus StartCertVerifyJob(
+      QuicStreamFactory* factory,
+      const quic::QuicServerId& server_id,
+      int cert_verify_flags,
+      const NetLogWithSource& net_log);
 
   static void SetYieldAfterPackets(QuicStreamFactory* factory,
                                    int yield_after_packets);
 
   static void SetYieldAfterDuration(QuicStreamFactory* factory,
-                                    QuicTime::Delta yield_after_duration);
+                                    quic::QuicTime::Delta yield_after_duration);
 
   static size_t GetNumberOfActiveJobs(QuicStreamFactory* factory,
-                                      const QuicServerId& server_id);
+                                      const quic::QuicServerId& server_id);
 
-  static bool CryptoConfigCacheIsEmpty(QuicStreamFactory* factory,
-                                       const QuicServerId& quic_server_id);
+  static bool CryptoConfigCacheIsEmpty(
+      QuicStreamFactory* factory,
+      const quic::QuicServerId& quic_server_id);
 
   // Creates a dummy QUIC server config and caches it.
   static void CacheDummyServerConfig(QuicStreamFactory* factory,
-                                     const QuicServerId& quic_server_id);
+                                     const quic::QuicServerId& quic_server_id);
 
-  static QuicClientPushPromiseIndex* GetPushPromiseIndex(
+  static quic::QuicClientPushPromiseIndex* GetPushPromiseIndex(
       QuicStreamFactory* factory);
 
   static int GetNumPushStreamsCreated(QuicStreamFactory* factory);
 
-  static void SetAlarmFactory(QuicStreamFactory* factory,
-                              std::unique_ptr<QuicAlarmFactory> alarm_factory);
+  static void SetAlarmFactory(
+      QuicStreamFactory* factory,
+      std::unique_ptr<quic::QuicAlarmFactory> alarm_factory);
 
  private:
   DISALLOW_COPY_AND_ASSIGN(QuicStreamFactoryPeer);
diff --git a/net/quic/chromium/quic_stream_factory_test.cc b/net/quic/chromium/quic_stream_factory_test.cc
index 567bd4b..d496e89 100644
--- a/net/quic/chromium/quic_stream_factory_test.cc
+++ b/net/quic/chromium/quic_stream_factory_test.cc
@@ -116,14 +116,14 @@
     return os;
   }
 
-  QuicTransportVersion version;
+  quic::QuicTransportVersion version;
   bool client_headers_include_h2_stream_dependency;
 };
 
 std::vector<TestParams> GetTestParams() {
   std::vector<TestParams> params;
-  QuicTransportVersionVector all_supported_versions =
-      AllSupportedTransportVersions();
+  quic::QuicTransportVersionVector all_supported_versions =
+      quic::AllSupportedTransportVersions();
   for (const auto& version : all_supported_versions) {
     params.push_back(TestParams{version, false});
     params.push_back(TestParams{version, true});
@@ -155,16 +155,16 @@
     return os;
   }
 
-  QuicTransportVersion version;
+  quic::QuicTransportVersion version;
   DestinationType destination_type;
   bool client_headers_include_h2_stream_dependency;
 };
 
 std::vector<PoolingTestParams> GetPoolingTestParams() {
   std::vector<PoolingTestParams> params;
-  QuicTransportVersionVector all_supported_versions =
-      AllSupportedTransportVersions();
-  for (const QuicTransportVersion version : all_supported_versions) {
+  quic::QuicTransportVersionVector all_supported_versions =
+      quic::AllSupportedTransportVersions();
+  for (const quic::QuicTransportVersion version : all_supported_versions) {
     params.push_back(PoolingTestParams{version, SAME_AS_FIRST, false});
     params.push_back(PoolingTestParams{version, SAME_AS_FIRST, true});
     params.push_back(PoolingTestParams{version, SAME_AS_SECOND, false});
@@ -211,7 +211,7 @@
 
 class QuicStreamFactoryTestBase : public WithScopedTaskEnvironment {
  protected:
-  QuicStreamFactoryTestBase(QuicTransportVersion version,
+  QuicStreamFactoryTestBase(quic::QuicTransportVersion version,
                             bool client_headers_include_h2_stream_dependency)
       : ssl_config_service_(new MockSSLConfigService),
         socket_factory_(new MockClientSocketFactory),
@@ -224,13 +224,13 @@
                       0,
                       &clock_,
                       kDefaultServerHostName,
-                      Perspective::IS_CLIENT,
+                      quic::Perspective::IS_CLIENT,
                       client_headers_include_h2_stream_dependency_),
         server_maker_(version_,
                       0,
                       &clock_,
                       kDefaultServerHostName,
-                      Perspective::IS_SERVER,
+                      quic::Perspective::IS_SERVER,
                       false),
         cert_verifier_(std::make_unique<MockCertVerifier>()),
         channel_id_service_(
@@ -247,10 +247,11 @@
         store_server_configs_in_properties_(false),
         close_sessions_on_ip_change_(false),
         idle_connection_timeout_seconds_(kIdleConnectionTimeoutSeconds),
-        reduced_ping_timeout_seconds_(kPingTimeoutSecs),
+        reduced_ping_timeout_seconds_(quic::kPingTimeoutSecs),
         max_time_before_crypto_handshake_seconds_(
-            kMaxTimeForCryptoHandshakeSecs),
-        max_idle_time_before_crypto_handshake_seconds_(kInitialIdleTimeoutSecs),
+            quic::kMaxTimeForCryptoHandshakeSecs),
+        max_idle_time_before_crypto_handshake_seconds_(
+            quic::kInitialIdleTimeoutSecs),
         migrate_sessions_on_network_change_(false),
         migrate_sessions_early_(false),
         migrate_sessions_on_network_change_v2_(false),
@@ -258,7 +259,7 @@
         allow_server_migration_(false),
         race_cert_verification_(false),
         estimate_initial_rtt_(false) {
-    clock_.AdvanceTime(QuicTime::Delta::FromSeconds(1));
+    clock_.AdvanceTime(quic::QuicTime::Delta::FromSeconds(1));
   }
 
   void Initialize() {
@@ -270,8 +271,8 @@
         &transport_security_state_, cert_transparency_verifier_.get(),
         /*SocketPerformanceWatcherFactory*/ nullptr,
         &crypto_client_stream_factory_, &random_generator_, &clock_,
-        kDefaultMaxPacketSize, string(), store_server_configs_in_properties_,
-        close_sessions_on_ip_change_,
+        quic::kDefaultMaxPacketSize, string(),
+        store_server_configs_in_properties_, close_sessions_on_ip_change_,
         /*mark_quic_broken_when_network_blackholes*/ false,
         idle_connection_timeout_seconds_, reduced_ping_timeout_seconds_,
         max_time_before_crypto_handshake_seconds_,
@@ -324,24 +325,24 @@
   }
 
   bool HasActiveSession(const HostPortPair& host_port_pair) {
-    QuicServerId server_id(host_port_pair, PRIVACY_MODE_DISABLED);
+    quic::QuicServerId server_id(host_port_pair, PRIVACY_MODE_DISABLED);
     return QuicStreamFactoryPeer::HasActiveSession(factory_.get(), server_id);
   }
 
   bool HasActiveJob(const HostPortPair& host_port_pair,
                     const PrivacyMode privacy_mode) {
-    QuicServerId server_id(host_port_pair, privacy_mode);
+    quic::QuicServerId server_id(host_port_pair, privacy_mode);
     return QuicStreamFactoryPeer::HasActiveJob(factory_.get(), server_id);
   }
 
-  bool HasActiveCertVerifierJob(const QuicServerId& server_id) {
+  bool HasActiveCertVerifierJob(const quic::QuicServerId& server_id) {
     return QuicStreamFactoryPeer::HasActiveCertVerifierJob(factory_.get(),
                                                            server_id);
   }
 
   QuicChromiumClientSession* GetActiveSession(
       const HostPortPair& host_port_pair) {
-    QuicServerId server_id(host_port_pair, PRIVACY_MODE_DISABLED);
+    quic::QuicServerId server_id(host_port_pair, PRIVACY_MODE_DISABLED);
     return QuicStreamFactoryPeer::GetActiveSession(factory_.get(), server_id);
   }
 
@@ -385,7 +386,8 @@
     }
 
     if (goaway_received) {
-      QuicGoAwayFrame goaway(kInvalidControlFrameId, QUIC_NO_ERROR, 1, "");
+      quic::QuicGoAwayFrame goaway(quic::kInvalidControlFrameId,
+                                   quic::QUIC_NO_ERROR, 1, "");
       session->connection()->OnGoAwayFrame(goaway);
     }
 
@@ -396,16 +398,16 @@
     return socket_factory_->udp_client_socket_ports()[socket_count];
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientConnectionClosePacket(
-      QuicPacketNumber num) {
+  std::unique_ptr<quic::QuicEncryptedPacket>
+  ConstructClientConnectionClosePacket(quic::QuicPacketNumber num) {
     return client_maker_.MakeConnectionClosePacket(
-        num, false, QUIC_CRYPTO_VERSION_NOT_SUPPORTED, "Time to panic!");
+        num, false, quic::QUIC_CRYPTO_VERSION_NOT_SUPPORTED, "Time to panic!");
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructClientRstPacket(
-      QuicPacketNumber packet_number,
-      QuicRstStreamErrorCode error_code) {
-    QuicStreamId stream_id = GetNthClientInitiatedStreamId(0);
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructClientRstPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicRstStreamErrorCode error_code) {
+    quic::QuicStreamId stream_id = GetNthClientInitiatedStreamId(0);
     return client_maker_.MakeRstPacket(packet_number, true, stream_id,
                                        error_code);
   }
@@ -427,9 +429,9 @@
     base::RunLoop().RunUntilIdle();
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructGetRequestPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructGetRequestPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin) {
     spdy::SpdyHeaderBlock headers =
@@ -442,12 +444,12 @@
         std::move(headers), 0, &spdy_headers_frame_len);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructGetRequestPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructGetRequestPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset* offset) {
+      quic::QuicStreamOffset* offset) {
     spdy::SpdyHeaderBlock headers =
         client_maker_.GetRequestHeaders("GET", "https", "/");
     spdy::SpdyPriority priority =
@@ -458,9 +460,9 @@
         std::move(headers), 0, &spdy_headers_frame_len, offset);
   }
 
-  std::unique_ptr<QuicEncryptedPacket> ConstructOkResponsePacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicEncryptedPacket> ConstructOkResponsePacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin) {
     spdy::SpdyHeaderBlock headers = server_maker_.GetResponseHeaders("200 OK");
@@ -470,18 +472,18 @@
         std::move(headers), &spdy_headers_frame_len);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructInitialSettingsPacket() {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructInitialSettingsPacket() {
     return client_maker_.MakeInitialSettingsPacket(1, nullptr);
   }
 
-  std::unique_ptr<QuicReceivedPacket> ConstructInitialSettingsPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamOffset* offset) {
+  std::unique_ptr<quic::QuicReceivedPacket> ConstructInitialSettingsPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamOffset* offset) {
     return client_maker_.MakeInitialSettingsPacket(packet_number, offset);
   }
 
   // Helper method for server migration tests.
-  void VerifyServerMigration(const QuicConfig& config,
+  void VerifyServerMigration(const quic::QuicConfig& config,
                              IPEndPoint expected_address) {
     allow_server_migration_ = true;
     Initialize();
@@ -505,7 +507,7 @@
     socket_data2.AddWrite(
         SYNCHRONOUS,
         client_maker_.MakeRstPacket(3, true, GetNthClientInitiatedStreamId(0),
-                                    QUIC_STREAM_CANCELLED));
+                                    quic::QUIC_STREAM_CANCELLED));
     socket_data2.AddSocketDataToFactory(socket_factory_.get());
 
     // Create request and QuicHttpStream.
@@ -562,8 +564,9 @@
     crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
     crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
     crypto_client_stream_factory_.set_handshake_mode(
-        MockCryptoClientStream::ZERO_RTT);
-    const QuicConfig* config = QuicStreamFactoryPeer::GetConfig(factory_.get());
+        quic::MockCryptoClientStream::ZERO_RTT);
+    const quic::QuicConfig* config =
+        QuicStreamFactoryPeer::GetConfig(factory_.get());
     EXPECT_EQ(500, config->IdleNetworkTimeout().ToSeconds());
 
     QuicStreamFactoryPeer::SetTaskRunner(factory_.get(), runner_.get());
@@ -596,8 +599,8 @@
     http_server_properties_.SetMaxServerConfigsStoredInProperties(
         kDefaultMaxQuicServerEntries);
 
-    QuicServerId quic_server_id(kDefaultServerHostName, 443,
-                                PRIVACY_MODE_DISABLED);
+    quic::QuicServerId quic_server_id(kDefaultServerHostName, 443,
+                                      PRIVACY_MODE_DISABLED);
     std::unique_ptr<QuicServerInfo> quic_server_info =
         std::make_unique<PropertiesBasedQuicServerInfo>(
             quic_server_id, &http_server_properties_);
@@ -636,7 +639,8 @@
 
     quic_server_info->Persist();
 
-    QuicServerId quic_server_id2(kServer2HostName, 443, PRIVACY_MODE_DISABLED);
+    quic::QuicServerId quic_server_id2(kServer2HostName, 443,
+                                       PRIVACY_MODE_DISABLED);
     std::unique_ptr<QuicServerInfo> quic_server_info2 =
         std::make_unique<PropertiesBasedQuicServerInfo>(
             quic_server_id2, &http_server_properties_);
@@ -704,9 +708,9 @@
 
     EXPECT_FALSE(QuicStreamFactoryPeer::CryptoConfigCacheIsEmpty(
         factory_.get(), quic_server_id));
-    QuicCryptoClientConfig* crypto_config =
+    quic::QuicCryptoClientConfig* crypto_config =
         QuicStreamFactoryPeer::GetCryptoConfig(factory_.get());
-    QuicCryptoClientConfig::CachedState* cached =
+    quic::QuicCryptoClientConfig::CachedState* cached =
         crypto_config->LookupOrCreate(quic_server_id);
     EXPECT_FALSE(cached->server_config().empty());
     EXPECT_TRUE(cached->GetServerConfig());
@@ -739,7 +743,7 @@
 
     EXPECT_FALSE(QuicStreamFactoryPeer::CryptoConfigCacheIsEmpty(
         factory_.get(), quic_server_id2));
-    QuicCryptoClientConfig::CachedState* cached2 =
+    quic::QuicCryptoClientConfig::CachedState* cached2 =
         crypto_config->LookupOrCreate(quic_server_id2);
     EXPECT_FALSE(cached2->server_config().empty());
     EXPECT_TRUE(cached2->GetServerConfig());
@@ -757,12 +761,12 @@
       runner_->RunNextTask();
   }
 
-  QuicStreamId GetNthClientInitiatedStreamId(int n) {
-    return test::GetNthClientInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthClientInitiatedStreamId(int n) {
+    return quic::test::GetNthClientInitiatedStreamId(version_, n);
   }
 
-  QuicStreamId GetNthServerInitiatedStreamId(int n) {
-    return test::GetNthServerInitiatedStreamId(version_, n);
+  quic::QuicStreamId GetNthServerInitiatedStreamId(int n) {
+    return quic::test::GetNthServerInitiatedStreamId(version_, n);
   }
 
   // Helper methods for tests of connection migration on write error.
@@ -788,10 +792,10 @@
   scoped_refptr<SSLConfigService> ssl_config_service_;
   std::unique_ptr<MockClientSocketFactory> socket_factory_;
   MockCryptoClientStreamFactory crypto_client_stream_factory_;
-  MockRandom random_generator_;
-  MockClock clock_;
+  quic::test::MockRandom random_generator_;
+  quic::MockClock clock_;
   scoped_refptr<TestTaskRunner> runner_;
-  const QuicTransportVersion version_;
+  const quic::QuicTransportVersion version_;
   const bool client_headers_include_h2_stream_dependency_;
   QuicTestPacketMaker client_maker_;
   QuicTestPacketMaker server_maker_;
@@ -829,8 +833,8 @@
   bool allow_server_migration_;
   bool race_cert_verification_;
   bool estimate_initial_rtt_;
-  QuicTagVector connection_options_;
-  QuicTagVector client_connection_options_;
+  quic::QuicTagVector connection_options_;
+  quic::QuicTagVector client_connection_options_;
 };
 
 class QuicStreamFactoryTest : public QuicStreamFactoryTestBase,
@@ -904,7 +908,7 @@
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::ZERO_RTT);
+      quic::MockCryptoClientStream::ZERO_RTT);
   host_resolver_.set_synchronous_mode(true);
   host_resolver_.rules()->AddIPLiteralRule(host_port_pair_.host(),
                                            "192.168.0.1", "");
@@ -973,7 +977,7 @@
 
 TEST_P(QuicStreamFactoryTest, RequireConfirmation) {
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::ZERO_RTT);
+      quic::MockCryptoClientStream::ZERO_RTT);
   host_resolver_.set_synchronous_mode(true);
   host_resolver_.rules()->AddIPLiteralRule(host_port_pair_.host(),
                                            "192.168.0.1", "");
@@ -998,7 +1002,7 @@
   EXPECT_FALSE(http_server_properties_.GetSupportsQuic(&last_address));
 
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   EXPECT_TRUE(http_server_properties_.GetSupportsQuic(&last_address));
 
@@ -1012,7 +1016,7 @@
 
 TEST_P(QuicStreamFactoryTest, DontRequireConfirmationFromSameIP) {
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::ZERO_RTT);
+      quic::MockCryptoClientStream::ZERO_RTT);
   host_resolver_.set_synchronous_mode(true);
   host_resolver_.rules()->AddIPLiteralRule(host_port_pair_.host(),
                                            "192.168.0.1", "");
@@ -1045,7 +1049,7 @@
   EXPECT_FALSE(session->require_confirmation());
 
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
 
   EXPECT_TRUE(http_server_properties_.GetSupportsQuic(&last_address));
 }
@@ -1170,7 +1174,7 @@
 
   QuicChromiumClientSession* session = GetActiveSession(host_port_pair_);
 
-  session->OnGoAway(QuicGoAwayFrame());
+  session->OnGoAway(quic::QuicGoAwayFrame());
 
   EXPECT_FALSE(HasActiveSession(host_port_pair_));
 
@@ -1201,9 +1205,9 @@
 
   QuicChromiumClientSession* session = GetActiveSession(host_port_pair_);
 
-  session->OnGoAway(
-      QuicGoAwayFrame(kInvalidControlFrameId, QUIC_ERROR_MIGRATING_PORT, 0,
-                      "peer connection migration due to port change only"));
+  session->OnGoAway(quic::QuicGoAwayFrame(
+      quic::kInvalidControlFrameId, quic::QUIC_ERROR_MIGRATING_PORT, 0,
+      "peer connection migration due to port change only"));
   NetErrorDetails details;
   EXPECT_FALSE(details.quic_port_migration_detected);
   session->PopulateNetErrorDetails(&details);
@@ -1262,22 +1266,22 @@
   host_resolver_.rules()->AddIPLiteralRule(host_port_pair_.host(),
                                            "192.168.0.1", "");
   IPEndPoint alt_address = IPEndPoint(IPAddress(1, 2, 3, 4), 443);
-  QuicConfig config;
+  quic::QuicConfig config;
   config.SetAlternateServerAddressToSend(
-      QuicSocketAddress(QuicSocketAddressImpl(alt_address)));
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(alt_address)));
 
   VerifyServerMigration(config, alt_address);
 
   // Close server-migrated session.
   QuicChromiumClientSession* session = GetActiveSession(host_port_pair_);
-  session->CloseSessionOnError(0u, QUIC_NO_ERROR);
+  session->CloseSessionOnError(0u, quic::QUIC_NO_ERROR);
 
   // Set up server IP, socket, proof, and config for new session.
   HostPortPair server2(kServer2HostName, kDefaultServerPort);
   host_resolver_.rules()->AddIPLiteralRule(server2.host(), "192.168.0.1", "");
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, settings_packet->data(),
                                   settings_packet->length(), 1)};
@@ -1287,7 +1291,7 @@
 
   ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails();
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
-  QuicConfig config2;
+  quic::QuicConfig config2;
   crypto_client_stream_factory_.SetConfig(config2);
 
   // Create new request to cause new session creation.
@@ -1577,14 +1581,15 @@
   ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails();
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
-  QuicStreamId stream_id = GetNthClientInitiatedStreamId(0);
+  quic::QuicStreamId stream_id = GetNthClientInitiatedStreamId(0);
   MockQuicData socket_data;
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket());
   socket_data.AddWrite(
-      SYNCHRONOUS,
-      client_maker_.MakeRstPacket(2, true, stream_id, QUIC_STREAM_CANCELLED));
-  socket_data.AddRead(ASYNC, server_maker_.MakeRstPacket(
-                                 1, false, stream_id, QUIC_STREAM_CANCELLED));
+      SYNCHRONOUS, client_maker_.MakeRstPacket(2, true, stream_id,
+                                               quic::QUIC_STREAM_CANCELLED));
+  socket_data.AddRead(ASYNC,
+                      server_maker_.MakeRstPacket(1, false, stream_id,
+                                                  quic::QUIC_STREAM_CANCELLED));
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
@@ -1593,9 +1598,9 @@
       MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
 
   std::vector<std::unique_ptr<HttpStream>> streams;
-  // The MockCryptoClientStream sets max_open_streams to be
-  // kDefaultMaxStreamsPerConnection / 2.
-  for (size_t i = 0; i < kDefaultMaxStreamsPerConnection / 2; i++) {
+  // The quic::MockCryptoClientStream sets max_open_streams to be
+  // quic::kDefaultMaxStreamsPerConnection / 2.
+  for (size_t i = 0; i < quic::kDefaultMaxStreamsPerConnection / 2; i++) {
     QuicStreamRequest request(factory_.get());
     int rv = request.Request(host_port_pair_, version_, privacy_mode_,
                              DEFAULT_PRIORITY, SocketTag(),
@@ -1639,8 +1644,9 @@
   // packets when streams are torn down, which wouldn't be relevant to
   // this test anyway.
   QuicChromiumClientSession* session = GetActiveSession(host_port_pair_);
-  session->connection()->CloseConnection(QUIC_PUBLIC_RESET, "test",
-                                         ConnectionCloseBehavior::SILENT_CLOSE);
+  session->connection()->CloseConnection(
+      quic::QUIC_PUBLIC_RESET, "test",
+      quic::ConnectionCloseBehavior::SILENT_CLOSE);
 }
 
 TEST_P(QuicStreamFactoryTest, ResolutionErrorInCreate) {
@@ -1723,8 +1729,8 @@
   MockQuicData socket_data;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket());
-  socket_data.AddWrite(SYNCHRONOUS,
-                       ConstructClientRstPacket(2, QUIC_RST_ACKNOWLEDGEMENT));
+  socket_data.AddWrite(
+      SYNCHRONOUS, ConstructClientRstPacket(2, quic::QUIC_RST_ACKNOWLEDGEMENT));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   MockQuicData socket_data2;
@@ -1748,7 +1754,8 @@
                                          net_log_, CompletionOnceCallback()));
 
   // Close the session and verify that stream saw the error.
-  factory_->CloseAllSessions(ERR_INTERNET_DISCONNECTED, QUIC_INTERNAL_ERROR);
+  factory_->CloseAllSessions(ERR_INTERNET_DISCONNECTED,
+                             quic::QUIC_INTERNAL_ERROR);
   EXPECT_EQ(ERR_INTERNET_DISCONNECTED,
             stream->ReadResponseHeaders(callback_.callback()));
 
@@ -1781,7 +1788,7 @@
   Initialize();
   // Use unmocked crypto stream to do crypto connect.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::USE_DEFAULT_CRYPTO_STREAM);
+      quic::MockCryptoClientStream::USE_DEFAULT_CRYPTO_STREAM);
 
   MockQuicData socket_data;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
@@ -1802,7 +1809,7 @@
 
   // Verify new requests can be sent normally without hanging.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
   ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails();
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
   MockQuicData socket_data2;
@@ -1823,7 +1830,7 @@
 
   // Complete handshake. QuicStreamFactory::Job should complete and succeed.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
   EXPECT_THAT(callback_.WaitForResult(), IsOk());
   EXPECT_TRUE(HasActiveSession(host_port_pair_));
   EXPECT_FALSE(HasActiveJob(host_port_pair_, privacy_mode_));
@@ -1842,7 +1849,7 @@
   Initialize();
   // Use unmocked crypto stream to do crypto connect.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::USE_DEFAULT_CRYPTO_STREAM);
+      quic::MockCryptoClientStream::USE_DEFAULT_CRYPTO_STREAM);
   host_resolver_.set_synchronous_mode(true);
   host_resolver_.rules()->AddIPLiteralRule(host_port_pair_.host(),
                                            "192.168.0.1", "");
@@ -1866,7 +1873,7 @@
 
   // Verify new requests can be sent normally without hanging.
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::COLD_START);
+      quic::MockCryptoClientStream::COLD_START);
   ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails();
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
   MockQuicData socket_data2;
@@ -1885,7 +1892,7 @@
 
   // Complete handshake.
   crypto_client_stream_factory_.last_stream()->SendOnCryptoHandshakeEvent(
-      QuicSession::HANDSHAKE_CONFIRMED);
+      quic::QuicSession::HANDSHAKE_CONFIRMED);
   EXPECT_THAT(callback_.WaitForResult(), IsOk());
   EXPECT_TRUE(HasActiveSession(host_port_pair_));
   EXPECT_FALSE(HasActiveJob(host_port_pair_, privacy_mode_));
@@ -1910,8 +1917,8 @@
   MockQuicData socket_data;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket());
-  socket_data.AddWrite(SYNCHRONOUS,
-                       ConstructClientRstPacket(2, QUIC_RST_ACKNOWLEDGEMENT));
+  socket_data.AddWrite(
+      SYNCHRONOUS, ConstructClientRstPacket(2, quic::QUIC_RST_ACKNOWLEDGEMENT));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   MockQuicData socket_data2;
@@ -1973,8 +1980,8 @@
   MockQuicData socket_data;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket());
-  socket_data.AddWrite(SYNCHRONOUS,
-                       ConstructClientRstPacket(2, QUIC_STREAM_CANCELLED));
+  socket_data.AddWrite(
+      SYNCHRONOUS, ConstructClientRstPacket(2, quic::QUIC_STREAM_CANCELLED));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   QuicStreamRequest request(factory_.get());
@@ -2030,7 +2037,7 @@
 
   int packet_number = 1;
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS,
@@ -2094,7 +2101,7 @@
   socket_data1.AddWrite(
       SYNCHRONOUS, client_maker_.MakeAckAndRstPacket(
                        packet_number++, false, GetNthClientInitiatedStreamId(0),
-                       QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                       quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // Trigger connection migration. This should cause a PING frame
@@ -2170,7 +2177,7 @@
 
   int packet_number = 1;
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS,
@@ -2234,7 +2241,7 @@
   socket_data1.AddWrite(
       SYNCHRONOUS, client_maker_.MakeAckAndRstPacket(
                        packet_number++, false, GetNthClientInitiatedStreamId(0),
-                       QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                       quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // Trigger connection migration. This should cause a PING frame
@@ -2363,7 +2370,7 @@
   socket_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_STREAM_CANCELLED));
+                                  quic::QUIC_STREAM_CANCELLED));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -2417,7 +2424,7 @@
   socket_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_STREAM_CANCELLED));
+                                  quic::QUIC_STREAM_CANCELLED));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -2444,7 +2451,8 @@
   EXPECT_TRUE(HasActiveSession(host_port_pair_));
 
   // Set session config to have connection migration disabled.
-  QuicConfigPeer::SetReceivedDisableConnectionMigration(session->config());
+  quic::test::QuicConfigPeer::SetReceivedDisableConnectionMigration(
+      session->config());
   EXPECT_TRUE(session->config()->DisableConnectionMigration());
 
   // Trigger connection migration. Since there is a non-migratable stream,
@@ -2474,7 +2482,7 @@
   socket_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_RST_ACKNOWLEDGEMENT));
+                                  quic::QUIC_RST_ACKNOWLEDGEMENT));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -2503,7 +2511,7 @@
 
   // Trigger connection migration. Since there is a non-migratable stream,
   // this should cause a RST_STREAM frame to be emitted with
-  // QUIC_RST_ACKNOWLEDGEMENT error code, and the session will be closed.
+  // quic::QUIC_RST_ACKNOWLEDGEMENT error code, and the session will be closed.
   scoped_mock_network_change_notifier_->mock_network_change_notifier()
       ->NotifyNetworkDisconnected(kDefaultNetworkForTests);
 
@@ -2527,7 +2535,7 @@
   socket_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_RST_ACKNOWLEDGEMENT));
+                                  quic::QUIC_RST_ACKNOWLEDGEMENT));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -2554,12 +2562,13 @@
   EXPECT_TRUE(HasActiveSession(host_port_pair_));
 
   // Set session config to have connection migration disabled.
-  QuicConfigPeer::SetReceivedDisableConnectionMigration(session->config());
+  quic::test::QuicConfigPeer::SetReceivedDisableConnectionMigration(
+      session->config());
   EXPECT_TRUE(session->config()->DisableConnectionMigration());
 
   // Trigger connection migration. Since there is a non-migratable stream,
   // this should cause a RST_STREAM frame to be emitted with
-  // QUIC_RST_ACKNOWLEDGEMENT error code, and the session will be closed.
+  // quic::QUIC_RST_ACKNOWLEDGEMENT error code, and the session will be closed.
   scoped_mock_network_change_notifier_->mock_network_change_notifier()
       ->NotifyNetworkDisconnected(kDefaultNetworkForTests);
 
@@ -2661,7 +2670,7 @@
   QuicStreamFactoryPeer::SetTaskRunner(factory_.get(), runner_.get());
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -2724,7 +2733,7 @@
   socket_data1.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             4, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // Add a new network and notify the stream factory of a new connected network.
@@ -2783,7 +2792,7 @@
       ->QueueNetworkMadeDefault(kDefaultNetworkForTests);
 
   MockQuicData quic_data1;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   quic_data1.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // Hanging Read.
   quic_data1.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
   quic_data1.AddWrite(SYNCHRONOUS, ConstructGetRequestPacket(
@@ -2806,9 +2815,10 @@
   quic_data2.AddRead(ASYNC, ConstructOkResponsePacket(
       2, GetNthClientInitiatedStreamId(0), false, false));
   quic_data2.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
-  quic_data2.AddWrite(SYNCHRONOUS, client_maker_.MakeAckAndRstPacket(
-      5, false, GetNthClientInitiatedStreamId(0), QUIC_STREAM_CANCELLED, 2, 2,
-      1, true));
+  quic_data2.AddWrite(SYNCHRONOUS,
+                      client_maker_.MakeAckAndRstPacket(
+                          5, false, GetNthClientInitiatedStreamId(0),
+                          quic::QUIC_STREAM_CANCELLED, 2, 2, 1, true));
   quic_data2.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -2930,7 +2940,7 @@
       ->QueueNetworkMadeDefault(kDefaultNetworkForTests);
 
   MockQuicData quic_data1;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   quic_data1.AddRead(SYNCHRONOUS, ERR_IO_PENDING);  // Hanging Read.
   quic_data1.AddWrite(SYNCHRONOUS,
                       ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -2959,7 +2969,7 @@
   quic_data2.AddWrite(SYNCHRONOUS,
                       client_maker_.MakeAckAndRstPacket(
                           5, false, GetNthClientInitiatedStreamId(0),
-                          QUIC_STREAM_CANCELLED, 2, 2, 1, true));
+                          quic::QUIC_STREAM_CANCELLED, 2, 2, 1, true));
   quic_data2.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -3081,7 +3091,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -3144,7 +3154,7 @@
   socket_data1.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             4, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // Add a new network and notify the stream factory of a new connected network.
@@ -3315,7 +3325,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -3365,7 +3375,7 @@
   socket_data1.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             4, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // Trigger early connection migration. This should cause a PING frame
@@ -3447,7 +3457,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -3499,7 +3509,7 @@
   socket_data1.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             4, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // Trigger early connection migration. This should cause a PING frame
@@ -3580,7 +3590,7 @@
   socket_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_STREAM_CANCELLED));
+                                  quic::QUIC_STREAM_CANCELLED));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -3637,7 +3647,7 @@
   socket_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_STREAM_CANCELLED));
+                                  quic::QUIC_STREAM_CANCELLED));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -3694,7 +3704,7 @@
   socket_data.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_STREAM_CANCELLED));
+                                  quic::QUIC_STREAM_CANCELLED));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -3721,7 +3731,8 @@
   EXPECT_TRUE(HasActiveSession(host_port_pair_));
 
   // Set session config to have connection migration disabled.
-  QuicConfigPeer::SetReceivedDisableConnectionMigration(session->config());
+  quic::test::QuicConfigPeer::SetReceivedDisableConnectionMigration(
+      session->config());
   EXPECT_TRUE(session->config()->DisableConnectionMigration());
 
   // Trigger connection migration. Since there is a non-migratable stream,
@@ -3751,7 +3762,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -3797,7 +3808,7 @@
   socket_data1.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             3, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // Send GET request on stream. This should cause a write error, which triggers
@@ -4038,7 +4049,8 @@
   EXPECT_TRUE(HasActiveSession(host_port_pair_));
 
   // Set session config to have connection migration disabled.
-  QuicConfigPeer::SetReceivedDisableConnectionMigration(session->config());
+  quic::test::QuicConfigPeer::SetReceivedDisableConnectionMigration(
+      session->config());
   EXPECT_TRUE(session->config()->DisableConnectionMigration());
 
   // Send GET request on stream. This should cause a write error, which triggers
@@ -4171,7 +4183,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -4217,7 +4229,7 @@
   socket_data1.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             3, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // First queue a network change notification in the message loop.
@@ -4275,7 +4287,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -4321,7 +4333,7 @@
   socket_data1.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             3, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // Send GET request on stream. This should cause a write error,
@@ -4380,7 +4392,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -4448,7 +4460,7 @@
   socket_data1.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             3, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   scoped_mock_network_change_notifier_->mock_network_change_notifier()
@@ -4520,7 +4532,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -4584,7 +4596,7 @@
   socket_data1.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             3, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   scoped_mock_network_change_notifier_->mock_network_change_notifier()
@@ -4680,7 +4692,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -4748,7 +4760,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockQuicData socket_data1;
-  QuicStreamOffset header_stream_offset = 0;
+  quic::QuicStreamOffset header_stream_offset = 0;
   socket_data1.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data1.AddWrite(
       SYNCHRONOUS, ConstructInitialSettingsPacket(1, &header_stream_offset));
@@ -4806,7 +4818,7 @@
   socket_data2.AddWrite(SYNCHRONOUS,
                         client_maker_.MakeAckAndRstPacket(
                             4, false, GetNthClientInitiatedStreamId(0),
-                            QUIC_STREAM_CANCELLED, 1, 1, 1, true));
+                            quic::QUIC_STREAM_CANCELLED, 1, 1, 1, true));
   socket_data2.AddSocketDataToFactory(socket_factory_.get());
 
   const uint8_t kTestIpAddress[] = {1, 2, 3, 4};
@@ -4844,9 +4856,9 @@
 TEST_P(QuicStreamFactoryTest, ServerMigrationIPv4ToIPv4) {
   // Add alternate IPv4 server address to config.
   IPEndPoint alt_address = IPEndPoint(IPAddress(1, 2, 3, 4), 123);
-  QuicConfig config;
+  quic::QuicConfig config;
   config.SetAlternateServerAddressToSend(
-      QuicSocketAddress(QuicSocketAddressImpl(alt_address)));
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(alt_address)));
   VerifyServerMigration(config, alt_address);
 }
 
@@ -4857,9 +4869,9 @@
   // Add alternate IPv6 server address to config.
   IPEndPoint alt_address = IPEndPoint(
       IPAddress(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), 123);
-  QuicConfig config;
+  quic::QuicConfig config;
   config.SetAlternateServerAddressToSend(
-      QuicSocketAddress(QuicSocketAddressImpl(alt_address)));
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(alt_address)));
   VerifyServerMigration(config, alt_address);
 }
 
@@ -4869,9 +4881,9 @@
                                            "fe80::aebc:32ff:febb:1e33", "");
   // Add alternate IPv4 server address to config.
   IPEndPoint alt_address = IPEndPoint(IPAddress(1, 2, 3, 4), 123);
-  QuicConfig config;
+  quic::QuicConfig config;
   config.SetAlternateServerAddressToSend(
-      QuicSocketAddress(QuicSocketAddressImpl(alt_address)));
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(alt_address)));
   IPEndPoint expected_address(
       ConvertIPv4ToIPv4MappedIPv6(alt_address.address()), alt_address.port());
   VerifyServerMigration(config, expected_address);
@@ -4887,9 +4899,9 @@
   // Add alternate IPv6 server address to config.
   IPEndPoint alt_address = IPEndPoint(
       IPAddress(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), 123);
-  QuicConfig config;
+  quic::QuicConfig config;
   config.SetAlternateServerAddressToSend(
-      QuicSocketAddress(QuicSocketAddressImpl(alt_address)));
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(alt_address)));
 
   ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails();
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
@@ -4904,7 +4916,7 @@
   socket_data1.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(2, true, GetNthClientInitiatedStreamId(0),
-                                  QUIC_STREAM_CANCELLED));
+                                  quic::QUIC_STREAM_CANCELLED));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   // Create request and QuicHttpStream.
@@ -4957,8 +4969,8 @@
   MockQuicData socket_data;
   socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING);
   socket_data.AddWrite(SYNCHRONOUS, ConstructInitialSettingsPacket());
-  socket_data.AddWrite(SYNCHRONOUS,
-                       ConstructClientRstPacket(2, QUIC_RST_ACKNOWLEDGEMENT));
+  socket_data.AddWrite(
+      SYNCHRONOUS, ConstructClientRstPacket(2, quic::QUIC_RST_ACKNOWLEDGEMENT));
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   MockQuicData socket_data2;
@@ -5085,10 +5097,10 @@
     r2_host_name.append(cannoncial_suffixes[i]);
 
     HostPortPair host_port_pair1(r1_host_name, 80);
-    QuicCryptoClientConfig* crypto_config =
+    quic::QuicCryptoClientConfig* crypto_config =
         QuicStreamFactoryPeer::GetCryptoConfig(factory_.get());
-    QuicServerId server_id1(host_port_pair1, privacy_mode_);
-    QuicCryptoClientConfig::CachedState* cached1 =
+    quic::QuicServerId server_id1(host_port_pair1, privacy_mode_);
+    quic::QuicCryptoClientConfig::CachedState* cached1 =
         crypto_config->LookupOrCreate(server_id1);
     EXPECT_FALSE(cached1->proof_valid());
     EXPECT_TRUE(cached1->source_address_token().empty());
@@ -5099,8 +5111,8 @@
     cached1->SetProofValid();
 
     HostPortPair host_port_pair2(r2_host_name, 80);
-    QuicServerId server_id2(host_port_pair2, privacy_mode_);
-    QuicCryptoClientConfig::CachedState* cached2 =
+    quic::QuicServerId server_id2(host_port_pair2, privacy_mode_);
+    quic::QuicCryptoClientConfig::CachedState* cached2 =
         crypto_config->LookupOrCreate(server_id2);
     EXPECT_EQ(cached1->source_address_token(), cached2->source_address_token());
     EXPECT_TRUE(cached2->proof_valid());
@@ -5120,10 +5132,10 @@
     r4_host_name.append(cannoncial_suffixes[i]);
 
     HostPortPair host_port_pair1(r3_host_name, 80);
-    QuicCryptoClientConfig* crypto_config =
+    quic::QuicCryptoClientConfig* crypto_config =
         QuicStreamFactoryPeer::GetCryptoConfig(factory_.get());
-    QuicServerId server_id1(host_port_pair1, privacy_mode_);
-    QuicCryptoClientConfig::CachedState* cached1 =
+    quic::QuicServerId server_id1(host_port_pair1, privacy_mode_);
+    quic::QuicCryptoClientConfig::CachedState* cached1 =
         crypto_config->LookupOrCreate(server_id1);
     EXPECT_FALSE(cached1->proof_valid());
     EXPECT_TRUE(cached1->source_address_token().empty());
@@ -5134,8 +5146,8 @@
     cached1->SetProofInvalid();
 
     HostPortPair host_port_pair2(r4_host_name, 80);
-    QuicServerId server_id2(host_port_pair2, privacy_mode_);
-    QuicCryptoClientConfig::CachedState* cached2 =
+    quic::QuicServerId server_id2(host_port_pair2, privacy_mode_);
+    quic::QuicCryptoClientConfig::CachedState* cached2 =
         crypto_config->LookupOrCreate(server_id2);
     EXPECT_NE(cached1->source_address_token(), cached2->source_address_token());
     EXPECT_TRUE(cached2->source_address_token().empty());
@@ -5156,7 +5168,7 @@
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::ZERO_RTT);
+      quic::MockCryptoClientStream::ZERO_RTT);
   host_resolver_.set_synchronous_mode(true);
   host_resolver_.rules()->AddIPLiteralRule(host_port_pair_.host(),
                                            "192.168.0.1", "");
@@ -5200,7 +5212,7 @@
   HostPortPair server2(kServer2HostName, kDefaultServerPort);
 
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::CONFIRM_HANDSHAKE);
+      quic::MockCryptoClientStream::CONFIRM_HANDSHAKE);
   host_resolver_.set_synchronous_mode(true);
   host_resolver_.rules()->AddIPLiteralRule(host_port_pair_.host(),
                                            "192.168.0.1", "");
@@ -5208,7 +5220,7 @@
 
   // Quic should use default PING timeout when no previous connection times out
   // with open stream.
-  EXPECT_EQ(QuicTime::Delta::FromSeconds(kPingTimeoutSecs),
+  EXPECT_EQ(quic::QuicTime::Delta::FromSeconds(quic::kPingTimeoutSecs),
             QuicStreamFactoryPeer::GetPingTimeout(factory_.get()));
   QuicStreamRequest request(factory_.get());
   EXPECT_EQ(OK, request.Request(host_port_pair_, version_, privacy_mode_,
@@ -5217,7 +5229,7 @@
                                 &net_error_details_, callback_.callback()));
 
   QuicChromiumClientSession* session = GetActiveSession(host_port_pair_);
-  EXPECT_EQ(QuicTime::Delta::FromSeconds(kPingTimeoutSecs),
+  EXPECT_EQ(quic::QuicTime::Delta::FromSeconds(quic::kPingTimeoutSecs),
             session->connection()->ping_timeout());
 
   std::unique_ptr<HttpStream> stream = CreateStream(&request);
@@ -5230,8 +5242,9 @@
 
   DVLOG(1)
       << "Created 1st session and initialized a stream. Now trigger timeout";
-  session->connection()->CloseConnection(QUIC_NETWORK_IDLE_TIMEOUT, "test",
-                                         ConnectionCloseBehavior::SILENT_CLOSE);
+  session->connection()->CloseConnection(
+      quic::QUIC_NETWORK_IDLE_TIMEOUT, "test",
+      quic::ConnectionCloseBehavior::SILENT_CLOSE);
   // Need to spin the loop now to ensure that
   // QuicStreamFactory::OnSessionClosed() runs.
   base::RunLoop run_loop;
@@ -5239,7 +5252,7 @@
 
   // The first connection times out with open stream, QUIC should reduce initial
   // PING time for subsequent connections.
-  EXPECT_EQ(QuicTime::Delta::FromSeconds(10),
+  EXPECT_EQ(quic::QuicTime::Delta::FromSeconds(10),
             QuicStreamFactoryPeer::GetPingTimeout(factory_.get()));
 
   // Test two-in-a-row timeouts with open streams.
@@ -5251,7 +5264,7 @@
                                  /*cert_verify_flags=*/0, url2_, net_log_,
                                  &net_error_details_, callback2.callback()));
   QuicChromiumClientSession* session2 = GetActiveSession(server2);
-  EXPECT_EQ(QuicTime::Delta::FromSeconds(10),
+  EXPECT_EQ(quic::QuicTime::Delta::FromSeconds(10),
             session2->connection()->ping_timeout());
 
   std::unique_ptr<HttpStream> stream2 = CreateStream(&request2);
@@ -5260,7 +5273,8 @@
             stream2->InitializeStream(&request_info, false, DEFAULT_PRIORITY,
                                       net_log_, CompletionOnceCallback()));
   session2->connection()->CloseConnection(
-      QUIC_NETWORK_IDLE_TIMEOUT, "test", ConnectionCloseBehavior::SILENT_CLOSE);
+      quic::QUIC_NETWORK_IDLE_TIMEOUT, "test",
+      quic::ConnectionCloseBehavior::SILENT_CLOSE);
   // Need to spin the loop now to ensure that
   // QuicStreamFactory::OnSessionClosed() runs.
   base::RunLoop run_loop2;
@@ -5291,16 +5305,16 @@
 
   // Load server config.
   HostPortPair host_port_pair(kDefaultServerHostName, kDefaultServerPort);
-  QuicServerId quic_server_id(host_port_pair_, privacy_mode_);
+  quic::QuicServerId quic_server_id(host_port_pair_, privacy_mode_);
   QuicStreamFactoryPeer::CacheDummyServerConfig(factory_.get(), quic_server_id);
 
   QuicStreamFactoryPeer::SetRaceCertVerification(factory_.get(), true);
   EXPECT_FALSE(HasActiveCertVerifierJob(quic_server_id));
 
   // Start CertVerifyJob.
-  QuicAsyncStatus status = QuicStreamFactoryPeer::StartCertVerifyJob(
+  quic::QuicAsyncStatus status = QuicStreamFactoryPeer::StartCertVerifyJob(
       factory_.get(), quic_server_id, /*cert_verify_flags=*/0, net_log_);
-  if (status == QUIC_PENDING) {
+  if (status == quic::QUIC_PENDING) {
     // Verify CertVerifierJob has started.
     EXPECT_TRUE(HasActiveCertVerifierJob(quic_server_id));
 
@@ -5349,7 +5363,7 @@
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::ZERO_RTT);
+      quic::MockCryptoClientStream::ZERO_RTT);
   host_resolver_.set_synchronous_mode(true);
   host_resolver_.rules()->AddIPLiteralRule(host_port_pair_.host(),
                                            "192.168.0.1", "");
@@ -5388,7 +5402,7 @@
   ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails();
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
   QuicStreamFactoryPeer::SetYieldAfterDuration(
-      factory_.get(), QuicTime::Delta::FromMilliseconds(-1));
+      factory_.get(), quic::QuicTime::Delta::FromMilliseconds(-1));
 
   MockQuicData socket_data;
   socket_data.AddRead(SYNCHRONOUS, ConstructClientConnectionClosePacket(0));
@@ -5396,7 +5410,7 @@
   socket_data.AddSocketDataToFactory(socket_factory_.get());
 
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::ZERO_RTT);
+      quic::MockCryptoClientStream::ZERO_RTT);
   host_resolver_.set_synchronous_mode(true);
   host_resolver_.rules()->AddIPLiteralRule(host_port_pair_.host(),
                                            "192.168.0.1", "");
@@ -5456,8 +5470,8 @@
 
   QuicChromiumClientSession* session = GetActiveSession(host_port_pair_);
 
-  QuicClientPromisedInfo promised(session, GetNthServerInitiatedStreamId(0),
-                                  kDefaultUrl);
+  quic::QuicClientPromisedInfo promised(
+      session, GetNthServerInitiatedStreamId(0), kDefaultUrl);
   (*QuicStreamFactoryPeer::GetPushPromiseIndex(factory_.get())
         ->promised_by_url())[kDefaultUrl] = &promised;
 
@@ -5482,7 +5496,7 @@
   socket_data1.AddWrite(
       SYNCHRONOUS,
       client_maker_.MakeRstPacket(2, true, GetNthServerInitiatedStreamId(0),
-                                  QUIC_STREAM_CANCELLED));
+                                  quic::QUIC_STREAM_CANCELLED));
   socket_data1.AddSocketDataToFactory(socket_factory_.get());
 
   MockQuicData socket_data2;
@@ -5506,10 +5520,10 @@
   string url = "https://www.example.org/";
   QuicChromiumClientSession* session = GetActiveSession(host_port_pair_);
 
-  QuicClientPromisedInfo promised(session, GetNthServerInitiatedStreamId(0),
-                                  kDefaultUrl);
+  quic::QuicClientPromisedInfo promised(
+      session, GetNthServerInitiatedStreamId(0), kDefaultUrl);
 
-  QuicClientPushPromiseIndex* index =
+  quic::QuicClientPushPromiseIndex* index =
       QuicStreamFactoryPeer::GetPushPromiseIndex(factory_.get());
 
   (*index->promised_by_url())[kDefaultUrl] = &promised;
@@ -5537,7 +5551,7 @@
   EXPECT_TRUE(socket_data2.AllWriteDataConsumed());
 }
 
-// Pool to existing session with matching QuicServerId
+// Pool to existing session with matching quic::QuicServerId
 // even if destination is different.
 TEST_P(QuicStreamFactoryTest, PoolByOrigin) {
   Initialize();
@@ -5579,7 +5593,7 @@
   QuicChromiumClientSession::Handle* session2 =
       QuicHttpStreamPeer::GetSessionHandle(stream2.get());
   EXPECT_TRUE(session1->SharesSameSession(*session2));
-  EXPECT_EQ(QuicServerId(host_port_pair_, privacy_mode_),
+  EXPECT_EQ(quic::QuicServerId(host_port_pair_, privacy_mode_),
             session1->server_id());
 
   EXPECT_TRUE(socket_data.AllReadDataConsumed());
@@ -5705,7 +5719,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, settings_packet->data(),
                                   settings_packet->length(), 1)};
@@ -5742,7 +5756,7 @@
       QuicHttpStreamPeer::GetSessionHandle(stream2.get());
   EXPECT_TRUE(session1->SharesSameSession(*session2));
 
-  EXPECT_EQ(QuicServerId(origin1_, privacy_mode_), session1->server_id());
+  EXPECT_EQ(quic::QuicServerId(origin1_, privacy_mode_), session1->server_id());
 
   EXPECT_TRUE(AllDataConsumed());
 }
@@ -5775,7 +5789,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details2);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, settings_packet->data(),
                                   settings_packet->length(), 1)};
@@ -5812,16 +5826,16 @@
 
   // |request2| does not pool to the first session, because PrivacyMode does not
   // match.  Instead, another session is opened to the same destination, but
-  // with a different QuicServerId.
+  // with a different quic::QuicServerId.
   QuicChromiumClientSession::Handle* session1 =
       QuicHttpStreamPeer::GetSessionHandle(stream1.get());
   QuicChromiumClientSession::Handle* session2 =
       QuicHttpStreamPeer::GetSessionHandle(stream2.get());
   EXPECT_FALSE(session1->SharesSameSession(*session2));
 
-  EXPECT_EQ(QuicServerId(origin1_, PRIVACY_MODE_DISABLED),
+  EXPECT_EQ(quic::QuicServerId(origin1_, PRIVACY_MODE_DISABLED),
             session1->server_id());
-  EXPECT_EQ(QuicServerId(origin2_, PRIVACY_MODE_ENABLED),
+  EXPECT_EQ(quic::QuicServerId(origin2_, PRIVACY_MODE_ENABLED),
             session2->server_id());
 
   EXPECT_TRUE(AllDataConsumed());
@@ -5860,7 +5874,7 @@
   crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details2);
 
   MockRead reads[] = {MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)};
-  std::unique_ptr<QuicEncryptedPacket> settings_packet(
+  std::unique_ptr<quic::QuicEncryptedPacket> settings_packet(
       client_maker_.MakeInitialSettingsPacket(1, nullptr));
   MockWrite writes[] = {MockWrite(SYNCHRONOUS, settings_packet->data(),
                                   settings_packet->length(), 1)};
@@ -5897,15 +5911,15 @@
 
   // |request2| does not pool to the first session, because the certificate does
   // not match.  Instead, another session is opened to the same destination, but
-  // with a different QuicServerId.
+  // with a different quic::QuicServerId.
   QuicChromiumClientSession::Handle* session1 =
       QuicHttpStreamPeer::GetSessionHandle(stream1.get());
   QuicChromiumClientSession::Handle* session2 =
       QuicHttpStreamPeer::GetSessionHandle(stream2.get());
   EXPECT_FALSE(session1->SharesSameSession(*session2));
 
-  EXPECT_EQ(QuicServerId(origin1_, privacy_mode_), session1->server_id());
-  EXPECT_EQ(QuicServerId(origin2_, privacy_mode_), session2->server_id());
+  EXPECT_EQ(quic::QuicServerId(origin1_, privacy_mode_), session1->server_id());
+  EXPECT_EQ(quic::QuicServerId(origin2_, privacy_mode_), session2->server_id());
 
   EXPECT_TRUE(AllDataConsumed());
 }
@@ -5915,14 +5929,14 @@
 // deletion itself works correctly is tested in QuicCryptoClientConfigTest.
 TEST_P(QuicStreamFactoryTest, ClearCachedStatesInCryptoConfig) {
   Initialize();
-  QuicCryptoClientConfig* crypto_config =
+  quic::QuicCryptoClientConfig* crypto_config =
       QuicStreamFactoryPeer::GetCryptoConfig(factory_.get());
 
   struct TestCase {
     TestCase(const std::string& host,
              int port,
              PrivacyMode privacy_mode,
-             QuicCryptoClientConfig* crypto_config)
+             quic::QuicCryptoClientConfig* crypto_config)
         : server_id(host, port, privacy_mode),
           state(crypto_config->LookupOrCreate(server_id)) {
       std::vector<string> certs(1);
@@ -5934,8 +5948,8 @@
       EXPECT_FALSE(state->certs().empty());
     }
 
-    QuicServerId server_id;
-    QuicCryptoClientConfig::CachedState* state;
+    quic::QuicServerId server_id;
+    quic::QuicCryptoClientConfig::CachedState* state;
   } test_cases[] = {
       TestCase("www.google.com", 443, privacy_mode_, crypto_config),
       TestCase("www.example.com", 443, privacy_mode_, crypto_config),
@@ -5958,23 +5972,24 @@
 }
 
 // Passes connection options and client connection options to QuicStreamFactory,
-// then checks that its internal QuicConfig is correct.
+// then checks that its internal quic::QuicConfig is correct.
 TEST_P(QuicStreamFactoryTest, ConfigConnectionOptions) {
-  connection_options_.push_back(net::kTIME);
-  connection_options_.push_back(net::kTBBR);
-  connection_options_.push_back(net::kREJ);
+  connection_options_.push_back(quic::kTIME);
+  connection_options_.push_back(quic::kTBBR);
+  connection_options_.push_back(quic::kREJ);
 
-  client_connection_options_.push_back(net::kTBBR);
-  client_connection_options_.push_back(net::k1RTT);
+  client_connection_options_.push_back(quic::kTBBR);
+  client_connection_options_.push_back(quic::k1RTT);
 
   Initialize();
 
-  const QuicConfig* config = QuicStreamFactoryPeer::GetConfig(factory_.get());
+  const quic::QuicConfig* config =
+      QuicStreamFactoryPeer::GetConfig(factory_.get());
   EXPECT_EQ(connection_options_, config->SendConnectionOptions());
   EXPECT_TRUE(config->HasClientRequestedIndependentOption(
-      net::kTBBR, Perspective::IS_CLIENT));
+      quic::kTBBR, quic::Perspective::IS_CLIENT));
   EXPECT_TRUE(config->HasClientRequestedIndependentOption(
-      net::k1RTT, Perspective::IS_CLIENT));
+      quic::k1RTT, quic::Perspective::IS_CLIENT));
 }
 
 // Verifies that the host resolver uses the request priority passed to
@@ -6008,17 +6023,18 @@
 
 // Passes |max_time_before_crypto_handshake_seconds| and
 // |max_idle_time_before_crypto_handshake_seconds| to QuicStreamFactory, then
-// checks that its internal QuicConfig is correct.
+// checks that its internal quic::QuicConfig is correct.
 TEST_P(QuicStreamFactoryTest, ConfigMaxTimeBeforeCryptoHandshake) {
   max_time_before_crypto_handshake_seconds_ = 11;
   max_idle_time_before_crypto_handshake_seconds_ = 13;
 
   Initialize();
 
-  const QuicConfig* config = QuicStreamFactoryPeer::GetConfig(factory_.get());
-  EXPECT_EQ(QuicTime::Delta::FromSeconds(11),
+  const quic::QuicConfig* config =
+      QuicStreamFactoryPeer::GetConfig(factory_.get());
+  EXPECT_EQ(quic::QuicTime::Delta::FromSeconds(11),
             config->max_time_before_crypto_handshake());
-  EXPECT_EQ(QuicTime::Delta::FromSeconds(13),
+  EXPECT_EQ(quic::QuicTime::Delta::FromSeconds(13),
             config->max_idle_time_before_crypto_handshake());
 }
 
@@ -6080,7 +6096,7 @@
 
   host_resolver_.set_ondemand_mode(true);
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::ZERO_RTT);
+      quic::MockCryptoClientStream::ZERO_RTT);
   factory_->set_require_confirmation(true);
 
   MockQuicData socket_data;
@@ -6167,7 +6183,7 @@
   // will fail asynchronously.
   host_resolver_.set_synchronous_mode(true);
   crypto_client_stream_factory_.set_handshake_mode(
-      MockCryptoClientStream::ZERO_RTT);
+      quic::MockCryptoClientStream::ZERO_RTT);
   factory_->set_require_confirmation(true);
 
   MockQuicData socket_data;
diff --git a/net/quic/chromium/quic_test_packet_maker.cc b/net/quic/chromium/quic_test_packet_maker.cc
index b65eb2f1..ae122af 100644
--- a/net/quic/chromium/quic_test_packet_maker.cc
+++ b/net/quic/chromium/quic_test_packet_maker.cc
@@ -16,8 +16,8 @@
 namespace test {
 namespace {
 
-QuicAckFrame MakeAckFrame(QuicPacketNumber largest_observed) {
-  QuicAckFrame ack;
+quic::QuicAckFrame MakeAckFrame(quic::QuicPacketNumber largest_observed) {
+  quic::QuicAckFrame ack;
   ack.largest_acked = largest_observed;
   return ack;
 }
@@ -25,11 +25,11 @@
 }  // namespace
 
 QuicTestPacketMaker::QuicTestPacketMaker(
-    QuicTransportVersion version,
-    QuicConnectionId connection_id,
-    MockClock* clock,
+    quic::QuicTransportVersion version,
+    quic::QuicConnectionId connection_id,
+    quic::MockClock* clock,
     const std::string& host,
-    Perspective perspective,
+    quic::Perspective perspective,
     bool client_headers_include_h2_stream_dependency)
     : version_(version),
       connection_id_(connection_id),
@@ -38,12 +38,12 @@
       spdy_request_framer_(spdy::SpdyFramer::ENABLE_COMPRESSION),
       spdy_response_framer_(spdy::SpdyFramer::ENABLE_COMPRESSION),
       perspective_(perspective),
-      encryption_level_(ENCRYPTION_FORWARD_SECURE),
-      long_header_type_(HANDSHAKE),
+      encryption_level_(quic::ENCRYPTION_FORWARD_SECURE),
+      long_header_type_(quic::HANDSHAKE),
       client_headers_include_h2_stream_dependency_(
           client_headers_include_h2_stream_dependency &&
-          version > QUIC_VERSION_42) {
-  DCHECK(!(perspective_ == Perspective::IS_SERVER &&
+          version > quic::QUIC_VERSION_42) {
+  DCHECK(!(perspective_ == quic::Perspective::IS_SERVER &&
            client_headers_include_h2_stream_dependency_));
 }
 
@@ -53,12 +53,12 @@
   host_.assign(host);
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeConnectivityProbingPacket(
-    QuicPacketNumber num,
+    quic::QuicPacketNumber num,
     bool include_version,
-    QuicByteCount packet_length) {
-  QuicPacketHeader header;
+    quic::QuicByteCount packet_length) {
+  quic::QuicPacketHeader header;
   header.connection_id = connection_id_;
   header.reset_flag = false;
   header.version_flag = ShouldIncludeVersion(include_version);
@@ -66,26 +66,27 @@
   header.packet_number_length = GetPacketNumberLength();
   header.packet_number = num;
 
-  QuicFramer framer(
-      SupportedVersions(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version_)),
-      clock_->Now(), perspective_);
+  quic::QuicFramer framer(quic::test::SupportedVersions(quic::ParsedQuicVersion(
+                              quic::PROTOCOL_QUIC_CRYPTO, version_)),
+                          clock_->Now(), perspective_);
 
-  char buffer[kMaxPacketSize];
+  char buffer[quic::kMaxPacketSize];
   size_t length =
       framer.BuildConnectivityProbingPacket(header, buffer, packet_length);
   size_t encrypted_size = framer.EncryptInPlace(
-      ENCRYPTION_NONE, header.packet_number,
+      quic::ENCRYPTION_NONE, header.packet_number,
       GetStartOfEncryptedData(framer.transport_version(), header), length,
-      kMaxPacketSize, buffer);
+      quic::kMaxPacketSize, buffer);
   EXPECT_NE(0u, encrypted_size);
-  QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(), false);
-  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
+  quic::QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(),
+                                     false);
+  return std::unique_ptr<quic::QuicReceivedPacket>(encrypted.Clone());
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePingPacket(
-    QuicPacketNumber num,
+std::unique_ptr<quic::QuicReceivedPacket> QuicTestPacketMaker::MakePingPacket(
+    quic::QuicPacketNumber num,
     bool include_version) {
-  QuicPacketHeader header;
+  quic::QuicPacketHeader header;
   header.connection_id = connection_id_;
   header.reset_flag = false;
   header.version_flag = ShouldIncludeVersion(include_version);
@@ -93,18 +94,18 @@
   header.packet_number_length = GetPacketNumberLength();
   header.packet_number = num;
 
-  QuicPingFrame ping;
-  return std::unique_ptr<QuicReceivedPacket>(
-      MakePacket(header, QuicFrame(ping)));
+  quic::QuicPingFrame ping;
+  return MakePacket(header, quic::QuicFrame(ping));
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckAndPingPacket(
-    QuicPacketNumber num,
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakeAckAndPingPacket(
+    quic::QuicPacketNumber num,
     bool include_version,
-    QuicPacketNumber largest_received,
-    QuicPacketNumber smallest_received,
-    QuicPacketNumber least_unacked) {
-  QuicPacketHeader header;
+    quic::QuicPacketNumber largest_received,
+    quic::QuicPacketNumber smallest_received,
+    quic::QuicPacketNumber least_unacked) {
+  quic::QuicPacketHeader header;
   header.connection_id = connection_id_;
   header.reset_flag = false;
   header.version_flag = ShouldIncludeVersion(include_version);
@@ -112,56 +113,59 @@
   header.packet_number_length = GetPacketNumberLength();
   header.packet_number = num;
 
-  QuicAckFrame ack(MakeAckFrame(largest_received));
-  ack.ack_delay_time = QuicTime::Delta::Zero();
-  for (QuicPacketNumber i = smallest_received; i <= largest_received; ++i) {
+  quic::QuicAckFrame ack(MakeAckFrame(largest_received));
+  ack.ack_delay_time = quic::QuicTime::Delta::Zero();
+  for (quic::QuicPacketNumber i = smallest_received; i <= largest_received;
+       ++i) {
     ack.received_packet_times.push_back(std::make_pair(i, clock_->Now()));
   }
   if (largest_received > 0) {
     ack.packets.AddRange(1, largest_received + 1);
   }
-  QuicFrames frames;
-  frames.push_back(QuicFrame(&ack));
-  DVLOG(1) << "Adding frame: " << frames[0];
+  quic::QuicFrames frames;
+  frames.push_back(quic::QuicFrame(&ack));
+  DVLOG(1) << "Adding frame: " << frames.back();
 
-  QuicStopWaitingFrame stop_waiting;
-  if (version_ <= QUIC_VERSION_43) {
+  quic::QuicStopWaitingFrame stop_waiting;
+  if (version_ <= quic::QUIC_VERSION_43) {
     stop_waiting.least_unacked = least_unacked;
-    frames.push_back(QuicFrame(&stop_waiting));
-    DVLOG(1) << "Adding frame: " << frames[1];
+    frames.push_back(quic::QuicFrame(&stop_waiting));
+    DVLOG(1) << "Adding frame: " << frames.back();
   }
 
-  frames.push_back(QuicFrame(QuicPingFrame()));
-  DVLOG(1) << "Adding frame: " << frames[2];
+  frames.push_back(quic::QuicFrame(quic::QuicPingFrame()));
+  DVLOG(1) << "Adding frame: " << frames.back();
 
-  QuicFramer framer(
-      SupportedVersions(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version_)),
-      clock_->Now(), perspective_);
-  std::unique_ptr<QuicPacket> packet(
-      BuildUnsizedDataPacket(&framer, header, frames));
-  char buffer[kMaxPacketSize];
-  size_t encrypted_size = framer.EncryptPayload(
-      ENCRYPTION_NONE, header.packet_number, *packet, buffer, kMaxPacketSize);
+  quic::QuicFramer framer(quic::test::SupportedVersions(quic::ParsedQuicVersion(
+                              quic::PROTOCOL_QUIC_CRYPTO, version_)),
+                          clock_->Now(), perspective_);
+  std::unique_ptr<quic::QuicPacket> packet(
+      quic::test::BuildUnsizedDataPacket(&framer, header, frames));
+  char buffer[quic::kMaxPacketSize];
+  size_t encrypted_size =
+      framer.EncryptPayload(quic::ENCRYPTION_NONE, header.packet_number,
+                            *packet, buffer, quic::kMaxPacketSize);
   EXPECT_NE(0u, encrypted_size);
-  QuicReceivedPacket encrypted(buffer, encrypted_size, QuicTime::Zero(), false);
-  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
+  quic::QuicReceivedPacket encrypted(buffer, encrypted_size,
+                                     quic::QuicTime::Zero(), false);
+  return std::unique_ptr<quic::QuicReceivedPacket>(encrypted.Clone());
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeRstPacket(
-    QuicPacketNumber num,
+std::unique_ptr<quic::QuicReceivedPacket> QuicTestPacketMaker::MakeRstPacket(
+    quic::QuicPacketNumber num,
     bool include_version,
-    QuicStreamId stream_id,
-    QuicRstStreamErrorCode error_code) {
+    quic::QuicStreamId stream_id,
+    quic::QuicRstStreamErrorCode error_code) {
   return MakeRstPacket(num, include_version, stream_id, error_code, 0);
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeRstPacket(
-    QuicPacketNumber num,
+std::unique_ptr<quic::QuicReceivedPacket> QuicTestPacketMaker::MakeRstPacket(
+    quic::QuicPacketNumber num,
     bool include_version,
-    QuicStreamId stream_id,
-    QuicRstStreamErrorCode error_code,
+    quic::QuicStreamId stream_id,
+    quic::QuicRstStreamErrorCode error_code,
     size_t bytes_written) {
-  QuicPacketHeader header;
+  quic::QuicPacketHeader header;
   header.connection_id = connection_id_;
   header.reset_flag = false;
   header.version_flag = ShouldIncludeVersion(include_version);
@@ -169,37 +173,38 @@
   header.packet_number_length = GetPacketNumberLength();
   header.packet_number = num;
 
-  QuicRstStreamFrame rst(1, stream_id, error_code, bytes_written);
-  DVLOG(1) << "Adding frame: " << QuicFrame(&rst);
-  return std::unique_ptr<QuicReceivedPacket>(
-      MakePacket(header, QuicFrame(&rst)));
+  quic::QuicRstStreamFrame rst(1, stream_id, error_code, bytes_written);
+  DVLOG(1) << "Adding frame: " << quic::QuicFrame(&rst);
+  return MakePacket(header, quic::QuicFrame(&rst));
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckAndRstPacket(
-    QuicPacketNumber num,
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakeAckAndRstPacket(
+    quic::QuicPacketNumber num,
     bool include_version,
-    QuicStreamId stream_id,
-    QuicRstStreamErrorCode error_code,
-    QuicPacketNumber largest_received,
-    QuicPacketNumber smallest_received,
-    QuicPacketNumber least_unacked,
+    quic::QuicStreamId stream_id,
+    quic::QuicRstStreamErrorCode error_code,
+    quic::QuicPacketNumber largest_received,
+    quic::QuicPacketNumber smallest_received,
+    quic::QuicPacketNumber least_unacked,
     bool send_feedback) {
   return MakeAckAndRstPacket(num, include_version, stream_id, error_code,
                              largest_received, smallest_received, least_unacked,
                              send_feedback, 0);
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckAndRstPacket(
-    QuicPacketNumber num,
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakeAckAndRstPacket(
+    quic::QuicPacketNumber num,
     bool include_version,
-    QuicStreamId stream_id,
-    QuicRstStreamErrorCode error_code,
-    QuicPacketNumber largest_received,
-    QuicPacketNumber smallest_received,
-    QuicPacketNumber least_unacked,
+    quic::QuicStreamId stream_id,
+    quic::QuicRstStreamErrorCode error_code,
+    quic::QuicPacketNumber largest_received,
+    quic::QuicPacketNumber smallest_received,
+    quic::QuicPacketNumber least_unacked,
     bool send_feedback,
     size_t bytes_written) {
-  QuicPacketHeader header;
+  quic::QuicPacketHeader header;
   header.connection_id = connection_id_;
   header.reset_flag = false;
   header.version_flag = ShouldIncludeVersion(include_version);
@@ -207,53 +212,57 @@
   header.packet_number_length = GetPacketNumberLength();
   header.packet_number = num;
 
-  QuicAckFrame ack(MakeAckFrame(largest_received));
-  ack.ack_delay_time = QuicTime::Delta::Zero();
-  for (QuicPacketNumber i = smallest_received; i <= largest_received; ++i) {
+  quic::QuicAckFrame ack(MakeAckFrame(largest_received));
+  ack.ack_delay_time = quic::QuicTime::Delta::Zero();
+  for (quic::QuicPacketNumber i = smallest_received; i <= largest_received;
+       ++i) {
     ack.received_packet_times.push_back(std::make_pair(i, clock_->Now()));
   }
   if (largest_received > 0) {
     ack.packets.AddRange(1, largest_received + 1);
   }
-  QuicFrames frames;
-  frames.push_back(QuicFrame(&ack));
-  DVLOG(1) << "Adding frame: " << frames[0];
+  quic::QuicFrames frames;
+  frames.push_back(quic::QuicFrame(&ack));
+  DVLOG(1) << "Adding frame: " << frames.back();
 
-  QuicStopWaitingFrame stop_waiting;
-  if (version_ <= QUIC_VERSION_43) {
+  quic::QuicStopWaitingFrame stop_waiting;
+  if (version_ <= quic::QUIC_VERSION_43) {
     stop_waiting.least_unacked = least_unacked;
-    frames.push_back(QuicFrame(&stop_waiting));
-    DVLOG(1) << "Adding frame: " << frames[1];
+    frames.push_back(quic::QuicFrame(&stop_waiting));
+    DVLOG(1) << "Adding frame: " << frames.back();
   }
 
-  QuicRstStreamFrame rst(1, stream_id, error_code, bytes_written);
-  frames.push_back(QuicFrame(&rst));
+  quic::QuicRstStreamFrame rst(1, stream_id, error_code, bytes_written);
+  frames.push_back(quic::QuicFrame(&rst));
   DVLOG(1) << "Adding frame: " << frames[2];
+  DVLOG(1) << "Adding frame: " << frames.back();
 
-  QuicFramer framer(
-      SupportedVersions(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version_)),
-      clock_->Now(), perspective_);
-  std::unique_ptr<QuicPacket> packet(
-      BuildUnsizedDataPacket(&framer, header, frames));
-  char buffer[kMaxPacketSize];
-  size_t encrypted_size = framer.EncryptPayload(
-      ENCRYPTION_NONE, header.packet_number, *packet, buffer, kMaxPacketSize);
+  quic::QuicFramer framer(quic::test::SupportedVersions(quic::ParsedQuicVersion(
+                              quic::PROTOCOL_QUIC_CRYPTO, version_)),
+                          clock_->Now(), perspective_);
+  std::unique_ptr<quic::QuicPacket> packet(
+      quic::test::BuildUnsizedDataPacket(&framer, header, frames));
+  char buffer[quic::kMaxPacketSize];
+  size_t encrypted_size =
+      framer.EncryptPayload(quic::ENCRYPTION_NONE, header.packet_number,
+                            *packet, buffer, quic::kMaxPacketSize);
   EXPECT_NE(0u, encrypted_size);
-  QuicReceivedPacket encrypted(buffer, encrypted_size, QuicTime::Zero(), false);
-  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
+  quic::QuicReceivedPacket encrypted(buffer, encrypted_size,
+                                     quic::QuicTime::Zero(), false);
+  return std::unique_ptr<quic::QuicReceivedPacket>(encrypted.Clone());
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeAckAndConnectionClosePacket(
-    QuicPacketNumber num,
+    quic::QuicPacketNumber num,
     bool include_version,
-    QuicTime::Delta ack_delay_time,
-    QuicPacketNumber largest_received,
-    QuicPacketNumber smallest_received,
-    QuicPacketNumber least_unacked,
-    QuicErrorCode quic_error,
+    quic::QuicTime::Delta ack_delay_time,
+    quic::QuicPacketNumber largest_received,
+    quic::QuicPacketNumber smallest_received,
+    quic::QuicPacketNumber least_unacked,
+    quic::QuicErrorCode quic_error,
     const std::string& quic_error_details) {
-  QuicPacketHeader header;
+  quic::QuicPacketHeader header;
   header.connection_id = connection_id_;
   header.reset_flag = false;
   header.version_flag = ShouldIncludeVersion(include_version);
@@ -261,53 +270,56 @@
   header.packet_number_length = GetPacketNumberLength();
   header.packet_number = num;
 
-  QuicAckFrame ack(MakeAckFrame(largest_received));
+  quic::QuicAckFrame ack(MakeAckFrame(largest_received));
   ack.ack_delay_time = ack_delay_time;
-  for (QuicPacketNumber i = smallest_received; i <= largest_received; ++i) {
+  for (quic::QuicPacketNumber i = smallest_received; i <= largest_received;
+       ++i) {
     ack.received_packet_times.push_back(std::make_pair(i, clock_->Now()));
   }
   if (largest_received > 0) {
     ack.packets.AddRange(1, largest_received + 1);
   }
-  QuicFrames frames;
-  frames.push_back(QuicFrame(&ack));
-  DVLOG(1) << "Adding frame: " << frames[0];
+  quic::QuicFrames frames;
+  frames.push_back(quic::QuicFrame(&ack));
+  DVLOG(1) << "Adding frame: " << frames.back();
 
-  QuicStopWaitingFrame stop_waiting;
-  if (version_ <= QUIC_VERSION_43) {
+  quic::QuicStopWaitingFrame stop_waiting;
+  if (version_ <= quic::QUIC_VERSION_43) {
     stop_waiting.least_unacked = least_unacked;
-    frames.push_back(QuicFrame(&stop_waiting));
-    DVLOG(1) << "Adding frame: " << frames[1];
+    frames.push_back(quic::QuicFrame(&stop_waiting));
+    DVLOG(1) << "Adding frame: " << frames.back();
   }
 
-  QuicConnectionCloseFrame close;
+  quic::QuicConnectionCloseFrame close;
   close.error_code = quic_error;
   close.error_details = quic_error_details;
 
-  frames.push_back(QuicFrame(&close));
-  DVLOG(1) << "Adding frame: " << frames[2];
+  frames.push_back(quic::QuicFrame(&close));
+  DVLOG(1) << "Adding frame: " << frames.back();
 
-  QuicFramer framer(
-      SupportedVersions(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version_)),
-      clock_->Now(), perspective_);
+  quic::QuicFramer framer(quic::test::SupportedVersions(quic::ParsedQuicVersion(
+                              quic::PROTOCOL_QUIC_CRYPTO, version_)),
+                          clock_->Now(), perspective_);
 
-  std::unique_ptr<QuicPacket> packet(
-      BuildUnsizedDataPacket(&framer, header, frames));
-  char buffer[kMaxPacketSize];
-  size_t encrypted_size = framer.EncryptPayload(
-      ENCRYPTION_NONE, header.packet_number, *packet, buffer, kMaxPacketSize);
+  std::unique_ptr<quic::QuicPacket> packet(
+      quic::test::BuildUnsizedDataPacket(&framer, header, frames));
+  char buffer[quic::kMaxPacketSize];
+  size_t encrypted_size =
+      framer.EncryptPayload(quic::ENCRYPTION_NONE, header.packet_number,
+                            *packet, buffer, quic::kMaxPacketSize);
   EXPECT_NE(0u, encrypted_size);
-  QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(), false);
-  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
+  quic::QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(),
+                                     false);
+  return std::unique_ptr<quic::QuicReceivedPacket>(encrypted.Clone());
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeConnectionClosePacket(
-    QuicPacketNumber num,
+    quic::QuicPacketNumber num,
     bool include_version,
-    QuicErrorCode quic_error,
+    quic::QuicErrorCode quic_error,
     const std::string& quic_error_details) {
-  QuicPacketHeader header;
+  quic::QuicPacketHeader header;
   header.connection_id = connection_id_;
   header.reset_flag = false;
   header.version_flag = ShouldIncludeVersion(include_version);
@@ -315,18 +327,17 @@
   header.packet_number_length = GetPacketNumberLength();
   header.packet_number = num;
 
-  QuicConnectionCloseFrame close;
+  quic::QuicConnectionCloseFrame close;
   close.error_code = quic_error;
   close.error_details = quic_error_details;
-  return std::unique_ptr<QuicReceivedPacket>(
-      MakePacket(header, QuicFrame(&close)));
+  return MakePacket(header, quic::QuicFrame(&close));
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeGoAwayPacket(
-    QuicPacketNumber num,
-    QuicErrorCode error_code,
+std::unique_ptr<quic::QuicReceivedPacket> QuicTestPacketMaker::MakeGoAwayPacket(
+    quic::QuicPacketNumber num,
+    quic::QuicErrorCode error_code,
     std::string reason_phrase) {
-  QuicPacketHeader header;
+  quic::QuicPacketHeader header;
   header.connection_id = connection_id_;
   header.reset_flag = false;
   header.version_flag = ShouldIncludeVersion(false);
@@ -334,32 +345,32 @@
   header.packet_number_length = GetPacketNumberLength();
   header.packet_number = num;
 
-  QuicGoAwayFrame goaway;
+  quic::QuicGoAwayFrame goaway;
   goaway.error_code = error_code;
   goaway.last_good_stream_id = 0;
   goaway.reason_phrase = reason_phrase;
-  return std::unique_ptr<QuicReceivedPacket>(
-      MakePacket(header, QuicFrame(&goaway)));
+  return MakePacket(header, quic::QuicFrame(&goaway));
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckPacket(
-    QuicPacketNumber packet_number,
-    QuicPacketNumber largest_received,
-    QuicPacketNumber smallest_received,
-    QuicPacketNumber least_unacked,
+std::unique_ptr<quic::QuicReceivedPacket> QuicTestPacketMaker::MakeAckPacket(
+    quic::QuicPacketNumber packet_number,
+    quic::QuicPacketNumber largest_received,
+    quic::QuicPacketNumber smallest_received,
+    quic::QuicPacketNumber least_unacked,
     bool send_feedback) {
   return MakeAckPacket(packet_number, largest_received, smallest_received,
-                       least_unacked, send_feedback, QuicTime::Delta::Zero());
+                       least_unacked, send_feedback,
+                       quic::QuicTime::Delta::Zero());
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckPacket(
-    QuicPacketNumber packet_number,
-    QuicPacketNumber largest_received,
-    QuicPacketNumber smallest_received,
-    QuicPacketNumber least_unacked,
+std::unique_ptr<quic::QuicReceivedPacket> QuicTestPacketMaker::MakeAckPacket(
+    quic::QuicPacketNumber packet_number,
+    quic::QuicPacketNumber largest_received,
+    quic::QuicPacketNumber smallest_received,
+    quic::QuicPacketNumber least_unacked,
     bool send_feedback,
-    QuicTime::Delta ack_delay_time) {
-  QuicPacketHeader header;
+    quic::QuicTime::Delta ack_delay_time) {
+  quic::QuicPacketHeader header;
   header.connection_id = connection_id_;
   header.reset_flag = false;
   header.version_flag = ShouldIncludeVersion(false);
@@ -367,124 +378,132 @@
   header.packet_number_length = GetPacketNumberLength();
   header.packet_number = packet_number;
 
-  QuicAckFrame ack(MakeAckFrame(largest_received));
+  quic::QuicAckFrame ack(MakeAckFrame(largest_received));
   ack.ack_delay_time = ack_delay_time;
-  for (QuicPacketNumber i = smallest_received; i <= largest_received; ++i) {
+  for (quic::QuicPacketNumber i = smallest_received; i <= largest_received;
+       ++i) {
     ack.received_packet_times.push_back(std::make_pair(i, clock_->Now()));
   }
   if (largest_received > 0) {
     ack.packets.AddRange(1, largest_received + 1);
   }
-  QuicFramer framer(
-      SupportedVersions(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version_)),
-      clock_->Now(), perspective_);
-  QuicFrames frames;
-  QuicFrame ack_frame(&ack);
-  DVLOG(1) << "Adding frame: " << ack_frame;
+  quic::QuicFramer framer(quic::test::SupportedVersions(quic::ParsedQuicVersion(
+                              quic::PROTOCOL_QUIC_CRYPTO, version_)),
+                          clock_->Now(), perspective_);
+  quic::QuicFrames frames;
+  quic::QuicFrame ack_frame(&ack);
   frames.push_back(ack_frame);
+  DVLOG(1) << "Adding frame: " << frames.back();
 
-  QuicStopWaitingFrame stop_waiting;
-  if (version_ <= QUIC_VERSION_43) {
+  quic::QuicStopWaitingFrame stop_waiting;
+  if (version_ <= quic::QUIC_VERSION_43) {
     stop_waiting.least_unacked = least_unacked;
-    frames.push_back(QuicFrame(&stop_waiting));
+    frames.push_back(quic::QuicFrame(&stop_waiting));
+    DVLOG(1) << "Adding frame: " << frames.back();
   }
 
-  std::unique_ptr<QuicPacket> packet(
-      BuildUnsizedDataPacket(&framer, header, frames));
-  char buffer[kMaxPacketSize];
-  size_t encrypted_size = framer.EncryptPayload(
-      ENCRYPTION_NONE, header.packet_number, *packet, buffer, kMaxPacketSize);
+  std::unique_ptr<quic::QuicPacket> packet(
+      quic::test::BuildUnsizedDataPacket(&framer, header, frames));
+  char buffer[quic::kMaxPacketSize];
+  size_t encrypted_size =
+      framer.EncryptPayload(quic::ENCRYPTION_NONE, header.packet_number,
+                            *packet, buffer, quic::kMaxPacketSize);
   EXPECT_NE(0u, encrypted_size);
-  QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(), false);
-  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
+  quic::QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(),
+                                     false);
+  return std::unique_ptr<quic::QuicReceivedPacket>(encrypted.Clone());
 }
 
 // Returns a newly created packet to send kData on stream 1.
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeDataPacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+std::unique_ptr<quic::QuicReceivedPacket> QuicTestPacketMaker::MakeDataPacket(
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
-    QuicStreamOffset offset,
-    QuicStringPiece data) {
+    quic::QuicStreamOffset offset,
+    quic::QuicStringPiece data) {
   InitializeHeader(packet_number, should_include_version);
-  QuicStreamFrame frame(stream_id, fin, offset, data);
+  quic::QuicStreamFrame frame(stream_id, fin, offset, data);
   DVLOG(1) << "Adding frame: " << frame;
-  return MakePacket(header_, QuicFrame(&frame));
+  return MakePacket(header_, quic::QuicFrame(&frame));
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeMultipleDataFramesPacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
-    QuicStreamOffset offset,
+    quic::QuicStreamOffset offset,
     const std::vector<std::string>& data_writes) {
   InitializeHeader(packet_number, should_include_version);
-  QuicFrames data_frames;
-  // QuicFrame takes a raw pointer. Use a std::vector here so we keep
+  quic::QuicFrames data_frames;
+  // quic::QuicFrame takes a raw pointer. Use a std::vector here so we keep
   // StreamFrames alive until MakeMultipleFramesPacket is done.
-  std::vector<std::unique_ptr<QuicStreamFrame>> stream_frames;
+  std::vector<std::unique_ptr<quic::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(std::make_unique<QuicStreamFrame>(
-        stream_id, is_fin, offset, QuicStringPiece(data_writes[i])));
+    stream_frames.push_back(std::make_unique<quic::QuicStreamFrame>(
+        stream_id, is_fin, offset, quic::QuicStringPiece(data_writes[i])));
     offset += data_writes[i].length();
   }
   for (const auto& stream_frame : stream_frames) {
-    QuicFrame quic_frame(stream_frame.get());
+    quic::QuicFrame quic_frame(stream_frame.get());
     DVLOG(1) << "Adding frame: " << quic_frame;
     data_frames.push_back(quic_frame);
   }
   return MakeMultipleFramesPacket(header_, data_frames);
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeAckAndDataPacket(
-    QuicPacketNumber packet_number,
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakeAckAndDataPacket(
+    quic::QuicPacketNumber packet_number,
     bool include_version,
-    QuicStreamId stream_id,
-    QuicPacketNumber largest_received,
-    QuicPacketNumber smallest_received,
-    QuicPacketNumber least_unacked,
+    quic::QuicStreamId stream_id,
+    quic::QuicPacketNumber largest_received,
+    quic::QuicPacketNumber smallest_received,
+    quic::QuicPacketNumber least_unacked,
     bool fin,
-    QuicStreamOffset offset,
-    QuicStringPiece data) {
+    quic::QuicStreamOffset offset,
+    quic::QuicStringPiece data) {
   InitializeHeader(packet_number, include_version);
 
-  QuicAckFrame ack(MakeAckFrame(largest_received));
-  ack.ack_delay_time = QuicTime::Delta::Zero();
-  for (QuicPacketNumber i = smallest_received; i <= largest_received; ++i) {
+  quic::QuicAckFrame ack(MakeAckFrame(largest_received));
+  ack.ack_delay_time = quic::QuicTime::Delta::Zero();
+  for (quic::QuicPacketNumber i = smallest_received; i <= largest_received;
+       ++i) {
     ack.received_packet_times.push_back(std::make_pair(i, clock_->Now()));
   }
   if (largest_received > 0) {
     ack.packets.AddRange(1, largest_received + 1);
   }
-  QuicFrames frames;
-  frames.push_back(QuicFrame(&ack));
+  quic::QuicFrames frames;
+  frames.push_back(quic::QuicFrame(&ack));
+  DVLOG(1) << "Adding frame: " << frames.back();
 
-  QuicStopWaitingFrame stop_waiting;
-  if (version_ <= QUIC_VERSION_43) {
+  quic::QuicStopWaitingFrame stop_waiting;
+  if (version_ <= quic::QUIC_VERSION_43) {
     stop_waiting.least_unacked = least_unacked;
-    frames.push_back(QuicFrame(&stop_waiting));
+    frames.push_back(quic::QuicFrame(&stop_waiting));
+    DVLOG(1) << "Adding frame: " << frames.back();
   }
 
-  QuicStreamFrame stream_frame(stream_id, fin, offset, data);
-  frames.push_back(QuicFrame(&stream_frame));
+  quic::QuicStreamFrame stream_frame(stream_id, fin, offset, data);
+  frames.push_back(quic::QuicFrame(&stream_frame));
 
   return MakeMultipleFramesPacket(header_, frames);
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeRequestHeadersAndMultipleDataFramesPacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
     spdy::SpdyPriority priority,
     spdy::SpdyHeaderBlock headers,
-    QuicStreamId parent_stream_id,
-    QuicStreamOffset* header_stream_offset,
+    quic::QuicStreamId parent_stream_id,
+    quic::QuicStreamOffset* header_stream_offset,
     size_t* spdy_headers_frame_length,
     const std::vector<std::string>& data_writes) {
   InitializeHeader(packet_number, should_include_version);
@@ -495,44 +514,45 @@
   if (spdy_headers_frame_length) {
     *spdy_headers_frame_length = spdy_frame.size();
   }
-  QuicFrames frames;
-  QuicStreamOffset header_offset =
+  quic::QuicFrames frames;
+  quic::QuicStreamOffset header_offset =
       header_stream_offset == nullptr ? 0 : *header_stream_offset;
-  QuicStreamFrame frame(kHeadersStreamId, false, header_offset,
-                        QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
-  frames.push_back(QuicFrame(&frame));
+  quic::QuicStreamFrame frame(
+      quic::kHeadersStreamId, false, header_offset,
+      quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+  frames.push_back(quic::QuicFrame(&frame));
   DVLOG(1) << "Adding frame: " << frames.back();
   if (header_stream_offset != nullptr) {
     *header_stream_offset += spdy_frame.size();
   }
 
-  QuicStreamOffset offset = 0;
-  // QuicFrame takes a raw pointer. Use a std::vector here so we keep
+  quic::QuicStreamOffset offset = 0;
+  // quic::QuicFrame takes a raw pointer. Use a std::vector here so we keep
   // StreamFrames alive until MakeMultipleFramesPacket is done.
-  std::vector<std::unique_ptr<QuicStreamFrame>> stream_frames;
+  std::vector<std::unique_ptr<quic::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(std::make_unique<QuicStreamFrame>(
-        stream_id, is_fin, offset, QuicStringPiece(data_writes[i])));
+    stream_frames.push_back(std::make_unique<quic::QuicStreamFrame>(
+        stream_id, is_fin, offset, quic::QuicStringPiece(data_writes[i])));
     offset += data_writes[i].length();
   }
   for (const auto& stream_frame : stream_frames) {
-    QuicFrame quic_frame(stream_frame.get());
+    quic::QuicFrame quic_frame(stream_frame.get());
     DVLOG(1) << "Adding frame: " << quic_frame;
     frames.push_back(quic_frame);
   }
   return MakeMultipleFramesPacket(header_, frames);
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeRequestHeadersPacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
     spdy::SpdyPriority priority,
     spdy::SpdyHeaderBlock headers,
-    QuicStreamId parent_stream_id,
+    quic::QuicStreamId parent_stream_id,
     size_t* spdy_headers_frame_length) {
   return MakeRequestHeadersPacket(
       packet_number, stream_id, should_include_version, fin, priority,
@@ -541,16 +561,17 @@
 
 // If |offset| is provided, will use the value when creating the packet.
 // Will also update the value after packet creation.
-std::unique_ptr<QuicReceivedPacket>
-QuicTestPacketMaker::MakeRequestHeadersPacket(QuicPacketNumber packet_number,
-                                              QuicStreamId stream_id,
-                                              bool should_include_version,
-                                              bool fin,
-                                              spdy::SpdyPriority priority,
-                                              spdy::SpdyHeaderBlock headers,
-                                              QuicStreamId parent_stream_id,
-                                              size_t* spdy_headers_frame_length,
-                                              QuicStreamOffset* offset) {
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakeRequestHeadersPacket(
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
+    bool should_include_version,
+    bool fin,
+    spdy::SpdyPriority priority,
+    spdy::SpdyHeaderBlock headers,
+    quic::QuicStreamId parent_stream_id,
+    size_t* spdy_headers_frame_length,
+    quic::QuicStreamOffset* offset) {
   std::string unused_stream_data;
   return MakeRequestHeadersPacketAndSaveData(
       packet_number, stream_id, should_include_version, fin, priority,
@@ -558,17 +579,17 @@
       &unused_stream_data);
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeRequestHeadersPacketAndSaveData(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
     spdy::SpdyPriority priority,
     spdy::SpdyHeaderBlock headers,
-    QuicStreamId parent_stream_id,
+    quic::QuicStreamId parent_stream_id,
     size_t* spdy_headers_frame_length,
-    QuicStreamOffset* offset,
+    quic::QuicStreamOffset* offset,
     std::string* stream_data) {
   InitializeHeader(packet_number, should_include_version);
   spdy::SpdySerializedFrame spdy_frame = MakeSpdyHeadersFrame(
@@ -579,53 +600,53 @@
     *spdy_headers_frame_length = spdy_frame.size();
 
   if (offset != nullptr) {
-    QuicStreamFrame frame(
-        kHeadersStreamId, false, *offset,
-        QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+    quic::QuicStreamFrame frame(
+        quic::kHeadersStreamId, false, *offset,
+        quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
     *offset += spdy_frame.size();
-    return MakePacket(header_, QuicFrame(&frame));
+    return MakePacket(header_, quic::QuicFrame(&frame));
   } else {
-    QuicStreamFrame frame(
-        kHeadersStreamId, false, 0,
-        QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+    quic::QuicStreamFrame frame(
+        quic::kHeadersStreamId, false, 0,
+        quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
 
-    return MakePacket(header_, QuicFrame(&frame));
+    return MakePacket(header_, quic::QuicFrame(&frame));
   }
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeRequestHeadersAndRstPacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
     spdy::SpdyPriority priority,
     spdy::SpdyHeaderBlock headers,
-    QuicStreamId parent_stream_id,
+    quic::QuicStreamId parent_stream_id,
     size_t* spdy_headers_frame_length,
-    QuicStreamOffset* header_stream_offset,
-    QuicRstStreamErrorCode error_code,
+    quic::QuicStreamOffset* header_stream_offset,
+    quic::QuicRstStreamErrorCode error_code,
     size_t bytes_written) {
   spdy::SpdySerializedFrame spdy_frame = MakeSpdyHeadersFrame(
       stream_id, fin, priority, std::move(headers), parent_stream_id);
   if (spdy_headers_frame_length) {
     *spdy_headers_frame_length = spdy_frame.size();
   }
-  QuicStreamOffset header_offset = 0;
+  quic::QuicStreamOffset header_offset = 0;
   if (header_stream_offset != nullptr) {
     header_offset = *header_stream_offset;
     *header_stream_offset += spdy_frame.size();
   }
-  QuicStreamFrame headers_frame(
-      kHeadersStreamId, false, header_offset,
-      QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+  quic::QuicStreamFrame headers_frame(
+      quic::kHeadersStreamId, false, header_offset,
+      quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
 
-  QuicRstStreamFrame rst_frame(1, stream_id, error_code, bytes_written);
+  quic::QuicRstStreamFrame rst_frame(1, stream_id, error_code, bytes_written);
 
-  QuicFrames frames;
-  frames.push_back(QuicFrame(&headers_frame));
+  quic::QuicFrames frames;
+  frames.push_back(quic::QuicFrame(&headers_frame));
   DVLOG(1) << "Adding frame: " << frames.back();
-  frames.push_back(QuicFrame(&rst_frame));
+  frames.push_back(quic::QuicFrame(&rst_frame));
   DVLOG(1) << "Adding frame: " << frames.back();
 
   InitializeHeader(packet_number, should_include_version);
@@ -633,11 +654,11 @@
 }
 
 spdy::SpdySerializedFrame QuicTestPacketMaker::MakeSpdyHeadersFrame(
-    QuicStreamId stream_id,
+    quic::QuicStreamId stream_id,
     bool fin,
     spdy::SpdyPriority priority,
     spdy::SpdyHeaderBlock headers,
-    QuicStreamId parent_stream_id) {
+    quic::QuicStreamId parent_stream_id) {
   spdy::SpdyHeadersIR headers_frame(stream_id, std::move(headers));
   headers_frame.set_fin(fin);
   headers_frame.set_weight(spdy::Spdy3PriorityToHttp2Weight(priority));
@@ -656,16 +677,16 @@
 
 // Convenience method for calling MakeRequestHeadersPacket with nullptr for
 // |spdy_headers_frame_length|.
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeRequestHeadersPacketWithOffsetTracking(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
     spdy::SpdyPriority priority,
     spdy::SpdyHeaderBlock headers,
-    QuicStreamId parent_stream_id,
-    QuicStreamOffset* offset) {
+    quic::QuicStreamId parent_stream_id,
+    quic::QuicStreamOffset* offset) {
   return MakeRequestHeadersPacket(
       packet_number, stream_id, should_include_version, fin, priority,
       std::move(headers), parent_stream_id, nullptr, offset);
@@ -673,15 +694,16 @@
 
 // If |offset| is provided, will use the value when creating the packet.
 // Will also update the value after packet creation.
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePushPromisePacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
-    QuicStreamId promised_stream_id,
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakePushPromisePacket(
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
+    quic::QuicStreamId promised_stream_id,
     bool should_include_version,
     bool fin,
     spdy::SpdyHeaderBlock headers,
     size_t* spdy_headers_frame_length,
-    QuicStreamOffset* offset) {
+    quic::QuicStreamOffset* offset) {
   InitializeHeader(packet_number, should_include_version);
   spdy::SpdySerializedFrame spdy_frame;
   spdy::SpdyPushPromiseIR promise_frame(stream_id, promised_stream_id,
@@ -692,49 +714,50 @@
     *spdy_headers_frame_length = spdy_frame.size();
   }
   if (offset != nullptr) {
-    QuicStreamFrame frame(
-        kHeadersStreamId, false, *offset,
-        QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+    quic::QuicStreamFrame frame(
+        quic::kHeadersStreamId, false, *offset,
+        quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
     *offset += spdy_frame.size();
-    return MakePacket(header_, QuicFrame(&frame));
+    return MakePacket(header_, quic::QuicFrame(&frame));
   } else {
-    QuicStreamFrame frame(
-        kHeadersStreamId, false, 0,
-        QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
-    return MakePacket(header_, QuicFrame(&frame));
+    quic::QuicStreamFrame frame(
+        quic::kHeadersStreamId, false, 0,
+        quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+    return MakePacket(header_, quic::QuicFrame(&frame));
   }
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakeForceHolDataPacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakeForceHolDataPacket(
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
-    QuicStreamOffset* offset,
-    QuicStringPiece data) {
+    quic::QuicStreamOffset* offset,
+    quic::QuicStringPiece data) {
   spdy::SpdyDataIR spdy_data(stream_id, data);
   spdy_data.set_fin(fin);
   spdy::SpdySerializedFrame spdy_frame(
       spdy_request_framer_.SerializeFrame(spdy_data));
   InitializeHeader(packet_number, should_include_version);
-  QuicStreamFrame quic_frame(
-      kHeadersStreamId, false, *offset,
-      QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+  quic::QuicStreamFrame quic_frame(
+      quic::kHeadersStreamId, false, *offset,
+      quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
   *offset += spdy_frame.size();
-  return MakePacket(header_, QuicFrame(&quic_frame));
+  return MakePacket(header_, quic::QuicFrame(&quic_frame));
 }
 
 // If |offset| is provided, will use the value when creating the packet.
 // Will also update the value after packet creation.
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeResponseHeadersPacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
     spdy::SpdyHeaderBlock headers,
     size_t* spdy_headers_frame_length,
-    QuicStreamOffset* offset) {
+    quic::QuicStreamOffset* offset) {
   InitializeHeader(packet_number, should_include_version);
   spdy::SpdySerializedFrame spdy_frame;
   spdy::SpdyHeadersIR headers_frame(stream_id, std::move(headers));
@@ -745,23 +768,23 @@
     *spdy_headers_frame_length = spdy_frame.size();
   }
   if (offset != nullptr) {
-    QuicStreamFrame frame(
-        kHeadersStreamId, false, *offset,
-        QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+    quic::QuicStreamFrame frame(
+        quic::kHeadersStreamId, false, *offset,
+        quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
     *offset += spdy_frame.size();
-    return MakePacket(header_, QuicFrame(&frame));
+    return MakePacket(header_, quic::QuicFrame(&frame));
   } else {
-    QuicStreamFrame frame(
-        kHeadersStreamId, false, 0,
-        QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
-    return MakePacket(header_, QuicFrame(&frame));
+    quic::QuicStreamFrame frame(
+        quic::kHeadersStreamId, false, 0,
+        quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+    return MakePacket(header_, quic::QuicFrame(&frame));
   }
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeResponseHeadersPacket(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
     spdy::SpdyHeaderBlock headers,
@@ -773,14 +796,14 @@
 
 // Convenience method for calling MakeResponseHeadersPacket with nullptr for
 // |spdy_headers_frame_length|.
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeResponseHeadersPacketWithOffsetTracking(
-    QuicPacketNumber packet_number,
-    QuicStreamId stream_id,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamId stream_id,
     bool should_include_version,
     bool fin,
     spdy::SpdyHeaderBlock headers,
-    QuicStreamOffset* offset) {
+    quic::QuicStreamOffset* offset) {
   return MakeResponseHeadersPacket(packet_number, stream_id,
                                    should_include_version, fin,
                                    std::move(headers), nullptr, offset);
@@ -824,31 +847,34 @@
   return headers;
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePacket(
-    const QuicPacketHeader& header,
-    const QuicFrame& frame) {
-  QuicFrames frames;
+std::unique_ptr<quic::QuicReceivedPacket> QuicTestPacketMaker::MakePacket(
+    const quic::QuicPacketHeader& header,
+    const quic::QuicFrame& frame) {
+  quic::QuicFrames frames;
   frames.push_back(frame);
   return MakeMultipleFramesPacket(header, frames);
 }
 
-std::unique_ptr<QuicReceivedPacket>
-QuicTestPacketMaker::MakeMultipleFramesPacket(const QuicPacketHeader& header,
-                                              const QuicFrames& frames) {
-  QuicFramer framer(
-      SupportedVersions(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version_)),
-      clock_->Now(), perspective_);
-  std::unique_ptr<QuicPacket> packet(
-      BuildUnsizedDataPacket(&framer, header, frames));
-  char buffer[kMaxPacketSize];
-  size_t encrypted_size = framer.EncryptPayload(
-      ENCRYPTION_NONE, header.packet_number, *packet, buffer, kMaxPacketSize);
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakeMultipleFramesPacket(
+    const quic::QuicPacketHeader& header,
+    const quic::QuicFrames& frames) {
+  quic::QuicFramer framer(quic::test::SupportedVersions(quic::ParsedQuicVersion(
+                              quic::PROTOCOL_QUIC_CRYPTO, version_)),
+                          clock_->Now(), perspective_);
+  std::unique_ptr<quic::QuicPacket> packet(
+      quic::test::BuildUnsizedDataPacket(&framer, header, frames));
+  char buffer[quic::kMaxPacketSize];
+  size_t encrypted_size =
+      framer.EncryptPayload(quic::ENCRYPTION_NONE, header.packet_number,
+                            *packet, buffer, quic::kMaxPacketSize);
   EXPECT_NE(0u, encrypted_size);
-  QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(), false);
-  return std::unique_ptr<QuicReceivedPacket>(encrypted.Clone());
+  quic::QuicReceivedPacket encrypted(buffer, encrypted_size, clock_->Now(),
+                                     false);
+  return std::unique_ptr<quic::QuicReceivedPacket>(encrypted.Clone());
 }
 
-void QuicTestPacketMaker::InitializeHeader(QuicPacketNumber packet_number,
+void QuicTestPacketMaker::InitializeHeader(quic::QuicPacketNumber packet_number,
                                            bool should_include_version) {
   header_.connection_id = connection_id_;
   header_.reset_flag = false;
@@ -858,46 +884,47 @@
   header_.packet_number = packet_number;
 }
 
-std::unique_ptr<QuicReceivedPacket>
-QuicTestPacketMaker::MakeInitialSettingsPacket(QuicPacketNumber packet_number,
-                                               QuicStreamOffset* offset) {
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakeInitialSettingsPacket(
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamOffset* offset) {
   std::string unused_data;
   return MakeInitialSettingsPacketAndSaveData(packet_number, offset,
                                               &unused_data);
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeInitialSettingsPacketAndSaveData(
-    QuicPacketNumber packet_number,
-    QuicStreamOffset* offset,
+    quic::QuicPacketNumber packet_number,
+    quic::QuicStreamOffset* offset,
     std::string* stream_data) {
   spdy::SpdySettingsIR settings_frame;
   settings_frame.AddSetting(spdy::SETTINGS_MAX_HEADER_LIST_SIZE,
-                            kDefaultMaxUncompressedHeaderSize);
+                            quic::kDefaultMaxUncompressedHeaderSize);
   spdy::SpdySerializedFrame spdy_frame(
       spdy_request_framer_.SerializeFrame(settings_frame));
   InitializeHeader(packet_number, /*should_include_version*/ true);
   *stream_data = std::string(spdy_frame.data(), spdy_frame.size());
   if (offset != nullptr) {
-    QuicStreamFrame quic_frame(
-        kHeadersStreamId, false, *offset,
-        QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+    quic::QuicStreamFrame quic_frame(
+        quic::kHeadersStreamId, false, *offset,
+        quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
     *offset += spdy_frame.size();
-    return MakePacket(header_, QuicFrame(&quic_frame));
+    return MakePacket(header_, quic::QuicFrame(&quic_frame));
   }
-  QuicStreamFrame quic_frame(
-      kHeadersStreamId, false, 0,
-      QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
-  return MakePacket(header_, QuicFrame(&quic_frame));
+  quic::QuicStreamFrame quic_frame(
+      quic::kHeadersStreamId, false, 0,
+      quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+  return MakePacket(header_, quic::QuicFrame(&quic_frame));
 }
 
-std::unique_ptr<QuicReceivedPacket> QuicTestPacketMaker::MakePriorityPacket(
-    QuicPacketNumber packet_number,
-    bool should_include_version,
-    QuicStreamId id,
-    QuicStreamId parent_stream_id,
-    spdy::SpdyPriority priority,
-    QuicStreamOffset* offset) {
+std::unique_ptr<quic::QuicReceivedPacket>
+QuicTestPacketMaker::MakePriorityPacket(quic::QuicPacketNumber packet_number,
+                                        bool should_include_version,
+                                        quic::QuicStreamId id,
+                                        quic::QuicStreamId parent_stream_id,
+                                        spdy::SpdyPriority priority,
+                                        quic::QuicStreamOffset* offset) {
   if (!client_headers_include_h2_stream_dependency_) {
     parent_stream_id = 0;
   }
@@ -907,56 +934,57 @@
   spdy::SpdySerializedFrame spdy_frame(
       spdy_request_framer_.SerializeFrame(priority_frame));
 
-  QuicStreamOffset header_offset = 0;
+  quic::QuicStreamOffset header_offset = 0;
   if (offset != nullptr) {
     header_offset = *offset;
     *offset += spdy_frame.size();
   }
-  QuicStreamFrame quic_frame(
-      kHeadersStreamId, false, header_offset,
-      QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
-  DVLOG(1) << "Adding frame: " << QuicFrame(&quic_frame);
+  quic::QuicStreamFrame quic_frame(
+      quic::kHeadersStreamId, false, header_offset,
+      quic::QuicStringPiece(spdy_frame.data(), spdy_frame.size()));
+  DVLOG(1) << "Adding frame: " << quic::QuicFrame(&quic_frame);
   InitializeHeader(packet_number, should_include_version);
-  return MakePacket(header_, QuicFrame(&quic_frame));
+  return MakePacket(header_, quic::QuicFrame(&quic_frame));
 }
 
-std::unique_ptr<QuicReceivedPacket>
+std::unique_ptr<quic::QuicReceivedPacket>
 QuicTestPacketMaker::MakeAckAndMultiplePriorityFramesPacket(
-    QuicPacketNumber packet_number,
+    quic::QuicPacketNumber packet_number,
     bool should_include_version,
-    QuicPacketNumber largest_received,
-    QuicPacketNumber smallest_received,
-    QuicPacketNumber least_unacked,
+    quic::QuicPacketNumber largest_received,
+    quic::QuicPacketNumber smallest_received,
+    quic::QuicPacketNumber least_unacked,
     const std::vector<Http2StreamDependency>& priority_frames,
-    QuicStreamOffset* offset) {
-  QuicAckFrame ack(MakeAckFrame(largest_received));
-  ack.ack_delay_time = QuicTime::Delta::Zero();
-  for (QuicPacketNumber i = smallest_received; i <= largest_received; ++i) {
+    quic::QuicStreamOffset* offset) {
+  quic::QuicAckFrame ack(MakeAckFrame(largest_received));
+  ack.ack_delay_time = quic::QuicTime::Delta::Zero();
+  for (quic::QuicPacketNumber i = smallest_received; i <= largest_received;
+       ++i) {
     ack.received_packet_times.push_back(std::make_pair(i, clock_->Now()));
   }
   if (largest_received > 0) {
     ack.packets.AddRange(1, largest_received + 1);
   }
-  QuicFrames frames;
-  frames.push_back(QuicFrame(&ack));
-  DVLOG(1) << "Adding frame: " << frames[0];
+  quic::QuicFrames frames;
+  frames.push_back(quic::QuicFrame(&ack));
+  DVLOG(1) << "Adding frame: " << frames.back();
 
-  QuicStopWaitingFrame stop_waiting;
-  if (version_ <= QUIC_VERSION_43) {
+  quic::QuicStopWaitingFrame stop_waiting;
+  if (version_ <= quic::QUIC_VERSION_43) {
     stop_waiting.least_unacked = least_unacked;
-    frames.push_back(QuicFrame(&stop_waiting));
-    DVLOG(1) << "Adding frame: " << frames[1];
+    frames.push_back(quic::QuicFrame(&stop_waiting));
+    DVLOG(1) << "Adding frame: " << frames.back();
   }
 
   const bool exclusive = client_headers_include_h2_stream_dependency_;
-  QuicStreamOffset header_offset = 0;
+  quic::QuicStreamOffset header_offset = 0;
   if (offset == nullptr) {
     offset = &header_offset;
   }
   // Keep SpdySerializedFrames alive until MakeMultipleFramesPacket is done.
   // Keep StreamFrames alive until MakeMultipleFramesPacket is done.
   std::vector<std::unique_ptr<spdy::SpdySerializedFrame>> spdy_frames;
-  std::vector<std::unique_ptr<QuicStreamFrame>> stream_frames;
+  std::vector<std::unique_ptr<quic::QuicStreamFrame>> stream_frames;
   for (const Http2StreamDependency& info : priority_frames) {
     spdy::SpdyPriorityIR priority_frame(
         info.stream_id, info.parent_stream_id,
@@ -966,12 +994,12 @@
         spdy_request_framer_.SerializeFrame(priority_frame)));
 
     spdy::SpdySerializedFrame* spdy_frame = spdy_frames.back().get();
-    stream_frames.push_back(std::make_unique<QuicStreamFrame>(
-        kHeadersStreamId, false, *offset,
-        QuicStringPiece(spdy_frame->data(), spdy_frame->size())));
+    stream_frames.push_back(std::make_unique<quic::QuicStreamFrame>(
+        quic::kHeadersStreamId, false, *offset,
+        quic::QuicStringPiece(spdy_frame->data(), spdy_frame->size())));
     *offset += spdy_frame->size();
 
-    frames.push_back(QuicFrame(stream_frames.back().get()));
+    frames.push_back(quic::QuicFrame(stream_frames.back().get()));
     DVLOG(1) << "Adding frame: " << frames.back();
     ;
   }
@@ -980,27 +1008,28 @@
   return MakeMultipleFramesPacket(header_, frames);
 }
 
-void QuicTestPacketMaker::SetEncryptionLevel(EncryptionLevel level) {
+void QuicTestPacketMaker::SetEncryptionLevel(quic::EncryptionLevel level) {
   encryption_level_ = level;
 }
 
-void QuicTestPacketMaker::SetLongHeaderType(QuicLongHeaderType type) {
+void QuicTestPacketMaker::SetLongHeaderType(quic::QuicLongHeaderType type) {
   long_header_type_ = type;
 }
 
 bool QuicTestPacketMaker::ShouldIncludeVersion(bool include_version) const {
-  if (version_ == QUIC_VERSION_99) {
-    return encryption_level_ < ENCRYPTION_FORWARD_SECURE;
+  if (version_ == quic::QUIC_VERSION_99) {
+    return encryption_level_ < quic::ENCRYPTION_FORWARD_SECURE;
   }
   return include_version;
 }
 
-QuicPacketNumberLength QuicTestPacketMaker::GetPacketNumberLength() const {
-  if (version_ == QUIC_VERSION_99 &&
-      encryption_level_ < ENCRYPTION_FORWARD_SECURE) {
-    return PACKET_4BYTE_PACKET_NUMBER;
+quic::QuicPacketNumberLength QuicTestPacketMaker::GetPacketNumberLength()
+    const {
+  if (version_ == quic::QUIC_VERSION_99 &&
+      encryption_level_ < quic::ENCRYPTION_FORWARD_SECURE) {
+    return quic::PACKET_4BYTE_PACKET_NUMBER;
   }
-  return PACKET_1BYTE_PACKET_NUMBER;
+  return quic::PACKET_1BYTE_PACKET_NUMBER;
 }
 
 }  // namespace test
diff --git a/net/quic/chromium/quic_test_packet_maker.h b/net/quic/chromium/quic_test_packet_maker.h
index 4c50fd40..afefe2b 100644
--- a/net/quic/chromium/quic_test_packet_maker.h
+++ b/net/quic/chromium/quic_test_packet_maker.h
@@ -28,8 +28,8 @@
 class QuicTestPacketMaker {
  public:
   struct Http2StreamDependency {
-    QuicStreamId stream_id;
-    QuicStreamId parent_stream_id;
+    quic::QuicStreamId stream_id;
+    quic::QuicStreamId parent_stream_id;
     spdy::SpdyPriority spdy_priority;
   };
 
@@ -39,222 +39,224 @@
   // stream id set to the |parent_stream_id| param of MakeRequestHeaders...().
   // Otherwise, headers are constructed with the exclusive flag set to false and
   // the parent stream ID set to 0 (ignoring the |parent_stream_id| param).
-  QuicTestPacketMaker(QuicTransportVersion version,
-                      QuicConnectionId connection_id,
-                      MockClock* clock,
+  QuicTestPacketMaker(quic::QuicTransportVersion version,
+                      quic::QuicConnectionId connection_id,
+                      quic::MockClock* clock,
                       const std::string& host,
-                      Perspective perspective,
+                      quic::Perspective perspective,
                       bool client_headers_include_h2_stream_dependency);
   ~QuicTestPacketMaker();
 
   void set_hostname(const std::string& host);
-  std::unique_ptr<QuicReceivedPacket> MakeConnectivityProbingPacket(
-      QuicPacketNumber num,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeConnectivityProbingPacket(
+      quic::QuicPacketNumber num,
       bool include_version,
-      QuicByteCount packet_length);
-  std::unique_ptr<QuicReceivedPacket> MakePingPacket(QuicPacketNumber num,
-                                                     bool include_version);
-  std::unique_ptr<QuicReceivedPacket> MakeAckAndPingPacket(
-      QuicPacketNumber num,
+      quic::QuicByteCount packet_length);
+  std::unique_ptr<quic::QuicReceivedPacket> MakePingPacket(
+      quic::QuicPacketNumber num,
+      bool include_version);
+  std::unique_ptr<quic::QuicReceivedPacket> MakeAckAndPingPacket(
+      quic::QuicPacketNumber num,
       bool include_version,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked);
-  std::unique_ptr<QuicReceivedPacket> MakeRstPacket(
-      QuicPacketNumber num,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked);
+  std::unique_ptr<quic::QuicReceivedPacket> MakeRstPacket(
+      quic::QuicPacketNumber num,
       bool include_version,
-      QuicStreamId stream_id,
-      QuicRstStreamErrorCode error_code);
+      quic::QuicStreamId stream_id,
+      quic::QuicRstStreamErrorCode error_code);
 
-  std::unique_ptr<QuicReceivedPacket> MakeRstPacket(
-      QuicPacketNumber num,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeRstPacket(
+      quic::QuicPacketNumber num,
       bool include_version,
-      QuicStreamId stream_id,
-      QuicRstStreamErrorCode error_code,
+      quic::QuicStreamId stream_id,
+      quic::QuicRstStreamErrorCode error_code,
       size_t bytes_written);
 
-  std::unique_ptr<QuicReceivedPacket> MakeAckAndRstPacket(
-      QuicPacketNumber num,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeAckAndRstPacket(
+      quic::QuicPacketNumber num,
       bool include_version,
-      QuicStreamId stream_id,
-      QuicRstStreamErrorCode error_code,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+      quic::QuicStreamId stream_id,
+      quic::QuicRstStreamErrorCode error_code,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       bool send_feedback);
-  std::unique_ptr<QuicReceivedPacket> MakeAckAndRstPacket(
-      QuicPacketNumber num,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeAckAndRstPacket(
+      quic::QuicPacketNumber num,
       bool include_version,
-      QuicStreamId stream_id,
-      QuicRstStreamErrorCode error_code,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+      quic::QuicStreamId stream_id,
+      quic::QuicRstStreamErrorCode error_code,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       bool send_feedback,
       size_t bytes_written);
-  std::unique_ptr<QuicReceivedPacket> MakeAckAndConnectionClosePacket(
-      QuicPacketNumber num,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeAckAndConnectionClosePacket(
+      quic::QuicPacketNumber num,
       bool include_version,
-      QuicTime::Delta delta_time_largest_observed,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
-      QuicErrorCode quic_error,
+      quic::QuicTime::Delta delta_time_largest_observed,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
+      quic::QuicErrorCode quic_error,
       const std::string& quic_error_details);
-  std::unique_ptr<QuicReceivedPacket> MakeConnectionClosePacket(
-      QuicPacketNumber num,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeConnectionClosePacket(
+      quic::QuicPacketNumber num,
       bool include_version,
-      QuicErrorCode quic_error,
+      quic::QuicErrorCode quic_error,
       const std::string& quic_error_details);
-  std::unique_ptr<QuicReceivedPacket> MakeGoAwayPacket(
-      QuicPacketNumber num,
-      QuicErrorCode error_code,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeGoAwayPacket(
+      quic::QuicPacketNumber num,
+      quic::QuicErrorCode error_code,
       std::string reason_phrase);
-  std::unique_ptr<QuicReceivedPacket> MakeAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       bool send_feedback);
-  std::unique_ptr<QuicReceivedPacket> MakeAckPacket(
-      QuicPacketNumber packet_number,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeAckPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       bool send_feedback,
-      QuicTime::Delta ack_delay_time);
-  std::unique_ptr<QuicReceivedPacket> MakeDataPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+      quic::QuicTime::Delta ack_delay_time);
+  std::unique_ptr<quic::QuicReceivedPacket> MakeDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data);
-  std::unique_ptr<QuicReceivedPacket> MakeForceHolDataPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data);
+  std::unique_ptr<quic::QuicReceivedPacket> MakeForceHolDataPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset* offset,
-      QuicStringPiece data);
-  std::unique_ptr<QuicReceivedPacket> MakeMultipleDataFramesPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+      quic::QuicStreamOffset* offset,
+      quic::QuicStringPiece data);
+  std::unique_ptr<quic::QuicReceivedPacket> MakeMultipleDataFramesPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
-      QuicStreamOffset offset,
+      quic::QuicStreamOffset offset,
       const std::vector<std::string>& data_writes);
-  std::unique_ptr<QuicReceivedPacket> MakeAckAndDataPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeAckAndDataPacket(
+      quic::QuicPacketNumber packet_number,
       bool include_version,
-      QuicStreamId stream_id,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+      quic::QuicStreamId stream_id,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       bool fin,
-      QuicStreamOffset offset,
-      QuicStringPiece data);
+      quic::QuicStreamOffset offset,
+      quic::QuicStringPiece data);
 
-  std::unique_ptr<QuicReceivedPacket>
+  std::unique_ptr<quic::QuicReceivedPacket>
   MakeRequestHeadersAndMultipleDataFramesPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       spdy::SpdyPriority priority,
       spdy::SpdyHeaderBlock headers,
-      QuicStreamId parent_stream_id,
-      QuicStreamOffset* header_stream_offset,
+      quic::QuicStreamId parent_stream_id,
+      quic::QuicStreamOffset* header_stream_offset,
       size_t* spdy_headers_frame_length,
       const std::vector<std::string>& data_writes);
 
   // If |spdy_headers_frame_length| is non-null, it will be set to the size of
   // the SPDY headers frame created for this packet.
-  std::unique_ptr<QuicReceivedPacket> MakeRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeRequestHeadersPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       spdy::SpdyPriority priority,
       spdy::SpdyHeaderBlock headers,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId parent_stream_id,
       size_t* spdy_headers_frame_length);
 
-  std::unique_ptr<QuicReceivedPacket> MakeRequestHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeRequestHeadersPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       spdy::SpdyPriority priority,
       spdy::SpdyHeaderBlock headers,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId parent_stream_id,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset);
+      quic::QuicStreamOffset* offset);
 
   // Saves the serialized QUIC stream data in |stream_data|.
-  std::unique_ptr<QuicReceivedPacket> MakeRequestHeadersPacketAndSaveData(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeRequestHeadersPacketAndSaveData(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       spdy::SpdyPriority priority,
       spdy::SpdyHeaderBlock headers,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId parent_stream_id,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset,
+      quic::QuicStreamOffset* offset,
       std::string* stream_data);
 
-  std::unique_ptr<QuicReceivedPacket> MakeRequestHeadersAndRstPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeRequestHeadersAndRstPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       spdy::SpdyPriority priority,
       spdy::SpdyHeaderBlock headers,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId parent_stream_id,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* header_stream_offset,
-      QuicRstStreamErrorCode error_code,
+      quic::QuicStreamOffset* header_stream_offset,
+      quic::QuicRstStreamErrorCode error_code,
       size_t bytes_written);
 
   // Convenience method for calling MakeRequestHeadersPacket with nullptr for
   // |spdy_headers_frame_length|.
-  std::unique_ptr<QuicReceivedPacket>
-  MakeRequestHeadersPacketWithOffsetTracking(QuicPacketNumber packet_number,
-                                             QuicStreamId stream_id,
-                                             bool should_include_version,
-                                             bool fin,
-                                             spdy::SpdyPriority priority,
-                                             spdy::SpdyHeaderBlock headers,
-                                             QuicStreamId parent_stream_id,
-                                             QuicStreamOffset* offset);
+  std::unique_ptr<quic::QuicReceivedPacket>
+  MakeRequestHeadersPacketWithOffsetTracking(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
+      bool should_include_version,
+      bool fin,
+      spdy::SpdyPriority priority,
+      spdy::SpdyHeaderBlock headers,
+      quic::QuicStreamId parent_stream_id,
+      quic::QuicStreamOffset* offset);
 
   // If |spdy_headers_frame_length| is non-null, it will be set to the size of
   // the SPDY headers frame created for this packet.
-  std::unique_ptr<QuicReceivedPacket> MakePushPromisePacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
-      QuicStreamId promised_stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> MakePushPromisePacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
+      quic::QuicStreamId promised_stream_id,
       bool should_include_version,
       bool fin,
       spdy::SpdyHeaderBlock headers,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset);
+      quic::QuicStreamOffset* offset);
 
   // If |spdy_headers_frame_length| is non-null, it will be set to the size of
   // the SPDY headers frame created for this packet.
-  std::unique_ptr<QuicReceivedPacket> MakeResponseHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeResponseHeadersPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       spdy::SpdyHeaderBlock headers,
       size_t* spdy_headers_frame_length,
-      QuicStreamOffset* offset);
+      quic::QuicStreamOffset* offset);
 
-  std::unique_ptr<QuicReceivedPacket> MakeResponseHeadersPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamId stream_id,
+  std::unique_ptr<quic::QuicReceivedPacket> MakeResponseHeadersPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
       bool should_include_version,
       bool fin,
       spdy::SpdyHeaderBlock headers,
@@ -262,47 +264,49 @@
 
   // Convenience method for calling MakeResponseHeadersPacket with nullptr for
   // |spdy_headers_frame_length|.
-  std::unique_ptr<QuicReceivedPacket>
-  MakeResponseHeadersPacketWithOffsetTracking(QuicPacketNumber packet_number,
-                                              QuicStreamId stream_id,
-                                              bool should_include_version,
-                                              bool fin,
-                                              spdy::SpdyHeaderBlock headers,
-                                              QuicStreamOffset* offset);
+  std::unique_ptr<quic::QuicReceivedPacket>
+  MakeResponseHeadersPacketWithOffsetTracking(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamId stream_id,
+      bool should_include_version,
+      bool fin,
+      spdy::SpdyHeaderBlock headers,
+      quic::QuicStreamOffset* offset);
 
   // Creates a packet containing the initial SETTINGS frame, and saves the
   // headers stream offset into |offset|.
-  std::unique_ptr<QuicReceivedPacket> MakeInitialSettingsPacket(
-      QuicPacketNumber packet_number,
-      QuicStreamOffset* offset);
+  std::unique_ptr<quic::QuicReceivedPacket> MakeInitialSettingsPacket(
+      quic::QuicPacketNumber packet_number,
+      quic::QuicStreamOffset* offset);
 
   // Same as above, but also saves the serialized QUIC stream data in
   // |stream_data|.
-  std::unique_ptr<QuicReceivedPacket> MakeInitialSettingsPacketAndSaveData(
-      QuicPacketNumber packet_number,
-      QuicStreamOffset* offset,
-      std::string* stream_data);
+  std::unique_ptr<quic::QuicReceivedPacket>
+  MakeInitialSettingsPacketAndSaveData(quic::QuicPacketNumber packet_number,
+                                       quic::QuicStreamOffset* offset,
+                                       std::string* stream_data);
 
-  std::unique_ptr<QuicReceivedPacket> MakePriorityPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket> MakePriorityPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
-      QuicStreamId id,
-      QuicStreamId parent_stream_id,
+      quic::QuicStreamId id,
+      quic::QuicStreamId parent_stream_id,
       spdy::SpdyPriority priority,
-      QuicStreamOffset* offset);
+      quic::QuicStreamOffset* offset);
 
-  std::unique_ptr<QuicReceivedPacket> MakeAckAndMultiplePriorityFramesPacket(
-      QuicPacketNumber packet_number,
+  std::unique_ptr<quic::QuicReceivedPacket>
+  MakeAckAndMultiplePriorityFramesPacket(
+      quic::QuicPacketNumber packet_number,
       bool should_include_version,
-      QuicPacketNumber largest_received,
-      QuicPacketNumber smallest_received,
-      QuicPacketNumber least_unacked,
+      quic::QuicPacketNumber largest_received,
+      quic::QuicPacketNumber smallest_received,
+      quic::QuicPacketNumber least_unacked,
       const std::vector<Http2StreamDependency>& priority_frames,
-      QuicStreamOffset* offset);
+      quic::QuicStreamOffset* offset);
 
-  void SetEncryptionLevel(EncryptionLevel level);
+  void SetEncryptionLevel(quic::EncryptionLevel level);
 
-  void SetLongHeaderType(QuicLongHeaderType type);
+  void SetLongHeaderType(quic::QuicLongHeaderType type);
 
   spdy::SpdyHeaderBlock GetRequestHeaders(const std::string& method,
                                           const std::string& scheme,
@@ -316,36 +320,38 @@
                                            const std::string& alt_svc);
 
  private:
-  std::unique_ptr<QuicReceivedPacket> MakePacket(const QuicPacketHeader& header,
-                                                 const QuicFrame& frame);
-  std::unique_ptr<QuicReceivedPacket> MakeMultipleFramesPacket(
-      const QuicPacketHeader& header,
-      const QuicFrames& frames);
+  std::unique_ptr<quic::QuicReceivedPacket> MakePacket(
+      const quic::QuicPacketHeader& header,
+      const quic::QuicFrame& frame);
+  std::unique_ptr<quic::QuicReceivedPacket> MakeMultipleFramesPacket(
+      const quic::QuicPacketHeader& header,
+      const quic::QuicFrames& frames);
 
-  void InitializeHeader(QuicPacketNumber packet_number,
+  void InitializeHeader(quic::QuicPacketNumber packet_number,
                         bool should_include_version);
 
-  spdy::SpdySerializedFrame MakeSpdyHeadersFrame(QuicStreamId stream_id,
-                                                 bool fin,
-                                                 spdy::SpdyPriority priority,
-                                                 spdy::SpdyHeaderBlock headers,
-                                                 QuicStreamId parent_stream_id);
+  spdy::SpdySerializedFrame MakeSpdyHeadersFrame(
+      quic::QuicStreamId stream_id,
+      bool fin,
+      spdy::SpdyPriority priority,
+      spdy::SpdyHeaderBlock headers,
+      quic::QuicStreamId parent_stream_id);
 
   bool ShouldIncludeVersion(bool include_version) const;
 
-  QuicPacketNumberLength GetPacketNumberLength() const;
+  quic::QuicPacketNumberLength GetPacketNumberLength() const;
 
-  QuicTransportVersion version_;
-  QuicConnectionId connection_id_;
-  MockClock* clock_;  // Owned by QuicStreamFactory.
+  quic::QuicTransportVersion version_;
+  quic::QuicConnectionId connection_id_;
+  quic::MockClock* clock_;  // Owned by QuicStreamFactory.
   std::string host_;
   spdy::SpdyFramer spdy_request_framer_;
   spdy::SpdyFramer spdy_response_framer_;
-  MockRandom random_generator_;
-  QuicPacketHeader header_;
-  Perspective perspective_;
-  EncryptionLevel encryption_level_;
-  QuicLongHeaderType long_header_type_;
+  quic::test::MockRandom random_generator_;
+  quic::QuicPacketHeader header_;
+  quic::Perspective perspective_;
+  quic::EncryptionLevel encryption_level_;
+  quic::QuicLongHeaderType long_header_type_;
 
   // If true, generated request headers will include non-default HTTP2 stream
   // dependency info.
diff --git a/net/quic/chromium/quic_utils_chromium.cc b/net/quic/chromium/quic_utils_chromium.cc
index 541cbf5..a2969ee 100644
--- a/net/quic/chromium/quic_utils_chromium.cc
+++ b/net/quic/chromium/quic_utils_chromium.cc
@@ -10,12 +10,12 @@
 
 namespace net {
 
-QuicTagVector ParseQuicConnectionOptions(
+quic::QuicTagVector ParseQuicConnectionOptions(
     const std::string& connection_options) {
-  QuicTagVector options;
+  quic::QuicTagVector options;
   // Tokens are expected to be no more than 4 characters long, but
   // handle overflow gracefully.
-  for (const QuicStringPiece& token :
+  for (const quic::QuicStringPiece& token :
        base::SplitStringPiece(connection_options, ",", base::TRIM_WHITESPACE,
                               base::SPLIT_WANT_ALL)) {
     uint32_t option = 0;
diff --git a/net/quic/chromium/quic_utils_chromium.h b/net/quic/chromium/quic_utils_chromium.h
index 0d2c3d7e7..dda61f2 100644
--- a/net/quic/chromium/quic_utils_chromium.h
+++ b/net/quic/chromium/quic_utils_chromium.h
@@ -80,8 +80,8 @@
 
 // Returns the list of QUIC tags represented by the comma separated
 // string in |connection_options|.
-NET_EXPORT QuicTagVector
-ParseQuicConnectionOptions(const std::string& connection_options);
+NET_EXPORT quic::QuicTagVector ParseQuicConnectionOptions(
+    const std::string& connection_options);
 
 }  // namespace net
 
diff --git a/net/quic/chromium/quic_utils_chromium_test.cc b/net/quic/chromium/quic_utils_chromium_test.cc
index 28f0f3f..0d221b9d 100644
--- a/net/quic/chromium/quic_utils_chromium_test.cc
+++ b/net/quic/chromium/quic_utils_chromium_test.cc
@@ -14,14 +14,15 @@
 namespace {
 
 TEST(QuicUtilsChromiumTest, ParseQuicConnectionOptions) {
-  QuicTagVector empty_options = ParseQuicConnectionOptions("");
+  quic::QuicTagVector empty_options = ParseQuicConnectionOptions("");
   EXPECT_TRUE(empty_options.empty());
 
-  QuicTagVector parsed_options = ParseQuicConnectionOptions("TIMER,TBBR,REJ");
-  QuicTagVector expected_options;
-  expected_options.push_back(kTIME);
-  expected_options.push_back(kTBBR);
-  expected_options.push_back(kREJ);
+  quic::QuicTagVector parsed_options =
+      ParseQuicConnectionOptions("TIMER,TBBR,REJ");
+  quic::QuicTagVector expected_options;
+  expected_options.push_back(quic::kTIME);
+  expected_options.push_back(quic::kTBBR);
+  expected_options.push_back(quic::kREJ);
   EXPECT_EQ(expected_options, parsed_options);
 }
 
diff --git a/net/quic/chromium/test_task_runner.cc b/net/quic/chromium/test_task_runner.cc
index 4a211295..2f32e71 100644
--- a/net/quic/chromium/test_task_runner.cc
+++ b/net/quic/chromium/test_task_runner.cc
@@ -13,7 +13,7 @@
 namespace net {
 namespace test {
 
-TestTaskRunner::TestTaskRunner(MockClock* clock) : clock_(clock) {}
+TestTaskRunner::TestTaskRunner(quic::MockClock* clock) : clock_(clock) {}
 
 TestTaskRunner::~TestTaskRunner() {}
 
@@ -43,7 +43,7 @@
 void TestTaskRunner::RunNextTask() {
   std::vector<PostedTask>::iterator next = FindNextTask();
   DCHECK(next != tasks_.end());
-  clock_->AdvanceTime(QuicTime::Delta::FromMicroseconds(
+  clock_->AdvanceTime(quic::QuicTime::Delta::FromMicroseconds(
       (next->GetTimeToRun() - clock_->NowInTicks()).InMicroseconds()));
   PostedTask task = std::move(*next);
   tasks_.erase(next);
diff --git a/net/quic/chromium/test_task_runner.h b/net/quic/chromium/test_task_runner.h
index 1921b99..3a18da1a 100644
--- a/net/quic/chromium/test_task_runner.h
+++ b/net/quic/chromium/test_task_runner.h
@@ -15,9 +15,10 @@
 #include "base/task_runner.h"
 #include "base/test/test_pending_task.h"
 
-namespace net {
-
+namespace quic {
 class MockClock;
+}  // namespace quic
+namespace net {
 
 namespace test {
 
@@ -25,7 +26,7 @@
 
 class TestTaskRunner : public base::SequencedTaskRunner {
  public:
-  explicit TestTaskRunner(MockClock* clock);
+  explicit TestTaskRunner(quic::MockClock* clock);
 
   // base::TaskRunner implementation.
   bool PostDelayedTask(const base::Location& from_here,
@@ -53,7 +54,7 @@
  private:
   std::vector<PostedTask>::iterator FindNextTask();
 
-  MockClock* const clock_;
+  quic::MockClock* const clock_;
   std::vector<PostedTask> tasks_;
 
   DISALLOW_COPY_AND_ASSIGN(TestTaskRunner);
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc
index 37ae777..fc96799 100644
--- a/net/socket/client_socket_pool_manager.cc
+++ b/net/socket/client_socket_pool_manager.cc
@@ -72,7 +72,7 @@
                          RequestPriority request_priority,
                          HttpNetworkSession* session,
                          const ProxyInfo& proxy_info,
-                         QuicTransportVersion quic_version,
+                         quic::QuicTransportVersion quic_version,
                          const SSLConfig& ssl_config_for_origin,
                          const SSLConfig& ssl_config_for_proxy,
                          bool force_tunnel,
@@ -181,7 +181,7 @@
       }
 
       if (!proxy_info.is_quic()) {
-        quic_version = QUIC_VERSION_UNSUPPORTED;
+        quic_version = quic::QUIC_VERSION_UNSUPPORTED;
       }
 
       http_proxy_params = new HttpProxySocketParams(
@@ -363,7 +363,7 @@
     RequestPriority request_priority,
     HttpNetworkSession* session,
     const ProxyInfo& proxy_info,
-    QuicTransportVersion quic_version,
+    quic::QuicTransportVersion quic_version,
     const SSLConfig& ssl_config_for_origin,
     const SSLConfig& ssl_config_for_proxy,
     PrivacyMode privacy_mode,
@@ -399,7 +399,7 @@
   DCHECK(socket_handle);
   return InitSocketPoolHelper(
       group_type, endpoint, request_extra_headers, request_load_flags,
-      request_priority, session, proxy_info, QUIC_VERSION_UNSUPPORTED,
+      request_priority, session, proxy_info, quic::QUIC_VERSION_UNSUPPORTED,
       ssl_config_for_origin, ssl_config_for_proxy,
       /*force_tunnel=*/true, privacy_mode, SocketTag(), net_log, 0,
       socket_handle, HttpNetworkSession::WEBSOCKET_SOCKET_POOL,
@@ -422,7 +422,7 @@
   return InitSocketPoolHelper(
       ClientSocketPoolManager::NORMAL_GROUP, host_port_pair,
       request_extra_headers, request_load_flags, request_priority, session,
-      proxy_info, QUIC_VERSION_UNSUPPORTED, ssl_config_for_origin,
+      proxy_info, quic::QUIC_VERSION_UNSUPPORTED, ssl_config_for_origin,
       ssl_config_for_proxy, /*force_tunnel=*/true, privacy_mode, SocketTag(),
       net_log, 0, socket_handle, HttpNetworkSession::NORMAL_SOCKET_POOL,
       OnHostResolutionCallback(), callback);
@@ -444,7 +444,8 @@
   return InitSocketPoolHelper(
       ClientSocketPoolManager::SSL_GROUP, endpoint, request_extra_headers,
       request_load_flags, request_priority, session, proxy_info,
-      QUIC_VERSION_UNSUPPORTED, ssl_config_for_origin, ssl_config_for_proxy,
+      quic::QUIC_VERSION_UNSUPPORTED, ssl_config_for_origin,
+      ssl_config_for_proxy,
       /*force_tunnel=*/true, privacy_mode, SocketTag(), net_log, 0,
       socket_handle, HttpNetworkSession::NORMAL_SOCKET_POOL,
       OnHostResolutionCallback(), callback);
@@ -465,7 +466,7 @@
     int num_preconnect_streams) {
   return InitSocketPoolHelper(
       group_type, endpoint, request_extra_headers, request_load_flags,
-      request_priority, session, proxy_info, QUIC_VERSION_UNSUPPORTED,
+      request_priority, session, proxy_info, quic::QUIC_VERSION_UNSUPPORTED,
       ssl_config_for_origin, ssl_config_for_proxy,
       /*force_tunnel=*/false, privacy_mode, SocketTag(), net_log,
       num_preconnect_streams, NULL, HttpNetworkSession::NORMAL_SOCKET_POOL,
diff --git a/net/socket/client_socket_pool_manager.h b/net/socket/client_socket_pool_manager.h
index aa2b3dd4..5c56de6 100644
--- a/net/socket/client_socket_pool_manager.h
+++ b/net/socket/client_socket_pool_manager.h
@@ -111,7 +111,7 @@
     RequestPriority request_priority,
     HttpNetworkSession* session,
     const ProxyInfo& proxy_info,
-    QuicTransportVersion quic_version,
+    quic::QuicTransportVersion quic_version,
     const SSLConfig& ssl_config_for_origin,
     const SSLConfig& ssl_config_for_proxy,
     PrivacyMode privacy_mode,
diff --git a/net/socket/ssl_client_socket_pool_unittest.cc b/net/socket/ssl_client_socket_pool_unittest.cc
index 2778e36c..7933173 100644
--- a/net/socket/ssl_client_socket_pool_unittest.cc
+++ b/net/socket/ssl_client_socket_pool_unittest.cc
@@ -123,7 +123,7 @@
         http_proxy_socket_params_(
             new HttpProxySocketParams(proxy_transport_socket_params_,
                                       NULL,
-                                      QUIC_VERSION_UNSUPPORTED,
+                                      quic::QUIC_VERSION_UNSUPPORTED,
                                       std::string(),
                                       HostPortPair("host", 80),
                                       session_->http_auth_cache(),
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 0f9ad4b2..1ca181c 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -762,7 +762,7 @@
     const SpdySessionKey& spdy_session_key,
     HttpServerProperties* http_server_properties,
     TransportSecurityState* transport_security_state,
-    const QuicTransportVersionVector& quic_supported_versions,
+    const quic::QuicTransportVersionVector& quic_supported_versions,
     bool enable_sending_initial_data,
     bool enable_ping_based_connection_checking,
     bool support_ietf_format_quic_altsvc,
@@ -895,8 +895,7 @@
     auto updates = priority_dependency_state_.OnStreamUpdate(
         (*stream)->stream_id(), ConvertRequestPriorityToSpdyPriority(priority));
     for (auto u : updates) {
-      ActiveStreamMap::iterator it = active_streams_.find(u.id);
-      DCHECK(it != active_streams_.end());
+      DCHECK(IsStreamActive(u.id));
       EnqueuePriorityFrame(u.id, u.parent_stream_id, u.weight, u.exclusive);
     }
   }
@@ -910,7 +909,7 @@
   if (stream_id == kNoPushedStreamFound)
     return;
 
-  DCHECK(active_streams_.find(stream_id) != active_streams_.end());
+  DCHECK(IsStreamActive(stream_id));
   ResetStream(stream_id, ERR_ABORTED, "Cancelled push stream.");
 }
 
@@ -1674,7 +1673,7 @@
   streams_pushed_count_++;
 
   // Verify that the response had a URL for us.
-  GURL gurl(SpdyUtils::GetPromisedUrlFromHeaders(headers));
+  GURL gurl(quic::SpdyUtils::GetPromisedUrlFromHeaders(headers));
   if (!gurl.is_valid()) {
     RecordSpdyPushedStreamFateHistogram(SpdyPushedStreamFate::kInvalidUrl);
     EnqueueResetStreamFrame(stream_id, request_priority,
@@ -2517,17 +2516,19 @@
 
 void SpdySession::InsertCreatedStream(std::unique_ptr<SpdyStream> stream) {
   CHECK_EQ(stream->stream_id(), 0u);
-  CHECK(created_streams_.find(stream.get()) == created_streams_.end());
-  created_streams_.insert(stream.release());
+  auto it = created_streams_.lower_bound(stream.get());
+  CHECK(it == created_streams_.end() || *it != stream.get());
+  created_streams_.insert(it, stream.release());
 }
 
 std::unique_ptr<SpdyStream> SpdySession::ActivateCreatedStream(
     SpdyStream* stream) {
   CHECK_EQ(stream->stream_id(), 0u);
-  CHECK(created_streams_.find(stream) != created_streams_.end());
+  auto it = created_streams_.find(stream);
+  CHECK(it != created_streams_.end());
   stream->set_stream_id(GetNewStreamId());
   std::unique_ptr<SpdyStream> owned_stream(stream);
-  created_streams_.erase(stream);
+  created_streams_.erase(it);
   return owned_stream;
 }
 
@@ -3133,7 +3134,7 @@
       continue;
 
     // Check if QUIC version is supported. Filter supported QUIC versions.
-    QuicTransportVersionVector advertised_versions;
+    quic::QuicTransportVersionVector advertised_versions;
     if (protocol == kProtoQUIC && !altsvc.version.empty()) {
       advertised_versions = FilterSupportedAltSvcVersions(
           altsvc, quic_supported_versions_, support_ietf_format_quic_altsvc_);
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index bf261364..c140c2d 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -292,7 +292,7 @@
   SpdySession(const SpdySessionKey& spdy_session_key,
               HttpServerProperties* http_server_properties,
               TransportSecurityState* transport_security_state,
-              const QuicTransportVersionVector& quic_supported_versions,
+              const quic::QuicTransportVersionVector& quic_supported_versions,
               bool enable_sending_initial_data,
               bool enable_ping_based_connection_checking,
               bool support_ietf_format_quic_altsvc,
@@ -1090,7 +1090,7 @@
   NetLogWithSource net_log_;
 
   // Versions of QUIC which may be used.
-  const QuicTransportVersionVector quic_supported_versions_;
+  const quic::QuicTransportVersionVector quic_supported_versions_;
 
   // Outside of tests, these should always be true.
   bool enable_sending_initial_data_;
diff --git a/net/spdy/spdy_session_pool.cc b/net/spdy/spdy_session_pool.cc
index c664d19..93e7c4fd 100644
--- a/net/spdy/spdy_session_pool.cc
+++ b/net/spdy/spdy_session_pool.cc
@@ -51,7 +51,7 @@
     SSLConfigService* ssl_config_service,
     HttpServerProperties* http_server_properties,
     TransportSecurityState* transport_security_state,
-    const QuicTransportVersionVector& quic_supported_versions,
+    const quic::QuicTransportVersionVector& quic_supported_versions,
     bool enable_ping_based_connection_checking,
     bool support_ietf_format_quic_altsvc,
     size_t session_max_recv_window_size,
diff --git a/net/spdy/spdy_session_pool.h b/net/spdy/spdy_session_pool.h
index ae5c8a5..d68e03c 100644
--- a/net/spdy/spdy_session_pool.h
+++ b/net/spdy/spdy_session_pool.h
@@ -56,16 +56,17 @@
  public:
   typedef base::TimeTicks (*TimeFunc)(void);
 
-  SpdySessionPool(HostResolver* host_resolver,
-                  SSLConfigService* ssl_config_service,
-                  HttpServerProperties* http_server_properties,
-                  TransportSecurityState* transport_security_state,
-                  const QuicTransportVersionVector& quic_supported_versions,
-                  bool enable_ping_based_connection_checking,
-                  bool support_ietf_format_quic_altsvc,
-                  size_t session_max_recv_window_size,
-                  const spdy::SettingsMap& initial_settings,
-                  SpdySessionPool::TimeFunc time_func);
+  SpdySessionPool(
+      HostResolver* host_resolver,
+      SSLConfigService* ssl_config_service,
+      HttpServerProperties* http_server_properties,
+      TransportSecurityState* transport_security_state,
+      const quic::QuicTransportVersionVector& quic_supported_versions,
+      bool enable_ping_based_connection_checking,
+      bool support_ietf_format_quic_altsvc,
+      size_t session_max_recv_window_size,
+      const spdy::SettingsMap& initial_settings,
+      SpdySessionPool::TimeFunc time_func);
   ~SpdySessionPool() override;
 
   // In the functions below, a session is "available" if this pool has
@@ -258,7 +259,7 @@
   HostResolver* const resolver_;
 
   // Versions of QUIC which may be used.
-  const QuicTransportVersionVector quic_supported_versions_;
+  const quic::QuicTransportVersionVector quic_supported_versions_;
 
   // Defaults to true. May be controlled via SpdySessionPoolPeer for tests.
   bool enable_sending_initial_data_;
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc
index 0f91bb52..c6b59f1 100644
--- a/net/spdy/spdy_session_unittest.cc
+++ b/net/spdy/spdy_session_unittest.cc
@@ -6284,7 +6284,7 @@
   // TODO(zhongyi): spdy::SpdyAltSvcWireFormat::ParseHeaderFieldValue expects
   // positve versions while VersionVector allows nonnegative verisons. Fix the
   // parse function and change the hardcoded invalid version to
-  // QUIC_VERSION_UNSUPPORTED.
+  // quic::QUIC_VERSION_UNSUPPORTED.
   quic_alternative_service.version.push_back(/* invalid QUIC version */ 1);
   altsvc_ir.add_altsvc(quic_alternative_service);
   altsvc_ir.set_origin(origin);
diff --git a/net/spdy/spdy_write_queue.cc b/net/spdy/spdy_write_queue.cc
index df56e9c2..d803d91 100644
--- a/net/spdy/spdy_write_queue.cc
+++ b/net/spdy/spdy_write_queue.cc
@@ -120,6 +120,11 @@
   base::circular_deque<PendingWrite>& queue = queue_[priority];
   auto out_it = queue.begin();
   for (auto it = queue.begin(); it != queue.end(); ++it) {
+    // Loop invariant: elements between |begin| and |old_it| are the ones
+    // preserved, contigously, in their original order.  Elements between
+    // |old_it| and |it| are undefined.  The distance between |old_it| and |it|
+    // is the number elements moved to |erased_buffer_producers| so far.
+    // Elements between |it| and |end| have not been touched yet.
     if (it->stream.get() == stream.get()) {
       erased_buffer_producers.push_back(std::move(it->frame_producer));
     } else {
@@ -127,8 +132,13 @@
       ++out_it;
     }
   }
+  // The number of elements preserved is the distance between |begin| and
+  // |old_it|.  The rest of the container shall be erased.
   queue.erase(out_it, queue.end());
   removing_writes_ = false;
+
+  // Iteration on |queue| is completed.  Now |erased_buffer_producers| goes out
+  // of scope, SpdyBufferProducers are destroyed.
 }
 
 void SpdyWriteQueue::RemovePendingWritesForStreamsAfter(
@@ -142,6 +152,11 @@
     base::circular_deque<PendingWrite>& queue = queue_[i];
     auto out_it = queue.begin();
     for (auto it = queue.begin(); it != queue.end(); ++it) {
+      // Loop invariant: elements between |begin| and |old_it| are the ones
+      // preserved, contigously, in their original order.  Elements between
+      // |old_it| and |it| are undefined.  The distance between |old_it| and
+      // |it| is the number elements moved to |erased_buffer_producers| so far.
+      // Elements between |it| and |end| have not been touched yet.
       if (it->stream.get() && (it->stream->stream_id() > last_good_stream_id ||
                                it->stream->stream_id() == 0)) {
         erased_buffer_producers.push_back(std::move(it->frame_producer));
@@ -150,9 +165,53 @@
         ++out_it;
       }
     }
+    // The number of elements preserved is the distance between |begin| and
+    // |old_it|.  The rest of the container shall be erased.
     queue.erase(out_it, queue.end());
   }
   removing_writes_ = false;
+
+  // Iteration on each |queue| is completed.  Now |erased_buffer_producers| goes
+  // out of scope, SpdyBufferProducers are destroyed.
+}
+
+void SpdyWriteQueue::ChangePriorityOfWritesForStream(
+    const base::WeakPtr<SpdyStream>& stream,
+    RequestPriority old_priority,
+    RequestPriority new_priority) {
+  CHECK(!removing_writes_);
+  DCHECK(stream.get());
+
+#if DCHECK_IS_ON()
+  // |stream| should not have pending writes in a queue not matching
+  // |old_priority|.
+  for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) {
+    if (i == old_priority)
+      continue;
+    for (auto it = queue_[i].begin(); it != queue_[i].end(); ++it)
+      DCHECK_NE(it->stream.get(), stream.get());
+  }
+#endif
+
+  base::circular_deque<PendingWrite>& old_queue = queue_[old_priority];
+  base::circular_deque<PendingWrite>& new_queue = queue_[new_priority];
+  auto out_it = old_queue.begin();
+  for (auto it = old_queue.begin(); it != old_queue.end(); ++it) {
+    // Loop invariant: elements between |begin| and |old_it| are the ones
+    // kept in |old_queue|, contigously, in their original order.  Elements
+    // between |old_it| and |it| are undefined.  The distance between |old_it|
+    // and |it| is the number elements moved to |new_queue| so far. Elements
+    // between |it| and |end| have not been touched yet.
+    if (it->stream.get() == stream.get()) {
+      new_queue.push_back(std::move(*it));
+    } else {
+      *out_it = std::move(*it);
+      ++out_it;
+    }
+  }
+  // The number of elements kept in |old_queue| is the distance between |begin|
+  // and |old_it|.  The rest of the container shall be erased.
+  old_queue.erase(out_it, old_queue.end());
 }
 
 void SpdyWriteQueue::Clear() {
diff --git a/net/spdy/spdy_write_queue.h b/net/spdy/spdy_write_queue.h
index e740f22..4c080c6 100644
--- a/net/spdy/spdy_write_queue.h
+++ b/net/spdy/spdy_write_queue.h
@@ -60,6 +60,12 @@
   void RemovePendingWritesForStreamsAfter(
       spdy::SpdyStreamId last_good_stream_id);
 
+  // Change priority of all pending writes for the given stream.  Frames will be
+  // queued after other writes with |new_priority|.
+  void ChangePriorityOfWritesForStream(const base::WeakPtr<SpdyStream>& stream,
+                                       RequestPriority old_priority,
+                                       RequestPriority new_priority);
+
   // Removes all pending writes.
   void Clear();
 
diff --git a/net/spdy/spdy_write_queue_unittest.cc b/net/spdy/spdy_write_queue_unittest.cc
index b768810..12b4e0a 100644
--- a/net/spdy/spdy_write_queue_unittest.cc
+++ b/net/spdy/spdy_write_queue_unittest.cc
@@ -415,6 +415,55 @@
             producer->ProduceBuffer()->GetRemainingData());
 }
 
+TEST_F(SpdyWriteQueueTest, ChangePriority) {
+  SpdyWriteQueue write_queue;
+
+  std::unique_ptr<SpdyBufferProducer> producer1 = IntToProducer(1);
+  std::unique_ptr<SpdyBufferProducer> producer2 = IntToProducer(2);
+  std::unique_ptr<SpdyBufferProducer> producer3 = IntToProducer(3);
+
+  std::unique_ptr<SpdyStream> stream1 = MakeTestStream(HIGHEST);
+  std::unique_ptr<SpdyStream> stream2 = MakeTestStream(MEDIUM);
+  std::unique_ptr<SpdyStream> stream3 = MakeTestStream(LOW);
+
+  write_queue.Enqueue(HIGHEST, spdy::SpdyFrameType::HEADERS,
+                      std::move(producer1), stream1->GetWeakPtr(),
+                      TRAFFIC_ANNOTATION_FOR_TESTS);
+  write_queue.Enqueue(MEDIUM, spdy::SpdyFrameType::DATA, std::move(producer2),
+                      stream2->GetWeakPtr(), TRAFFIC_ANNOTATION_FOR_TESTS);
+  write_queue.Enqueue(LOW, spdy::SpdyFrameType::RST_STREAM,
+                      std::move(producer3), stream3->GetWeakPtr(),
+                      TRAFFIC_ANNOTATION_FOR_TESTS);
+
+  write_queue.ChangePriorityOfWritesForStream(stream3->GetWeakPtr(), LOW,
+                                              HIGHEST);
+
+  spdy::SpdyFrameType frame_type = spdy::SpdyFrameType::DATA;
+  std::unique_ptr<SpdyBufferProducer> frame_producer;
+  base::WeakPtr<SpdyStream> stream;
+  MutableNetworkTrafficAnnotationTag traffic_annotation;
+  ASSERT_TRUE(write_queue.Dequeue(&frame_type, &frame_producer, &stream,
+                                  &traffic_annotation));
+  EXPECT_EQ(spdy::SpdyFrameType::HEADERS, frame_type);
+  EXPECT_EQ(1, ProducerToInt(std::move(frame_producer)));
+  EXPECT_EQ(stream1.get(), stream.get());
+
+  ASSERT_TRUE(write_queue.Dequeue(&frame_type, &frame_producer, &stream,
+                                  &traffic_annotation));
+  EXPECT_EQ(spdy::SpdyFrameType::RST_STREAM, frame_type);
+  EXPECT_EQ(3, ProducerToInt(std::move(frame_producer)));
+  EXPECT_EQ(stream3.get(), stream.get());
+
+  ASSERT_TRUE(write_queue.Dequeue(&frame_type, &frame_producer, &stream,
+                                  &traffic_annotation));
+  EXPECT_EQ(spdy::SpdyFrameType::DATA, frame_type);
+  EXPECT_EQ(2, ProducerToInt(std::move(frame_producer)));
+  EXPECT_EQ(stream2.get(), stream.get());
+
+  EXPECT_FALSE(write_queue.Dequeue(&frame_type, &frame_producer, &stream,
+                                   &traffic_annotation));
+}
+
 }  // namespace
 
 }  // namespace net
diff --git a/net/test/quic_simple_test_server.cc b/net/test/quic_simple_test_server.cc
index 13eccd0..c55f148d 100644
--- a/net/test/quic_simple_test_server.cc
+++ b/net/test/quic_simple_test_server.cc
@@ -51,7 +51,7 @@
 const char kSimpleHeaderValue[] = "hello header value";
 
 base::Thread* g_quic_server_thread = nullptr;
-net::QuicMemoryCacheBackend* g_quic_cache_backend = nullptr;
+quic::QuicMemoryCacheBackend* g_quic_cache_backend = nullptr;
 net::QuicSimpleServer* g_quic_server = nullptr;
 int g_quic_server_port = 0;
 
@@ -137,7 +137,7 @@
   headers[kStatusHeader] = kHelloStatus;
   spdy::SpdyHeaderBlock trailers;
   trailers[kHelloTrailerName] = kHelloTrailerValue;
-  g_quic_cache_backend = new QuicMemoryCacheBackend();
+  g_quic_cache_backend = new quic::QuicMemoryCacheBackend();
   g_quic_cache_backend->AddResponse(base::StringPrintf("%s", kTestServerHost),
                                     kHelloPath, std::move(headers),
                                     kHelloBodyValue, std::move(trailers));
@@ -153,7 +153,7 @@
   DCHECK(g_quic_server_thread->task_runner()->BelongsToCurrentThread());
   DCHECK(!g_quic_server);
 
-  QuicConfig config;
+  quic::QuicConfig config;
   // Set up server certs.
   base::FilePath directory;
   directory = test_files_root;
@@ -163,9 +163,10 @@
                                  base::FilePath()));
   SetupQuicMemoryCacheBackend();
 
-  g_quic_server = new QuicSimpleServer(
-      std::move(proof_source), config, QuicCryptoServerConfig::ConfigOptions(),
-      AllSupportedVersions(), g_quic_cache_backend);
+  g_quic_server =
+      new QuicSimpleServer(std::move(proof_source), config,
+                           quic::QuicCryptoServerConfig::ConfigOptions(),
+                           quic::AllSupportedVersions(), g_quic_cache_backend);
 
   // Start listening on an unbound port.
   int rv = g_quic_server->Listen(IPEndPoint(IPAddress::IPv4AllZeros(), 0));
diff --git a/net/test/url_request/url_request_failed_job.cc b/net/test/url_request/url_request_failed_job.cc
index 03da26a..d4c0bf92 100644
--- a/net/test/url_request/url_request_failed_job.cc
+++ b/net/test/url_request/url_request_failed_job.cc
@@ -121,9 +121,10 @@
 void URLRequestFailedJob::PopulateNetErrorDetails(
     NetErrorDetails* details) const {
   if (net_error_ == ERR_QUIC_PROTOCOL_ERROR) {
-    details->quic_connection_error = QUIC_INTERNAL_ERROR;
+    details->quic_connection_error = quic::QUIC_INTERNAL_ERROR;
   } else if (net_error_ == ERR_NETWORK_CHANGED) {
-    details->quic_connection_error = QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK;
+    details->quic_connection_error =
+        quic::QUIC_CONNECTION_MIGRATION_NO_NEW_NETWORK;
   }
 }
 
diff --git a/net/third_party/quic/core/chlo_extractor.cc b/net/third_party/quic/core/chlo_extractor.cc
index 317ea52c..cbedc04 100644
--- a/net/third_party/quic/core/chlo_extractor.cc
+++ b/net/third_party/quic/core/chlo_extractor.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -212,4 +212,4 @@
   return visitor.found_chlo() || visitor.chlo_contains_tags();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/chlo_extractor.h b/net/third_party/quic/core/chlo_extractor.h
index ba9cfe4..8b07107 100644
--- a/net/third_party/quic/core/chlo_extractor.h
+++ b/net/third_party/quic/core/chlo_extractor.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/crypto/crypto_handshake_message.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 
 // A utility for extracting QUIC Client Hello messages from packets,
 // without needs to spin up a full QuicSession.
@@ -39,6 +39,6 @@
   ChloExtractor operator=(const ChloExtractor&) = delete;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CHLO_EXTRACTOR_H_
diff --git a/net/third_party/quic/core/chlo_extractor_test.cc b/net/third_party/quic/core/chlo_extractor_test.cc
index 59ce0fa..0f4595b 100644
--- a/net/third_party/quic/core/chlo_extractor_test.cc
+++ b/net/third_party/quic/core/chlo_extractor_test.cc
@@ -16,7 +16,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -135,4 +135,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/bandwidth_sampler.cc b/net/third_party/quic/core/congestion_control/bandwidth_sampler.cc
index f97d268..e7fe2cf 100644
--- a/net/third_party/quic/core/congestion_control/bandwidth_sampler.cc
+++ b/net/third_party/quic/core/congestion_control/bandwidth_sampler.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_flag_utils.h"
 #include "net/third_party/quic/platform/api/quic_flags.h"
 
-namespace net {
+namespace quic {
 BandwidthSampler::BandwidthSampler()
     : total_bytes_sent_(0),
       total_bytes_acked_(0),
@@ -173,4 +173,4 @@
   return end_of_app_limited_phase_;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/bandwidth_sampler.h b/net/third_party/quic/core/congestion_control/bandwidth_sampler.h
index 8234924..b040162a 100644
--- a/net/third_party/quic/core/congestion_control/bandwidth_sampler.h
+++ b/net/third_party/quic/core/congestion_control/bandwidth_sampler.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class BandwidthSamplerPeer;
@@ -289,6 +289,6 @@
       const ConnectionStateOnSentPacket& sent_packet);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_BANDWIDTH_SAMPLER_H_
diff --git a/net/third_party/quic/core/congestion_control/bandwidth_sampler_test.cc b/net/third_party/quic/core/congestion_control/bandwidth_sampler_test.cc
index 03b162c6..56c9795f 100644
--- a/net/third_party/quic/core/congestion_control/bandwidth_sampler_test.cc
+++ b/net/third_party/quic/core/congestion_control/bandwidth_sampler_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/mock_clock.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class BandwidthSamplerPeer {
@@ -394,4 +394,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/bbr_sender.cc b/net/third_party/quic/core/congestion_control/bbr_sender.cc
index f360baa..eaf325d 100644
--- a/net/third_party/quic/core/congestion_control/bbr_sender.cc
+++ b/net/third_party/quic/core/congestion_control/bbr_sender.cc
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/platform/api/quic_logging.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 // Constants based on TCP defaults.
@@ -819,4 +819,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/bbr_sender.h b/net/third_party/quic/core/congestion_control/bbr_sender.h
index 31a18a3..9656aed 100644
--- a/net/third_party/quic/core/congestion_control/bbr_sender.h
+++ b/net/third_party/quic/core/congestion_control/bbr_sender.h
@@ -22,7 +22,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class RttStats;
 
@@ -360,6 +360,6 @@
     std::ostream& os,
     const BbrSender::DebugState& state);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_BBR_SENDER_H_
diff --git a/net/third_party/quic/core/congestion_control/bbr_sender_test.cc b/net/third_party/quic/core/congestion_control/bbr_sender_test.cc
index 7df913e9..77e36f4 100644
--- a/net/third_party/quic/core/congestion_control/bbr_sender_test.cc
+++ b/net/third_party/quic/core/congestion_control/bbr_sender_test.cc
@@ -24,7 +24,7 @@
 #include "net/third_party/quic/test_tools/simulator/simulator.h"
 #include "net/third_party/quic/test_tools/simulator/switch.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Use the initial CWND of 10, as 32 is too much for the test network.
@@ -1076,4 +1076,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/cubic_bytes.cc b/net/third_party/quic/core/congestion_control/cubic_bytes.cc
index 086addf0d..34b735bb 100644
--- a/net/third_party/quic/core/congestion_control/cubic_bytes.cc
+++ b/net/third_party/quic/core/congestion_control/cubic_bytes.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_flags.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -188,4 +188,4 @@
   return target_congestion_window;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/cubic_bytes.h b/net/third_party/quic/core/congestion_control/cubic_bytes.h
index 99f33ba..ef1e382 100644
--- a/net/third_party/quic/core/congestion_control/cubic_bytes.h
+++ b/net/third_party/quic/core/congestion_control/cubic_bytes.h
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/platform/api/quic_clock.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class CubicBytesTest;
@@ -98,6 +98,6 @@
   DISALLOW_COPY_AND_ASSIGN(CubicBytes);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_CUBIC_BYTES_H_
diff --git a/net/third_party/quic/core/congestion_control/cubic_bytes_test.cc b/net/third_party/quic/core/congestion_control/cubic_bytes_test.cc
index 285465a..681c08c 100644
--- a/net/third_party/quic/core/congestion_control/cubic_bytes_test.cc
+++ b/net/third_party/quic/core/congestion_control/cubic_bytes_test.cc
@@ -13,7 +13,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -387,4 +387,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/general_loss_algorithm.cc b/net/third_party/quic/core/congestion_control/general_loss_algorithm.cc
index 9938d5d11..540738a 100644
--- a/net/third_party/quic/core/congestion_control/general_loss_algorithm.cc
+++ b/net/third_party/quic/core/congestion_control/general_loss_algorithm.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_flag_utils.h"
 #include "net/third_party/quic/platform/api/quic_flags.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -187,4 +187,4 @@
   } while (proposed_extra_time < extra_time_needed && reordering_shift_ > 0);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/general_loss_algorithm.h b/net/third_party/quic/core/congestion_control/general_loss_algorithm.h
index 3b7ac52..5503908 100644
--- a/net/third_party/quic/core/congestion_control/general_loss_algorithm.h
+++ b/net/third_party/quic/core/congestion_control/general_loss_algorithm.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/core/quic_unacked_packet_map.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Class which can be configured to implement's TCP's approach of detecting loss
 // when 3 nacks have been received for a packet or with a time threshold.
@@ -82,6 +82,6 @@
   DISALLOW_COPY_AND_ASSIGN(GeneralLossAlgorithm);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_GENERAL_LOSS_ALGORITHM_H_
diff --git a/net/third_party/quic/core/congestion_control/general_loss_algorithm_test.cc b/net/third_party/quic/core/congestion_control/general_loss_algorithm_test.cc
index da94931..f592d86 100644
--- a/net/third_party/quic/core/congestion_control/general_loss_algorithm_test.cc
+++ b/net/third_party/quic/core/congestion_control/general_loss_algorithm_test.cc
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/test_tools/mock_clock.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -457,4 +457,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/hybrid_slow_start.cc b/net/third_party/quic/core/congestion_control/hybrid_slow_start.cc
index 6027ae6..29d07a1 100644
--- a/net/third_party/quic/core/congestion_control/hybrid_slow_start.cc
+++ b/net/third_party/quic/core/congestion_control/hybrid_slow_start.cc
@@ -8,7 +8,7 @@
 
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 // Note(pwestin): the magic clamping numbers come from the original code in
 // tcp_cubic.c.
@@ -103,4 +103,4 @@
          hystart_found_ != NOT_FOUND;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/hybrid_slow_start.h b/net/third_party/quic/core/congestion_control/hybrid_slow_start.h
index 0a90798..cbc2b890 100644
--- a/net/third_party/quic/core/congestion_control/hybrid_slow_start.h
+++ b/net/third_party/quic/core/congestion_control/hybrid_slow_start.h
@@ -23,7 +23,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE HybridSlowStart {
  public:
@@ -79,6 +79,6 @@
   DISALLOW_COPY_AND_ASSIGN(HybridSlowStart);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_HYBRID_SLOW_START_H_
diff --git a/net/third_party/quic/core/congestion_control/hybrid_slow_start_test.cc b/net/third_party/quic/core/congestion_control/hybrid_slow_start_test.cc
index 9cb0dabf..2ff614d5 100644
--- a/net/third_party/quic/core/congestion_control/hybrid_slow_start_test.cc
+++ b/net/third_party/quic/core/congestion_control/hybrid_slow_start_test.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_ptr_util.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class HybridSlowStartTest : public QuicTest {
@@ -73,4 +73,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/loss_detection_interface.h b/net/third_party/quic/core/congestion_control/loss_detection_interface.h
index ec6f77f..73954b3 100644
--- a/net/third_party/quic/core/congestion_control/loss_detection_interface.h
+++ b/net/third_party/quic/core/congestion_control/loss_detection_interface.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QuicUnackedPacketMap;
 class RttStats;
@@ -43,6 +43,6 @@
       QuicPacketNumber spurious_retransmission) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_LOSS_DETECTION_INTERFACE_H_
diff --git a/net/third_party/quic/core/congestion_control/pacing_sender.cc b/net/third_party/quic/core/congestion_control/pacing_sender.cc
index 9ebcde19..0cb7861 100644
--- a/net/third_party/quic/core/congestion_control/pacing_sender.cc
+++ b/net/third_party/quic/core/congestion_control/pacing_sender.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/platform/api/quic_flag_utils.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 namespace {
 
 // The estimated system alarm granularity.
@@ -183,4 +183,4 @@
   return sender_->PacingRate(bytes_in_flight);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/pacing_sender.h b/net/third_party/quic/core/congestion_control/pacing_sender.h
index 9181a33e0..c1d4c43e 100644
--- a/net/third_party/quic/core/congestion_control/pacing_sender.h
+++ b/net/third_party/quic/core/congestion_control/pacing_sender.h
@@ -23,7 +23,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicSentPacketManagerPeer;
@@ -99,6 +99,6 @@
   DISALLOW_COPY_AND_ASSIGN(PacingSender);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_PACING_SENDER_H_
diff --git a/net/third_party/quic/core/congestion_control/pacing_sender_test.cc b/net/third_party/quic/core/congestion_control/pacing_sender_test.cc
index 4850c06..da2366c 100644
--- a/net/third_party/quic/core/congestion_control/pacing_sender_test.cc
+++ b/net/third_party/quic/core/congestion_control/pacing_sender_test.cc
@@ -22,7 +22,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 
 const QuicByteCount kBytesInFlight = 1024;
@@ -462,4 +462,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/prr_sender.cc b/net/third_party/quic/core/congestion_control/prr_sender.cc
index 08fb6eaf..a39cfd73 100644
--- a/net/third_party/quic/core/congestion_control/prr_sender.cc
+++ b/net/third_party/quic/core/congestion_control/prr_sender.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 // Constant based on TCP defaults.
@@ -64,4 +64,4 @@
   return false;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/prr_sender.h b/net/third_party/quic/core/congestion_control/prr_sender.h
index 594d25d..5985278c 100644
--- a/net/third_party/quic/core/congestion_control/prr_sender.h
+++ b/net/third_party/quic/core/congestion_control/prr_sender.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE PrrSender {
  public:
@@ -38,6 +38,6 @@
   QuicByteCount bytes_in_flight_before_loss_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_PRR_SENDER_H_
diff --git a/net/third_party/quic/core/congestion_control/prr_sender_test.cc b/net/third_party/quic/core/congestion_control/prr_sender_test.cc
index 9c6c0743..41258fc1 100644
--- a/net/third_party/quic/core/congestion_control/prr_sender_test.cc
+++ b/net/third_party/quic/core/congestion_control/prr_sender_test.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_constants.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 namespace {
@@ -120,4 +120,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/rtt_stats.cc b/net/third_party/quic/core/congestion_control/rtt_stats.cc
index 2dff19d0..f85785d 100644
--- a/net/third_party/quic/core/congestion_control/rtt_stats.cc
+++ b/net/third_party/quic/core/congestion_control/rtt_stats.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_flags.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -100,4 +100,4 @@
   max_ack_delay_ = QuicTime::Delta::Zero();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/rtt_stats.h b/net/third_party/quic/core/congestion_control/rtt_stats.h
index 3061eb6..168de9d 100644
--- a/net/third_party/quic/core/congestion_control/rtt_stats.h
+++ b/net/third_party/quic/core/congestion_control/rtt_stats.h
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class RttStatsPeer;
@@ -105,6 +105,6 @@
   DISALLOW_COPY_AND_ASSIGN(RttStats);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_RTT_STATS_H_
diff --git a/net/third_party/quic/core/congestion_control/rtt_stats_test.cc b/net/third_party/quic/core/congestion_control/rtt_stats_test.cc
index 0bfd8cd8..a7cd781 100644
--- a/net/third_party/quic/core/congestion_control/rtt_stats_test.cc
+++ b/net/third_party/quic/core/congestion_control/rtt_stats_test.cc
@@ -15,7 +15,7 @@
 using testing::HasSubstr;
 using testing::Message;
 
-namespace net {
+namespace quic {
 namespace test {
 
 class RttStatsTest : public QuicTest {
@@ -228,4 +228,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/send_algorithm_interface.cc b/net/third_party/quic/core/congestion_control/send_algorithm_interface.cc
index e04b3e3..51037e2 100644
--- a/net/third_party/quic/core/congestion_control/send_algorithm_interface.cc
+++ b/net/third_party/quic/core/congestion_control/send_algorithm_interface.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_flags.h"
 #include "net/third_party/quic/platform/api/quic_pcc_sender.h"
 
-namespace net {
+namespace quic {
 
 class RttStats;
 
@@ -52,4 +52,4 @@
   return nullptr;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/send_algorithm_interface.h b/net/third_party/quic/core/congestion_control/send_algorithm_interface.h
index b18fb19..a7d844df5c 100644
--- a/net/third_party/quic/core/congestion_control/send_algorithm_interface.h
+++ b/net/third_party/quic/core/congestion_control/send_algorithm_interface.h
@@ -22,7 +22,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class CachedNetworkParameters;
 class RttStats;
@@ -139,6 +139,6 @@
   virtual void OnApplicationLimited(QuicByteCount bytes_in_flight) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_
diff --git a/net/third_party/quic/core/congestion_control/send_algorithm_test.cc b/net/third_party/quic/core/congestion_control/send_algorithm_test.cc
index 11a4770..882030b4 100644
--- a/net/third_party/quic/core/congestion_control/send_algorithm_test.cc
+++ b/net/third_party/quic/core/congestion_control/send_algorithm_test.cc
@@ -25,7 +25,7 @@
 #include "net/third_party/quic/test_tools/simulator/simulator.h"
 #include "net/third_party/quic/test_tools/simulator/switch.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -374,4 +374,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.cc b/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
index b73318a..2dfd1c02 100644
--- a/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
+++ b/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_logging.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 // Constants based on TCP defaults.
@@ -429,4 +429,4 @@
   return reno_ ? kRenoBytes : kCubicBytes;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.h b/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.h
index ebe177ad..9651db5 100644
--- a/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.h
+++ b/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.h
@@ -21,7 +21,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class RttStats;
 
@@ -168,6 +168,6 @@
   DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBytes);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BYTES_H_
diff --git a/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc b/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc
index 5f0d8f5..5999936 100644
--- a/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc
+++ b/net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes_test.cc
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/test_tools/mock_clock.h"
 #include "net/third_party/quic/test_tools/quic_config_peer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // TODO(ianswett): A number of theses tests were written with the assumption of
@@ -826,4 +826,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/congestion_control/windowed_filter.h b/net/third_party/quic/core/congestion_control/windowed_filter.h
index afcd0cf..dbac79a 100644
--- a/net/third_party/quic/core/congestion_control/windowed_filter.h
+++ b/net/third_party/quic/core/congestion_control/windowed_filter.h
@@ -33,7 +33,7 @@
 
 #include "net/third_party/quic/core/quic_time.h"
 
-namespace net {
+namespace quic {
 
 // Compares two values and returns true if the first is less than or equal
 // to the second.
@@ -162,6 +162,6 @@
   Sample estimates_[3];       // Best estimate is element 0.
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CONGESTION_CONTROL_WINDOWED_FILTER_H_
diff --git a/net/third_party/quic/core/congestion_control/windowed_filter_test.cc b/net/third_party/quic/core/congestion_control/windowed_filter_test.cc
index bf42c3c3..c7c28ab 100644
--- a/net/third_party/quic/core/congestion_control/windowed_filter_test.cc
+++ b/net/third_party/quic/core/congestion_control/windowed_filter_test.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class WindowedFilterTest : public QuicTest {
@@ -384,4 +384,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aead_base_decrypter.cc b/net/third_party/quic/core/crypto/aead_base_decrypter.cc
index 385f61e..933f00f 100644
--- a/net/third_party/quic/core/crypto/aead_base_decrypter.cc
+++ b/net/third_party/quic/core/crypto/aead_base_decrypter.cc
@@ -15,7 +15,7 @@
 #include "third_party/boringssl/src/include/openssl/err.h"
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -200,4 +200,4 @@
                          nonce_size_ - sizeof(QuicPacketNumber));
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aead_base_decrypter.h b/net/third_party/quic/core/crypto/aead_base_decrypter.h
index 2a986d8..e8467e1 100644
--- a/net/third_party/quic/core/crypto/aead_base_decrypter.h
+++ b/net/third_party/quic/core/crypto/aead_base_decrypter.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // AeadBaseDecrypter is the base class of AEAD QuicDecrypter subclasses.
 class QUIC_EXPORT_PRIVATE AeadBaseDecrypter : public QuicDecrypter {
@@ -71,6 +71,6 @@
   DISALLOW_COPY_AND_ASSIGN(AeadBaseDecrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_AEAD_BASE_DECRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/aead_base_encrypter.cc b/net/third_party/quic/core/crypto/aead_base_encrypter.cc
index a4fd834..b061a77 100644
--- a/net/third_party/quic/core/crypto/aead_base_encrypter.cc
+++ b/net/third_party/quic/core/crypto/aead_base_encrypter.cc
@@ -13,7 +13,7 @@
 #include "third_party/boringssl/src/include/openssl/err.h"
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -185,4 +185,4 @@
                          GetNoncePrefixSize());
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aead_base_encrypter.h b/net/third_party/quic/core/crypto/aead_base_encrypter.h
index 22e128e..3bf975e 100644
--- a/net/third_party/quic/core/crypto/aead_base_encrypter.h
+++ b/net/third_party/quic/core/crypto/aead_base_encrypter.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // AeadBaseEncrypter is the base class of AEAD QuicEncrypter subclasses.
 class QUIC_EXPORT_PRIVATE AeadBaseEncrypter : public QuicEncrypter {
@@ -78,6 +78,6 @@
   DISALLOW_COPY_AND_ASSIGN(AeadBaseEncrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_AEAD_BASE_ENCRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter.cc b/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter.cc
index 6d8dd89..5eeee75 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter.cc
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter.cc
@@ -7,7 +7,7 @@
 #include "third_party/boringssl/src/include/openssl/aead.h"
 #include "third_party/boringssl/src/include/openssl/tls1.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -32,4 +32,4 @@
   return TLS1_CK_AES_128_GCM_SHA256;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter.h b/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter.h
index fb88a6c..78f3b22 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter.h
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_decrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // An Aes128Gcm12Decrypter is a QuicDecrypter that implements the
 // AEAD_AES_128_GCM_12 algorithm specified in RFC 5282. Create an instance by
@@ -35,6 +35,6 @@
   DISALLOW_COPY_AND_ASSIGN(Aes128Gcm12Decrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_AES_128_GCM_12_DECRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc b/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc
index d040212..e529705 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_12_decrypter_test.cc
@@ -194,7 +194,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // DecryptWithNonce wraps the |Decrypt| method of |decrypter| to allow passing
@@ -283,4 +283,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter.cc b/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter.cc
index fef55b9..ea0272d 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter.cc
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter.cc
@@ -6,7 +6,7 @@
 
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -27,4 +27,4 @@
 
 Aes128Gcm12Encrypter::~Aes128Gcm12Encrypter() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter.h b/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter.h
index 2ffcfe3..d24c21e 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter.h
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_encrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // An Aes128Gcm12Encrypter is a QuicEncrypter that implements the
 // AEAD_AES_128_GCM_12 algorithm specified in RFC 5282. Create an instance by
@@ -31,6 +31,6 @@
   DISALLOW_COPY_AND_ASSIGN(Aes128Gcm12Encrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_AES_128_GCM_12_ENCRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc b/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
index 8d2202f..6a39a39 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_12_encrypter_test.cc
@@ -152,7 +152,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // EncryptWithNonce wraps the |Encrypt| method of |encrypter| to allow passing
@@ -238,4 +238,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_decrypter.cc b/net/third_party/quic/core/crypto/aes_128_gcm_decrypter.cc
index a6dfeee8..a78ef47 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_decrypter.cc
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_decrypter.cc
@@ -9,7 +9,7 @@
 #include "third_party/boringssl/src/include/openssl/aead.h"
 #include "third_party/boringssl/src/include/openssl/tls1.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -34,4 +34,4 @@
   return TLS1_CK_AES_128_GCM_SHA256;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_decrypter.h b/net/third_party/quic/core/crypto/aes_128_gcm_decrypter.h
index 3fb9c5d..bca4fad 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_decrypter.h
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_decrypter.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_decrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // An Aes128GcmDecrypter is a QuicDecrypter that implements the
 // AEAD_AES_128_GCM algorithm specified in RFC 5116 for use in IETF QUIC.
@@ -33,6 +33,6 @@
   DISALLOW_COPY_AND_ASSIGN(Aes128GcmDecrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_AES_128_GCM_DECRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_decrypter_test.cc b/net/third_party/quic/core/crypto/aes_128_gcm_decrypter_test.cc
index ca87352..f194502 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_decrypter_test.cc
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_decrypter_test.cc
@@ -194,7 +194,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // DecryptWithNonce wraps the |Decrypt| method of |decrypter| to allow passing
@@ -272,4 +272,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_encrypter.cc b/net/third_party/quic/core/crypto/aes_128_gcm_encrypter.cc
index 7ad992d..82b01d40 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_encrypter.cc
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_encrypter.cc
@@ -6,7 +6,7 @@
 
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -27,4 +27,4 @@
 
 Aes128GcmEncrypter::~Aes128GcmEncrypter() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_encrypter.h b/net/third_party/quic/core/crypto/aes_128_gcm_encrypter.h
index 9f80418..e78d6fd 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_encrypter.h
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_encrypter.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_encrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // An Aes128GcmEncrypter is a QuicEncrypter that implements the
 // AEAD_AES_128_GCM algorithm specified in RFC 5116 for use in IETF QUIC.
@@ -29,6 +29,6 @@
   DISALLOW_COPY_AND_ASSIGN(Aes128GcmEncrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_AES_128_GCM_ENCRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/aes_128_gcm_encrypter_test.cc b/net/third_party/quic/core/crypto/aes_128_gcm_encrypter_test.cc
index 9727d8e..d72e51c9 100644
--- a/net/third_party/quic/core/crypto/aes_128_gcm_encrypter_test.cc
+++ b/net/third_party/quic/core/crypto/aes_128_gcm_encrypter_test.cc
@@ -152,7 +152,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // EncryptWithNonce wraps the |Encrypt| method of |encrypter| to allow passing
@@ -255,4 +255,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_256_gcm_decrypter.cc b/net/third_party/quic/core/crypto/aes_256_gcm_decrypter.cc
index 76ed9a7..15411d9 100644
--- a/net/third_party/quic/core/crypto/aes_256_gcm_decrypter.cc
+++ b/net/third_party/quic/core/crypto/aes_256_gcm_decrypter.cc
@@ -9,7 +9,7 @@
 #include "third_party/boringssl/src/include/openssl/aead.h"
 #include "third_party/boringssl/src/include/openssl/tls1.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -34,4 +34,4 @@
   return TLS1_CK_AES_256_GCM_SHA384;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_256_gcm_decrypter.h b/net/third_party/quic/core/crypto/aes_256_gcm_decrypter.h
index 57bda1e4..16618eb 100644
--- a/net/third_party/quic/core/crypto/aes_256_gcm_decrypter.h
+++ b/net/third_party/quic/core/crypto/aes_256_gcm_decrypter.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_decrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // An Aes256GcmDecrypter is a QuicDecrypter that implements the
 // AEAD_AES_256_GCM algorithm specified in RFC 5116 for use in IETF QUIC.
@@ -33,6 +33,6 @@
   DISALLOW_COPY_AND_ASSIGN(Aes256GcmDecrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_AES_256_GCM_DECRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/aes_256_gcm_decrypter_test.cc b/net/third_party/quic/core/crypto/aes_256_gcm_decrypter_test.cc
index 2371435a..9c15b69c 100644
--- a/net/third_party/quic/core/crypto/aes_256_gcm_decrypter_test.cc
+++ b/net/third_party/quic/core/crypto/aes_256_gcm_decrypter_test.cc
@@ -198,7 +198,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // DecryptWithNonce wraps the |Decrypt| method of |decrypter| to allow passing
@@ -276,4 +276,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_256_gcm_encrypter.cc b/net/third_party/quic/core/crypto/aes_256_gcm_encrypter.cc
index ae99407..285255a 100644
--- a/net/third_party/quic/core/crypto/aes_256_gcm_encrypter.cc
+++ b/net/third_party/quic/core/crypto/aes_256_gcm_encrypter.cc
@@ -6,7 +6,7 @@
 
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -27,4 +27,4 @@
 
 Aes256GcmEncrypter::~Aes256GcmEncrypter() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/aes_256_gcm_encrypter.h b/net/third_party/quic/core/crypto/aes_256_gcm_encrypter.h
index 1152d13..5169b7b 100644
--- a/net/third_party/quic/core/crypto/aes_256_gcm_encrypter.h
+++ b/net/third_party/quic/core/crypto/aes_256_gcm_encrypter.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_encrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // An Aes256GcmEncrypter is a QuicEncrypter that implements the
 // AEAD_AES_256_GCM algorithm specified in RFC 5116 for use in IETF QUIC.
@@ -29,6 +29,6 @@
   DISALLOW_COPY_AND_ASSIGN(Aes256GcmEncrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_AES_256_GCM_ENCRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/aes_256_gcm_encrypter_test.cc b/net/third_party/quic/core/crypto/aes_256_gcm_encrypter_test.cc
index d52e0fb6..dc9f52a 100644
--- a/net/third_party/quic/core/crypto/aes_256_gcm_encrypter_test.cc
+++ b/net/third_party/quic/core/crypto/aes_256_gcm_encrypter_test.cc
@@ -159,7 +159,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // EncryptWithNonce wraps the |Encrypt| method of |encrypter| to allow passing
@@ -239,4 +239,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/cert_compressor.cc b/net/third_party/quic/core/crypto/cert_compressor.cc
index 0f037546..b183d65 100644
--- a/net/third_party/quic/core/crypto/cert_compressor.cc
+++ b/net/third_party/quic/core/crypto/cert_compressor.cc
@@ -14,7 +14,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -645,4 +645,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/cert_compressor.h b/net/third_party/quic/core/crypto/cert_compressor.h
index 419f629..daa6cc9 100644
--- a/net/third_party/quic/core/crypto/cert_compressor.h
+++ b/net/third_party/quic/core/crypto/cert_compressor.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // CertCompressor provides functions for compressing and decompressing
 // certificate chains using three techniquies:
@@ -53,6 +53,6 @@
   DISALLOW_COPY_AND_ASSIGN(CertCompressor);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CERT_COMPRESSOR_H_
diff --git a/net/third_party/quic/core/crypto/cert_compressor_test.cc b/net/third_party/quic/core/crypto/cert_compressor_test.cc
index f14a8ab..899f8ed8 100644
--- a/net/third_party/quic/core/crypto/cert_compressor_test.cc
+++ b/net/third_party/quic/core/crypto/cert_compressor_test.cc
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 #include "net/third_party/quic/test_tools/crypto_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class CertCompressorTest : public QuicTest {};
@@ -127,4 +127,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter.cc b/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter.cc
index 5df9c58a1..fb6a92b3 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter.cc
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter.cc
@@ -7,7 +7,7 @@
 #include "third_party/boringssl/src/include/openssl/aead.h"
 #include "third_party/boringssl/src/include/openssl/tls1.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -32,4 +32,4 @@
   return TLS1_CK_CHACHA20_POLY1305_SHA256;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter.h b/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter.h
index 6c6281e..9707b3ad 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter.h
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_decrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // A ChaCha20Poly1305Decrypter is a QuicDecrypter that implements the
 // AEAD_CHACHA20_POLY1305 algorithm specified in RFC 7539, except that
@@ -35,6 +35,6 @@
   DISALLOW_COPY_AND_ASSIGN(ChaCha20Poly1305Decrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CHACHA20_POLY1305_DECRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter_test.cc b/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
index b8a7255..e8d3039 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
@@ -107,7 +107,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // DecryptWithNonce wraps the |Decrypt| method of |decrypter| to allow passing
@@ -173,4 +173,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter.cc b/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter.cc
index fb23e3d..024a2a2c 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter.cc
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter.cc
@@ -6,7 +6,7 @@
 
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -27,4 +27,4 @@
 
 ChaCha20Poly1305Encrypter::~ChaCha20Poly1305Encrypter() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter.h b/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter.h
index 4cdb97d..a995631 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter.h
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_encrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // A ChaCha20Poly1305Encrypter is a QuicEncrypter that implements the
 // AEAD_CHACHA20_POLY1305 algorithm specified in RFC 7539, except that
@@ -31,6 +31,6 @@
   DISALLOW_COPY_AND_ASSIGN(ChaCha20Poly1305Encrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CHACHA20_POLY1305_ENCRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter_test.cc b/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter_test.cc
index 00d2e46d..8546813 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter_test.cc
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_encrypter_test.cc
@@ -64,7 +64,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // EncryptWithNonce wraps the |Encrypt| method of |encrypter| to allow passing
@@ -154,4 +154,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter.cc b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter.cc
index e79354a8..ceb8c07 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter.cc
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter.cc
@@ -9,7 +9,7 @@
 #include "third_party/boringssl/src/include/openssl/aead.h"
 #include "third_party/boringssl/src/include/openssl/tls1.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -34,4 +34,4 @@
   return TLS1_CK_CHACHA20_POLY1305_SHA256;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter.h b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter.h
index b9bb546..b6b477d8 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter.h
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_decrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // A ChaCha20Poly1305TlsDecrypter is a QuicDecrypter that implements the
 // AEAD_CHACHA20_POLY1305 algorithm specified in RFC 7539 for use in IETF QUIC.
@@ -34,6 +34,6 @@
   DISALLOW_COPY_AND_ASSIGN(ChaCha20Poly1305TlsDecrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CHACHA20_POLY1305_TLS_DECRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter_test.cc b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter_test.cc
index 0b0f5b7..b11f660 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter_test.cc
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_decrypter_test.cc
@@ -107,7 +107,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // DecryptWithNonce wraps the |Decrypt| method of |decrypter| to allow passing
@@ -168,4 +168,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter.cc b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter.cc
index bcf70d5..2a2d848 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter.cc
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter.cc
@@ -6,7 +6,7 @@
 
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -27,4 +27,4 @@
 
 ChaCha20Poly1305TlsEncrypter::~ChaCha20Poly1305TlsEncrypter() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter.h b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter.h
index 38d02459..930956c 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter.h
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/crypto/aead_base_encrypter.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // A ChaCha20Poly1305Encrypter is a QuicEncrypter that implements the
 // AEAD_CHACHA20_POLY1305 algorithm specified in RFC 7539 for use in IETF QUIC.
@@ -30,6 +30,6 @@
   DISALLOW_COPY_AND_ASSIGN(ChaCha20Poly1305TlsEncrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CHACHA20_POLY1305_TLS_ENCRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter_test.cc b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter_test.cc
index ebb68c56..3960f3d 100644
--- a/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter_test.cc
+++ b/net/third_party/quic/core/crypto/chacha20_poly1305_tls_encrypter_test.cc
@@ -63,7 +63,7 @@
 
 }  // namespace
 
-namespace net {
+namespace quic {
 namespace test {
 
 // EncryptWithNonce wraps the |Encrypt| method of |encrypter| to allow passing
@@ -153,4 +153,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/channel_id.cc b/net/third_party/quic/core/crypto/channel_id.cc
index a3b0be7..83d47d5 100644
--- a/net/third_party/quic/core/crypto/channel_id.cc
+++ b/net/third_party/quic/core/crypto/channel_id.cc
@@ -12,7 +12,7 @@
 #include "third_party/boringssl/src/include/openssl/nid.h"
 #include "third_party/boringssl/src/include/openssl/sha.h"
 
-namespace net {
+namespace quic {
 
 // static
 const char ChannelIDVerifier::kContextStr[] = "QUIC ChannelID";
@@ -86,4 +86,4 @@
   return ECDSA_do_verify(digest, sizeof(digest), &sig, ecdsa_key.get()) == 1;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/channel_id.h b/net/third_party/quic/core/crypto/channel_id.h
index 868610e9..99a5ee3 100644
--- a/net/third_party/quic/core/crypto/channel_id.h
+++ b/net/third_party/quic/core/crypto/channel_id.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // ChannelIDKey is an interface that supports signing with and serializing a
 // ChannelID key.
@@ -94,6 +94,6 @@
   DISALLOW_COPY_AND_ASSIGN(ChannelIDVerifier);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CHANNEL_ID_H_
diff --git a/net/third_party/quic/core/crypto/channel_id_test.cc b/net/third_party/quic/core/crypto/channel_id_test.cc
index 5e0221a..9a638ba 100644
--- a/net/third_party/quic/core/crypto/channel_id_test.cc
+++ b/net/third_party/quic/core/crypto/channel_id_test.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/crypto_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 namespace {
@@ -318,4 +318,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/common_cert_set.cc b/net/third_party/quic/core/crypto/common_cert_set.cc
index 72ad588..8e58abb 100644
--- a/net/third_party/quic/core/crypto/common_cert_set.cc
+++ b/net/third_party/quic/core/crypto/common_cert_set.cc
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_arraysize.h"
 #include "net/third_party/quic/platform/api/quic_singleton.h"
 
-namespace net {
+namespace quic {
 
 namespace common_cert_set_2 {
 #include "net/third_party/quic/core/crypto/common_cert_set_2.c"
@@ -164,4 +164,4 @@
   return CommonCertSetsQUIC::GetInstance();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/common_cert_set.h b/net/third_party/quic/core/crypto/common_cert_set.h
index 8db0260..477e705 100644
--- a/net/third_party/quic/core/crypto/common_cert_set.h
+++ b/net/third_party/quic/core/crypto/common_cert_set.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // CommonCertSets is an interface to an object that contains a number of common
 // certificate sets and can match against them.
@@ -43,6 +43,6 @@
                          uint32_t* out_index) const = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_COMMON_CERT_SET_H_
diff --git a/net/third_party/quic/core/crypto/common_cert_set_test.cc b/net/third_party/quic/core/crypto/common_cert_set_test.cc
index 299453fc..f4824d9 100644
--- a/net/third_party/quic/core/crypto/common_cert_set_test.cc
+++ b/net/third_party/quic/core/crypto/common_cert_set_test.cc
@@ -8,7 +8,7 @@
 
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Google Internet Authority cert from v2 of the cert set.
@@ -246,4 +246,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_framer.cc b/net/third_party/quic/core/crypto/crypto_framer.cc
index be12288..48cff06 100644
--- a/net/third_party/quic/core/crypto/crypto_framer.cc
+++ b/net/third_party/quic/core/crypto/crypto_framer.cc
@@ -17,7 +17,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -351,4 +351,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_framer.h b/net/third_party/quic/core/crypto/crypto_framer.h
index 48e6f97..a6974c5 100644
--- a/net/third_party/quic/core/crypto/crypto_framer.h
+++ b/net/third_party/quic/core/crypto/crypto_framer.h
@@ -18,7 +18,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class CryptoFramer;
 class QuicData;
@@ -132,6 +132,6 @@
   bool process_truncated_messages_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CRYPTO_FRAMER_H_
diff --git a/net/third_party/quic/core/crypto/crypto_framer_test.cc b/net/third_party/quic/core/crypto/crypto_framer_test.cc
index a28ba3a..3c8e75d1 100644
--- a/net/third_party/quic/core/crypto/crypto_framer_test.cc
+++ b/net/third_party/quic/core/crypto/crypto_framer_test.cc
@@ -19,7 +19,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -477,4 +477,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_handshake.cc b/net/third_party/quic/core/crypto/crypto_handshake.cc
index 4e1dcee..75dbf45 100644
--- a/net/third_party/quic/core/crypto/crypto_handshake.cc
+++ b/net/third_party/quic/core/crypto/crypto_handshake.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/crypto/quic_decrypter.h"
 #include "net/third_party/quic/core/crypto/quic_encrypter.h"
 
-namespace net {
+namespace quic {
 
 QuicCryptoNegotiatedParameters::QuicCryptoNegotiatedParameters()
     : key_exchange(0),
@@ -38,4 +38,4 @@
 
 QuicCryptoConfig::~QuicCryptoConfig() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_handshake.h b/net/third_party/quic/core/crypto/crypto_handshake.h
index 4484d758..129b733 100644
--- a/net/third_party/quic/core/crypto/crypto_handshake.h
+++ b/net/third_party/quic/core/crypto/crypto_handshake.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class CommonCertSets;
 class KeyExchange;
@@ -186,6 +186,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoConfig);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_H_
diff --git a/net/third_party/quic/core/crypto/crypto_handshake_message.cc b/net/third_party/quic/core/crypto/crypto_handshake_message.cc
index 0b1d56cf..d4d1777 100644
--- a/net/third_party/quic/core/crypto/crypto_handshake_message.cc
+++ b/net/third_party/quic/core/crypto/crypto_handshake_message.cc
@@ -19,7 +19,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 CryptoHandshakeMessage::CryptoHandshakeMessage() : tag_(0), minimum_size_(0) {}
 
@@ -384,4 +384,4 @@
   return ret;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_handshake_message.h b/net/third_party/quic/core/crypto/crypto_handshake_message.h
index b5325e8..b922405 100644
--- a/net/third_party/quic/core/crypto/crypto_handshake_message.h
+++ b/net/third_party/quic/core/crypto/crypto_handshake_message.h
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/api/quic_uint128.h"
 
-namespace net {
+namespace quic {
 
 // An intermediate format of a handshake message that's convenient for a
 // CryptoFramer to serialize from or parse into.
@@ -150,6 +150,6 @@
   mutable std::unique_ptr<QuicData> serialized_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_MESSAGE_H_
diff --git a/net/third_party/quic/core/crypto/crypto_handshake_message_test.cc b/net/third_party/quic/core/crypto/crypto_handshake_message_test.cc
index 453c57e..a1860e5 100644
--- a/net/third_party/quic/core/crypto/crypto_handshake_message_test.cc
+++ b/net/third_party/quic/core/crypto/crypto_handshake_message_test.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_endian.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -135,4 +135,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_message_parser.h b/net/third_party/quic/core/crypto/crypto_message_parser.h
index 2a044b5..a9243f5 100644
--- a/net/third_party/quic/core/crypto/crypto_message_parser.h
+++ b/net/third_party/quic/core/crypto/crypto_message_parser.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE CryptoMessageParser {
  public:
@@ -28,6 +28,6 @@
   virtual size_t InputBytesRemaining() const = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CRYPTO_MESSAGE_PARSER_H_
diff --git a/net/third_party/quic/core/crypto/crypto_protocol.h b/net/third_party/quic/core/crypto/crypto_protocol.h
index df79b6d..b847d1fe 100644
--- a/net/third_party/quic/core/crypto/crypto_protocol.h
+++ b/net/third_party/quic/core/crypto/crypto_protocol.h
@@ -22,7 +22,7 @@
 #define TAG(a, b, c, d) \
   static_cast<QuicTag>((d << 24) + (c << 16) + (b << 8) + a)
 
-namespace net {
+namespace quic {
 
 typedef QuicString ServerConfigID;
 
@@ -292,6 +292,6 @@
 // rejection message.
 const size_t kClientHelloMinimumSize = 1024;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CRYPTO_PROTOCOL_H_
diff --git a/net/third_party/quic/core/crypto/crypto_secret_boxer.cc b/net/third_party/quic/core/crypto/crypto_secret_boxer.cc
index c3493b9..ea81484 100644
--- a/net/third_party/quic/core/crypto/crypto_secret_boxer.cc
+++ b/net/third_party/quic/core/crypto/crypto_secret_boxer.cc
@@ -16,7 +16,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 // Defined kKeySize for GetKeySize() and SetKey().
 static const size_t kKeySize = 16;
@@ -131,4 +131,4 @@
   return false;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_secret_boxer.h b/net/third_party/quic/core/crypto/crypto_secret_boxer.h
index ddc9653..33beb208c 100644
--- a/net/third_party/quic/core/crypto/crypto_secret_boxer.h
+++ b/net/third_party/quic/core/crypto/crypto_secret_boxer.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QuicRandom;
 
@@ -63,6 +63,6 @@
   DISALLOW_COPY_AND_ASSIGN(CryptoSecretBoxer);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CRYPTO_SECRET_BOXER_H_
diff --git a/net/third_party/quic/core/crypto/crypto_secret_boxer_test.cc b/net/third_party/quic/core/crypto/crypto_secret_boxer_test.cc
index b894b76..79b2f171 100644
--- a/net/third_party/quic/core/crypto/crypto_secret_boxer_test.cc
+++ b/net/third_party/quic/core/crypto/crypto_secret_boxer_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class CryptoSecretBoxerTest : public QuicTest {};
@@ -76,4 +76,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_server_config_protobuf.cc b/net/third_party/quic/core/crypto/crypto_server_config_protobuf.cc
index d3047f7..d9cbadbf 100644
--- a/net/third_party/quic/core/crypto/crypto_server_config_protobuf.cc
+++ b/net/third_party/quic/core/crypto/crypto_server_config_protobuf.cc
@@ -6,11 +6,11 @@
 
 #include "net/third_party/quic/core/quic_time.h"
 
-namespace net {
+namespace quic {
 
 QuicServerConfigProtobuf::QuicServerConfigProtobuf()
     : primary_time_(QuicWallTime::Zero().ToUNIXSeconds()), priority_(0) {}
 
 QuicServerConfigProtobuf::~QuicServerConfigProtobuf() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_server_config_protobuf.h b/net/third_party/quic/core/crypto/crypto_server_config_protobuf.h
index 1d4380d..ed20143 100644
--- a/net/third_party/quic/core/crypto/crypto_server_config_protobuf.h
+++ b/net/third_party/quic/core/crypto/crypto_server_config_protobuf.h
@@ -18,7 +18,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // QuicServerConfigProtobuf contains QUIC server config block and the private
 // keys needed to prove ownership.
@@ -110,6 +110,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicServerConfigProtobuf);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_
diff --git a/net/third_party/quic/core/crypto/crypto_server_test.cc b/net/third_party/quic/core/crypto/crypto_server_test.cc
index bebe154..85a4a96 100644
--- a/net/third_party/quic/core/crypto/crypto_server_test.cc
+++ b/net/third_party/quic/core/crypto/crypto_server_test.cc
@@ -37,7 +37,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 namespace {
@@ -1148,4 +1148,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_utils.cc b/net/third_party/quic/core/crypto/crypto_utils.cc
index 55e00385..4987c60 100644
--- a/net/third_party/quic/core/crypto/crypto_utils.cc
+++ b/net/third_party/quic/core/crypto/crypto_utils.cc
@@ -29,7 +29,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 // static
 std::vector<uint8_t> CryptoUtils::QhkdfExpand(
@@ -457,4 +457,4 @@
   output->assign(reinterpret_cast<const char*>(digest), sizeof(digest));
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/crypto_utils.h b/net/third_party/quic/core/crypto/crypto_utils.h
index bf3eb96..77b85cf7 100644
--- a/net/third_party/quic/core/crypto/crypto_utils.h
+++ b/net/third_party/quic/core/crypto/crypto_utils.h
@@ -21,7 +21,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 class QuicRandom;
 
@@ -223,6 +223,6 @@
   DISALLOW_COPY_AND_ASSIGN(CryptoUtils);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CRYPTO_UTILS_H_
diff --git a/net/third_party/quic/core/crypto/crypto_utils_test.cc b/net/third_party/quic/core/crypto/crypto_utils_test.cc
index 871f65a..d9bfb30 100644
--- a/net/third_party/quic/core/crypto/crypto_utils_test.cc
+++ b/net/third_party/quic/core/crypto/crypto_utils_test.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -167,4 +167,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/curve25519_key_exchange.cc b/net/third_party/quic/core/crypto/curve25519_key_exchange.cc
index b79fa36..8c4efbc 100644
--- a/net/third_party/quic/core/crypto/curve25519_key_exchange.cc
+++ b/net/third_party/quic/core/crypto/curve25519_key_exchange.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "third_party/boringssl/src/include/openssl/curve25519.h"
 
-namespace net {
+namespace quic {
 
 Curve25519KeyExchange::Curve25519KeyExchange() {}
 
@@ -76,4 +76,4 @@
   return kC255;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/curve25519_key_exchange.h b/net/third_party/quic/core/crypto/curve25519_key_exchange.h
index 4f73927..b486429 100644
--- a/net/third_party/quic/core/crypto/curve25519_key_exchange.h
+++ b/net/third_party/quic/core/crypto/curve25519_key_exchange.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QuicRandom;
 
@@ -45,6 +45,6 @@
   uint8_t public_key_[32];
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_CURVE25519_KEY_EXCHANGE_H_
diff --git a/net/third_party/quic/core/crypto/curve25519_key_exchange_test.cc b/net/third_party/quic/core/crypto/curve25519_key_exchange_test.cc
index 7db0487f..4df2a67 100644
--- a/net/third_party/quic/core/crypto/curve25519_key_exchange_test.cc
+++ b/net/third_party/quic/core/crypto/curve25519_key_exchange_test.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class Curve25519KeyExchangeTest : public QuicTest {};
@@ -40,4 +40,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/ephemeral_key_source.h b/net/third_party/quic/core/crypto/ephemeral_key_source.h
index 6e72f544..22f7b19 100644
--- a/net/third_party/quic/core/crypto/ephemeral_key_source.h
+++ b/net/third_party/quic/core/crypto/ephemeral_key_source.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class KeyExchange;
 class QuicRandom;
@@ -36,6 +36,6 @@
       QuicString* public_value) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_EPHEMERAL_KEY_SOURCE_H_
diff --git a/net/third_party/quic/core/crypto/key_exchange.h b/net/third_party/quic/core/crypto/key_exchange.h
index cf772807..744e58f 100644
--- a/net/third_party/quic/core/crypto/key_exchange.h
+++ b/net/third_party/quic/core/crypto/key_exchange.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QuicRandom;
 
@@ -41,6 +41,6 @@
   virtual QuicTag tag() const = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_KEY_EXCHANGE_H_
diff --git a/net/third_party/quic/core/crypto/null_decrypter.cc b/net/third_party/quic/core/crypto/null_decrypter.cc
index 166f9a3..75ff724 100644
--- a/net/third_party/quic/core/crypto/null_decrypter.cc
+++ b/net/third_party/quic/core/crypto/null_decrypter.cc
@@ -13,7 +13,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 NullDecrypter::NullDecrypter(Perspective perspective)
     : perspective_(perspective) {}
@@ -121,4 +121,4 @@
   return correct_hash;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/null_decrypter.h b/net/third_party/quic/core/crypto/null_decrypter.h
index 2c3613d..97bc337e 100644
--- a/net/third_party/quic/core/crypto/null_decrypter.h
+++ b/net/third_party/quic/core/crypto/null_decrypter.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/api/quic_uint128.h"
 
-namespace net {
+namespace quic {
 
 class QuicDataReader;
 
@@ -58,6 +58,6 @@
   DISALLOW_COPY_AND_ASSIGN(NullDecrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_NULL_DECRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/null_decrypter_test.cc b/net/third_party/quic/core/crypto/null_decrypter_test.cc
index 06f0abb5..a6c48124 100644
--- a/net/third_party/quic/core/crypto/null_decrypter_test.cc
+++ b/net/third_party/quic/core/crypto/null_decrypter_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class NullDecrypterTest : public QuicTestWithParam<bool> {};
@@ -121,4 +121,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/null_encrypter.cc b/net/third_party/quic/core/crypto/null_encrypter.cc
index b41d2ecf..926a4064 100644
--- a/net/third_party/quic/core/crypto/null_encrypter.cc
+++ b/net/third_party/quic/core/crypto/null_encrypter.cc
@@ -9,7 +9,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 const size_t kHashSizeShort = 12;  // size of uint128 serialized short
 
@@ -92,4 +92,4 @@
   return kHashSizeShort;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/null_encrypter.h b/net/third_party/quic/core/crypto/null_encrypter.h
index c0061c4..1ad9e25 100644
--- a/net/third_party/quic/core/crypto/null_encrypter.h
+++ b/net/third_party/quic/core/crypto/null_encrypter.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // A NullEncrypter is a QuicEncrypter used before a crypto negotiation
 // has occurred.  It does not actually encrypt the payload, but does
@@ -51,6 +51,6 @@
   DISALLOW_COPY_AND_ASSIGN(NullEncrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_NULL_ENCRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/null_encrypter_test.cc b/net/third_party/quic/core/crypto/null_encrypter_test.cc
index 248d796a..db0ce358 100644
--- a/net/third_party/quic/core/crypto/null_encrypter_test.cc
+++ b/net/third_party/quic/core/crypto/null_encrypter_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class NullEncrypterTest : public QuicTestWithParam<bool> {};
@@ -99,4 +99,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/p256_key_exchange.cc b/net/third_party/quic/core/crypto/p256_key_exchange.cc
index aa8793f..bf6f19b 100644
--- a/net/third_party/quic/core/crypto/p256_key_exchange.cc
+++ b/net/third_party/quic/core/crypto/p256_key_exchange.cc
@@ -15,7 +15,7 @@
 #include "third_party/boringssl/src/include/openssl/err.h"
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 P256KeyExchange::P256KeyExchange(bssl::UniquePtr<EC_KEY> private_key,
                                  const uint8_t* public_key)
@@ -119,4 +119,4 @@
   return kP256;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/p256_key_exchange.h b/net/third_party/quic/core/crypto/p256_key_exchange.h
index f038859..ae01620 100644
--- a/net/third_party/quic/core/crypto/p256_key_exchange.h
+++ b/net/third_party/quic/core/crypto/p256_key_exchange.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "third_party/boringssl/src/include/openssl/base.h"
 
-namespace net {
+namespace quic {
 
 // P256KeyExchange implements a KeyExchange using elliptic-curve
 // Diffie-Hellman on NIST P-256.
@@ -62,6 +62,6 @@
   DISALLOW_COPY_AND_ASSIGN(P256KeyExchange);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_P256_KEY_EXCHANGE_H_
diff --git a/net/third_party/quic/core/crypto/p256_key_exchange_test.cc b/net/third_party/quic/core/crypto/p256_key_exchange_test.cc
index a862c2f..6d7b1cc 100644
--- a/net/third_party/quic/core/crypto/p256_key_exchange_test.cc
+++ b/net/third_party/quic/core/crypto/p256_key_exchange_test.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class P256KeyExchangeTest : public QuicTest {};
@@ -42,4 +42,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/proof_source.cc b/net/third_party/quic/core/crypto/proof_source.cc
index 421c58a7..75c2ca6 100644
--- a/net/third_party/quic/core/crypto/proof_source.cc
+++ b/net/third_party/quic/core/crypto/proof_source.cc
@@ -5,11 +5,11 @@
 #include "net/third_party/quic/core/crypto/proof_source.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 ProofSource::Chain::Chain(const std::vector<QuicString>& certs)
     : certs(certs) {}
 
 ProofSource::Chain::~Chain() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/proof_source.h b/net/third_party/quic/core/crypto/proof_source.h
index e9f1352..3a683dc1 100644
--- a/net/third_party/quic/core/crypto/proof_source.h
+++ b/net/third_party/quic/core/crypto/proof_source.h
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // ProofSource is an interface by which a QUIC server can obtain certificate
 // chains and signatures that prove its identity.
@@ -141,6 +141,6 @@
       std::unique_ptr<SignatureCallback> callback) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_PROOF_SOURCE_H_
diff --git a/net/third_party/quic/core/crypto/proof_verifier.h b/net/third_party/quic/core/crypto/proof_verifier.h
index c96072f..7de0bae 100644
--- a/net/third_party/quic/core/crypto/proof_verifier.h
+++ b/net/third_party/quic/core/crypto/proof_verifier.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // ProofVerifyDetails is an abstract class that acts as a container for any
 // implementation specific details that a ProofVerifier wishes to return. These
@@ -109,6 +109,6 @@
       std::unique_ptr<ProofVerifierCallback> callback) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_PROOF_VERIFIER_H_
diff --git a/net/third_party/quic/core/crypto/quic_compressed_certs_cache.cc b/net/third_party/quic/core/crypto/quic_compressed_certs_cache.cc
index 9dac871f..11b1240 100644
--- a/net/third_party/quic/core/crypto/quic_compressed_certs_cache.cc
+++ b/net/third_party/quic/core/crypto/quic_compressed_certs_cache.cc
@@ -5,7 +5,7 @@
 #include "net/third_party/quic/core/crypto/quic_compressed_certs_cache.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -123,4 +123,4 @@
   return hash;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_compressed_certs_cache.h b/net/third_party/quic/core/crypto/quic_compressed_certs_cache.h
index 9699a99..a589695 100644
--- a/net/third_party/quic/core/crypto/quic_compressed_certs_cache.h
+++ b/net/third_party/quic/core/crypto/quic_compressed_certs_cache.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_lru_cache.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // QuicCompressedCertsCache is a cache to track most recently compressed certs.
 class QUIC_EXPORT_PRIVATE QuicCompressedCertsCache {
@@ -103,6 +103,6 @@
   QuicLRUCache<uint64_t, CachedCerts> certs_cache_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_QUIC_COMPRESSED_CERTS_CACHE_H_
diff --git a/net/third_party/quic/core/crypto/quic_compressed_certs_cache_test.cc b/net/third_party/quic/core/crypto/quic_compressed_certs_cache_test.cc
index 02d509e..d75c4d4 100644
--- a/net/third_party/quic/core/crypto/quic_compressed_certs_cache_test.cc
+++ b/net/third_party/quic/core/crypto/quic_compressed_certs_cache_test.cc
@@ -13,7 +13,7 @@
 
 using base::IntToString;
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -98,4 +98,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_crypto_client_config.cc b/net/third_party/quic/core/crypto/quic_crypto_client_config.cc
index d400eb4..aee158a8 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_client_config.cc
+++ b/net/third_party/quic/core/crypto/quic_crypto_client_config.cc
@@ -34,7 +34,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -558,7 +558,7 @@
   out->SetVector(kKEXS, QuicTagVector{out_params->key_exchange});
 
   if (!tb_key_params.empty() &&
-      server_id.privacy_mode() == PRIVACY_MODE_DISABLED) {
+      server_id.privacy_mode() == net::PRIVACY_MODE_DISABLED) {
     QuicTagVector their_tbkps;
     switch (scfg->GetTaglist(kTBKP, &their_tbkps)) {
       case QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND:
@@ -1005,4 +1005,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_crypto_client_config.h b/net/third_party/quic/core/crypto/quic_crypto_client_config.h
index 6f137ef..972122bc 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_client_config.h
+++ b/net/third_party/quic/core/crypto/quic_crypto_client_config.h
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "third_party/boringssl/src/include/openssl/base.h"
 
-namespace net {
+namespace quic {
 
 class ChannelIDKey;
 class ChannelIDSource;
@@ -405,6 +405,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientConfig);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_QUIC_CRYPTO_CLIENT_CONFIG_H_
diff --git a/net/third_party/quic/core/crypto/quic_crypto_client_config_test.cc b/net/third_party/quic/core/crypto/quic_crypto_client_config_test.cc
index 6ced278..022027b 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_client_config_test.cc
+++ b/net/third_party/quic/core/crypto/quic_crypto_client_config_test.cc
@@ -17,7 +17,7 @@
 
 using testing::StartsWith;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -182,7 +182,7 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params(
       new QuicCryptoNegotiatedParameters);
   CryptoHandshakeMessage msg;
-  QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
+  QuicServerId server_id("www.google.com", 443, net::PRIVACY_MODE_DISABLED);
   MockRandom rand;
   config.FillInchoateClientHello(server_id, QuicVersionMax(), &state, &rand,
                                  /* demand_x509_proof= */ true, params, &msg);
@@ -217,7 +217,7 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params(
       new QuicCryptoNegotiatedParameters);
   CryptoHandshakeMessage msg;
-  QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
+  QuicServerId server_id("www.google.com", 443, net::PRIVACY_MODE_DISABLED);
   MockRandom rand;
   config.FillInchoateClientHello(server_id, QuicVersionMax(), &state, &rand,
                                  /* demand_x509_proof= */ true, params, &msg);
@@ -248,7 +248,7 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params(
       new QuicCryptoNegotiatedParameters);
   CryptoHandshakeMessage msg;
-  QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
+  QuicServerId server_id("www.google.com", 443, net::PRIVACY_MODE_DISABLED);
   MockRandom rand;
   config.FillInchoateClientHello(server_id, QuicVersionMax(), &state, &rand,
                                  /* demand_x509_proof= */ true, params, &msg);
@@ -276,7 +276,7 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params(
       new QuicCryptoNegotiatedParameters);
   CryptoHandshakeMessage msg;
-  QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
+  QuicServerId server_id("www.google.com", 443, net::PRIVACY_MODE_DISABLED);
   MockRandom rand;
   config.FillInchoateClientHello(server_id, QuicVersionMax(), &state, &rand,
                                  /* demand_x509_proof= */ true, params, &msg);
@@ -296,7 +296,7 @@
   QuicString error_details;
   MockRandom rand;
   CryptoHandshakeMessage chlo;
-  QuicServerId server_id("www.google.com", 443, PRIVACY_MODE_DISABLED);
+  QuicServerId server_id("www.google.com", 443, net::PRIVACY_MODE_DISABLED);
   config.FillClientHello(server_id, kConnectionId, QuicVersionMax(), &state,
                          QuicWallTime::Zero(), &rand,
                          nullptr,  // channel_id_key
@@ -341,14 +341,15 @@
   QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
                                 TlsClientHandshaker::CreateSslCtx());
   QuicServerId canonical_server_id("www.google.com", 443,
-                                   PRIVACY_MODE_DISABLED);
+                                   net::PRIVACY_MODE_DISABLED);
   QuicCryptoClientConfig::CachedState* state =
       config.LookupOrCreate(canonical_server_id);
   // TODO(rch): Populate other fields of |state|.
   state->set_source_address_token("TOKEN");
   state->SetProofValid();
 
-  QuicServerId other_server_id("mail.google.com", 443, PRIVACY_MODE_DISABLED);
+  QuicServerId other_server_id("mail.google.com", 443,
+                               net::PRIVACY_MODE_DISABLED);
   config.InitializeFrom(other_server_id, canonical_server_id, &config);
   QuicCryptoClientConfig::CachedState* other =
       config.LookupOrCreate(other_server_id);
@@ -363,8 +364,9 @@
   QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
                                 TlsClientHandshaker::CreateSslCtx());
   config.AddCanonicalSuffix(".google.com");
-  QuicServerId canonical_id1("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  QuicServerId canonical_id2("mail.google.com", 443, PRIVACY_MODE_DISABLED);
+  QuicServerId canonical_id1("www.google.com", 443, net::PRIVACY_MODE_DISABLED);
+  QuicServerId canonical_id2("mail.google.com", 443,
+                             net::PRIVACY_MODE_DISABLED);
   QuicCryptoClientConfig::CachedState* state =
       config.LookupOrCreate(canonical_id1);
   // TODO(rch): Populate other fields of |state|.
@@ -380,7 +382,7 @@
   EXPECT_EQ(state->certs(), other->certs());
   EXPECT_EQ(1u, other->generation_counter());
 
-  QuicServerId different_id("mail.google.org", 443, PRIVACY_MODE_DISABLED);
+  QuicServerId different_id("mail.google.org", 443, net::PRIVACY_MODE_DISABLED);
   EXPECT_TRUE(config.LookupOrCreate(different_id)->IsEmpty());
 }
 
@@ -388,8 +390,9 @@
   QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
                                 TlsClientHandshaker::CreateSslCtx());
   config.AddCanonicalSuffix(".google.com");
-  QuicServerId canonical_id1("www.google.com", 443, PRIVACY_MODE_DISABLED);
-  QuicServerId canonical_id2("mail.google.com", 443, PRIVACY_MODE_DISABLED);
+  QuicServerId canonical_id1("www.google.com", 443, net::PRIVACY_MODE_DISABLED);
+  QuicServerId canonical_id2("mail.google.com", 443,
+                             net::PRIVACY_MODE_DISABLED);
   QuicCryptoClientConfig::CachedState* state =
       config.LookupOrCreate(canonical_id1);
   // TODO(rch): Populate other fields of |state|.
@@ -407,7 +410,7 @@
   // Create two states on different origins.
   struct TestCase {
     TestCase(const QuicString& host, QuicCryptoClientConfig* config)
-        : server_id(host, 443, PRIVACY_MODE_DISABLED),
+        : server_id(host, 443, net::PRIVACY_MODE_DISABLED),
           state(config->LookupOrCreate(server_id)) {
       // TODO(rch): Populate other fields of |state|.
       CryptoHandshakeMessage scfg;
@@ -604,4 +607,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_crypto_proof.cc b/net/third_party/quic/core/crypto/quic_crypto_proof.cc
index 29fefdf..ac2439b 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_proof.cc
+++ b/net/third_party/quic/core/crypto/quic_crypto_proof.cc
@@ -4,8 +4,8 @@
 
 #include "net/third_party/quic/core/crypto/quic_crypto_proof.h"
 
-namespace net {
+namespace quic {
 
 QuicCryptoProof::QuicCryptoProof() : send_expect_ct_header(false) {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_crypto_proof.h b/net/third_party/quic/core/crypto/quic_crypto_proof.h
index f55301e..601f5ce4 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_proof.h
+++ b/net/third_party/quic/core/crypto/quic_crypto_proof.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // Contains the crypto-related data provided by ProofSource
 struct QUIC_EXPORT_PRIVATE QuicCryptoProof {
@@ -23,6 +23,6 @@
   bool send_expect_ct_header;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_QUIC_CRYPTO_PROOF_H_
diff --git a/net/third_party/quic/core/crypto/quic_crypto_server_config.cc b/net/third_party/quic/core/crypto/quic_crypto_server_config.cc
index 0f0df96..c50a04a 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_server_config.cc
+++ b/net/third_party/quic/core/crypto/quic_crypto_server_config.cc
@@ -47,7 +47,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -1945,4 +1945,4 @@
 QuicSignedServerConfig::QuicSignedServerConfig() {}
 QuicSignedServerConfig::~QuicSignedServerConfig() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_crypto_server_config.h b/net/third_party/quic/core/crypto/quic_crypto_server_config.h
index 94484ab..2c8944e6 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_server_config.h
+++ b/net/third_party/quic/core/crypto/quic_crypto_server_config.h
@@ -30,7 +30,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "third_party/boringssl/src/include/openssl/base.h"
 
-namespace net {
+namespace quic {
 
 class CryptoHandshakeMessage;
 class EphemeralKeySource;
@@ -791,6 +791,6 @@
   ~QuicSignedServerConfig() override;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_QUIC_CRYPTO_SERVER_CONFIG_H_
diff --git a/net/third_party/quic/core/crypto/quic_crypto_server_config_test.cc b/net/third_party/quic/core/crypto/quic_crypto_server_config_test.cc
index 092a3a3..3591235 100644
--- a/net/third_party/quic/core/crypto/quic_crypto_server_config_test.cc
+++ b/net/third_party/quic/core/crypto/quic_crypto_server_config_test.cc
@@ -25,7 +25,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicCryptoServerConfigTest : public QuicTest {};
@@ -462,4 +462,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_decrypter.cc b/net/third_party/quic/core/crypto/quic_decrypter.cc
index 68cb8ef..5bbfc08f 100644
--- a/net/third_party/quic/core/crypto/quic_decrypter.cc
+++ b/net/third_party/quic/core/crypto/quic_decrypter.cc
@@ -20,7 +20,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 // static
 std::unique_ptr<QuicDecrypter> QuicDecrypter::Create(QuicTag algorithm) {
@@ -67,4 +67,4 @@
   *out_nonce_prefix = string(hkdf.server_write_iv());
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_decrypter.h b/net/third_party/quic/core/crypto/quic_decrypter.h
index 3eac221..587ab9f5 100644
--- a/net/third_party/quic/core/crypto/quic_decrypter.h
+++ b/net/third_party/quic/core/crypto/quic_decrypter.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicDecrypter {
  public:
@@ -132,6 +132,6 @@
                                       QuicString* out_nonce_prefix);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_QUIC_DECRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/quic_encrypter.cc b/net/third_party/quic/core/crypto/quic_encrypter.cc
index b620d9e..2a5a58e6 100644
--- a/net/third_party/quic/core/crypto/quic_encrypter.cc
+++ b/net/third_party/quic/core/crypto/quic_encrypter.cc
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/platform/api/quic_ptr_util.h"
 #include "third_party/boringssl/src/include/openssl/tls1.h"
 
-namespace net {
+namespace quic {
 
 // static
 std::unique_ptr<QuicEncrypter> QuicEncrypter::Create(QuicTag algorithm) {
@@ -47,4 +47,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_encrypter.h b/net/third_party/quic/core/crypto/quic_encrypter.h
index ab06f19..92ff64df 100644
--- a/net/third_party/quic/core/crypto/quic_encrypter.h
+++ b/net/third_party/quic/core/crypto/quic_encrypter.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicEncrypter {
  public:
@@ -118,6 +118,6 @@
   virtual QuicStringPiece GetNoncePrefix() const = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_QUIC_ENCRYPTER_H_
diff --git a/net/third_party/quic/core/crypto/quic_random.cc b/net/third_party/quic/core/crypto/quic_random.cc
index 1b87fce..f912c57 100644
--- a/net/third_party/quic/core/crypto/quic_random.cc
+++ b/net/third_party/quic/core/crypto/quic_random.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_singleton.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -56,4 +56,4 @@
   return DefaultRandom::GetInstance();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_random.h b/net/third_party/quic/core/crypto/quic_random.h
index 10f1584..659a2e48 100644
--- a/net/third_party/quic/core/crypto/quic_random.h
+++ b/net/third_party/quic/core/crypto/quic_random.h
@@ -10,7 +10,7 @@
 
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // The interface for a random number generator.
 class QUIC_EXPORT_PRIVATE QuicRandom {
@@ -33,6 +33,6 @@
   virtual void Reseed(const void* additional_entropy, size_t entropy_len) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_QUIC_RANDOM_H_
diff --git a/net/third_party/quic/core/crypto/quic_random_test.cc b/net/third_party/quic/core/crypto/quic_random_test.cc
index a60626a4..6e25cd6 100644
--- a/net/third_party/quic/core/crypto/quic_random_test.cc
+++ b/net/third_party/quic/core/crypto/quic_random_test.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicRandomTest : public QuicTest {};
@@ -39,4 +39,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_tls_adapter.cc b/net/third_party/quic/core/crypto/quic_tls_adapter.cc
index 4e277b2..9d46e9ca 100644
--- a/net/third_party/quic/core/crypto/quic_tls_adapter.cc
+++ b/net/third_party/quic/core/crypto/quic_tls_adapter.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 
-namespace net {
+namespace quic {
 
 const BIO_METHOD QuicTlsAdapter::kBIOMethod = {
     0,        // type
@@ -127,4 +127,4 @@
   write_buffer_.clear();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/quic_tls_adapter.h b/net/third_party/quic/core/crypto/quic_tls_adapter.h
index a90f270..1a0c79b 100644
--- a/net/third_party/quic/core/crypto/quic_tls_adapter.h
+++ b/net/third_party/quic/core/crypto/quic_tls_adapter.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "third_party/boringssl/src/include/openssl/bio.h"
 
-namespace net {
+namespace quic {
 
 // QuicTlsAdapter provides an implementation of CryptoMessageParser that takes
 // incoming messages and provides them to be read in a BIO (used by the TLS
@@ -157,6 +157,6 @@
   QuicString error_detail_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_QUIC_TLS_ADAPTER_H_
diff --git a/net/third_party/quic/core/crypto/quic_tls_adapter_test.cc b/net/third_party/quic/core/crypto/quic_tls_adapter_test.cc
index 7c252411..74f5e25 100644
--- a/net/third_party/quic/core/crypto/quic_tls_adapter_test.cc
+++ b/net/third_party/quic/core/crypto/quic_tls_adapter_test.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "third_party/boringssl/src/include/openssl/bio.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -113,4 +113,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/scoped_evp_aead_ctx.cc b/net/third_party/quic/core/crypto/scoped_evp_aead_ctx.cc
index 0c0d443..b2d869d 100644
--- a/net/third_party/quic/core/crypto/scoped_evp_aead_ctx.cc
+++ b/net/third_party/quic/core/crypto/scoped_evp_aead_ctx.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/crypto/scoped_evp_aead_ctx.h"
 
-namespace net {
+namespace quic {
 
 ScopedEVPAEADCtx::ScopedEVPAEADCtx() {
   ctx_.aead = nullptr;
@@ -21,4 +21,4 @@
   return &ctx_;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/scoped_evp_aead_ctx.h b/net/third_party/quic/core/crypto/scoped_evp_aead_ctx.h
index e62a7d0..8de9edd 100644
--- a/net/third_party/quic/core/crypto/scoped_evp_aead_ctx.h
+++ b/net/third_party/quic/core/crypto/scoped_evp_aead_ctx.h
@@ -8,7 +8,7 @@
 #include "base/macros.h"
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 // ScopedEVPAEADCtx manages an EVP_AEAD_CTX object and calls the needed cleanup
 // functions when it goes out of scope.
@@ -25,6 +25,6 @@
   DISALLOW_COPY_AND_ASSIGN(ScopedEVPAEADCtx);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_SCOPED_EVP_AEAD_CTX_H_
diff --git a/net/third_party/quic/core/crypto/transport_parameters.cc b/net/third_party/quic/core/crypto/transport_parameters.cc
index 2d5bbbca..0459824 100644
--- a/net/third_party/quic/core/crypto/transport_parameters.cc
+++ b/net/third_party/quic/core/crypto/transport_parameters.cc
@@ -6,7 +6,7 @@
 
 #include "third_party/boringssl/src/include/openssl/bytestring.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -286,4 +286,4 @@
   return out->is_valid();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/crypto/transport_parameters.h b/net/third_party/quic/core/crypto/transport_parameters.h
index 9d98b87..9bfeb7a 100644
--- a/net/third_party/quic/core/crypto/transport_parameters.h
+++ b/net/third_party/quic/core/crypto/transport_parameters.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_types.h"
 #include "net/third_party/quic/core/quic_versions.h"
 
-namespace net {
+namespace quic {
 
 // TransportParameters contains parameters for QUIC's transport layer that are
 // indicated during the TLS handshake. This struct is a mirror of the struct in
@@ -83,6 +83,6 @@
                                                   Perspective perspective,
                                                   TransportParameters* out);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_CRYPTO_TRANSPORT_PARAMETERS_H_
diff --git a/net/third_party/quic/core/crypto/transport_parameters_test.cc b/net/third_party/quic/core/crypto/transport_parameters_test.cc
index d3d6498..f2f676a 100644
--- a/net/third_party/quic/core/crypto/transport_parameters_test.cc
+++ b/net/third_party/quic/core/crypto/transport_parameters_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "third_party/boringssl/src/include/openssl/mem.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class TransportParametersTest : public QuicTest {};
@@ -398,4 +398,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/end_to_end_test.cc b/net/third_party/quic/core/end_to_end_test.cc
index d0591b45..e8135e5 100644
--- a/net/third_party/quic/core/end_to_end_test.cc
+++ b/net/third_party/quic/core/end_to_end_test.cc
@@ -73,7 +73,7 @@
 using base::IntToString;
 using base::WaitableEvent;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -262,7 +262,7 @@
   explicit ClientDelegate(QuicClient* client) : client_(client) {}
   ~ClientDelegate() override = default;
   void OnCanWrite() override {
-    EpollEvent event(EPOLLOUT);
+    net::EpollEvent event(EPOLLOUT);
     client_->epoll_network_helper()->OnEvent(client_->GetLatestFD(), &event);
   }
 
@@ -271,7 +271,7 @@
 };
 
 class EndToEndTest : public QuicTestWithParam<TestParams>,
-                     public WithScopedTaskEnvironment {
+                     public net::WithScopedTaskEnvironment {
  protected:
   EndToEndTest()
       : initialized_(false),
@@ -417,7 +417,7 @@
     StartServer();
 
     CreateClientWithWriter();
-    static EpollEvent event(EPOLLOUT);
+    static net::EpollEvent event(EPOLLOUT);
     if (client_writer_ != nullptr) {
       client_writer_->Initialize(
           QuicConnectionPeer::GetHelper(
@@ -1148,8 +1148,8 @@
   // Regression test for b/14677858.
   // Test that the resume write alarm is not set in QuicConnection::OnCanWrite
   // if currently connection level flow control blocked. If set, this results in
-  // an infinite loop in the EpollServer, as the alarm fires and is immediately
-  // rescheduled.
+  // an infinite loop in the net::EpollServer, as the alarm fires and is
+  // immediately rescheduled.
   ASSERT_TRUE(Initialize());
   EXPECT_TRUE(client_->client()->WaitForCryptoHandshakeConfirmed());
 
@@ -1646,7 +1646,7 @@
 
   // Register the new FD for epoll events.
   int new_fd = client_->client()->GetLatestFD();
-  EpollServer* eps = client_->epoll_server();
+  net::EpollServer* eps = client_->epoll_server();
   eps->RegisterFD(new_fd, client_->client()->epoll_network_helper(),
                   EPOLLIN | EPOLLOUT | EPOLLET);
 
@@ -2841,7 +2841,7 @@
   client->UseWriter(client_writer_);
   client->Connect();
   client_.reset(client);
-  static EpollEvent event(EPOLLOUT);
+  static net::EpollEvent event(EPOLLOUT);
   client_writer_->Initialize(
       QuicConnectionPeer::GetHelper(
           client_->client()->client_session()->connection()),
@@ -3133,4 +3133,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_ack_frame.cc b/net/third_party/quic/core/frames/quic_ack_frame.cc
index 115c415a..76df5d7 100644
--- a/net/third_party/quic/core/frames/quic_ack_frame.cc
+++ b/net/third_party/quic/core/frames/quic_ack_frame.cc
@@ -13,7 +13,7 @@
 using std::max;
 using std::min;
 
-namespace net {
+namespace quic {
 
 namespace {
 const QuicPacketNumber kMaxPrintRange = 128;
@@ -67,10 +67,10 @@
   // Check if the deque is empty
   if (packet_number_deque_.empty()) {
     packet_number_deque_.push_front(
-        Interval<QuicPacketNumber>(packet_number, packet_number + 1));
+        net::Interval<QuicPacketNumber>(packet_number, packet_number + 1));
     return;
   }
-  Interval<QuicPacketNumber> back = packet_number_deque_.back();
+  net::Interval<QuicPacketNumber> back = packet_number_deque_.back();
 
   // Check for the typical case,
   // when the next packet in order is acked
@@ -81,15 +81,15 @@
   // Check if the next packet in order is skipped
   if (back.max() < packet_number) {
     packet_number_deque_.push_back(
-        Interval<QuicPacketNumber>(packet_number, packet_number + 1));
+        net::Interval<QuicPacketNumber>(packet_number, packet_number + 1));
     return;
   }
 
-  Interval<QuicPacketNumber> front = packet_number_deque_.front();
+  net::Interval<QuicPacketNumber> front = packet_number_deque_.front();
   // Check if the packet can be  popped on the front
   if (front.min() > packet_number + 1) {
     packet_number_deque_.push_front(
-        Interval<QuicPacketNumber>(packet_number, packet_number + 1));
+        net::Interval<QuicPacketNumber>(packet_number, packet_number + 1));
     return;
   }
   if (front.min() == packet_number + 1) {
@@ -101,7 +101,7 @@
   // Iterating through the queue backwards
   // to find a proper place for the packet
   while (i >= 0) {
-    Interval<QuicPacketNumber> packet_interval = packet_number_deque_[i];
+    net::Interval<QuicPacketNumber> packet_interval = packet_number_deque_[i];
     DCHECK(packet_interval.min() < packet_interval.max());
     // Check if the packet is contained in an interval already
     if (packet_interval.Contains(packet_number)) {
@@ -130,7 +130,7 @@
     if (packet_interval.max() < packet_number + 1) {
       packet_number_deque_.insert(
           packet_number_deque_.begin() + i + 1,
-          Interval<QuicPacketNumber>(packet_number, packet_number + 1));
+          net::Interval<QuicPacketNumber>(packet_number, packet_number + 1));
       return;
     }
     i--;
@@ -143,10 +143,11 @@
     return;
   }
   if (packet_number_deque_.empty()) {
-    packet_number_deque_.push_front(Interval<QuicPacketNumber>(lower, higher));
+    packet_number_deque_.push_front(
+        net::Interval<QuicPacketNumber>(lower, higher));
     return;
   }
-  Interval<QuicPacketNumber> back = packet_number_deque_.back();
+  net::Interval<QuicPacketNumber> back = packet_number_deque_.back();
 
   if (back.max() == lower) {
     // Check for the typical case,
@@ -156,15 +157,17 @@
   }
   if (back.max() < lower) {
     // Check if the next packet in order is skipped
-    packet_number_deque_.push_back(Interval<QuicPacketNumber>(lower, higher));
+    packet_number_deque_.push_back(
+        net::Interval<QuicPacketNumber>(lower, higher));
     return;
   }
-  Interval<QuicPacketNumber> front = packet_number_deque_.front();
+  net::Interval<QuicPacketNumber> front = packet_number_deque_.front();
   // Check if the packets are being added in reverse order
   if (front.min() == higher) {
     packet_number_deque_.front().SetMin(lower);
   } else if (front.min() > higher) {
-    packet_number_deque_.push_front(Interval<QuicPacketNumber>(lower, higher));
+    packet_number_deque_.push_front(
+        net::Interval<QuicPacketNumber>(lower, higher));
 
   } else {
     // Ranges must be above or below all existing ranges.
@@ -180,7 +183,7 @@
   }
   const QuicPacketNumber old_min = Min();
   while (!packet_number_deque_.empty()) {
-    Interval<QuicPacketNumber> front = packet_number_deque_.front();
+    net::Interval<QuicPacketNumber> front = packet_number_deque_.front();
     if (front.max() < higher) {
       packet_number_deque_.pop_front();
     } else if (front.min() < higher && front.max() >= higher) {
@@ -216,7 +219,7 @@
       packet_number_deque_.back().max() <= packet_number) {
     return false;
   }
-  for (Interval<QuicPacketNumber> interval : packet_number_deque_) {
+  for (net::Interval<QuicPacketNumber> interval : packet_number_deque_) {
     if (interval.Contains(packet_number)) {
       return true;
     }
@@ -240,7 +243,7 @@
 
 size_t PacketNumberQueue::NumPacketsSlow() const {
   int n_packets = 0;
-  for (Interval<QuicPacketNumber> interval : packet_number_deque_) {
+  for (net::Interval<QuicPacketNumber> interval : packet_number_deque_) {
     n_packets += interval.Length();
   }
   return n_packets;
@@ -276,7 +279,7 @@
 // than [a b c d]
 
 std::ostream& operator<<(std::ostream& os, const PacketNumberQueue& q) {
-  for (const Interval<QuicPacketNumber>& interval : q) {
+  for (const net::Interval<QuicPacketNumber>& interval : q) {
     // Print as a range if there is a pathological condition.
     if ((interval.min() >= interval.max()) ||
         (interval.max() - interval.min() > kMaxPrintRange)) {
@@ -298,4 +301,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_ack_frame.h b/net/third_party/quic/core/frames/quic_ack_frame.h
index df75b418..56785b1a 100644
--- a/net/third_party/quic/core/frames/quic_ack_frame.h
+++ b/net/third_party/quic/core/frames/quic_ack_frame.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_flags.h"
 
-namespace net {
+namespace quic {
 
 // A sequence of packet numbers where each number is unique. Intended to be used
 // in a sliding window fashion, where smaller old packet numbers are removed and
@@ -28,8 +28,9 @@
   PacketNumberQueue& operator=(const PacketNumberQueue& other);
   PacketNumberQueue& operator=(PacketNumberQueue&& other);
 
-  typedef QuicDeque<Interval<QuicPacketNumber>>::const_iterator const_iterator;
-  typedef QuicDeque<Interval<QuicPacketNumber>>::const_reverse_iterator
+  typedef QuicDeque<net::Interval<QuicPacketNumber>>::const_iterator
+      const_iterator;
+  typedef QuicDeque<net::Interval<QuicPacketNumber>>::const_reverse_iterator
       const_reverse_iterator;
 
   // Adds |packet_number| to the set of packets in the queue.
@@ -85,7 +86,7 @@
       const PacketNumberQueue& q);
 
  private:
-  QuicDeque<Interval<QuicPacketNumber>> packet_number_deque_;
+  QuicDeque<net::Interval<QuicPacketNumber>> packet_number_deque_;
 };
 
 struct QUIC_EXPORT_PRIVATE QuicAckFrame {
@@ -131,6 +132,6 @@
     QuicPacketNumber packet_number,
     QuicPacketNumber peer_least_packet_awaiting_ack);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_ACK_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_application_close_frame.cc b/net/third_party/quic/core/frames/quic_application_close_frame.cc
index 21ef891..8111cd5 100644
--- a/net/third_party/quic/core/frames/quic_application_close_frame.cc
+++ b/net/third_party/quic/core/frames/quic_application_close_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_application_close_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicApplicationCloseFrame::QuicApplicationCloseFrame()
     : error_code(QUIC_NO_ERROR) {}
@@ -16,4 +16,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_application_close_frame.h b/net/third_party/quic/core/frames/quic_application_close_frame.h
index 516ecc4..569e0c7 100644
--- a/net/third_party/quic/core/frames/quic_application_close_frame.h
+++ b/net/third_party/quic/core/frames/quic_application_close_frame.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicApplicationCloseFrame {
   QuicApplicationCloseFrame();
@@ -24,6 +24,6 @@
   QuicString error_details;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_APPLICATION_CLOSE_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_blocked_frame.cc b/net/third_party/quic/core/frames/quic_blocked_frame.cc
index 905f608..3ea12fb8 100644
--- a/net/third_party/quic/core/frames/quic_blocked_frame.cc
+++ b/net/third_party/quic/core/frames/quic_blocked_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_blocked_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicBlockedFrame::QuicBlockedFrame() : stream_id(0), offset(0) {}
 
@@ -26,4 +26,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_blocked_frame.h b/net/third_party/quic/core/frames/quic_blocked_frame.h
index 6022c9d4..70974be 100644
--- a/net/third_party/quic/core/frames/quic_blocked_frame.h
+++ b/net/third_party/quic/core/frames/quic_blocked_frame.h
@@ -9,7 +9,7 @@
 
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 
-namespace net {
+namespace quic {
 
 // The BLOCKED frame is used to indicate to the remote endpoint that this
 // endpoint believes itself to be flow-control blocked but otherwise ready to
@@ -39,6 +39,6 @@
   QuicStreamOffset offset;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_BLOCKED_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_connection_close_frame.cc b/net/third_party/quic/core/frames/quic_connection_close_frame.cc
index 1a13fbf..98602c4 100644
--- a/net/third_party/quic/core/frames/quic_connection_close_frame.cc
+++ b/net/third_party/quic/core/frames/quic_connection_close_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_connection_close_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicConnectionCloseFrame::QuicConnectionCloseFrame()
     : error_code(QUIC_NO_ERROR) {}
@@ -27,4 +27,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_connection_close_frame.h b/net/third_party/quic/core/frames/quic_connection_close_frame.h
index be668b42..3fa90eb4 100644
--- a/net/third_party/quic/core/frames/quic_connection_close_frame.h
+++ b/net/third_party/quic/core/frames/quic_connection_close_frame.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicConnectionCloseFrame {
   QuicConnectionCloseFrame();
@@ -35,6 +35,6 @@
   QuicString error_details;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_CONNECTION_CLOSE_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_control_frame.h b/net/third_party/quic/core/frames/quic_control_frame.h
index 8686d87..41b3c14 100644
--- a/net/third_party/quic/core/frames/quic_control_frame.h
+++ b/net/third_party/quic/core/frames/quic_control_frame.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_constants.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicControlFrame {
   QuicControlFrame() : control_frame_id(kInvalidControlFrameId) {}
@@ -20,6 +20,6 @@
   QuicControlFrameId control_frame_id;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_CONTROL_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_frame.cc b/net/third_party/quic/core/frames/quic_frame.cc
index f149e7f..1da0cb4 100644
--- a/net/third_party/quic/core/frames/quic_frame.cc
+++ b/net/third_party/quic/core/frames/quic_frame.cc
@@ -9,7 +9,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 QuicFrame::QuicFrame() {}
 
@@ -306,4 +306,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_frame.h b/net/third_party/quic/core/frames/quic_frame.h
index 7879300..d19b615 100644
--- a/net/third_party/quic/core/frames/quic_frame.h
+++ b/net/third_party/quic/core/frames/quic_frame.h
@@ -29,7 +29,7 @@
 #include "net/third_party/quic/core/quic_types.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicFrame {
   QuicFrame();
@@ -113,6 +113,6 @@
 QUIC_EXPORT_PRIVATE QuicFrame
 CopyRetransmittableControlFrame(const QuicFrame& frame);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_frames_test.cc b/net/third_party/quic/core/frames/quic_frames_test.cc
index 7625260..049a0d5e 100644
--- a/net/third_party/quic/core/frames/quic_frames_test.cc
+++ b/net/third_party/quic/core/frames/quic_frames_test.cc
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -187,23 +187,23 @@
   EXPECT_EQ(1u, ack_frame1.packets.Min());
   EXPECT_EQ(99u, ack_frame1.packets.Max());
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals;
-  expected_intervals.emplace_back(Interval<QuicPacketNumber>(1, 2));
-  expected_intervals.emplace_back(Interval<QuicPacketNumber>(99, 100));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals;
+  expected_intervals.emplace_back(net::Interval<QuicPacketNumber>(1, 2));
+  expected_intervals.emplace_back(net::Interval<QuicPacketNumber>(99, 100));
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals(
       ack_frame1.packets.begin(), ack_frame1.packets.end());
 
   EXPECT_EQ(expected_intervals, actual_intervals);
 
   ack_frame1.packets.Add(20);
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals2(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals2(
       ack_frame1.packets.begin(), ack_frame1.packets.end());
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals2;
-  expected_intervals2.emplace_back(Interval<QuicPacketNumber>(1, 2));
-  expected_intervals2.emplace_back(Interval<QuicPacketNumber>(20, 21));
-  expected_intervals2.emplace_back(Interval<QuicPacketNumber>(99, 100));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals2;
+  expected_intervals2.emplace_back(net::Interval<QuicPacketNumber>(1, 2));
+  expected_intervals2.emplace_back(net::Interval<QuicPacketNumber>(20, 21));
+  expected_intervals2.emplace_back(net::Interval<QuicPacketNumber>(99, 100));
 
   EXPECT_EQ(3u, ack_frame1.packets.NumIntervals());
   EXPECT_EQ(expected_intervals2, actual_intervals2);
@@ -211,19 +211,19 @@
   ack_frame1.packets.Add(19);
   ack_frame1.packets.Add(21);
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals3(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals3(
       ack_frame1.packets.begin(), ack_frame1.packets.end());
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals3;
-  expected_intervals3.emplace_back(Interval<QuicPacketNumber>(1, 2));
-  expected_intervals3.emplace_back(Interval<QuicPacketNumber>(19, 22));
-  expected_intervals3.emplace_back(Interval<QuicPacketNumber>(99, 100));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals3;
+  expected_intervals3.emplace_back(net::Interval<QuicPacketNumber>(1, 2));
+  expected_intervals3.emplace_back(net::Interval<QuicPacketNumber>(19, 22));
+  expected_intervals3.emplace_back(net::Interval<QuicPacketNumber>(99, 100));
 
   EXPECT_EQ(expected_intervals3, actual_intervals3);
 
   ack_frame1.packets.Add(20);
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals4(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals4(
       ack_frame1.packets.begin(), ack_frame1.packets.end());
 
   EXPECT_EQ(expected_intervals3, actual_intervals4);
@@ -235,15 +235,15 @@
   ack_frame2.packets.Add(10);
   ack_frame2.packets.Add(80);
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals5(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals5(
       ack_frame2.packets.begin(), ack_frame2.packets.end());
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals5;
-  expected_intervals5.emplace_back(Interval<QuicPacketNumber>(10, 11));
-  expected_intervals5.emplace_back(Interval<QuicPacketNumber>(20, 21));
-  expected_intervals5.emplace_back(Interval<QuicPacketNumber>(40, 41));
-  expected_intervals5.emplace_back(Interval<QuicPacketNumber>(60, 61));
-  expected_intervals5.emplace_back(Interval<QuicPacketNumber>(80, 81));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals5;
+  expected_intervals5.emplace_back(net::Interval<QuicPacketNumber>(10, 11));
+  expected_intervals5.emplace_back(net::Interval<QuicPacketNumber>(20, 21));
+  expected_intervals5.emplace_back(net::Interval<QuicPacketNumber>(40, 41));
+  expected_intervals5.emplace_back(net::Interval<QuicPacketNumber>(60, 61));
+  expected_intervals5.emplace_back(net::Interval<QuicPacketNumber>(80, 81));
 
   EXPECT_EQ(expected_intervals5, actual_intervals5);
 }
@@ -257,11 +257,11 @@
   EXPECT_EQ(1u, ack_frame1.packets.Min());
   EXPECT_EQ(99u, ack_frame1.packets.Max());
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals;
-  expected_intervals.emplace_back(Interval<QuicPacketNumber>(1, 10));
-  expected_intervals.emplace_back(Interval<QuicPacketNumber>(50, 100));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals;
+  expected_intervals.emplace_back(net::Interval<QuicPacketNumber>(1, 10));
+  expected_intervals.emplace_back(net::Interval<QuicPacketNumber>(50, 100));
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals(
       ack_frame1.packets.begin(), ack_frame1.packets.end());
 
   EXPECT_EQ(expected_intervals, actual_intervals);
@@ -269,12 +269,12 @@
   // Ensure adding a range within the existing ranges fails.
   EXPECT_QUIC_BUG(ack_frame1.packets.AddRange(20, 30), "");
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals2(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals2(
       ack_frame1.packets.begin(), ack_frame1.packets.end());
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals2;
-  expected_intervals2.emplace_back(Interval<QuicPacketNumber>(1, 10));
-  expected_intervals2.emplace_back(Interval<QuicPacketNumber>(50, 100));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals2;
+  expected_intervals2.emplace_back(net::Interval<QuicPacketNumber>(1, 10));
+  expected_intervals2.emplace_back(net::Interval<QuicPacketNumber>(50, 100));
 
   EXPECT_EQ(expected_intervals2.size(), ack_frame1.packets.NumIntervals());
   EXPECT_EQ(expected_intervals2, actual_intervals2);
@@ -287,15 +287,15 @@
   ack_frame2.packets.AddRange(10, 15);
   ack_frame2.packets.AddRange(80, 85);
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals8(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals8(
       ack_frame2.packets.begin(), ack_frame2.packets.end());
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals8;
-  expected_intervals8.emplace_back(Interval<QuicPacketNumber>(10, 15));
-  expected_intervals8.emplace_back(Interval<QuicPacketNumber>(20, 25));
-  expected_intervals8.emplace_back(Interval<QuicPacketNumber>(40, 45));
-  expected_intervals8.emplace_back(Interval<QuicPacketNumber>(60, 65));
-  expected_intervals8.emplace_back(Interval<QuicPacketNumber>(80, 85));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals8;
+  expected_intervals8.emplace_back(net::Interval<QuicPacketNumber>(10, 15));
+  expected_intervals8.emplace_back(net::Interval<QuicPacketNumber>(20, 25));
+  expected_intervals8.emplace_back(net::Interval<QuicPacketNumber>(40, 45));
+  expected_intervals8.emplace_back(net::Interval<QuicPacketNumber>(60, 65));
+  expected_intervals8.emplace_back(net::Interval<QuicPacketNumber>(80, 85));
 
   EXPECT_EQ(expected_intervals8, actual_intervals8);
 }
@@ -307,10 +307,10 @@
   ack_frame1.packets.AddRange(60, 70);
   ack_frame1.packets.AddRange(70, 100);
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals;
-  expected_intervals.emplace_back(Interval<QuicPacketNumber>(49, 100));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals;
+  expected_intervals.emplace_back(net::Interval<QuicPacketNumber>(49, 100));
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals(
       ack_frame1.packets.begin(), ack_frame1.packets.end());
 
   EXPECT_EQ(expected_intervals, actual_intervals);
@@ -323,10 +323,10 @@
   ack_frame1.packets.AddRange(50, 60);
   ack_frame1.packets.Add(49);
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals;
-  expected_intervals.emplace_back(Interval<QuicPacketNumber>(49, 100));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals;
+  expected_intervals.emplace_back(net::Interval<QuicPacketNumber>(49, 100));
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals(
       ack_frame1.packets.begin(), ack_frame1.packets.end());
 
   EXPECT_EQ(expected_intervals, actual_intervals);
@@ -464,19 +464,19 @@
   PacketNumberQueue queue;
   queue.AddRange(1, 100);
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals(queue.begin(),
-                                                                 queue.end());
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals(
+      queue.begin(), queue.end());
 
   PacketNumberQueue queue2;
   for (int i = 1; i < 100; i++) {
     queue2.AddRange(i, i + 1);
   }
 
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals2(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals2(
       queue2.begin(), queue2.end());
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals;
-  expected_intervals.emplace_back(Interval<QuicPacketNumber>(1, 100));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals;
+  expected_intervals.emplace_back(net::Interval<QuicPacketNumber>(1, 100));
   EXPECT_EQ(expected_intervals, actual_intervals);
   EXPECT_EQ(expected_intervals, actual_intervals2);
   EXPECT_EQ(actual_intervals, actual_intervals2);
@@ -489,13 +489,13 @@
   for (int i = 1; i < 100; i++) {
     queue2.AddRange(i, i + 1);
   }
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals(queue.rbegin(),
-                                                                 queue.rend());
-  const std::vector<Interval<QuicPacketNumber>> actual_intervals2(
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals(
+      queue.rbegin(), queue.rend());
+  const std::vector<net::Interval<QuicPacketNumber>> actual_intervals2(
       queue2.rbegin(), queue2.rend());
 
-  std::vector<Interval<QuicPacketNumber>> expected_intervals;
-  expected_intervals.emplace_back(Interval<QuicPacketNumber>(1, 100));
+  std::vector<net::Interval<QuicPacketNumber>> expected_intervals;
+  expected_intervals.emplace_back(net::Interval<QuicPacketNumber>(1, 100));
 
   EXPECT_EQ(expected_intervals, actual_intervals);
   EXPECT_EQ(expected_intervals, actual_intervals2);
@@ -534,4 +534,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_goaway_frame.cc b/net/third_party/quic/core/frames/quic_goaway_frame.cc
index a7492791..814f311 100644
--- a/net/third_party/quic/core/frames/quic_goaway_frame.cc
+++ b/net/third_party/quic/core/frames/quic_goaway_frame.cc
@@ -5,7 +5,7 @@
 #include "net/third_party/quic/core/frames/quic_goaway_frame.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicGoAwayFrame::QuicGoAwayFrame()
     : error_code(QUIC_NO_ERROR), last_good_stream_id(0) {}
@@ -28,4 +28,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_goaway_frame.h b/net/third_party/quic/core/frames/quic_goaway_frame.h
index 937da36..62c9dd0 100644
--- a/net/third_party/quic/core/frames/quic_goaway_frame.h
+++ b/net/third_party/quic/core/frames/quic_goaway_frame.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/quic_error_codes.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicGoAwayFrame : public QuicControlFrame {
   QuicGoAwayFrame();
@@ -28,6 +28,6 @@
   QuicString reason_phrase;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_GOAWAY_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_ietf_blocked_frame.cc b/net/third_party/quic/core/frames/quic_ietf_blocked_frame.cc
index e92273b4..0dcc476f 100644
--- a/net/third_party/quic/core/frames/quic_ietf_blocked_frame.cc
+++ b/net/third_party/quic/core/frames/quic_ietf_blocked_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_ietf_blocked_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicIetfBlockedFrame::QuicIetfBlockedFrame() {}
 
@@ -18,4 +18,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_ietf_blocked_frame.h b/net/third_party/quic/core/frames/quic_ietf_blocked_frame.h
index 63724d7..f80d1ea 100644
--- a/net/third_party/quic/core/frames/quic_ietf_blocked_frame.h
+++ b/net/third_party/quic/core/frames/quic_ietf_blocked_frame.h
@@ -9,7 +9,7 @@
 
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 
-namespace net {
+namespace quic {
 
 // IETF format BLOCKED frame.
 // The sender uses the BLOCKED frame to inform the receiver that the
@@ -27,6 +27,6 @@
   QuicStreamOffset offset;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_IETF_BLOCKED_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_max_stream_id_frame.cc b/net/third_party/quic/core/frames/quic_max_stream_id_frame.cc
index 0b84c92..914a15f 100644
--- a/net/third_party/quic/core/frames/quic_max_stream_id_frame.cc
+++ b/net/third_party/quic/core/frames/quic_max_stream_id_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_max_stream_id_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicMaxStreamIdFrame::QuicMaxStreamIdFrame() {}
 
@@ -18,4 +18,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_max_stream_id_frame.h b/net/third_party/quic/core/frames/quic_max_stream_id_frame.h
index 8a8e619f..6368afce 100644
--- a/net/third_party/quic/core/frames/quic_max_stream_id_frame.h
+++ b/net/third_party/quic/core/frames/quic_max_stream_id_frame.h
@@ -9,7 +9,7 @@
 
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 
-namespace net {
+namespace quic {
 
 // IETF format MAX_STREAM_ID frame.
 // This frame is used by the sender to inform the peer of the largest
@@ -27,6 +27,6 @@
   QuicStreamId max_stream_id;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_MAX_STREAM_ID_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_mtu_discovery_frame.h b/net/third_party/quic/core/frames/quic_mtu_discovery_frame.h
index 33d113b1..29c25a6 100644
--- a/net/third_party/quic/core/frames/quic_mtu_discovery_frame.h
+++ b/net/third_party/quic/core/frames/quic_mtu_discovery_frame.h
@@ -7,12 +7,12 @@
 
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // A path MTU discovery frame contains no payload and is serialized as a ping
 // frame.
 struct QUIC_EXPORT_PRIVATE QuicMtuDiscoveryFrame {};
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_MTU_DISCOVERY_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_new_connection_id_frame.cc b/net/third_party/quic/core/frames/quic_new_connection_id_frame.cc
index 5a06510..6629620 100644
--- a/net/third_party/quic/core/frames/quic_new_connection_id_frame.cc
+++ b/net/third_party/quic/core/frames/quic_new_connection_id_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_new_connection_id_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicNewConnectionIdFrame::QuicNewConnectionIdFrame()
     : QuicControlFrame(0), connection_id(0), sequence_number(0) {}
@@ -27,4 +27,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_new_connection_id_frame.h b/net/third_party/quic/core/frames/quic_new_connection_id_frame.h
index c577336..81a6517 100644
--- a/net/third_party/quic/core/frames/quic_new_connection_id_frame.h
+++ b/net/third_party/quic/core/frames/quic_new_connection_id_frame.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/quic_error_codes.h"
 #include "net/third_party/quic/platform/api/quic_uint128.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicNewConnectionIdFrame : public QuicControlFrame {
   QuicNewConnectionIdFrame();
@@ -29,6 +29,6 @@
   QuicUint128 stateless_reset_token;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_NEW_CONNECTION_ID_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_padding_frame.cc b/net/third_party/quic/core/frames/quic_padding_frame.cc
index df0aaec1..1ee7dd2 100644
--- a/net/third_party/quic/core/frames/quic_padding_frame.cc
+++ b/net/third_party/quic/core/frames/quic_padding_frame.cc
@@ -6,7 +6,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 std::ostream& operator<<(std::ostream& os,
                          const QuicPaddingFrame& padding_frame) {
@@ -14,4 +14,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_padding_frame.h b/net/third_party/quic/core/frames/quic_padding_frame.h
index 2b969134..366a160 100644
--- a/net/third_party/quic/core/frames/quic_padding_frame.h
+++ b/net/third_party/quic/core/frames/quic_padding_frame.h
@@ -10,7 +10,7 @@
 
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // A padding frame contains no payload.
 struct QUIC_EXPORT_PRIVATE QuicPaddingFrame {
@@ -27,6 +27,6 @@
   int num_padding_bytes;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_PADDING_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_path_challenge_frame.cc b/net/third_party/quic/core/frames/quic_path_challenge_frame.cc
index faf1a960..4497411 100644
--- a/net/third_party/quic/core/frames/quic_path_challenge_frame.cc
+++ b/net/third_party/quic/core/frames/quic_path_challenge_frame.cc
@@ -5,7 +5,7 @@
 #include "net/third_party/quic/core/frames/quic_path_challenge_frame.h"
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 
-namespace net {
+namespace quic {
 
 QuicPathChallengeFrame::QuicPathChallengeFrame() : QuicControlFrame(0) {}
 
@@ -32,4 +32,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_path_challenge_frame.h b/net/third_party/quic/core/frames/quic_path_challenge_frame.h
index 97c38ab..43bb802 100644
--- a/net/third_party/quic/core/frames/quic_path_challenge_frame.h
+++ b/net/third_party/quic/core/frames/quic_path_challenge_frame.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 #include "net/third_party/quic/core/quic_types.h"
 
-namespace net {
+namespace quic {
 
 // Size of the entire IETF Quic Path Challenge frame, including
 // type byte.
@@ -32,6 +32,6 @@
  private:
   DISALLOW_COPY_AND_ASSIGN(QuicPathChallengeFrame);
 };
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_PATH_CHALLENGE_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_path_response_frame.cc b/net/third_party/quic/core/frames/quic_path_response_frame.cc
index ae955176..31c9576 100644
--- a/net/third_party/quic/core/frames/quic_path_response_frame.cc
+++ b/net/third_party/quic/core/frames/quic_path_response_frame.cc
@@ -5,7 +5,7 @@
 #include "net/third_party/quic/core/frames/quic_path_response_frame.h"
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 
-namespace net {
+namespace quic {
 
 QuicPathResponseFrame::QuicPathResponseFrame() : QuicControlFrame(0) {}
 
@@ -31,4 +31,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_path_response_frame.h b/net/third_party/quic/core/frames/quic_path_response_frame.h
index d18635f..584255c 100644
--- a/net/third_party/quic/core/frames/quic_path_response_frame.h
+++ b/net/third_party/quic/core/frames/quic_path_response_frame.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 #include "net/third_party/quic/core/quic_types.h"
 
-namespace net {
+namespace quic {
 
 // Size of the entire IETF Quic Path Response frame, including
 // type byte.
@@ -32,6 +32,6 @@
  private:
   DISALLOW_COPY_AND_ASSIGN(QuicPathResponseFrame);
 };
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_PATH_RESPONSE_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_ping_frame.cc b/net/third_party/quic/core/frames/quic_ping_frame.cc
index 11dc707..3b64f18 100644
--- a/net/third_party/quic/core/frames/quic_ping_frame.cc
+++ b/net/third_party/quic/core/frames/quic_ping_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_ping_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicPingFrame::QuicPingFrame() {}
 
@@ -16,4 +16,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_ping_frame.h b/net/third_party/quic/core/frames/quic_ping_frame.h
index e22474c..0ee991e 100644
--- a/net/third_party/quic/core/frames/quic_ping_frame.h
+++ b/net/third_party/quic/core/frames/quic_ping_frame.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 
-namespace net {
+namespace quic {
 
 // A ping frame contains no payload, though it is retransmittable,
 // and ACK'd just like other normal frames.
@@ -20,6 +20,6 @@
       const QuicPingFrame& ping_frame);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_PING_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_rst_stream_frame.cc b/net/third_party/quic/core/frames/quic_rst_stream_frame.cc
index d1d5528..fd8cc0bf 100644
--- a/net/third_party/quic/core/frames/quic_rst_stream_frame.cc
+++ b/net/third_party/quic/core/frames/quic_rst_stream_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_rst_stream_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicRstStreamFrame::QuicRstStreamFrame()
     : stream_id(0), error_code(QUIC_STREAM_NO_ERROR), byte_offset(0) {}
@@ -35,4 +35,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_rst_stream_frame.h b/net/third_party/quic/core/frames/quic_rst_stream_frame.h
index ffc18c73..c21e83a 100644
--- a/net/third_party/quic/core/frames/quic_rst_stream_frame.h
+++ b/net/third_party/quic/core/frames/quic_rst_stream_frame.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 #include "net/third_party/quic/core/quic_error_codes.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicRstStreamFrame : public QuicControlFrame {
   QuicRstStreamFrame();
@@ -45,6 +45,6 @@
   QuicStreamOffset byte_offset;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_RST_STREAM_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_stop_sending_frame.cc b/net/third_party/quic/core/frames/quic_stop_sending_frame.cc
index b3d98c3..00794f0 100644
--- a/net/third_party/quic/core/frames/quic_stop_sending_frame.cc
+++ b/net/third_party/quic/core/frames/quic_stop_sending_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_stop_sending_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicStopSendingFrame::QuicStopSendingFrame()
     : stream_id(0), application_error_code(0) {}
@@ -24,4 +24,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_stop_sending_frame.h b/net/third_party/quic/core/frames/quic_stop_sending_frame.h
index a88a8bf..9ade111 100644
--- a/net/third_party/quic/core/frames/quic_stop_sending_frame.h
+++ b/net/third_party/quic/core/frames/quic_stop_sending_frame.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 #include "net/third_party/quic/core/quic_error_codes.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicStopSendingFrame : public QuicControlFrame {
   QuicStopSendingFrame();
@@ -26,6 +26,6 @@
   QuicApplicationErrorCode application_error_code;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_STOP_SENDING_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_stop_waiting_frame.cc b/net/third_party/quic/core/frames/quic_stop_waiting_frame.cc
index e7c4f0b..a89160f 100644
--- a/net/third_party/quic/core/frames/quic_stop_waiting_frame.cc
+++ b/net/third_party/quic/core/frames/quic_stop_waiting_frame.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/core/quic_constants.h"
 
-namespace net {
+namespace quic {
 
 QuicStopWaitingFrame::QuicStopWaitingFrame() : least_unacked(0) {}
 
@@ -18,4 +18,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_stop_waiting_frame.h b/net/third_party/quic/core/frames/quic_stop_waiting_frame.h
index 026ff232..372d81a4 100644
--- a/net/third_party/quic/core/frames/quic_stop_waiting_frame.h
+++ b/net/third_party/quic/core/frames/quic_stop_waiting_frame.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_types.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicStopWaitingFrame {
   QuicStopWaitingFrame();
@@ -24,6 +24,6 @@
   QuicPacketNumber least_unacked;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_STOP_WAITING_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_stream_frame.cc b/net/third_party/quic/core/frames/quic_stream_frame.cc
index 3fb0794..f0abc17 100644
--- a/net/third_party/quic/core/frames/quic_stream_frame.cc
+++ b/net/third_party/quic/core/frames/quic_stream_frame.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 QuicStreamFrame::QuicStreamFrame() : QuicStreamFrame(0, false, 0, nullptr, 0) {}
 
@@ -43,4 +43,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_stream_frame.h b/net/third_party/quic/core/frames/quic_stream_frame.h
index 66f864d8..0e585cd 100644
--- a/net/third_party/quic/core/frames/quic_stream_frame.h
+++ b/net/third_party/quic/core/frames/quic_stream_frame.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicStreamFrame {
   QuicStreamFrame();
@@ -48,6 +48,6 @@
 static_assert(sizeof(QuicStreamFrame) <= 64,
               "Keep the QuicStreamFrame size to a cacheline.");
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_STREAM_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_stream_id_blocked_frame.cc b/net/third_party/quic/core/frames/quic_stream_id_blocked_frame.cc
index 2cc5d50f..07346a63 100644
--- a/net/third_party/quic/core/frames/quic_stream_id_blocked_frame.cc
+++ b/net/third_party/quic/core/frames/quic_stream_id_blocked_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_stream_id_blocked_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicStreamIdBlockedFrame::QuicStreamIdBlockedFrame() {}
 
@@ -20,4 +20,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_stream_id_blocked_frame.h b/net/third_party/quic/core/frames/quic_stream_id_blocked_frame.h
index 77bf40d..47d7a47 100644
--- a/net/third_party/quic/core/frames/quic_stream_id_blocked_frame.h
+++ b/net/third_party/quic/core/frames/quic_stream_id_blocked_frame.h
@@ -9,7 +9,7 @@
 
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 
-namespace net {
+namespace quic {
 
 // IETF format STREAM_ID_BLOCKED frame.
 // The sender uses this to inform the peer that the sender wished to
@@ -27,6 +27,6 @@
   QuicStreamId stream_id;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_STREAM_ID_BLOCKED_FRAME_H_
diff --git a/net/third_party/quic/core/frames/quic_window_update_frame.cc b/net/third_party/quic/core/frames/quic_window_update_frame.cc
index fd53708..cbd23442 100644
--- a/net/third_party/quic/core/frames/quic_window_update_frame.cc
+++ b/net/third_party/quic/core/frames/quic_window_update_frame.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/frames/quic_window_update_frame.h"
 
-namespace net {
+namespace quic {
 
 QuicWindowUpdateFrame::QuicWindowUpdateFrame() {}
 
@@ -24,4 +24,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/frames/quic_window_update_frame.h b/net/third_party/quic/core/frames/quic_window_update_frame.h
index 55525580..73b4448b 100644
--- a/net/third_party/quic/core/frames/quic_window_update_frame.h
+++ b/net/third_party/quic/core/frames/quic_window_update_frame.h
@@ -9,7 +9,7 @@
 
 #include "net/third_party/quic/core/frames/quic_control_frame.h"
 
-namespace net {
+namespace quic {
 
 // Flow control updates per-stream and at the connection level.
 // Based on SPDY's WINDOW_UPDATE frame, but uses an absolute byte offset rather
@@ -39,6 +39,6 @@
   QuicStreamOffset byte_offset;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_FRAMES_QUIC_WINDOW_UPDATE_FRAME_H_
diff --git a/net/third_party/quic/core/packet_number_indexed_queue.h b/net/third_party/quic/core/packet_number_indexed_queue.h
index cf34ff4..9fa4a8d5 100644
--- a/net/third_party/quic/core/packet_number_indexed_queue.h
+++ b/net/third_party/quic/core/packet_number_indexed_queue.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_types.h"
 #include "net/third_party/quic/platform/api/quic_containers.h"
 
-namespace net {
+namespace quic {
 
 // PacketNumberIndexedQueue is a queue of mostly continuous numbered entries
 // which supports the following operations:
@@ -201,6 +201,6 @@
   return entry;
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_PACKET_NUMBER_INDEXED_QUEUE_H_
diff --git a/net/third_party/quic/core/packet_number_indexed_queue_test.cc b/net/third_party/quic/core/packet_number_indexed_queue_test.cc
index 53f4787..3e50973 100644
--- a/net/third_party/quic/core/packet_number_indexed_queue_test.cc
+++ b/net/third_party/quic/core/packet_number_indexed_queue_test.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace {
 
 class PacketNumberIndexedQueueTest : public QuicTest {
@@ -177,4 +177,4 @@
 }
 
 }  // namespace
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/proto/cached_network_parameters.proto b/net/third_party/quic/core/proto/cached_network_parameters.proto
index 2a3f3e5..d609be9 100644
--- a/net/third_party/quic/core/proto/cached_network_parameters.proto
+++ b/net/third_party/quic/core/proto/cached_network_parameters.proto
@@ -6,7 +6,7 @@
 
 option optimize_for = LITE_RUNTIME;
 
-package net;
+package quic;
 
 // CachedNetworkParameters contains data that can be used to choose appropriate
 // connection parameters (initial RTT, initial CWND, etc.) in new connections.
diff --git a/net/third_party/quic/core/proto/source_address_token.proto b/net/third_party/quic/core/proto/source_address_token.proto
index 8d833de9..1897a25 100644
--- a/net/third_party/quic/core/proto/source_address_token.proto
+++ b/net/third_party/quic/core/proto/source_address_token.proto
@@ -8,7 +8,7 @@
 
 import "cached_network_parameters.proto";
 
-package net;
+package quic;
 
 // A SourceAddressToken is serialised, encrypted and sent to clients so that
 // they can prove ownership of an IP address.
diff --git a/net/third_party/quic/core/quic_ack_listener_interface.cc b/net/third_party/quic/core/quic_ack_listener_interface.cc
index f042874..ce42b511 100644
--- a/net/third_party/quic/core/quic_ack_listener_interface.cc
+++ b/net/third_party/quic/core/quic_ack_listener_interface.cc
@@ -4,8 +4,8 @@
 
 #include "net/third_party/quic/core/quic_ack_listener_interface.h"
 
-namespace net {
+namespace quic {
 
 QuicAckListenerInterface::~QuicAckListenerInterface() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_ack_listener_interface.h b/net/third_party/quic/core/quic_ack_listener_interface.h
index ffabb4df..281a0280 100644
--- a/net/third_party/quic/core/quic_ack_listener_interface.h
+++ b/net/third_party/quic/core/quic_ack_listener_interface.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_reference_counted.h"
 
-namespace net {
+namespace quic {
 
 // Pure virtual class to listen for packet acknowledgements.
 class QUIC_EXPORT_PRIVATE QuicAckListenerInterface
@@ -32,6 +32,6 @@
   ~QuicAckListenerInterface() override;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_ACK_LISTENER_INTERFACE_H_
diff --git a/net/third_party/quic/core/quic_alarm.cc b/net/third_party/quic/core/quic_alarm.cc
index 1d300483..8add921e 100644
--- a/net/third_party/quic/core/quic_alarm.cc
+++ b/net/third_party/quic/core/quic_alarm.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/quic_alarm.h"
 
-namespace net {
+namespace quic {
 
 QuicAlarm::QuicAlarm(QuicArenaScopedPtr<Delegate> delegate)
     : delegate_(std::move(delegate)), deadline_(QuicTime::Zero()) {}
@@ -70,4 +70,4 @@
   SetImpl();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_alarm.h b/net/third_party/quic/core/quic_alarm.h
index 7db559f..966bd7c6 100644
--- a/net/third_party/quic/core/quic_alarm.h
+++ b/net/third_party/quic/core/quic_alarm.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Abstract class which represents an alarm which will go off at a
 // scheduled time, and execute the |OnAlarm| method of the delegate.
@@ -82,6 +82,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicAlarm);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_ALARM_H_
diff --git a/net/third_party/quic/core/quic_alarm_factory.h b/net/third_party/quic/core/quic_alarm_factory.h
index f58c88f6..cde152f 100644
--- a/net/third_party/quic/core/quic_alarm_factory.h
+++ b/net/third_party/quic/core/quic_alarm_factory.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_one_block_arena.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // QuicConnections currently use around 1KB of polymorphic types which would
 // ordinarily be on the heap. Instead, store them inline in an arena.
@@ -35,6 +35,6 @@
       QuicConnectionArena* arena) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_ALARM_FACTORY_H_
diff --git a/net/third_party/quic/core/quic_alarm_test.cc b/net/third_party/quic/core/quic_alarm_test.cc
index e0e70227..eba6650 100644
--- a/net/third_party/quic/core/quic_alarm_test.cc
+++ b/net/third_party/quic/core/quic_alarm_test.cc
@@ -8,7 +8,7 @@
 
 using testing::Invoke;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -163,4 +163,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_arena_scoped_ptr.h b/net/third_party/quic/core/quic_arena_scoped_ptr.h
index 6950ef8..4ff6030c 100644
--- a/net/third_party/quic/core/quic_arena_scoped_ptr.h
+++ b/net/third_party/quic/core/quic_arena_scoped_ptr.h
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/platform/api/quic_aligned.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 template <typename T>
 class QuicArenaScopedPtr {
@@ -204,6 +204,6 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_ARENA_SCOPED_PTR_H_
diff --git a/net/third_party/quic/core/quic_arena_scoped_ptr_test.cc b/net/third_party/quic/core/quic_arena_scoped_ptr_test.cc
index ca57731..87ba5a8c 100644
--- a/net/third_party/quic/core/quic_arena_scoped_ptr_test.cc
+++ b/net/third_party/quic/core/quic_arena_scoped_ptr_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/quic_one_block_arena.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace {
 
 enum class TestParam { kFromHeap, kFromArena };
@@ -99,4 +99,4 @@
 }
 
 }  // namespace
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_bandwidth.cc b/net/third_party/quic/core/quic_bandwidth.cc
index ad2e3611..f3dbe379 100644
--- a/net/third_party/quic/core/quic_bandwidth.cc
+++ b/net/third_party/quic/core/quic_bandwidth.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_str_cat.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicString QuicBandwidth::ToDebugValue() const {
   if (bits_per_second_ < 80000) {
@@ -37,4 +37,4 @@
                           bytes_per_second_with_unit, unit);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_bandwidth.h b/net/third_party/quic/core/quic_bandwidth.h
index 76867d5..3a95ddb 100644
--- a/net/third_party/quic/core/quic_bandwidth.h
+++ b/net/third_party/quic/core/quic_bandwidth.h
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicBandwidth {
  public:
@@ -148,5 +148,5 @@
   return output;
 }
 
-}  // namespace net
+}  // namespace quic
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_BANDWIDTH_H_
diff --git a/net/third_party/quic/core/quic_bandwidth_test.cc b/net/third_party/quic/core/quic_bandwidth_test.cc
index ca477fd..67a8c39 100644
--- a/net/third_party/quic/core/quic_bandwidth_test.cc
+++ b/net/third_party/quic/core/quic_bandwidth_test.cc
@@ -6,7 +6,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicBandwidthTest : public QuicTest {};
@@ -119,4 +119,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_blocked_writer_interface.h b/net/third_party/quic/core/quic_blocked_writer_interface.h
index bf625ee..ce02b0ae 100644
--- a/net/third_party/quic/core/quic_blocked_writer_interface.h
+++ b/net/third_party/quic/core/quic_blocked_writer_interface.h
@@ -11,7 +11,7 @@
 
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicBlockedWriterInterface {
  public:
@@ -22,6 +22,6 @@
   virtual void OnBlockedWriterCanWrite() = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_BLOCKED_WRITER_INTERFACE_H_
diff --git a/net/third_party/quic/core/quic_buffer_allocator.cc b/net/third_party/quic/core/quic_buffer_allocator.cc
index f2926f3..8835676 100644
--- a/net/third_party/quic/core/quic_buffer_allocator.cc
+++ b/net/third_party/quic/core/quic_buffer_allocator.cc
@@ -4,8 +4,8 @@
 
 #include "net/third_party/quic/core/quic_buffer_allocator.h"
 
-namespace net {
+namespace quic {
 
 QuicBufferAllocator::~QuicBufferAllocator() = default;
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_buffer_allocator.h b/net/third_party/quic/core/quic_buffer_allocator.h
index f100a8a4..984b5c4f3 100644
--- a/net/third_party/quic/core/quic_buffer_allocator.h
+++ b/net/third_party/quic/core/quic_buffer_allocator.h
@@ -9,7 +9,7 @@
 
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Abstract base class for classes which allocate and delete buffers.
 class QUIC_EXPORT_PRIVATE QuicBufferAllocator {
@@ -32,6 +32,6 @@
   virtual void MarkAllocatorIdle() {}
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_BUFFER_ALLOCATOR_H_
diff --git a/net/third_party/quic/core/quic_buffered_packet_store.cc b/net/third_party/quic/core/quic_buffered_packet_store.cc
index a8b7c22..9d933a6 100644
--- a/net/third_party/quic/core/quic_buffered_packet_store.cc
+++ b/net/third_party/quic/core/quic_buffered_packet_store.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_map_util.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 typedef QuicBufferedPacketStore::BufferedPacket BufferedPacket;
 typedef QuicBufferedPacketStore::BufferedPacketList BufferedPacketList;
@@ -226,4 +226,4 @@
   return QuicContainsKey(connections_with_chlo_, connection_id);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_buffered_packet_store.h b/net/third_party/quic/core/quic_buffered_packet_store.h
index ae462b53..bf65b37 100644
--- a/net/third_party/quic/core/quic_buffered_packet_store.h
+++ b/net/third_party/quic/core/quic_buffered_packet_store.h
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicBufferedPacketStorePeer;
@@ -165,6 +165,6 @@
   QuicLinkedHashMap<QuicConnectionId, bool> connections_with_chlo_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_BUFFERED_PACKET_STORE_H_
diff --git a/net/third_party/quic/core/quic_buffered_packet_store_test.cc b/net/third_party/quic/core/quic_buffered_packet_store_test.cc
index 4fd7af4..d911ada 100644
--- a/net/third_party/quic/core/quic_buffered_packet_store_test.cc
+++ b/net/third_party/quic/core/quic_buffered_packet_store_test.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/test_tools/quic_buffered_packet_store_peer.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 
 typedef QuicBufferedPacketStore::BufferedPacket BufferedPacket;
 typedef QuicBufferedPacketStore::EnqueuePacketResult EnqueuePacketResult;
@@ -422,4 +422,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_client_promised_info.cc b/net/third_party/quic/core/quic_client_promised_info.cc
index 6cf9699..d15f570 100644
--- a/net/third_party/quic/core/quic_client_promised_info.cc
+++ b/net/third_party/quic/core/quic_client_promised_info.cc
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/spdy/core/spdy_protocol.h"
 
-namespace net {
+namespace quic {
 
 QuicClientPromisedInfo::QuicClientPromisedInfo(
     QuicSpdyClientSessionBase* session,
@@ -142,4 +142,4 @@
   Reset(QUIC_STREAM_CANCELLED);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_client_promised_info.h b/net/third_party/quic/core/quic_client_promised_info.h
index 02963d07..2ee0be3a8 100644
--- a/net/third_party/quic/core/quic_client_promised_info.h
+++ b/net/third_party/quic/core/quic_client_promised_info.h
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/spdy/core/spdy_framer.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicClientPromisedInfoPeer;
@@ -109,6 +109,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicClientPromisedInfo);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CLIENT_PROMISED_INFO_H_
diff --git a/net/third_party/quic/core/quic_client_promised_info_test.cc b/net/third_party/quic/core/quic_client_promised_info_test.cc
index 06942d6..9560501 100644
--- a/net/third_party/quic/core/quic_client_promised_info_test.cc
+++ b/net/third_party/quic/core/quic_client_promised_info_test.cc
@@ -23,7 +23,7 @@
 using testing::_;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -35,7 +35,7 @@
       : QuicSpdyClientSession(
             DefaultQuicConfig(),
             connection,
-            QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED),
+            QuicServerId("example.com", 443, net::PRIVACY_MODE_DISABLED),
             &crypto_config_,
             push_promise_index),
         crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
@@ -343,4 +343,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_client_push_promise_index.cc b/net/third_party/quic/core/quic_client_push_promise_index.cc
index fbc11fd..5b29eaa0 100644
--- a/net/third_party/quic/core/quic_client_push_promise_index.cc
+++ b/net/third_party/quic/core/quic_client_push_promise_index.cc
@@ -10,7 +10,7 @@
 
 using spdy::SpdyHeaderBlock;
 
-namespace net {
+namespace quic {
 
 QuicClientPushPromiseIndex::QuicClientPushPromiseIndex() {}
 
@@ -44,4 +44,4 @@
   return QUIC_FAILURE;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_client_push_promise_index.h b/net/third_party/quic/core/quic_client_push_promise_index.h
index 174bc53e..1213761 100644
--- a/net/third_party/quic/core/quic_client_push_promise_index.h
+++ b/net/third_party/quic/core/quic_client_push_promise_index.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // QuicClientPushPromiseIndex is the interface to support rendezvous
 // between client requests and resources delivered via server push.
@@ -95,6 +95,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicClientPushPromiseIndex);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CLIENT_PUSH_PROMISE_INDEX_H_
diff --git a/net/third_party/quic/core/quic_client_push_promise_index_test.cc b/net/third_party/quic/core/quic_client_push_promise_index_test.cc
index 58464ca..8153ca3 100644
--- a/net/third_party/quic/core/quic_client_push_promise_index_test.cc
+++ b/net/third_party/quic/core/quic_client_push_promise_index_test.cc
@@ -18,7 +18,7 @@
 using testing::StrictMock;
 using testing::_;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -30,7 +30,7 @@
       : QuicSpdyClientSession(
             DefaultQuicConfig(),
             connection,
-            QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED),
+            QuicServerId("example.com", 443, net::PRIVACY_MODE_DISABLED),
             &crypto_config_,
             push_promise_index),
         crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
@@ -111,4 +111,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_config.cc b/net/third_party/quic/core/quic_config.cc
index 190d62e6..f6de51d 100644
--- a/net/third_party/quic/core/quic_config.cc
+++ b/net/third_party/quic/core/quic_config.cc
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // Reads the value corresponding to |name_| from |msg| into |out|. If the
 // |name_| is absent in |msg| and |presence| is set to OPTIONAL |out| is set
@@ -764,4 +764,4 @@
   return error;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_config.h b/net/third_party/quic/core/quic_config.h
index 687e643..f78c4363 100644
--- a/net/third_party/quic/core/quic_config.h
+++ b/net/third_party/quic/core/quic_config.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_uint128.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicConfigPeer;
@@ -475,6 +475,6 @@
   QuicTagVector create_session_tag_indicators_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CONFIG_H_
diff --git a/net/third_party/quic/core/quic_config_test.cc b/net/third_party/quic/core/quic_config_test.cc
index 3ff295e..064fb75 100644
--- a/net/third_party/quic/core/quic_config_test.cc
+++ b/net/third_party/quic/core/quic_config_test.cc
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/test_tools/quic_config_peer.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -296,4 +296,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_connection.cc b/net/third_party/quic/core/quic_connection.cc
index c3b1ccc..83c293eb 100644
--- a/net/third_party/quic/core/quic_connection.cc
+++ b/net/third_party/quic/core/quic_connection.cc
@@ -36,7 +36,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 
-namespace net {
+namespace quic {
 
 class QuicDecrypter;
 class QuicEncrypter;
@@ -69,7 +69,7 @@
 
 // Error code used in WriteResult to indicate that the packet writer rejected
 // the message as being too big.
-const int kMessageTooBigErrorCode = ERR_MSG_TOO_BIG;
+const int kMessageTooBigErrorCode = net::ERR_MSG_TOO_BIG;
 
 bool Near(QuicPacketNumber a, QuicPacketNumber b) {
   QuicPacketNumber delta = (a > b) ? a - b : b - a;
@@ -2032,7 +2032,7 @@
   WriteResult result = writer_->WritePacket(
       packet->encrypted_buffer, encrypted_length, self_address().host(),
       peer_address(), per_packet_options_);
-  if (result.error_code == ERR_IO_PENDING) {
+  if (result.error_code == net::ERR_IO_PENDING) {
     DCHECK_EQ(WRITE_STATUS_BLOCKED, result.status);
   }
 
@@ -3314,4 +3314,4 @@
       QuicTime::Delta::Zero());
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_connection.h b/net/third_party/quic/core/quic_connection.h
index db2831d..7727fec 100644
--- a/net/third_party/quic/core/quic_connection.h
+++ b/net/third_party/quic/core/quic_connection.h
@@ -47,7 +47,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QuicClock;
 class QuicConfig;
@@ -1336,6 +1336,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicConnection);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CONNECTION_H_
diff --git a/net/third_party/quic/core/quic_connection_close_delegate_interface.h b/net/third_party/quic/core/quic_connection_close_delegate_interface.h
index 90cb56fa..a1b56544 100644
--- a/net/third_party/quic/core/quic_connection_close_delegate_interface.h
+++ b/net/third_party/quic/core/quic_connection_close_delegate_interface.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // Pure virtual class to close connection on unrecoverable errors.
 class QUIC_EXPORT_PRIVATE QuicConnectionCloseDelegateInterface {
@@ -23,6 +23,6 @@
                                     ConnectionCloseSource source) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CONNECTION_CLOSE_DELEGATE_INTERFACE_H_
diff --git a/net/third_party/quic/core/quic_connection_stats.cc b/net/third_party/quic/core/quic_connection_stats.cc
index 56b2a1e4..ec233f4 100644
--- a/net/third_party/quic/core/quic_connection_stats.cc
+++ b/net/third_party/quic/core/quic_connection_stats.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/quic_connection_stats.h"
 
-namespace net {
+namespace quic {
 
 QuicConnectionStats::QuicConnectionStats()
     : bytes_sent(0),
@@ -89,4 +89,4 @@
   return os;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_connection_stats.h b/net/third_party/quic/core/quic_connection_stats.h
index 8fa6617..a2cc250d 100644
--- a/net/third_party/quic/core/quic_connection_stats.h
+++ b/net/third_party/quic/core/quic_connection_stats.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 // Structure to hold stats for a QuicConnection.
 struct QUIC_EXPORT_PRIVATE QuicConnectionStats {
   QuicConnectionStats();
@@ -94,6 +94,6 @@
   uint64_t num_connectivity_probing_received;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CONNECTION_STATS_H_
diff --git a/net/third_party/quic/core/quic_connection_test.cc b/net/third_party/quic/core/quic_connection_test.cc
index 1cabcb4..75467b5 100644
--- a/net/third_party/quic/core/quic_connection_test.cc
+++ b/net/third_party/quic/core/quic_connection_test.cc
@@ -60,7 +60,7 @@
 using testing::SetArgPointee;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -330,11 +330,11 @@
     }
     if (next_packet_too_large_) {
       next_packet_too_large_ = false;
-      return WriteResult(WRITE_STATUS_ERROR, ERR_MSG_TOO_BIG);
+      return WriteResult(WRITE_STATUS_ERROR, net::ERR_MSG_TOO_BIG);
     }
     if (always_get_packet_too_large_) {
       LOG(ERROR) << "RETURNING TOO BIG";
-      return WriteResult(WRITE_STATUS_ERROR, ERR_MSG_TOO_BIG);
+      return WriteResult(WRITE_STATUS_ERROR, net::ERR_MSG_TOO_BIG);
     }
     if (IsWriteBlocked()) {
       return WriteResult(WRITE_STATUS_BLOCKED, -1);
@@ -6829,4 +6829,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_constants.cc b/net/third_party/quic/core/quic_constants.cc
index d6d63cf..8c59d64f 100644
--- a/net/third_party/quic/core/quic_constants.cc
+++ b/net/third_party/quic/core/quic_constants.cc
@@ -4,8 +4,8 @@
 
 #include "net/third_party/quic/core/quic_constants.h"
 
-namespace net {
+namespace quic {
 
 const char* const kFinalOffsetHeaderKey = ":final-offset";
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_constants.h b/net/third_party/quic/core/quic_constants.h
index ed0c01f..093ec00 100644
--- a/net/third_party/quic/core/quic_constants.h
+++ b/net/third_party/quic/core/quic_constants.h
@@ -16,7 +16,7 @@
 
 // Definitions of constant values used throughout the QUIC code.
 
-namespace net {
+namespace quic {
 
 // Simple time constants.
 const uint64_t kNumSecondsPerMinute = 60;
@@ -212,6 +212,6 @@
 // Number of bytes reserved for packet header type.
 const size_t kPacketHeaderTypeSize = 1;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CONSTANTS_H_
diff --git a/net/third_party/quic/core/quic_control_frame_manager.cc b/net/third_party/quic/core/quic_control_frame_manager.cc
index bc3b066..8d15ba36 100644
--- a/net/third_party/quic/core/quic_control_frame_manager.cc
+++ b/net/third_party/quic/core/quic_control_frame_manager.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_map_util.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicControlFrameManager::QuicControlFrameManager(QuicSession* session)
     : last_control_frame_id_(kInvalidControlFrameId),
@@ -279,4 +279,4 @@
   return least_unsent_ < least_unacked_ + control_frames_.size();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_control_frame_manager.h b/net/third_party/quic/core/quic_control_frame_manager.h
index c5ef38110..e5b89cb 100644
--- a/net/third_party/quic/core/quic_control_frame_manager.h
+++ b/net/third_party/quic/core/quic_control_frame_manager.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_containers.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class QuicSession;
 
@@ -123,6 +123,6 @@
   QuicSession* session_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CONTROL_FRAME_MANAGER_H_
diff --git a/net/third_party/quic/core/quic_control_frame_manager_test.cc b/net/third_party/quic/core/quic_control_frame_manager_test.cc
index 93bacfb3..92be10c3 100644
--- a/net/third_party/quic/core/quic_control_frame_manager_test.cc
+++ b/net/third_party/quic/core/quic_control_frame_manager_test.cc
@@ -14,7 +14,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicControlFrameManagerPeer {
@@ -208,4 +208,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_crypto_client_handshaker.cc b/net/third_party/quic/core/quic_crypto_client_handshaker.cc
index 81e9e5c..2c104b4 100644
--- a/net/third_party/quic/core/quic_crypto_client_handshaker.cc
+++ b/net/third_party/quic/core/quic_crypto_client_handshaker.cc
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/platform/api/quic_str_cat.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicCryptoClientHandshaker::ChannelIDSourceCallbackImpl::
     ChannelIDSourceCallbackImpl(QuicCryptoClientHandshaker* parent)
@@ -677,7 +677,7 @@
 
 bool QuicCryptoClientHandshaker::RequiresChannelID(
     QuicCryptoClientConfig::CachedState* cached) {
-  if (server_id_.privacy_mode() == PRIVACY_MODE_ENABLED ||
+  if (server_id_.privacy_mode() == net::PRIVACY_MODE_ENABLED ||
       !crypto_config_->channel_id_source()) {
     return false;
   }
@@ -697,4 +697,4 @@
   return false;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_crypto_client_handshaker.h b/net/third_party/quic/core/quic_crypto_client_handshaker.h
index 2f06e53..3d20a9e 100644
--- a/net/third_party/quic/core/quic_crypto_client_handshaker.h
+++ b/net/third_party/quic/core/quic_crypto_client_handshaker.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicChromiumClientSessionPeer;
@@ -237,6 +237,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientHandshaker);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CRYPTO_CLIENT_HANDSHAKER_H_
diff --git a/net/third_party/quic/core/quic_crypto_client_stream.cc b/net/third_party/quic/core/quic_crypto_client_stream.cc
index a6c5440..08662aa1 100644
--- a/net/third_party/quic/core/quic_crypto_client_stream.cc
+++ b/net/third_party/quic/core/quic_crypto_client_stream.cc
@@ -22,7 +22,7 @@
 #include "net/third_party/quic/platform/api/quic_str_cat.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 const int QuicCryptoClientStream::kMaxClientHellos;
 
@@ -102,4 +102,4 @@
   return handshaker_->chlo_hash();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_crypto_client_stream.h b/net/third_party/quic/core/quic_crypto_client_stream.h
index 31f172b..b34d8a8 100644
--- a/net/third_party/quic/core/quic_crypto_client_stream.h
+++ b/net/third_party/quic/core/quic_crypto_client_stream.h
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicCryptoClientStreamBase : public QuicCryptoStream {
  public:
@@ -166,6 +166,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoClientStream);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CRYPTO_CLIENT_STREAM_H_
diff --git a/net/third_party/quic/core/quic_crypto_client_stream_test.cc b/net/third_party/quic/core/quic_crypto_client_stream_test.cc
index 3786913..e45f50e1 100644
--- a/net/third_party/quic/core/quic_crypto_client_stream_test.cc
+++ b/net/third_party/quic/core/quic_crypto_client_stream_test.cc
@@ -27,7 +27,7 @@
 
 using testing::_;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -38,7 +38,7 @@
  public:
   QuicCryptoClientStreamTest()
       : supported_versions_(AllSupportedVersions()),
-        server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED),
+        server_id_(kServerHostname, kServerPort, net::PRIVACY_MODE_DISABLED),
         crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
                        TlsClientHandshaker::CreateSslCtx()) {
     SetQuicReloadableFlag(quic_respect_ietf_header, true);
@@ -369,7 +369,8 @@
 TEST_F(QuicCryptoClientStreamTest, NoTokenBindingInPrivacyMode) {
   server_options_.token_binding_params = QuicTagVector{kTB10};
   crypto_config_.tb_key_params = QuicTagVector{kTB10};
-  server_id_ = QuicServerId(kServerHostname, kServerPort, PRIVACY_MODE_ENABLED);
+  server_id_ =
+      QuicServerId(kServerHostname, kServerPort, net::PRIVACY_MODE_ENABLED);
   CreateConnection();
 
   CompleteCryptoHandshake();
@@ -389,7 +390,7 @@
                               TlsServerHandshaker::CreateSslCtx()),
         server_compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
-        server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED) {
+        server_id_(kServerHostname, kServerPort, net::PRIVACY_MODE_DISABLED) {
     SetQuicReloadableFlag(quic_respect_ietf_header, true);
     TestQuicSpdyClientSession* client_session = nullptr;
     CreateClientSessionForTest(server_id_,
@@ -490,4 +491,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_crypto_framer_parse_message_fuzzer.cc b/net/third_party/quic/core/quic_crypto_framer_parse_message_fuzzer.cc
index add0d986..8d29f32f 100644
--- a/net/third_party/quic/core/quic_crypto_framer_parse_message_fuzzer.cc
+++ b/net/third_party/quic/core/quic_crypto_framer_parse_message_fuzzer.cc
@@ -10,10 +10,10 @@
 
 // Entry point for LibFuzzer.
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
-  net::QuicStringPiece crypto_input(reinterpret_cast<const char*>(data), size);
-  std::unique_ptr<net::CryptoHandshakeMessage> handshake_message(
-      net::CryptoFramer::ParseMessage(crypto_input,
-                                      net::Perspective::IS_CLIENT));
+  quic::QuicStringPiece crypto_input(reinterpret_cast<const char*>(data), size);
+  std::unique_ptr<quic::CryptoHandshakeMessage> handshake_message(
+      quic::CryptoFramer::ParseMessage(crypto_input,
+                                       quic::Perspective::IS_CLIENT));
 
   return 0;
 }
diff --git a/net/third_party/quic/core/quic_crypto_handshaker.cc b/net/third_party/quic/core/quic_crypto_handshaker.cc
index c91c125..963279e 100644
--- a/net/third_party/quic/core/quic_crypto_handshaker.cc
+++ b/net/third_party/quic/core/quic_crypto_handshaker.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/core/quic_session.h"
 
-namespace net {
+namespace quic {
 
 #define ENDPOINT                                                   \
   (session()->perspective() == Perspective::IS_SERVER ? "Server: " \
@@ -49,4 +49,4 @@
   return &crypto_framer_;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_crypto_handshaker.h b/net/third_party/quic/core/quic_crypto_handshaker.h
index 7311966..a88235fc 100644
--- a/net/third_party/quic/core/quic_crypto_handshaker.h
+++ b/net/third_party/quic/core/quic_crypto_handshaker.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_crypto_stream.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicCryptoHandshaker
     : public CryptoFramerVisitorInterface {
@@ -45,6 +45,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoHandshaker);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CRYPTO_HANDSHAKER_H_
diff --git a/net/third_party/quic/core/quic_crypto_server_handshaker.cc b/net/third_party/quic/core/quic_crypto_server_handshaker.cc
index 68587fe..8da9272 100644
--- a/net/third_party/quic/core/quic_crypto_server_handshaker.cc
+++ b/net/third_party/quic/core/quic_crypto_server_handshaker.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 #include "third_party/boringssl/src/include/openssl/sha.h"
 
-namespace net {
+namespace quic {
 
 class QuicCryptoServerHandshaker::ProcessClientHelloCallback
     : public ProcessClientHelloResultCallback {
@@ -22,12 +22,12 @@
           ValidateClientHelloResultCallback::Result>& result)
       : parent_(parent), result_(result) {}
 
-  void Run(QuicErrorCode error,
-           const QuicString& error_details,
-           std::unique_ptr<CryptoHandshakeMessage> message,
-           std::unique_ptr<DiversificationNonce> diversification_nonce,
-           std::unique_ptr<net::ProofSource::Details> proof_source_details)
-      override {
+  void Run(
+      QuicErrorCode error,
+      const QuicString& error_details,
+      std::unique_ptr<CryptoHandshakeMessage> message,
+      std::unique_ptr<DiversificationNonce> diversification_nonce,
+      std::unique_ptr<ProofSource::Details> proof_source_details) override {
     if (parent_ == nullptr) {
       return;
     }
@@ -470,4 +470,4 @@
   return session()->connection()->peer_address();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_crypto_server_handshaker.h b/net/third_party/quic/core/quic_crypto_server_handshaker.h
index 00c74cf..3562a92 100644
--- a/net/third_party/quic/core/quic_crypto_server_handshaker.h
+++ b/net/third_party/quic/core/quic_crypto_server_handshaker.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicCryptoServerStreamPeer;
@@ -225,6 +225,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerHandshaker);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CRYPTO_SERVER_HANDSHAKER_H_
diff --git a/net/third_party/quic/core/quic_crypto_server_stream.cc b/net/third_party/quic/core/quic_crypto_server_stream.cc
index 21e5413..6f2911b 100644
--- a/net/third_party/quic/core/quic_crypto_server_stream.cc
+++ b/net/third_party/quic/core/quic_crypto_server_stream.cc
@@ -23,7 +23,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 QuicCryptoServerStreamBase::QuicCryptoServerStreamBase(QuicSession* session)
     : QuicCryptoStream(session) {}
@@ -174,4 +174,4 @@
   return handshaker_.get();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_crypto_server_stream.h b/net/third_party/quic/core/quic_crypto_server_stream.h
index c07838f..5626f25 100644
--- a/net/third_party/quic/core/quic_crypto_server_stream.h
+++ b/net/third_party/quic/core/quic_crypto_server_stream.h
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class CachedNetworkParameters;
 class CryptoHandshakeMessage;
@@ -224,6 +224,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoServerStream);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CRYPTO_SERVER_STREAM_H_
diff --git a/net/third_party/quic/core/quic_crypto_server_stream_test.cc b/net/third_party/quic/core/quic_crypto_server_stream_test.cc
index 9c80371..85c8ca5 100644
--- a/net/third_party/quic/core/quic_crypto_server_stream_test.cc
+++ b/net/third_party/quic/core/quic_crypto_server_stream_test.cc
@@ -33,24 +33,23 @@
 #include "net/third_party/quic/test_tools/quic_crypto_server_config_peer.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 class QuicConnection;
 class QuicStream;
-}  // namespace net
+}  // namespace quic
 
 using std::string;
 using testing::NiceMock;
 using testing::_;
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicCryptoServerStreamPeer {
  public:
   static bool DoesPeerSupportStatelessRejects(
       const CryptoHandshakeMessage& message) {
-    return net::QuicCryptoServerStream::DoesPeerSupportStatelessRejects(
-        message);
+    return QuicCryptoServerStream::DoesPeerSupportStatelessRejects(message);
   }
 };
 
@@ -72,7 +71,7 @@
                               TlsServerHandshaker::CreateSslCtx()),
         server_compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
-        server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED),
+        server_id_(kServerHostname, kServerPort, net::PRIVACY_MODE_DISABLED),
         client_crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
                               TlsClientHandshaker::CreateSslCtx()) {
     SetQuicReloadableFlag(enable_quic_stateless_reject_support, false);
@@ -599,4 +598,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_crypto_stream.cc b/net/third_party/quic/core/quic_crypto_stream.cc
index d4495cf..4fe1e15 100644
--- a/net/third_party/quic/core/quic_crypto_stream.cc
+++ b/net/third_party/quic/core/quic_crypto_stream.cc
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 #define ENDPOINT                                                   \
   (session()->perspective() == Perspective::IS_SERVER ? "Server: " \
@@ -202,4 +202,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_crypto_stream.h b/net/third_party/quic/core/quic_crypto_stream.h
index a9afef6a..850502b 100644
--- a/net/third_party/quic/core/quic_crypto_stream.h
+++ b/net/third_party/quic/core/quic_crypto_stream.h
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QuicSession;
 
@@ -112,6 +112,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicCryptoStream);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_CRYPTO_STREAM_H_
diff --git a/net/third_party/quic/core/quic_crypto_stream_test.cc b/net/third_party/quic/core/quic_crypto_stream_test.cc
index 540a091..64000a3 100644
--- a/net/third_party/quic/core/quic_crypto_stream_test.cc
+++ b/net/third_party/quic/core/quic_crypto_stream_test.cc
@@ -25,7 +25,7 @@
 using testing::Invoke;
 using testing::InvokeWithoutArgs;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -251,4 +251,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_data_reader.cc b/net/third_party/quic/core/quic_data_reader.cc
index 337a4c0..83a5e8d 100644
--- a/net/third_party/quic/core/quic_data_reader.cc
+++ b/net/third_party/quic/core/quic_data_reader.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_flags.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 #define ENDPOINT \
   (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ")
@@ -279,4 +279,4 @@
   *result = static_cast<QuicStreamId>(temp_uint64);
   return true;
 }
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_data_reader.h b/net/third_party/quic/core/quic_data_reader.h
index 183ca4d0..9b6b4db7 100644
--- a/net/third_party/quic/core/quic_data_reader.h
+++ b/net/third_party/quic/core/quic_data_reader.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // Used for reading QUIC data. Though there isn't really anything terribly
 // QUIC-specific here, it's a helper class that's useful when doing QUIC
@@ -162,6 +162,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicDataReader);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_DATA_READER_H_
diff --git a/net/third_party/quic/core/quic_data_writer.cc b/net/third_party/quic/core/quic_data_writer.cc
index 08baee0..c856fd5 100644
--- a/net/third_party/quic/core/quic_data_writer.cc
+++ b/net/third_party/quic/core/quic_data_writer.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_flags.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 #define ENDPOINT \
   (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ")
@@ -309,4 +309,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_data_writer.h b/net/third_party/quic/core/quic_data_writer.h
index 4360256..74afeaa 100644
--- a/net/third_party/quic/core/quic_data_writer.h
+++ b/net/third_party/quic/core/quic_data_writer.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 // VarInt64 encoding masks
 // If a uint64_t anded with a mask is not 0 then the value is encoded
 // using that length (or is too big, in the case of
@@ -126,6 +126,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicDataWriter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_DATA_WRITER_H_
diff --git a/net/third_party/quic/core/quic_data_writer_test.cc b/net/third_party/quic/core/quic_data_writer_test.cc
index 3928982..7f64283d 100644
--- a/net/third_party/quic/core/quic_data_writer_test.cc
+++ b/net/third_party/quic/core/quic_data_writer_test.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -961,4 +961,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_default_packet_writer.cc b/net/third_party/quic/core/quic_default_packet_writer.cc
index 40b0bfe..72d09c7 100644
--- a/net/third_party/quic/core/quic_default_packet_writer.cc
+++ b/net/third_party/quic/core/quic_default_packet_writer.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_socket_utils.h"
 
-namespace net {
+namespace quic {
 
 QuicDefaultPacketWriter::QuicDefaultPacketWriter(int fd)
     : fd_(fd), write_blocked_(false) {}
@@ -51,4 +51,4 @@
   write_blocked_ = is_blocked;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_default_packet_writer.h b/net/third_party/quic/core/quic_default_packet_writer.h
index 95b9c2e5..39fe223 100644
--- a/net/third_party/quic/core/quic_default_packet_writer.h
+++ b/net/third_party/quic/core/quic_default_packet_writer.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 
-namespace net {
+namespace quic {
 
 struct WriteResult;
 
@@ -47,6 +47,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicDefaultPacketWriter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_DEFAULT_PACKET_WRITER_H_
diff --git a/net/third_party/quic/core/quic_dispatcher.cc b/net/third_party/quic/core/quic_dispatcher.cc
index 3ae388b..5ba84f1 100644
--- a/net/third_party/quic/core/quic_dispatcher.cc
+++ b/net/third_party/quic/core/quic_dispatcher.cc
@@ -24,7 +24,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/tools/quic_simple_server_session.h"
 
-namespace net {
+namespace quic {
 
 typedef QuicBufferedPacketStore::BufferedPacket BufferedPacket;
 typedef QuicBufferedPacketStore::BufferedPacketList BufferedPacketList;
@@ -1143,4 +1143,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_dispatcher.h b/net/third_party/quic/core/quic_dispatcher.h
index 184584fef..300eb2bd 100644
--- a/net/third_party/quic/core/quic_dispatcher.h
+++ b/net/third_party/quic/core/quic_dispatcher.h
@@ -29,7 +29,7 @@
 #include "net/third_party/quic/core/quic_time_wait_list_manager.h"
 #include "net/third_party/quic/core/stateless_rejector.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicDispatcherPeer;
 }  // namespace test
@@ -443,6 +443,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicDispatcher);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_DISPATCHER_H_
diff --git a/net/third_party/quic/core/quic_dispatcher_test.cc b/net/third_party/quic/core/quic_dispatcher_test.cc
index 52c328f..4af3bcf 100644
--- a/net/third_party/quic/core/quic_dispatcher_test.cc
+++ b/net/third_party/quic/core/quic_dispatcher_test.cc
@@ -56,7 +56,7 @@
     kDefaultMaxConnectionsInStore / 2;
 static const int16_t kMaxNumSessionsToCreate = 16;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -119,7 +119,7 @@
   TestDispatcher(const QuicConfig& config,
                  const QuicCryptoServerConfig* crypto_config,
                  QuicVersionManager* version_manager,
-                 EpollServer* eps)
+                 net::EpollServer* eps)
       : QuicDispatcher(
             config,
             crypto_config,
@@ -351,7 +351,7 @@
 
   QuicString SerializeTlsClientHello() { return ""; }
 
-  EpollServer eps_;
+  net::EpollServer eps_;
   QuicEpollConnectionHelper helper_;
   MockQuicConnectionHelper mock_helper_;
   QuicEpollAlarmFactory alarm_factory_;
@@ -1422,7 +1422,7 @@
     CryptoHandshakeMessage chlo =
         crypto_test_utils::GenerateDefaultInchoateCHLO(clock_, version,
                                                        &crypto_config_);
-    chlo.SetVector(net::kCOPT, net::QuicTagVector{net::kSREJ});
+    chlo.SetVector(kCOPT, QuicTagVector{kSREJ});
     // Pass an inchoate CHLO.
     crypto_test_utils::GenerateFullCHLO(
         chlo, &crypto_config_, server_addr_, client_addr_, version, clock_,
@@ -1841,7 +1841,7 @@
     QuicTransportVersion version = AllSupportedTransportVersions().front();
     chlo_ = crypto_test_utils::GenerateDefaultInchoateCHLO(clock_, version,
                                                            &crypto_config_);
-    chlo_.SetVector(net::kCOPT, net::QuicTagVector{net::kSREJ});
+    chlo_.SetVector(kCOPT, QuicTagVector{kSREJ});
     chlo_.SetStringPiece(kALPN, "HTTP/1");
     // Pass an inchoate CHLO.
     crypto_test_utils::GenerateFullCHLO(
@@ -2445,4 +2445,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_epoll_alarm_factory.cc b/net/third_party/quic/core/quic_epoll_alarm_factory.cc
index 3a14059..12079bd 100644
--- a/net/third_party/quic/core/quic_epoll_alarm_factory.cc
+++ b/net/third_party/quic/core/quic_epoll_alarm_factory.cc
@@ -6,13 +6,13 @@
 
 #include "net/tools/epoll_server/epoll_server.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
 class QuicEpollAlarm : public QuicAlarm {
  public:
-  QuicEpollAlarm(EpollServer* epoll_server,
+  QuicEpollAlarm(net::EpollServer* epoll_server,
                  QuicArenaScopedPtr<Delegate> delegate)
       : QuicAlarm(std::move(delegate)),
         epoll_server_(epoll_server),
@@ -31,12 +31,12 @@
   }
 
  private:
-  class EpollAlarmImpl : public EpollAlarm {
+  class EpollAlarmImpl : public net::EpollAlarm {
    public:
     explicit EpollAlarmImpl(QuicEpollAlarm* alarm) : alarm_(alarm) {}
 
     int64_t OnAlarm() override {
-      EpollAlarm::OnAlarm();
+      net::EpollAlarm::OnAlarm();
       alarm_->Fire();
       // Fire will take care of registering the alarm, if needed.
       return 0;
@@ -46,13 +46,13 @@
     QuicEpollAlarm* alarm_;
   };
 
-  EpollServer* epoll_server_;
+  net::EpollServer* epoll_server_;
   EpollAlarmImpl epoll_alarm_impl_;
 };
 
 }  // namespace
 
-QuicEpollAlarmFactory::QuicEpollAlarmFactory(EpollServer* epoll_server)
+QuicEpollAlarmFactory::QuicEpollAlarmFactory(net::EpollServer* epoll_server)
     : epoll_server_(epoll_server) {}
 
 QuicEpollAlarmFactory::~QuicEpollAlarmFactory() = default;
@@ -73,4 +73,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_epoll_alarm_factory.h b/net/third_party/quic/core/quic_epoll_alarm_factory.h
index 0a62caf..87e8ccda 100644
--- a/net/third_party/quic/core/quic_epoll_alarm_factory.h
+++ b/net/third_party/quic/core/quic_epoll_alarm_factory.h
@@ -8,14 +8,16 @@
 #include "net/third_party/quic/core/quic_alarm.h"
 #include "net/third_party/quic/core/quic_alarm_factory.h"
 
+namespace quic {}  // namespace quic
 namespace net {
-
 class EpollServer;
+}  // namespace net
+namespace quic {
 
-// Creates alarms that use the supplied EpollServer for timing and firing.
+// Creates alarms that use the supplied net::EpollServer for timing and firing.
 class QuicEpollAlarmFactory : public QuicAlarmFactory {
  public:
-  explicit QuicEpollAlarmFactory(EpollServer* epoll_server);
+  explicit QuicEpollAlarmFactory(net::EpollServer* epoll_server);
   ~QuicEpollAlarmFactory() override;
 
   // QuicAlarmFactory interface.
@@ -25,11 +27,11 @@
       QuicConnectionArena* arena) override;
 
  private:
-  EpollServer* epoll_server_;  // Not owned.
+  net::EpollServer* epoll_server_;  // Not owned.
 
   DISALLOW_COPY_AND_ASSIGN(QuicEpollAlarmFactory);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_EPOLL_ALARM_FACTORY_H_
diff --git a/net/third_party/quic/core/quic_epoll_alarm_factory_test.cc b/net/third_party/quic/core/quic_epoll_alarm_factory_test.cc
index 3868fb01c..c7553483 100644
--- a/net/third_party/quic/core/quic_epoll_alarm_factory_test.cc
+++ b/net/third_party/quic/core/quic_epoll_alarm_factory_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/impl/quic_epoll_clock.h"
 #include "net/third_party/quic/test_tools/mock_epoll_server.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -137,4 +137,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_epoll_connection_helper.cc b/net/third_party/quic/core/quic_epoll_connection_helper.cc
index 18d1445..10ec875 100644
--- a/net/third_party/quic/core/quic_epoll_connection_helper.cc
+++ b/net/third_party/quic/core/quic_epoll_connection_helper.cc
@@ -11,10 +11,11 @@
 #include "net/third_party/quic/platform/impl/quic_socket_utils.h"
 #include "net/tools/epoll_server/epoll_server.h"
 
-namespace net {
+namespace quic {
 
-QuicEpollConnectionHelper::QuicEpollConnectionHelper(EpollServer* epoll_server,
-                                                     QuicAllocator type)
+QuicEpollConnectionHelper::QuicEpollConnectionHelper(
+    net::EpollServer* epoll_server,
+    QuicAllocator type)
     : clock_(epoll_server),
       random_generator_(QuicRandom::GetInstance()),
       allocator_type_(type) {}
@@ -38,4 +39,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_epoll_connection_helper.h b/net/third_party/quic/core/quic_epoll_connection_helper.h
index b28d01f..f55be65 100644
--- a/net/third_party/quic/core/quic_epoll_connection_helper.h
+++ b/net/third_party/quic/core/quic_epoll_connection_helper.h
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 //
 // The Google-specific helper for QuicConnection which uses
-// EpollAlarm for alarms, and used an int fd_ for writing data.
+// net::EpollAlarm for alarms, and used an int fd_ for writing data.
 
 #ifndef NET_THIRD_PARTY_QUIC_CORE_QUIC_EPOLL_CONNECTION_HELPER_H_
 #define NET_THIRD_PARTY_QUIC_CORE_QUIC_EPOLL_CONNECTION_HELPER_H_
@@ -20,9 +20,11 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/impl/quic_epoll_clock.h"
 
+namespace quic {}  // namespace quic
 namespace net {
-
 class EpollServer;
+}  // namespace net
+namespace quic {
 class QuicRandom;
 
 using QuicStreamBufferAllocator = SimpleBufferAllocator;
@@ -31,7 +33,7 @@
 
 class QuicEpollConnectionHelper : public QuicConnectionHelperInterface {
  public:
-  QuicEpollConnectionHelper(EpollServer* eps, QuicAllocator allocator);
+  QuicEpollConnectionHelper(net::EpollServer* eps, QuicAllocator allocator);
   ~QuicEpollConnectionHelper() override;
 
   // QuicEpollConnectionHelperInterface
@@ -53,6 +55,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicEpollConnectionHelper);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_EPOLL_CONNECTION_HELPER_H_
diff --git a/net/third_party/quic/core/quic_epoll_connection_helper_test.cc b/net/third_party/quic/core/quic_epoll_connection_helper_test.cc
index eb5cf6a7..7d785bc8 100644
--- a/net/third_party/quic/core/quic_epoll_connection_helper_test.cc
+++ b/net/third_party/quic/core/quic_epoll_connection_helper_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/mock_epoll_server.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -38,4 +38,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_error_codes.cc b/net/third_party/quic/core/quic_error_codes.cc
index 197b0a6..9675cdca 100644
--- a/net/third_party/quic/core/quic_error_codes.cc
+++ b/net/third_party/quic/core/quic_error_codes.cc
@@ -6,7 +6,7 @@
 
 #include "base/metrics/histogram_macros.h"
 
-namespace net {
+namespace quic {
 
 #define RETURN_STRING_LITERAL(x) \
   case x:                        \
@@ -152,4 +152,4 @@
                             INTERNAL_ERROR_LOCATION_MAX);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_error_codes.h b/net/third_party/quic/core/quic_error_codes.h
index ba04fa1..90bdb092 100644
--- a/net/third_party/quic/core/quic_error_codes.h
+++ b/net/third_party/quic/core/quic_error_codes.h
@@ -10,7 +10,7 @@
 
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 enum QuicRstStreamErrorCode {
   // Complete response has been sent, sending a RST to ask the other endpoint
@@ -333,6 +333,6 @@
 QUIC_EXPORT_PRIVATE
 void RecordInternalErrorLocation(QuicInternalErrorLocation location);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_ERROR_CODES_H_
diff --git a/net/third_party/quic/core/quic_error_codes_test.cc b/net/third_party/quic/core/quic_error_codes_test.cc
index 0fbfb1872..981c301 100644
--- a/net/third_party/quic/core/quic_error_codes_test.cc
+++ b/net/third_party/quic/core/quic_error_codes_test.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -23,4 +23,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_flow_controller.cc b/net/third_party/quic/core/quic_flow_controller.cc
index 1686bd7d..d611320 100644
--- a/net/third_party/quic/core/quic_flow_controller.cc
+++ b/net/third_party/quic/core/quic_flow_controller.cc
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_logging.h"
 #include "net/third_party/quic/platform/api/quic_str_cat.h"
 
-namespace net {
+namespace quic {
 
 #define ENDPOINT \
   (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ")
@@ -297,4 +297,4 @@
   session_->SendWindowUpdate(id_, receive_window_offset_);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_flow_controller.h b/net/third_party/quic/core/quic_flow_controller.h
index 5c467e2..6092f42 100644
--- a/net/third_party/quic/core/quic_flow_controller.h
+++ b/net/third_party/quic/core/quic_flow_controller.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicFlowControllerPeer;
@@ -199,6 +199,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicFlowController);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_
diff --git a/net/third_party/quic/core/quic_flow_controller_test.cc b/net/third_party/quic/core/quic_flow_controller_test.cc
index 86d8041f..fec3945 100644
--- a/net/third_party/quic/core/quic_flow_controller_test.cc
+++ b/net/third_party/quic/core/quic_flow_controller_test.cc
@@ -16,7 +16,7 @@
 
 using testing::_;
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Receive window auto-tuning uses RTT in its logic.
@@ -391,4 +391,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_framer.cc b/net/third_party/quic/core/quic_framer.cc
index 07bceaa..648ff8a 100644
--- a/net/third_party/quic/core/quic_framer.cc
+++ b/net/third_party/quic/core/quic_framer.cc
@@ -34,7 +34,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -3734,4 +3734,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_framer.h b/net/third_party/quic/core/quic_framer.h
index ec33c43..71cef8c9 100644
--- a/net/third_party/quic/core/quic_framer.h
+++ b/net/third_party/quic/core/quic_framer.h
@@ -18,7 +18,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicFramerPeer;
@@ -704,6 +704,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicFramer);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_FRAMER_H_
diff --git a/net/third_party/quic/core/quic_framer_test.cc b/net/third_party/quic/core/quic_framer_test.cc
index 796f22e..d0bd5e6 100644
--- a/net/third_party/quic/core/quic_framer_test.cc
+++ b/net/third_party/quic/core/quic_framer_test.cc
@@ -31,7 +31,7 @@
 using testing::Return;
 using testing::Truly;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -7906,4 +7906,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_header_list.cc b/net/third_party/quic/core/quic_header_list.cc
index ee74eae..87e2a92 100644
--- a/net/third_party/quic/core/quic_header_list.cc
+++ b/net/third_party/quic/core/quic_header_list.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/spdy/core/spdy_protocol.h"
 
-namespace net {
+namespace quic {
 
 QuicHeaderList::QuicHeaderList()
     : max_header_list_size_(kDefaultMaxUncompressedHeaderSize),
@@ -69,4 +69,4 @@
   return s;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_header_list.h b/net/third_party/quic/core/quic_header_list.h
index 3bf3e39..88d5e2a 100644
--- a/net/third_party/quic/core/quic_header_list.h
+++ b/net/third_party/quic/core/quic_header_list.h
@@ -17,7 +17,7 @@
 #include "net/third_party/spdy/core/spdy_header_block.h"
 #include "net/third_party/spdy/core/spdy_headers_handler_interface.h"
 
-namespace net {
+namespace quic {
 
 // A simple class that accumulates header pairs
 class QUIC_EXPORT_PRIVATE QuicHeaderList
@@ -83,6 +83,6 @@
   return std::equal(l1.begin(), l1.end(), l2.begin(), pred);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_HEADER_LIST_H_
diff --git a/net/third_party/quic/core/quic_header_list_test.cc b/net/third_party/quic/core/quic_header_list_test.cc
index 54931f4..9928c7a 100644
--- a/net/third_party/quic/core/quic_header_list_test.cc
+++ b/net/third_party/quic/core/quic_header_list_test.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 
 class QuicHeaderListTest : public QuicTest {};
 
@@ -65,4 +65,4 @@
   EXPECT_EQ("{ foo=bar, april=fools, beep=, }", headers3.DebugString());
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_headers_stream.cc b/net/third_party/quic/core/quic_headers_stream.cc
index efa8d0b5..115d9a7 100644
--- a/net/third_party/quic/core/quic_headers_stream.cc
+++ b/net/third_party/quic/core/quic_headers_stream.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_flag_utils.h"
 #include "net/third_party/quic/platform/api/quic_flags.h"
 
-namespace net {
+namespace quic {
 
 QuicHeadersStream::CompressedHeaderInfo::CompressedHeaderInfo(
     QuicStreamOffset headers_stream_offset,
@@ -149,4 +149,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_headers_stream.h b/net/third_party/quic/core/quic_headers_stream.h
index 31d37110..0c0187d1 100644
--- a/net/third_party/quic/core/quic_headers_stream.h
+++ b/net/third_party/quic/core/quic_headers_stream.h
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/spdy/core/spdy_framer.h"
 
-namespace net {
+namespace quic {
 
 class QuicSpdySession;
 
@@ -91,6 +91,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_HEADERS_STREAM_H_
diff --git a/net/third_party/quic/core/quic_headers_stream_test.cc b/net/third_party/quic/core/quic_headers_stream_test.cc
index e628e63..882d063a 100644
--- a/net/third_party/quic/core/quic_headers_stream_test.cc
+++ b/net/third_party/quic/core/quic_headers_stream_test.cc
@@ -39,7 +39,7 @@
 using testing::StrictMock;
 using testing::WithArgs;
 
-namespace net {
+namespace quic {
 namespace test {
 
 class MockQuicHpackDebugVisitor : public QuicHpackDebugVisitor {
@@ -912,4 +912,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_ietf_framer_test.cc b/net/third_party/quic/core/quic_ietf_framer_test.cc
index daa3a761..8fdc5d6 100644
--- a/net/third_party/quic/core/quic_ietf_framer_test.cc
+++ b/net/third_party/quic/core/quic_ietf_framer_test.cc
@@ -40,7 +40,7 @@
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 #include "net/third_party/quic/test_tools/simple_data_producer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -967,4 +967,4 @@
 }
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_iovector.h b/net/third_party/quic/core/quic_iovector.h
index 4722159..bc9cccc 100644
--- a/net/third_party/quic/core/quic_iovector.h
+++ b/net/third_party/quic/core/quic_iovector.h
@@ -10,7 +10,7 @@
 #include "net/base/iovec.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Convenience wrapper to wrap an iovec array and the total length, which must
 // be less than or equal to the actual total length of the iovecs.
@@ -23,6 +23,6 @@
   const size_t total_length;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_IOVECTOR_H_
diff --git a/net/third_party/quic/core/quic_one_block_arena.h b/net/third_party/quic/core/quic_one_block_arena.h
index b4b2366..494331ee 100644
--- a/net/third_party/quic/core/quic_one_block_arena.h
+++ b/net/third_party/quic/core/quic_one_block_arena.h
@@ -18,7 +18,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 template <uint32_t ArenaSize>
 class QuicOneBlockArena {
@@ -74,6 +74,6 @@
                                QuicArenaScopedPtr<T>::ConstructFrom::kArena);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_ONE_BLOCK_ARENA_H_
diff --git a/net/third_party/quic/core/quic_one_block_arena_test.cc b/net/third_party/quic/core/quic_one_block_arena_test.cc
index 0b73b05..e89a8ba 100644
--- a/net/third_party/quic/core/quic_one_block_arena_test.cc
+++ b/net/third_party/quic/core/quic_one_block_arena_test.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace {
 
 static const uint32_t kMaxAlign = 8;
@@ -56,4 +56,4 @@
 }
 
 }  // namespace
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_packet_creator.cc b/net/third_party/quic/core/quic_packet_creator.cc
index 780a88d8..8c01e4a8 100644
--- a/net/third_party/quic/core/quic_packet_creator.cc
+++ b/net/third_party/quic/core/quic_packet_creator.cc
@@ -24,7 +24,7 @@
 // If true, enforce that QUIC CHLOs fit in one packet.
 bool FLAGS_quic_enforce_single_packet_chlo = true;
 
-namespace net {
+namespace quic {
 
 #define ENDPOINT \
   (framer_->perspective() == Perspective::IS_SERVER ? "Server: " : "Client: ")
@@ -690,4 +690,4 @@
          packet_.encryption_level < ENCRYPTION_FORWARD_SECURE;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_packet_creator.h b/net/third_party/quic/core/quic_packet_creator.h
index 63b3a835..62eb9db 100644
--- a/net/third_party/quic/core/quic_packet_creator.h
+++ b/net/third_party/quic/core/quic_packet_creator.h
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/core/quic_pending_retransmission.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicPacketCreatorPeer;
 }
@@ -323,6 +323,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_PACKET_CREATOR_H_
diff --git a/net/third_party/quic/core/quic_packet_creator_test.cc b/net/third_party/quic/core/quic_packet_creator_test.cc
index 9dd53b30..935eba82 100644
--- a/net/third_party/quic/core/quic_packet_creator_test.cc
+++ b/net/third_party/quic/core/quic_packet_creator_test.cc
@@ -32,7 +32,7 @@
 using testing::SaveArg;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -1134,4 +1134,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_packet_generator.cc b/net/third_party/quic/core/quic_packet_generator.cc
index ba53cce..4645b4d6 100644
--- a/net/third_party/quic/core/quic_packet_generator.cc
+++ b/net/third_party/quic/core/quic_packet_generator.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_flags.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 QuicPacketGenerator::QuicPacketGenerator(QuicConnectionId connection_id,
                                          QuicFramer* framer,
@@ -387,4 +387,4 @@
   packet_creator_.set_can_set_transmission_type(can_set_transmission_type);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_packet_generator.h b/net/third_party/quic/core/quic_packet_generator.h
index 884d7d61..50a4077 100644
--- a/net/third_party/quic/core/quic_packet_generator.h
+++ b/net/third_party/quic/core/quic_packet_generator.h
@@ -51,7 +51,7 @@
 #include "net/third_party/quic/core/quic_types.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicPacketGeneratorPeer;
@@ -241,6 +241,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_PACKET_GENERATOR_H_
diff --git a/net/third_party/quic/core/quic_packet_generator_test.cc b/net/third_party/quic/core/quic_packet_generator_test.cc
index 63e30d7..b06193e 100644
--- a/net/third_party/quic/core/quic_packet_generator_test.cc
+++ b/net/third_party/quic/core/quic_packet_generator_test.cc
@@ -32,7 +32,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -1223,4 +1223,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_packet_reader.cc b/net/third_party/quic/core/quic_packet_reader.cc
index 63e8c3c..9b42fad 100644
--- a/net/third_party/quic/core/quic_packet_reader.cc
+++ b/net/third_party/quic/core/quic_packet_reader.cc
@@ -23,7 +23,7 @@
 #define SO_RXQ_OVFL 40
 #endif
 
-namespace net {
+namespace quic {
 
 QuicPacketReader::QuicPacketReader() {
   Initialize();
@@ -189,4 +189,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_packet_reader.h b/net/third_party/quic/core/quic_packet_reader.h
index da07c71..8ad14655 100644
--- a/net/third_party/quic/core/quic_packet_reader.h
+++ b/net/third_party/quic/core/quic_packet_reader.h
@@ -21,7 +21,7 @@
 
 #define MMSG_MORE 0
 
-namespace net {
+namespace quic {
 
 #if MMSG_MORE
 // Read in larger batches to minimize recvmmsg overhead.
@@ -90,6 +90,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicPacketReader);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_PACKET_READER_H_
diff --git a/net/third_party/quic/core/quic_packet_writer.h b/net/third_party/quic/core/quic_packet_writer.h
index 57cf842..08add9d 100644
--- a/net/third_party/quic/core/quic_packet_writer.h
+++ b/net/third_party/quic/core/quic_packet_writer.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 
-namespace net {
+namespace quic {
 
 struct WriteResult;
 
@@ -68,6 +68,6 @@
       const QuicSocketAddress& peer_address) const = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_PACKET_WRITER_H_
diff --git a/net/third_party/quic/core/quic_packet_writer_wrapper.cc b/net/third_party/quic/core/quic_packet_writer_wrapper.cc
index c7082865..de755f7 100644
--- a/net/third_party/quic/core/quic_packet_writer_wrapper.cc
+++ b/net/third_party/quic/core/quic_packet_writer_wrapper.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/core/quic_types.h"
 
-namespace net {
+namespace quic {
 
 QuicPacketWriterWrapper::QuicPacketWriterWrapper() = default;
 
@@ -62,4 +62,4 @@
   writer_ = nullptr;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_packet_writer_wrapper.h b/net/third_party/quic/core/quic_packet_writer_wrapper.h
index ebd4dba..734e4c0 100644
--- a/net/third_party/quic/core/quic_packet_writer_wrapper.h
+++ b/net/third_party/quic/core/quic_packet_writer_wrapper.h
@@ -12,7 +12,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/core/quic_packet_writer.h"
 
-namespace net {
+namespace quic {
 
 // Wraps a writer object to allow dynamically extending functionality. Use
 // cases: replace writer while dispatcher and connections hold on to the
@@ -54,6 +54,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicPacketWriterWrapper);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_PACKET_WRITER_WRAPPER_H_
diff --git a/net/third_party/quic/core/quic_packets.cc b/net/third_party/quic/core/quic_packets.cc
index 2a77dce..c5d78e4 100644
--- a/net/third_party/quic/core/quic_packets.cc
+++ b/net/third_party/quic/core/quic_packets.cc
@@ -13,7 +13,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 size_t GetPacketHeaderSize(QuicTransportVersion version,
                            const QuicPacketHeader& header) {
@@ -279,4 +279,4 @@
   return dst_buffer;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_packets.h b/net/third_party/quic/core/quic_packets.h
index e3c4974d..2e7698e8 100644
--- a/net/third_party/quic/core/quic_packets.h
+++ b/net/third_party/quic/core/quic_packets.h
@@ -28,7 +28,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/api/quic_uint128.h"
 
-namespace net {
+namespace quic {
 
 class QuicPacket;
 struct QuicPacketHeader;
@@ -283,6 +283,6 @@
 typedef std::unique_ptr<SerializedPacket, SerializedPacketDeleter>
     OwningSerializedPacketPointer;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_PACKETS_H_
diff --git a/net/third_party/quic/core/quic_pending_retransmission.h b/net/third_party/quic/core/quic_pending_retransmission.h
index fed08ae2..cda50c179 100644
--- a/net/third_party/quic/core/quic_pending_retransmission.h
+++ b/net/third_party/quic/core/quic_pending_retransmission.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_types.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Struct to store the pending retransmission information.
 struct QUIC_EXPORT_PRIVATE QuicPendingRetransmission {
@@ -49,6 +49,6 @@
   QuicPacketNumberLength packet_number_length;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_PENDING_RETRANSMISSION_H_
diff --git a/net/third_party/quic/core/quic_per_connection_packet_writer.cc b/net/third_party/quic/core/quic_per_connection_packet_writer.cc
index 2bc06cd..584cd3f 100644
--- a/net/third_party/quic/core/quic_per_connection_packet_writer.cc
+++ b/net/third_party/quic/core/quic_per_connection_packet_writer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/quic_per_connection_packet_writer.h"
 
-namespace net {
+namespace quic {
 
 QuicPerConnectionPacketWriter::QuicPerConnectionPacketWriter(
     QuicPacketWriter* shared_writer)
@@ -39,4 +39,4 @@
   return shared_writer_->GetMaxPacketSize(peer_address);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_per_connection_packet_writer.h b/net/third_party/quic/core/quic_per_connection_packet_writer.h
index 043b7b2..915c73cf 100644
--- a/net/third_party/quic/core/quic_per_connection_packet_writer.h
+++ b/net/third_party/quic/core/quic_per_connection_packet_writer.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/quic_connection.h"
 #include "net/third_party/quic/core/quic_packet_writer.h"
 
-namespace net {
+namespace quic {
 
 // A connection-specific packet writer that wraps a shared writer.
 class QuicPerConnectionPacketWriter : public QuicPacketWriter {
@@ -39,6 +39,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicPerConnectionPacketWriter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_PER_CONNECTION_PACKET_WRITER_H_
diff --git a/net/third_party/quic/core/quic_process_packet_interface.h b/net/third_party/quic/core/quic_process_packet_interface.h
index 5be482b..db0190c 100644
--- a/net/third_party/quic/core/quic_process_packet_interface.h
+++ b/net/third_party/quic/core/quic_process_packet_interface.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 
-namespace net {
+namespace quic {
 
 // A class to process each incoming packet.
 class ProcessPacketInterface {
@@ -20,6 +20,6 @@
                              const QuicReceivedPacket& packet) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_PROCESS_PACKET_INTERFACE_H_
diff --git a/net/third_party/quic/core/quic_received_packet_manager.cc b/net/third_party/quic/core/quic_received_packet_manager.cc
index 20f61adc..32f147f 100644
--- a/net/third_party/quic/core/quic_received_packet_manager.cc
+++ b/net/third_party/quic/core/quic_received_packet_manager.cc
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -71,8 +71,8 @@
 
 bool QuicReceivedPacketManager::IsAwaitingPacket(
     QuicPacketNumber packet_number) {
-  return net::IsAwaitingPacket(ack_frame_, packet_number,
-                               peer_least_packet_awaiting_ack_);
+  return quic::IsAwaitingPacket(ack_frame_, packet_number,
+                                peer_least_packet_awaiting_ack_);
 }
 
 const QuicFrame QuicReceivedPacketManager::GetUpdatedAckFrame(
@@ -143,4 +143,4 @@
   return LargestAcked(ack_frame_);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_received_packet_manager.h b/net/third_party/quic/core/quic_received_packet_manager.h
index f3d33689..7c615004 100644
--- a/net/third_party/quic/core/quic_received_packet_manager.h
+++ b/net/third_party/quic/core/quic_received_packet_manager.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicConnectionPeer;
@@ -96,6 +96,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_RECEIVED_PACKET_MANAGER_H_
diff --git a/net/third_party/quic/core/quic_received_packet_manager_test.cc b/net/third_party/quic/core/quic_received_packet_manager_test.cc
index d9f8ce6..3191cd3 100644
--- a/net/third_party/quic/core/quic_received_packet_manager_test.cc
+++ b/net/third_party/quic/core/quic_received_packet_manager_test.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/quic_connection_stats.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -143,4 +143,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_sent_packet_manager.cc b/net/third_party/quic/core/quic_sent_packet_manager.cc
index f9ad3f6..c06f2db 100644
--- a/net/third_party/quic/core/quic_sent_packet_manager.cc
+++ b/net/third_party/quic/core/quic_sent_packet_manager.cc
@@ -22,7 +22,7 @@
 #include "net/third_party/quic/platform/api/quic_map_util.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 static const int64_t kDefaultRetransmissionTimeMs = 500;
@@ -1264,4 +1264,4 @@
   return unacked_packets_.session_decides_what_to_write();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_sent_packet_manager.h b/net/third_party/quic/core/quic_sent_packet_manager.h
index 19c3dc50..c5324d6f 100644
--- a/net/third_party/quic/core/quic_sent_packet_manager.h
+++ b/net/third_party/quic/core/quic_sent_packet_manager.h
@@ -29,7 +29,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicConnectionPeer;
@@ -516,6 +516,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SENT_PACKET_MANAGER_H_
diff --git a/net/third_party/quic/core/quic_sent_packet_manager_test.cc b/net/third_party/quic/core/quic_sent_packet_manager_test.cc
index 196f3d3..62da11f 100644
--- a/net/third_party/quic/core/quic_sent_packet_manager_test.cc
+++ b/net/third_party/quic/core/quic_sent_packet_manager_test.cc
@@ -30,7 +30,7 @@
 using testing::StrictMock;
 using testing::WithArgs;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 // Default packet length.
@@ -2652,4 +2652,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_server_id.cc b/net/third_party/quic/core/quic_server_id.cc
index 9710956..5d8b42d 100644
--- a/net/third_party/quic/core/quic_server_id.cc
+++ b/net/third_party/quic/core/quic_server_id.cc
@@ -10,20 +10,20 @@
 #include "net/third_party/quic/platform/api/quic_str_cat.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
-QuicServerId::QuicServerId() : privacy_mode_(PRIVACY_MODE_DISABLED) {}
+QuicServerId::QuicServerId() : privacy_mode_(net::PRIVACY_MODE_DISABLED) {}
 
-QuicServerId::QuicServerId(const HostPortPair& host_port_pair,
-                           PrivacyMode privacy_mode)
+QuicServerId::QuicServerId(const net::HostPortPair& host_port_pair,
+                           net::PrivacyMode privacy_mode)
     : host_port_pair_(host_port_pair), privacy_mode_(privacy_mode) {}
 
 QuicServerId::QuicServerId(const QuicString& host, uint16_t port)
-    : host_port_pair_(host, port), privacy_mode_(PRIVACY_MODE_DISABLED) {}
+    : host_port_pair_(host, port), privacy_mode_(net::PRIVACY_MODE_DISABLED) {}
 
 QuicServerId::QuicServerId(const QuicString& host,
                            uint16_t port,
-                           PrivacyMode privacy_mode)
+                           net::PrivacyMode privacy_mode)
     : host_port_pair_(host, port), privacy_mode_(privacy_mode) {}
 
 QuicServerId::~QuicServerId() {}
@@ -39,12 +39,13 @@
 }
 
 QuicString QuicServerId::ToString() const {
-  return QuicStrCat("https://", host_port_pair_.ToString(),
-                    (privacy_mode_ == PRIVACY_MODE_ENABLED ? "/private" : ""));
+  return QuicStrCat(
+      "https://", host_port_pair_.ToString(),
+      (privacy_mode_ == net::PRIVACY_MODE_ENABLED ? "/private" : ""));
 }
 
 size_t QuicServerId::EstimateMemoryUsage() const {
   return QuicEstimateMemoryUsage(host_port_pair_);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_server_id.h b/net/third_party/quic/core/quic_server_id.h
index 39033347..5368de2 100644
--- a/net/third_party/quic/core/quic_server_id.h
+++ b/net/third_party/quic/core/quic_server_id.h
@@ -12,16 +12,19 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // The id used to identify sessions. Includes the hostname, port, scheme and
 // privacy_mode.
 class QUIC_EXPORT_PRIVATE QuicServerId {
  public:
   QuicServerId();
-  QuicServerId(const HostPortPair& host_port_pair, PrivacyMode privacy_mode);
+  QuicServerId(const net::HostPortPair& host_port_pair,
+               net::PrivacyMode privacy_mode);
   QuicServerId(const QuicString& host, uint16_t port);
-  QuicServerId(const QuicString& host, uint16_t port, PrivacyMode privacy_mode);
+  QuicServerId(const QuicString& host,
+               uint16_t port,
+               net::PrivacyMode privacy_mode);
   ~QuicServerId();
 
   // Needed to be an element of std::set.
@@ -33,21 +36,21 @@
   QuicString ToString() const;
 
   // Used in Chromium, but not internally.
-  const HostPortPair& host_port_pair() const { return host_port_pair_; }
+  const net::HostPortPair& host_port_pair() const { return host_port_pair_; }
 
   const QuicString& host() const { return host_port_pair_.host(); }
 
   uint16_t port() const { return host_port_pair_.port(); }
 
-  PrivacyMode privacy_mode() const { return privacy_mode_; }
+  net::PrivacyMode privacy_mode() const { return privacy_mode_; }
 
   size_t EstimateMemoryUsage() const;
 
  private:
-  HostPortPair host_port_pair_;
-  PrivacyMode privacy_mode_;
+  net::HostPortPair host_port_pair_;
+  net::PrivacyMode privacy_mode_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SERVER_ID_H_
diff --git a/net/third_party/quic/core/quic_server_id_test.cc b/net/third_party/quic/core/quic_server_id_test.cc
index 9dc4a46..1d6006a 100644
--- a/net/third_party/quic/core/quic_server_id_test.cc
+++ b/net/third_party/quic/core/quic_server_id_test.cc
@@ -8,48 +8,56 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
 class QuicServerIdTest : public QuicTest {};
 
 TEST_F(QuicServerIdTest, ToString) {
-  HostPortPair google_host_port_pair("google.com", 10);
+  net::HostPortPair google_host_port_pair("google.com", 10);
 
-  QuicServerId google_server_id(google_host_port_pair, PRIVACY_MODE_DISABLED);
+  QuicServerId google_server_id(google_host_port_pair,
+                                net::PRIVACY_MODE_DISABLED);
   QuicString google_server_id_str = google_server_id.ToString();
   EXPECT_EQ("https://google.com:10", google_server_id_str);
 
-  QuicServerId private_server_id(google_host_port_pair, PRIVACY_MODE_ENABLED);
+  QuicServerId private_server_id(google_host_port_pair,
+                                 net::PRIVACY_MODE_ENABLED);
   QuicString private_server_id_str = private_server_id.ToString();
   EXPECT_EQ("https://google.com:10/private", private_server_id_str);
 }
 
 TEST_F(QuicServerIdTest, HostPortPair) {
-  HostPortPair google_host_port_pair("google.com", 10);
+  net::HostPortPair google_host_port_pair("google.com", 10);
 
-  QuicServerId google_server_id(google_host_port_pair, PRIVACY_MODE_DISABLED);
+  QuicServerId google_server_id(google_host_port_pair,
+                                net::PRIVACY_MODE_DISABLED);
   EXPECT_TRUE(google_host_port_pair.Equals(google_server_id.host_port_pair()));
 
-  QuicServerId private_server_id(google_host_port_pair, PRIVACY_MODE_ENABLED);
+  QuicServerId private_server_id(google_host_port_pair,
+                                 net::PRIVACY_MODE_ENABLED);
   EXPECT_TRUE(google_host_port_pair.Equals(private_server_id.host_port_pair()));
 }
 
 TEST_F(QuicServerIdTest, LessThan) {
-  QuicServerId a_10_https(HostPortPair("a.com", 10), PRIVACY_MODE_DISABLED);
-  QuicServerId a_11_https(HostPortPair("a.com", 11), PRIVACY_MODE_DISABLED);
-  QuicServerId b_10_https(HostPortPair("b.com", 10), PRIVACY_MODE_DISABLED);
-  QuicServerId b_11_https(HostPortPair("b.com", 11), PRIVACY_MODE_DISABLED);
+  QuicServerId a_10_https(net::HostPortPair("a.com", 10),
+                          net::PRIVACY_MODE_DISABLED);
+  QuicServerId a_11_https(net::HostPortPair("a.com", 11),
+                          net::PRIVACY_MODE_DISABLED);
+  QuicServerId b_10_https(net::HostPortPair("b.com", 10),
+                          net::PRIVACY_MODE_DISABLED);
+  QuicServerId b_11_https(net::HostPortPair("b.com", 11),
+                          net::PRIVACY_MODE_DISABLED);
 
-  QuicServerId a_10_https_private(HostPortPair("a.com", 10),
-                                  PRIVACY_MODE_ENABLED);
-  QuicServerId a_11_https_private(HostPortPair("a.com", 11),
-                                  PRIVACY_MODE_ENABLED);
-  QuicServerId b_10_https_private(HostPortPair("b.com", 10),
-                                  PRIVACY_MODE_ENABLED);
-  QuicServerId b_11_https_private(HostPortPair("b.com", 11),
-                                  PRIVACY_MODE_ENABLED);
+  QuicServerId a_10_https_private(net::HostPortPair("a.com", 10),
+                                  net::PRIVACY_MODE_ENABLED);
+  QuicServerId a_11_https_private(net::HostPortPair("a.com", 11),
+                                  net::PRIVACY_MODE_ENABLED);
+  QuicServerId b_10_https_private(net::HostPortPair("b.com", 10),
+                                  net::PRIVACY_MODE_ENABLED);
+  QuicServerId b_11_https_private(net::HostPortPair("b.com", 11),
+                                  net::PRIVACY_MODE_ENABLED);
 
   // Test combinations of host, port, and privacy being same on left and
   // right side of less than.
@@ -60,27 +68,27 @@
 
   // Test with either host, port or https being different on left and right side
   // of less than.
-  PrivacyMode left_privacy;
-  PrivacyMode right_privacy;
+  net::PrivacyMode left_privacy;
+  net::PrivacyMode right_privacy;
   for (int i = 0; i < 4; i++) {
-    left_privacy = static_cast<PrivacyMode>(i / 2);
-    right_privacy = static_cast<PrivacyMode>(i % 2);
-    QuicServerId a_10_https_left_private(HostPortPair("a.com", 10),
+    left_privacy = static_cast<net::PrivacyMode>(i / 2);
+    right_privacy = static_cast<net::PrivacyMode>(i % 2);
+    QuicServerId a_10_https_left_private(net::HostPortPair("a.com", 10),
                                          left_privacy);
-    QuicServerId a_10_https_right_private(HostPortPair("a.com", 10),
+    QuicServerId a_10_https_right_private(net::HostPortPair("a.com", 10),
                                           right_privacy);
-    QuicServerId a_11_https_left_private(HostPortPair("a.com", 11),
+    QuicServerId a_11_https_left_private(net::HostPortPair("a.com", 11),
                                          left_privacy);
-    QuicServerId a_11_https_right_private(HostPortPair("a.com", 11),
+    QuicServerId a_11_https_right_private(net::HostPortPair("a.com", 11),
                                           right_privacy);
 
-    QuicServerId b_10_https_left_private(HostPortPair("b.com", 10),
+    QuicServerId b_10_https_left_private(net::HostPortPair("b.com", 10),
                                          left_privacy);
-    QuicServerId b_10_https_right_private(HostPortPair("b.com", 10),
+    QuicServerId b_10_https_right_private(net::HostPortPair("b.com", 10),
                                           right_privacy);
-    QuicServerId b_11_https_left_private(HostPortPair("b.com", 11),
+    QuicServerId b_11_https_left_private(net::HostPortPair("b.com", 11),
                                          left_privacy);
-    QuicServerId b_11_https_right_private(HostPortPair("b.com", 11),
+    QuicServerId b_11_https_right_private(net::HostPortPair("b.com", 11),
                                           right_privacy);
 
     EXPECT_TRUE(a_10_https_left_private < a_11_https_right_private);
@@ -99,26 +107,26 @@
 }
 
 TEST_F(QuicServerIdTest, Equals) {
-  PrivacyMode left_privacy;
-  PrivacyMode right_privacy;
+  net::PrivacyMode left_privacy;
+  net::PrivacyMode right_privacy;
   for (int i = 0; i < 2; i++) {
-    left_privacy = right_privacy = static_cast<PrivacyMode>(i);
-    QuicServerId a_10_https_right_private(HostPortPair("a.com", 10),
+    left_privacy = right_privacy = static_cast<net::PrivacyMode>(i);
+    QuicServerId a_10_https_right_private(net::HostPortPair("a.com", 10),
                                           right_privacy);
-    QuicServerId a_11_https_right_private(HostPortPair("a.com", 11),
+    QuicServerId a_11_https_right_private(net::HostPortPair("a.com", 11),
                                           right_privacy);
-    QuicServerId b_10_https_right_private(HostPortPair("b.com", 10),
+    QuicServerId b_10_https_right_private(net::HostPortPair("b.com", 10),
                                           right_privacy);
-    QuicServerId b_11_https_right_private(HostPortPair("b.com", 11),
+    QuicServerId b_11_https_right_private(net::HostPortPair("b.com", 11),
                                           right_privacy);
 
-    QuicServerId new_a_10_https_left_private(HostPortPair("a.com", 10),
+    QuicServerId new_a_10_https_left_private(net::HostPortPair("a.com", 10),
                                              left_privacy);
-    QuicServerId new_a_11_https_left_private(HostPortPair("a.com", 11),
+    QuicServerId new_a_11_https_left_private(net::HostPortPair("a.com", 11),
                                              left_privacy);
-    QuicServerId new_b_10_https_left_private(HostPortPair("b.com", 10),
+    QuicServerId new_b_10_https_left_private(net::HostPortPair("b.com", 10),
                                              left_privacy);
-    QuicServerId new_b_11_https_left_private(HostPortPair("b.com", 11),
+    QuicServerId new_b_11_https_left_private(net::HostPortPair("b.com", 11),
                                              left_privacy);
 
     EXPECT_EQ(new_a_10_https_left_private, a_10_https_right_private);
@@ -128,37 +136,38 @@
   }
 
   for (int i = 0; i < 2; i++) {
-    right_privacy = static_cast<PrivacyMode>(i);
-    QuicServerId a_10_https_right_private(HostPortPair("a.com", 10),
+    right_privacy = static_cast<net::PrivacyMode>(i);
+    QuicServerId a_10_https_right_private(net::HostPortPair("a.com", 10),
                                           right_privacy);
-    QuicServerId a_11_https_right_private(HostPortPair("a.com", 11),
+    QuicServerId a_11_https_right_private(net::HostPortPair("a.com", 11),
                                           right_privacy);
-    QuicServerId b_10_https_right_private(HostPortPair("b.com", 10),
+    QuicServerId b_10_https_right_private(net::HostPortPair("b.com", 10),
                                           right_privacy);
-    QuicServerId b_11_https_right_private(HostPortPair("b.com", 11),
+    QuicServerId b_11_https_right_private(net::HostPortPair("b.com", 11),
                                           right_privacy);
 
-    QuicServerId new_a_10_https_left_private(HostPortPair("a.com", 10),
-                                             PRIVACY_MODE_DISABLED);
+    QuicServerId new_a_10_https_left_private(net::HostPortPair("a.com", 10),
+                                             net::PRIVACY_MODE_DISABLED);
 
     EXPECT_FALSE(new_a_10_https_left_private == a_11_https_right_private);
     EXPECT_FALSE(new_a_10_https_left_private == b_10_https_right_private);
     EXPECT_FALSE(new_a_10_https_left_private == b_11_https_right_private);
   }
-  QuicServerId a_10_https_private(HostPortPair("a.com", 10),
-                                  PRIVACY_MODE_ENABLED);
-  QuicServerId new_a_10_https_no_private(HostPortPair("a.com", 10),
-                                         PRIVACY_MODE_DISABLED);
+  QuicServerId a_10_https_private(net::HostPortPair("a.com", 10),
+                                  net::PRIVACY_MODE_ENABLED);
+  QuicServerId new_a_10_https_no_private(net::HostPortPair("a.com", 10),
+                                         net::PRIVACY_MODE_DISABLED);
   EXPECT_FALSE(new_a_10_https_no_private == a_10_https_private);
 }
 
 TEST_F(QuicServerIdTest, EstimateMemoryUsage) {
-  HostPortPair host_port_pair("this is a rather very quite long hostname", 10);
-  QuicServerId server_id(host_port_pair, PRIVACY_MODE_ENABLED);
+  net::HostPortPair host_port_pair("this is a rather very quite long hostname",
+                                   10);
+  QuicServerId server_id(host_port_pair, net::PRIVACY_MODE_ENABLED);
   EXPECT_EQ(QuicEstimateMemoryUsage(host_port_pair),
             QuicEstimateMemoryUsage(server_id));
 }
 
 }  // namespace
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_server_session_base.cc b/net/third_party/quic/core/quic_server_session_base.cc
index 4840823..e9838213 100644
--- a/net/third_party/quic/core/quic_server_session_base.cc
+++ b/net/third_party/quic/core/quic_server_session_base.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 QuicServerSessionBase::QuicServerSessionBase(
     const QuicConfig& config,
@@ -242,4 +242,4 @@
               : static_cast<int32_t>(bytes_per_second));
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_server_session_base.h b/net/third_party/quic/core/quic_server_session_base.h
index 820f801..dae10a4 100644
--- a/net/third_party/quic/core/quic_server_session_base.h
+++ b/net/third_party/quic/core/quic_server_session_base.h
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class QuicConfig;
 class QuicConnection;
@@ -133,6 +133,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicServerSessionBase);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SERVER_SESSION_BASE_H_
diff --git a/net/third_party/quic/core/quic_server_session_base_test.cc b/net/third_party/quic/core/quic_server_session_base_test.cc
index ed08c00..ca6af2a 100644
--- a/net/third_party/quic/core/quic_server_session_base_test.cc
+++ b/net/third_party/quic/core/quic_server_session_base_test.cc
@@ -41,7 +41,7 @@
 using testing::_;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicServerSessionBasePeer {
@@ -652,4 +652,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_session.cc b/net/third_party/quic/core/quic_session.cc
index f912c7c..0a9b105 100644
--- a/net/third_party/quic/core/quic_session.cc
+++ b/net/third_party/quic/core/quic_session.cc
@@ -19,7 +19,7 @@
 
 using spdy::SpdyPriority;
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -1227,4 +1227,4 @@
   return connection_->session_decides_what_to_write();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_session.h b/net/third_party/quic/core/quic_session.h
index 9bc53508..c2c45bf 100644
--- a/net/third_party/quic/core/quic_session.h
+++ b/net/third_party/quic/core/quic_session.h
@@ -28,7 +28,7 @@
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class QuicCryptoStream;
 class QuicFlowController;
@@ -555,6 +555,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSession);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SESSION_H_
diff --git a/net/third_party/quic/core/quic_session_test.cc b/net/third_party/quic/core/quic_session_test.cc
index 0fedab8..0b5616c 100644
--- a/net/third_party/quic/core/quic_session_test.cc
+++ b/net/third_party/quic/core/quic_session_test.cc
@@ -44,7 +44,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -1402,4 +1402,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_simple_buffer_allocator.cc b/net/third_party/quic/core/quic_simple_buffer_allocator.cc
index d8a2639..d434f403 100644
--- a/net/third_party/quic/core/quic_simple_buffer_allocator.cc
+++ b/net/third_party/quic/core/quic_simple_buffer_allocator.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/quic_simple_buffer_allocator.h"
 
-namespace net {
+namespace quic {
 
 char* SimpleBufferAllocator::New(size_t size) {
   return new char[size];
@@ -18,4 +18,4 @@
   delete[] buffer;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_simple_buffer_allocator.h b/net/third_party/quic/core/quic_simple_buffer_allocator.h
index ed1e628..b9c79b5 100644
--- a/net/third_party/quic/core/quic_simple_buffer_allocator.h
+++ b/net/third_party/quic/core/quic_simple_buffer_allocator.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_buffer_allocator.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE SimpleBufferAllocator : public QuicBufferAllocator {
  public:
@@ -17,6 +17,6 @@
   void Delete(char* buffer) override;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SIMPLE_BUFFER_ALLOCATOR_H_
diff --git a/net/third_party/quic/core/quic_simple_buffer_allocator_test.cc b/net/third_party/quic/core/quic_simple_buffer_allocator_test.cc
index e2e02ac..eb76131 100644
--- a/net/third_party/quic/core/quic_simple_buffer_allocator_test.cc
+++ b/net/third_party/quic/core/quic_simple_buffer_allocator_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace {
 
 class SimpleBufferAllocatorTest : public QuicTest {};
@@ -25,4 +25,4 @@
 }
 
 }  // namespace
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_socket_address_coder.cc b/net/third_party/quic/core/quic_socket_address_coder.cc
index 3cbaa29..1f56711 100644
--- a/net/third_party/quic/core/quic_socket_address_coder.cc
+++ b/net/third_party/quic/core/quic_socket_address_coder.cc
@@ -5,7 +5,7 @@
 #include "net/third_party/quic/core/quic_socket_address_coder.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -84,4 +84,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_socket_address_coder.h b/net/third_party/quic/core/quic_socket_address_coder.h
index 0afd722..6894079d 100644
--- a/net/third_party/quic/core/quic_socket_address_coder.h
+++ b/net/third_party/quic/core/quic_socket_address_coder.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // Serializes and parses a socket address (IP address and port), to be used in
 // the kCADR tag in the ServerHello handshake message and the Public Reset
@@ -37,6 +37,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSocketAddressCoder);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SOCKET_ADDRESS_CODER_H_
diff --git a/net/third_party/quic/core/quic_socket_address_coder_test.cc b/net/third_party/quic/core/quic_socket_address_coder_test.cc
index 109cf89f..fa5d811c 100644
--- a/net/third_party/quic/core/quic_socket_address_coder_test.cc
+++ b/net/third_party/quic/core/quic_socket_address_coder_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicSocketAddressCoderTest : public QuicTest {};
@@ -124,4 +124,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_client_session.cc b/net/third_party/quic/core/quic_spdy_client_session.cc
index 4477d7c..fae3e83 100644
--- a/net/third_party/quic/core/quic_spdy_client_session.cc
+++ b/net/third_party/quic/core/quic_spdy_client_session.cc
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_ptr_util.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicSpdyClientSession::QuicSpdyClientSession(
     const QuicConfig& config,
@@ -129,7 +129,8 @@
 std::unique_ptr<QuicCryptoClientStreamBase>
 QuicSpdyClientSession::CreateQuicCryptoStream() {
   return QuicMakeUnique<QuicCryptoClientStream>(
-      server_id_, this, new ProofVerifyContextChromium(0, NetLogWithSource()),
+      server_id_, this,
+      new net::ProofVerifyContextChromium(0, net::NetLogWithSource()),
       crypto_config_, this);
 }
 
@@ -137,4 +138,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_client_session.h b/net/third_party/quic/core/quic_spdy_client_session.h
index 2044784..8a3b1ed 100644
--- a/net/third_party/quic/core/quic_spdy_client_session.h
+++ b/net/third_party/quic/core/quic_spdy_client_session.h
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/core/quic_spdy_client_stream.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class QuicConnection;
 class QuicServerId;
@@ -93,6 +93,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientSession);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SPDY_CLIENT_SESSION_H_
diff --git a/net/third_party/quic/core/quic_spdy_client_session_base.cc b/net/third_party/quic/core/quic_spdy_client_session_base.cc
index 66bbbf0..3145fc0 100644
--- a/net/third_party/quic/core/quic_spdy_client_session_base.cc
+++ b/net/third_party/quic/core/quic_spdy_client_session_base.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_logging.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicSpdyClientSessionBase::QuicSpdyClientSessionBase(
     QuicConnection* connection,
@@ -188,4 +188,4 @@
   return num_active_requests() == 0 && promised_by_id_.empty();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_client_session_base.h b/net/third_party/quic/core/quic_spdy_client_session_base.h
index e79c189..a97ff63 100644
--- a/net/third_party/quic/core/quic_spdy_client_session_base.h
+++ b/net/third_party/quic/core/quic_spdy_client_session_base.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class QuicClientPromisedInfo;
 class QuicClientPushPromiseIndex;
@@ -133,6 +133,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientSessionBase);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SPDY_CLIENT_SESSION_BASE_H_
diff --git a/net/third_party/quic/core/quic_spdy_client_session_test.cc b/net/third_party/quic/core/quic_spdy_client_session_test.cc
index d351eae..03a3f4f 100644
--- a/net/third_party/quic/core/quic_spdy_client_session_test.cc
+++ b/net/third_party/quic/core/quic_spdy_client_session_test.cc
@@ -30,7 +30,7 @@
 using testing::Invoke;
 using testing::Truly;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -89,7 +89,7 @@
                                              SupportedVersions(GetParam()));
     session_ = QuicMakeUnique<TestQuicSpdyClientSession>(
         DefaultQuicConfig(), connection_,
-        QuicServerId(kServerHostname, kPort, PRIVACY_MODE_DISABLED),
+        QuicServerId(kServerHostname, kPort, net::PRIVACY_MODE_DISABLED),
         &crypto_config_, &push_promise_index_);
     session_->Initialize();
     push_promise_[":path"] = "/bar";
@@ -644,4 +644,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_client_stream.cc b/net/third_party/quic/core/quic_spdy_client_stream.cc
index e8cc7d6..88517ba2 100644
--- a/net/third_party/quic/core/quic_spdy_client_stream.cc
+++ b/net/third_party/quic/core/quic_spdy_client_stream.cc
@@ -15,7 +15,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 QuicSpdyClientStream::QuicSpdyClientStream(QuicStreamId id,
                                            QuicSpdyClientSession* session)
@@ -145,4 +145,4 @@
   return bytes_sent;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_client_stream.h b/net/third_party/quic/core/quic_spdy_client_stream.h
index 1605c6d..9710404 100644
--- a/net/third_party/quic/core/quic_spdy_client_stream.h
+++ b/net/third_party/quic/core/quic_spdy_client_stream.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/spdy/core/spdy_framer.h"
 
-namespace net {
+namespace quic {
 
 class QuicSpdyClientSession;
 
@@ -92,6 +92,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SPDY_CLIENT_STREAM_H_
diff --git a/net/third_party/quic/core/quic_spdy_client_stream_test.cc b/net/third_party/quic/core/quic_spdy_client_stream_test.cc
index c5208ae..001fde09 100644
--- a/net/third_party/quic/core/quic_spdy_client_stream_test.cc
+++ b/net/third_party/quic/core/quic_spdy_client_stream_test.cc
@@ -25,7 +25,7 @@
 using testing::_;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 
 namespace {
@@ -38,7 +38,7 @@
       : QuicSpdyClientSession(
             DefaultQuicConfig(),
             connection,
-            QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED),
+            QuicServerId("example.com", 443, net::PRIVACY_MODE_DISABLED),
             &crypto_config_,
             push_promise_index),
         crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
@@ -188,4 +188,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_server_stream_base.cc b/net/third_party/quic/core/quic_spdy_server_stream_base.cc
index d6e401f..8ac9c6a 100644
--- a/net/third_party/quic/core/quic_spdy_server_stream_base.cc
+++ b/net/third_party/quic/core/quic_spdy_server_stream_base.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/quic_error_codes.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 QuicSpdyServerStreamBase::QuicSpdyServerStreamBase(QuicStreamId id,
                                                    QuicSpdySession* session)
@@ -38,4 +38,4 @@
   QuicSpdyStream::StopReading();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_server_stream_base.h b/net/third_party/quic/core/quic_spdy_server_stream_base.h
index e6a00435..74c7fa4 100644
--- a/net/third_party/quic/core/quic_spdy_server_stream_base.h
+++ b/net/third_party/quic/core/quic_spdy_server_stream_base.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/core/quic_spdy_stream.h"
 
-namespace net {
+namespace quic {
 
 class QuicSpdyServerStreamBase : public QuicSpdyStream {
  public:
@@ -22,6 +22,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSpdyServerStreamBase);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SPDY_SERVER_STREAM_BASE_H_
diff --git a/net/third_party/quic/core/quic_spdy_server_stream_base_test.cc b/net/third_party/quic/core/quic_spdy_server_stream_base_test.cc
index b7fe427..032914a 100644
--- a/net/third_party/quic/core/quic_spdy_server_stream_base_test.cc
+++ b/net/third_party/quic/core/quic_spdy_server_stream_base_test.cc
@@ -11,7 +11,7 @@
 
 using testing::_;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -65,4 +65,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_session.cc b/net/third_party/quic/core/quic_spdy_session.cc
index 660927c..1428b61 100644
--- a/net/third_party/quic/core/quic_spdy_session.cc
+++ b/net/third_party/quic/core/quic_spdy_session.cc
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 #include "net/third_party/spdy/core/http2_frame_decoder_adapter.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -625,4 +625,4 @@
       error, details, ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_session.h b/net/third_party/quic/core/quic_spdy_session.h
index 1fe98d94..4025fff 100644
--- a/net/third_party/quic/core/quic_spdy_session.h
+++ b/net/third_party/quic/core/quic_spdy_session.h
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/spdy/core/http2_frame_decoder_adapter.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicSpdySessionPeer;
@@ -259,6 +259,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSpdySession);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SPDY_SESSION_H_
diff --git a/net/third_party/quic/core/quic_spdy_session_test.cc b/net/third_party/quic/core/quic_spdy_session_test.cc
index 628b332..4fbe7f2 100644
--- a/net/third_party/quic/core/quic_spdy_session_test.cc
+++ b/net/third_party/quic/core/quic_spdy_session_test.cc
@@ -45,7 +45,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -1596,4 +1596,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_stream.cc b/net/third_party/quic/core/quic_spdy_stream.cc
index 4a60a7d..6550d24 100644
--- a/net/third_party/quic/core/quic_spdy_stream.cc
+++ b/net/third_party/quic/core/quic_spdy_stream.cc
@@ -19,7 +19,7 @@
 
 using base::IntToString;
 
-namespace net {
+namespace quic {
 #define ENDPOINT                                                   \
   (session()->perspective() == Perspective::IS_SERVER ? "Server: " \
                                                       : "Client:"  \
@@ -302,4 +302,4 @@
   spdy_session_ = nullptr;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_spdy_stream.h b/net/third_party/quic/core/quic_spdy_stream.h
index 259b3b913..0ebe198 100644
--- a/net/third_party/quic/core/quic_spdy_stream.h
+++ b/net/third_party/quic/core/quic_spdy_stream.h
@@ -26,7 +26,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/spdy/core/spdy_framer.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicSpdyStreamPeer;
@@ -204,6 +204,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSpdyStream);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SPDY_STREAM_H_
diff --git a/net/third_party/quic/core/quic_spdy_stream_test.cc b/net/third_party/quic/core/quic_spdy_stream_test.cc
index 2f36c1d..03765aa8 100644
--- a/net/third_party/quic/core/quic_spdy_stream_test.cc
+++ b/net/third_party/quic/core/quic_spdy_stream_test.cc
@@ -30,7 +30,7 @@
 using testing::StrictMock;
 using testing::_;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -1064,4 +1064,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_stream.cc b/net/third_party/quic/core/quic_stream.cc
index 522f710..ec22f35 100644
--- a/net/third_party/quic/core/quic_stream.cc
+++ b/net/third_party/quic/core/quic_stream.cc
@@ -15,7 +15,7 @@
 
 using spdy::SpdyPriority;
 
-namespace net {
+namespace quic {
 
 #define ENDPOINT \
   (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ")
@@ -850,4 +850,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_stream.h b/net/third_party/quic/core/quic_stream.h
index a563391f..3b7215d9 100644
--- a/net/third_party/quic/core/quic_stream.h
+++ b/net/third_party/quic/core/quic_stream.h
@@ -36,7 +36,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/spdy/core/spdy_protocol.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicStreamPeer;
@@ -438,6 +438,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicStream);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_STREAM_H_
diff --git a/net/third_party/quic/core/quic_stream_frame_data_producer.h b/net/third_party/quic/core/quic_stream_frame_data_producer.h
index 625bcff..c504b58 100644
--- a/net/third_party/quic/core/quic_stream_frame_data_producer.h
+++ b/net/third_party/quic/core/quic_stream_frame_data_producer.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/core/quic_types.h"
 
-namespace net {
+namespace quic {
 
 class QuicDataWriter;
 
@@ -26,6 +26,6 @@
                                QuicDataWriter* writer) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_STREAM_FRAME_DATA_PRODUCER_H_
diff --git a/net/third_party/quic/core/quic_stream_send_buffer.cc b/net/third_party/quic/core/quic_stream_send_buffer.cc
index 21ad8735..9667dd0 100644
--- a/net/third_party/quic/core/quic_stream_send_buffer.cc
+++ b/net/third_party/quic/core/quic_stream_send_buffer.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_flags.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -159,7 +159,7 @@
     is_disjoint =
         bytes_acked_.Empty() || offset >= bytes_acked_.rbegin()->max();
   }
-  if (is_disjoint || bytes_acked_.IsDisjoint(Interval<QuicStreamOffset>(
+  if (is_disjoint || bytes_acked_.IsDisjoint(net::Interval<QuicStreamOffset>(
                          offset, offset + data_length))) {
     // Optimization for the typical case, when all data is newly acked.
     if (stream_bytes_outstanding_ < data_length) {
@@ -311,4 +311,4 @@
   return buffered_slices_.size();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_stream_send_buffer.h b/net/third_party/quic/core/quic_stream_send_buffer.h
index c9f92319..03821d0 100644
--- a/net/third_party/quic/core/quic_stream_send_buffer.h
+++ b/net/third_party/quic/core/quic_stream_send_buffer.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_containers.h"
 #include "net/third_party/quic/platform/api/quic_mem_slice.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicStreamSendBufferPeer;
@@ -155,6 +155,6 @@
   int32_t write_index_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_STREAM_SEND_BUFFER_H_
diff --git a/net/third_party/quic/core/quic_stream_send_buffer_test.cc b/net/third_party/quic/core/quic_stream_send_buffer_test.cc
index e49ced0..cfc01db 100644
--- a/net/third_party/quic/core/quic_stream_send_buffer_test.cc
+++ b/net/third_party/quic/core/quic_stream_send_buffer_test.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/test_tools/quic_stream_send_buffer_peer.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -287,4 +287,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_stream_sequencer.cc b/net/third_party/quic/core/quic_stream_sequencer.cc
index 3a1db8ac..140103c 100644
--- a/net/third_party/quic/core/quic_stream_sequencer.cc
+++ b/net/third_party/quic/core/quic_stream_sequencer.cc
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 QuicStreamSequencer::QuicStreamSequencer(QuicStream* quic_stream)
     : stream_(quic_stream),
@@ -243,4 +243,4 @@
   // clang-format on
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_stream_sequencer.h b/net/third_party/quic/core/quic_stream_sequencer.h
index 6838211..e93d11b 100644
--- a/net/third_party/quic/core/quic_stream_sequencer.h
+++ b/net/third_party/quic/core/quic_stream_sequencer.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicStreamSequencerPeer;
@@ -156,6 +156,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencer);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_STREAM_SEQUENCER_H_
diff --git a/net/third_party/quic/core/quic_stream_sequencer_buffer.cc b/net/third_party/quic/core/quic_stream_sequencer_buffer.cc
index e4dd499..dd91e60 100644
--- a/net/third_party/quic/core/quic_stream_sequencer_buffer.cc
+++ b/net/third_party/quic/core/quic_stream_sequencer_buffer.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_str_cat.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 namespace {
 
 size_t CalculateBlockCount(size_t max_capacity_bytes) {
@@ -95,7 +95,7 @@
   if (GetQuicReloadableFlag(quic_fast_path_on_stream_data) &&
       (bytes_received_.Empty() ||
        starting_offset >= bytes_received_.rbegin()->max() ||
-       bytes_received_.IsDisjoint(Interval<QuicStreamOffset>(
+       bytes_received_.IsDisjoint(net::Interval<QuicStreamOffset>(
            starting_offset, starting_offset + size)))) {
     // Optimization for the typical case, when all data is newly received.
     QUIC_FLAG_COUNT(quic_reloadable_flag_quic_fast_path_on_stream_data);
@@ -104,7 +104,7 @@
       // Extend the right edge of last interval.
       // TODO(fayang): Encapsulate this into a future version of QuicIntervalSet
       // if this is more efficient than Add.
-      const_cast<Interval<QuicPacketNumber>*>(&(*bytes_received_.rbegin()))
+      const_cast<net::Interval<QuicPacketNumber>*>(&(*bytes_received_.rbegin()))
           ->SetMax(starting_offset + size);
     } else {
       bytes_received_.Add(starting_offset, starting_offset + size);
@@ -506,4 +506,4 @@
   return bytes_received_.rbegin()->max();
 }
 
-}  //  namespace net
+}  //  namespace quic
diff --git a/net/third_party/quic/core/quic_stream_sequencer_buffer.h b/net/third_party/quic/core/quic_stream_sequencer_buffer.h
index 44b4aab..e61c6a01 100644
--- a/net/third_party/quic/core/quic_stream_sequencer_buffer.h
+++ b/net/third_party/quic/core/quic_stream_sequencer_buffer.h
@@ -69,7 +69,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicStreamSequencerBufferPeer;
@@ -241,6 +241,6 @@
 
   DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer);
 };
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_STREAM_SEQUENCER_BUFFER_H_
diff --git a/net/third_party/quic/core/quic_stream_sequencer_buffer_test.cc b/net/third_party/quic/core/quic_stream_sequencer_buffer_test.cc
index 052e0ebf..e937c62 100644
--- a/net/third_party/quic/core/quic_stream_sequencer_buffer_test.cc
+++ b/net/third_party/quic/core/quic_stream_sequencer_buffer_test.cc
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 #include "testing/gmock_mutant.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -941,4 +941,4 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_stream_sequencer_test.cc b/net/third_party/quic/core/quic_stream_sequencer_test.cc
index 4ff0c8e..1b4b637 100644
--- a/net/third_party/quic/core/quic_stream_sequencer_test.cc
+++ b/net/third_party/quic/core/quic_stream_sequencer_test.cc
@@ -29,7 +29,7 @@
 using testing::AnyNumber;
 using testing::InSequence;
 
-namespace net {
+namespace quic {
 namespace test {
 
 class MockStream : public QuicStream {
@@ -653,4 +653,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_stream_test.cc b/net/third_party/quic/core/quic_stream_test.cc
index bd8e69ef..43b567f 100644
--- a/net/third_party/quic/core/quic_stream_test.cc
+++ b/net/third_party/quic/core/quic_stream_test.cc
@@ -37,7 +37,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -1281,4 +1281,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_sustained_bandwidth_recorder.cc b/net/third_party/quic/core/quic_sustained_bandwidth_recorder.cc
index 2b61b04..5273277 100644
--- a/net/third_party/quic/core/quic_sustained_bandwidth_recorder.cc
+++ b/net/third_party/quic/core/quic_sustained_bandwidth_recorder.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 QuicSustainedBandwidthRecorder::QuicSustainedBandwidthRecorder()
     : has_estimate_(false),
@@ -59,4 +59,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_sustained_bandwidth_recorder.h b/net/third_party/quic/core/quic_sustained_bandwidth_recorder.h
index e5dedcf9..73baa1d0 100644
--- a/net/third_party/quic/core/quic_sustained_bandwidth_recorder.h
+++ b/net/third_party/quic/core/quic_sustained_bandwidth_recorder.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicSustainedBandwidthRecorderPeer;
@@ -89,6 +89,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSustainedBandwidthRecorder);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_SUSTAINED_BANDWIDTH_RECORDER_H_
diff --git a/net/third_party/quic/core/quic_sustained_bandwidth_recorder_test.cc b/net/third_party/quic/core/quic_sustained_bandwidth_recorder_test.cc
index e490919..19f33c69 100644
--- a/net/third_party/quic/core/quic_sustained_bandwidth_recorder_test.cc
+++ b/net/third_party/quic/core/quic_sustained_bandwidth_recorder_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -130,4 +130,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_tag.cc b/net/third_party/quic/core/quic_tag.cc
index 72372f9..da339616 100644
--- a/net/third_party/quic/core/quic_tag.cc
+++ b/net/third_party/quic/core/quic_tag.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 
-namespace net {
+namespace quic {
 
 bool FindMutualQuicTag(const QuicTagVector& our_tags,
                        const QuicTagVector& their_tags,
@@ -67,4 +67,4 @@
   return base::ContainsValue(tag_vector, tag);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_tag.h b/net/third_party/quic/core/quic_tag.h
index f298664..02232b43 100644
--- a/net/third_party/quic/core/quic_tag.h
+++ b/net/third_party/quic/core/quic_tag.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // A QuicTag is a 32-bit used as identifiers in the QUIC handshake.  The use of
 // a uint32_t seeks to provide a balance between the tyranny of magic number
@@ -48,6 +48,6 @@
 // treat it as a number if not.
 QUIC_EXPORT_PRIVATE QuicString QuicTagToString(QuicTag tag);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_TAG_H_
diff --git a/net/third_party/quic/core/quic_tag_test.cc b/net/third_party/quic/core/quic_tag_test.cc
index e373bb7..c64ded94 100644
--- a/net/third_party/quic/core/quic_tag_test.cc
+++ b/net/third_party/quic/core/quic_tag_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/crypto/crypto_protocol.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -35,4 +35,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_time.cc b/net/third_party/quic/core/quic_time.cc
index 01bca0ce..4564c999 100644
--- a/net/third_party/quic/core/quic_time.cc
+++ b/net/third_party/quic/core/quic_time.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_str_cat.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicString QuicTime::Delta::ToDebugValue() const {
   const int64_t one_ms = 1000;
@@ -82,4 +82,4 @@
   return QuicWallTime(microseconds);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_time.h b/net/third_party/quic/core/quic_time.h
index 8d580b43..a1f46ac2 100644
--- a/net/third_party/quic/core/quic_time.h
+++ b/net/third_party/quic/core/quic_time.h
@@ -23,7 +23,7 @@
 
 #define QUICTIME_CONSTEXPR inline
 
-namespace net {
+namespace quic {
 
 class QuicClock;
 
@@ -269,6 +269,6 @@
   output << delta.ToDebugValue();
   return output;
 }
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_TIME_H_
diff --git a/net/third_party/quic/core/quic_time_test.cc b/net/third_party/quic/core/quic_time_test.cc
index 89c6642..74f2bbd 100644
--- a/net/third_party/quic/core/quic_time_test.cc
+++ b/net/third_party/quic/core/quic_time_test.cc
@@ -6,7 +6,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/mock_clock.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicTimeDeltaTest : public QuicTest {};
@@ -165,4 +165,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_time_wait_list_manager.cc b/net/third_party/quic/core/quic_time_wait_list_manager.cc
index da0f0c7..0f9980b 100644
--- a/net/third_party/quic/core/quic_time_wait_list_manager.cc
+++ b/net/third_party/quic/core/quic_time_wait_list_manager.cc
@@ -22,7 +22,7 @@
 #include "net/third_party/quic/platform/api/quic_ptr_util.h"
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -354,4 +354,4 @@
   return kStatelessResetToken;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_time_wait_list_manager.h b/net/third_party/quic/core/quic_time_wait_list_manager.h
index e7619bfe..994d93b 100644
--- a/net/third_party/quic/core/quic_time_wait_list_manager.h
+++ b/net/third_party/quic/core/quic_time_wait_list_manager.h
@@ -23,7 +23,7 @@
 #include "net/third_party/quic/platform/api/quic_containers.h"
 #include "net/third_party/quic/platform/api/quic_flags.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicDispatcherPeer;
@@ -219,6 +219,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_TIME_WAIT_LIST_MANAGER_H_
diff --git a/net/third_party/quic/core/quic_time_wait_list_manager_test.cc b/net/third_party/quic/core/quic_time_wait_list_manager_test.cc
index 630b8f25..ad1a7e6 100644
--- a/net/third_party/quic/core/quic_time_wait_list_manager_test.cc
+++ b/net/third_party/quic/core/quic_time_wait_list_manager_test.cc
@@ -37,7 +37,7 @@
 using testing::StrictMock;
 using testing::Truly;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -77,7 +77,8 @@
 class MockFakeTimeEpollServer : public FakeTimeEpollServer {
  public:
   MOCK_METHOD2(RegisterAlarm,
-               void(int64_t timeout_in_us, EpollAlarmCallbackInterface* alarm));
+               void(int64_t timeout_in_us,
+                    net::EpollAlarmCallbackInterface* alarm));
 };
 
 class QuicTimeWaitListManagerTest : public QuicTest {
@@ -135,8 +136,8 @@
   QuicEncryptedPacket* ConstructEncryptedPacket(
       QuicConnectionId connection_id,
       QuicPacketNumber packet_number) {
-    return net::test::ConstructEncryptedPacket(connection_id, false, false,
-                                               packet_number, "data");
+    return quic::test::ConstructEncryptedPacket(connection_id, false, false,
+                                                packet_number, "data");
   }
 
   NiceMock<MockFakeTimeEpollServer> epoll_server_;
@@ -523,4 +524,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_trace_visitor.cc b/net/third_party/quic/core/quic_trace_visitor.cc
index f466728..2f78836 100644
--- a/net/third_party/quic/core/quic_trace_visitor.cc
+++ b/net/third_party/quic/core/quic_trace_visitor.cc
@@ -8,7 +8,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 quic_trace::EncryptionLevel EncryptionLevelToProto(EncryptionLevel level) {
   switch (level) {
@@ -290,4 +290,4 @@
                                  .ToBitsPerSecond());
 }
 
-};  // namespace net
+};  // namespace quic
diff --git a/net/third_party/quic/core/quic_trace_visitor.h b/net/third_party/quic/core/quic_trace_visitor.h
index 3cfbf5dd..876776d9 100644
--- a/net/third_party/quic/core/quic_trace_visitor.h
+++ b/net/third_party/quic/core/quic_trace_visitor.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_connection.h"
 #include "net/third_party/quic/core/quic_types.h"
 
-namespace net {
+namespace quic {
 
 // Records a QUIC trace protocol buffer for a QuicConnection.  It's the
 // responsibility of the user of this visitor to process or store the resulting
@@ -60,6 +60,6 @@
   const QuicTime start_time_;
 };
 
-};  // namespace net
+};  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_TRACE_VISITOR_H_
diff --git a/net/third_party/quic/core/quic_trace_visitor_test.cc b/net/third_party/quic/core/quic_trace_visitor_test.cc
index f52308c..6e5c737 100644
--- a/net/third_party/quic/core/quic_trace_visitor_test.cc
+++ b/net/third_party/quic/core/quic_trace_visitor_test.cc
@@ -12,7 +12,7 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace {
 
 using std::string;
@@ -164,4 +164,4 @@
 }
 
 }  // namespace
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_transmission_info.cc b/net/third_party/quic/core/quic_transmission_info.cc
index 7bc6978..a4e3433 100644
--- a/net/third_party/quic/core/quic_transmission_info.cc
+++ b/net/third_party/quic/core/quic_transmission_info.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/quic_transmission_info.h"
 
-namespace net {
+namespace quic {
 
 QuicTransmissionInfo::QuicTransmissionInfo()
     : encryption_level(ENCRYPTION_NONE),
@@ -44,4 +44,4 @@
 
 QuicTransmissionInfo::~QuicTransmissionInfo() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_transmission_info.h b/net/third_party/quic/core/quic_transmission_info.h
index f8de24104..1d93be2 100644
--- a/net/third_party/quic/core/quic_transmission_info.h
+++ b/net/third_party/quic/core/quic_transmission_info.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/core/quic_types.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Stores details of a single sent packet.
 struct QUIC_EXPORT_PRIVATE QuicTransmissionInfo {
@@ -60,6 +60,6 @@
 // 64-bit iOS resulted in an 88-byte struct that is greater than the 84-byte
 // limit on other platforms.  Removing per ianswett's request.
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_TRANSMISSION_INFO_H_
diff --git a/net/third_party/quic/core/quic_types.cc b/net/third_party/quic/core/quic_types.cc
index 60e44dfa..5995e6c 100644
--- a/net/third_party/quic/core/quic_types.cc
+++ b/net/third_party/quic/core/quic_types.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/core/quic_types.h"
 
-namespace net {
+namespace quic {
 
 QuicConsumedData::QuicConsumedData(size_t bytes_consumed, bool fin_consumed)
     : bytes_consumed(bytes_consumed), fin_consumed(fin_consumed) {}
@@ -36,4 +36,4 @@
 WriteResult::WriteResult(WriteStatus status, int bytes_written_or_error_code)
     : status(status), bytes_written(bytes_written_or_error_code) {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_types.h b/net/third_party/quic/core/quic_types.h
index 1d0bf3b6..0f1ba436 100644
--- a/net/third_party/quic/core/quic_types.h
+++ b/net/third_party/quic/core/quic_types.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 typedef uint16_t QuicPacketLength;
 typedef uint32_t QuicControlFrameId;
@@ -456,6 +456,6 @@
   FLAGS_LONG_HEADER = 1 << 7,
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_TYPES_H_
diff --git a/net/third_party/quic/core/quic_unacked_packet_map.cc b/net/third_party/quic/core/quic_unacked_packet_map.cc
index 5792c16..4e034c90 100644
--- a/net/third_party/quic/core/quic_unacked_packet_map.cc
+++ b/net/third_party/quic/core/quic_unacked_packet_map.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_utils.h"
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 
-namespace net {
+namespace quic {
 
 QuicUnackedPacketMap::QuicUnackedPacketMap()
     : largest_sent_packet_(0),
@@ -400,4 +400,4 @@
   session_decides_what_to_write_ = session_decides_what_to_write;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_unacked_packet_map.h b/net/third_party/quic/core/quic_unacked_packet_map.h
index e8574bea..8729f04 100644
--- a/net/third_party/quic/core/quic_unacked_packet_map.h
+++ b/net/third_party/quic/core/quic_unacked_packet_map.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/core/session_notifier_interface.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Class which tracks unacked packets for three purposes:
 // 1) Track retransmittable data, including multiple transmissions of frames.
@@ -228,6 +228,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_UNACKED_PACKET_MAP_H_
diff --git a/net/third_party/quic/core/quic_unacked_packet_map_test.cc b/net/third_party/quic/core/quic_unacked_packet_map_test.cc
index 2808f6dd..76961a0 100644
--- a/net/third_party/quic/core/quic_unacked_packet_map_test.cc
+++ b/net/third_party/quic/core/quic_unacked_packet_map_test.cc
@@ -13,7 +13,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -487,4 +487,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_utils.cc b/net/third_party/quic/core/quic_utils.cc
index 14c85dc..f26f6ab2 100644
--- a/net/third_party/quic/core/quic_utils.cc
+++ b/net/third_party/quic/core/quic_utils.cc
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_uint128.h"
 
-namespace net {
+namespace quic {
 namespace {
 
 // We know that >= GCC 4.8 and Clang have a __uint128_t intrinsic. Other
@@ -321,4 +321,4 @@
          !(first_byte & FLAGS_DEMULTIPLEXING_BIT);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_utils.h b/net/third_party/quic/core/quic_utils.h
index 9f51be0..2aa3f14 100644
--- a/net/third_party/quic/core/quic_utils.h
+++ b/net/third_party/quic/core/quic_utils.h
@@ -18,7 +18,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/api/quic_uint128.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicUtils {
  public:
@@ -92,6 +92,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicUtils);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_UTILS_H_
diff --git a/net/third_party/quic/core/quic_utils_test.cc b/net/third_party/quic/core/quic_utils_test.cc
index ed495ee..556fb38 100644
--- a/net/third_party/quic/core/quic_utils_test.cc
+++ b/net/third_party/quic/core/quic_utils_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -151,4 +151,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_version_manager.cc b/net/third_party/quic/core/quic_version_manager.cc
index 21aebe32..a84e4d8 100644
--- a/net/third_party/quic/core/quic_version_manager.cc
+++ b/net/third_party/quic/core/quic_version_manager.cc
@@ -10,7 +10,7 @@
 
 #include <algorithm>
 
-namespace net {
+namespace quic {
 
 QuicVersionManager::QuicVersionManager(
     ParsedQuicVersionVector supported_versions)
@@ -72,4 +72,4 @@
       quic_reloadable_flag_quic_version_manager_dedupe_transport_versions);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_version_manager.h b/net/third_party/quic/core/quic_version_manager.h
index 7bfa93c..8985fe28 100644
--- a/net/third_party/quic/core/quic_version_manager.h
+++ b/net/third_party/quic/core/quic_version_manager.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_versions.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Used to generate filtered supported versions based on flags.
 class QUIC_EXPORT_PRIVATE QuicVersionManager {
@@ -58,6 +58,6 @@
   QuicTransportVersionVector filtered_transport_versions_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_VERSION_MANAGER_H_
diff --git a/net/third_party/quic/core/quic_version_manager_test.cc b/net/third_party/quic/core/quic_version_manager_test.cc
index 5a1e877..4e9f516 100644
--- a/net/third_party/quic/core/quic_version_manager_test.cc
+++ b/net/third_party/quic/core/quic_version_manager_test.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -76,4 +76,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_versions.cc b/net/third_party/quic/core/quic_versions.cc
index 1493586..dd34630 100644
--- a/net/third_party/quic/core/quic_versions.cc
+++ b/net/third_party/quic/core/quic_versions.cc
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_logging.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 namespace {
 
 // Constructs a version label from the 4 bytes such that the on-the-wire
@@ -313,4 +313,4 @@
   return result;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_versions.h b/net/third_party/quic/core/quic_versions.h
index 81608a9..8dff7c8f 100644
--- a/net/third_party/quic/core/quic_versions.h
+++ b/net/third_party/quic/core/quic_versions.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // The available versions of QUIC. Guaranteed that the integer value of the enum
 // will match the version number.
@@ -238,6 +238,6 @@
                                          std::numeric_limits<size_t>::max());
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_VERSIONS_H_
diff --git a/net/third_party/quic/core/quic_versions_test.cc b/net/third_party/quic/core/quic_versions_test.cc
index ef9cc61..5ba67b6 100644
--- a/net/third_party/quic/core/quic_versions_test.cc
+++ b/net/third_party/quic/core/quic_versions_test.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -547,7 +547,7 @@
 // yet a typo was made in doing the #defines and it was caught
 // only in some test far removed from here... Better safe than sorry.
 TEST_F(QuicVersionsTest, CheckVersionNumbersForTypos) {
-  static_assert(QUIC_ARRAYSIZE(net::kSupportedTransportVersions) == 8u,
+  static_assert(QUIC_ARRAYSIZE(kSupportedTransportVersions) == 8u,
                 "Supported versions out of sync");
   EXPECT_EQ(QUIC_VERSION_35, 35);
   EXPECT_EQ(QUIC_VERSION_37, 37);
@@ -560,4 +560,4 @@
 }
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_write_blocked_list.cc b/net/third_party/quic/core/quic_write_blocked_list.cc
index 52122da5..00a94dc79c 100644
--- a/net/third_party/quic/core/quic_write_blocked_list.cc
+++ b/net/third_party/quic/core/quic_write_blocked_list.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/platform/api/quic_flag_utils.h"
 #include "net/third_party/quic/platform/api/quic_flags.h"
 
-namespace net {
+namespace quic {
 
 QuicWriteBlockedList::QuicWriteBlockedList(bool register_static_streams)
     : last_priority_popped_(0),
@@ -23,4 +23,4 @@
 
 QuicWriteBlockedList::~QuicWriteBlockedList() {}
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/quic_write_blocked_list.h b/net/third_party/quic/core/quic_write_blocked_list.h
index 59e9ee8..2ea9db7 100644
--- a/net/third_party/quic/core/quic_write_blocked_list.h
+++ b/net/third_party/quic/core/quic_write_blocked_list.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_map_util.h"
 #include "net/third_party/spdy/core/priority_write_scheduler.h"
 
-namespace net {
+namespace quic {
 
 // Keeps tracks of the QUIC streams that have data to write, sorted by
 // priority.  QUIC stream priority order is:
@@ -261,6 +261,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicWriteBlockedList);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_QUIC_WRITE_BLOCKED_LIST_H_
diff --git a/net/third_party/quic/core/quic_write_blocked_list_test.cc b/net/third_party/quic/core/quic_write_blocked_list_test.cc
index 4f5a51b..b3a26bc 100644
--- a/net/third_party/quic/core/quic_write_blocked_list_test.cc
+++ b/net/third_party/quic/core/quic_write_blocked_list_test.cc
@@ -10,7 +10,7 @@
 // using spdy::kV3HighestPriority;
 // using spdy::kV3LowestPriority;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -241,4 +241,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/session_notifier_interface.h b/net/third_party/quic/core/session_notifier_interface.h
index 6de7161..80159e8 100644
--- a/net/third_party/quic/core/session_notifier_interface.h
+++ b/net/third_party/quic/core/session_notifier_interface.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/frames/quic_frame.h"
 #include "net/third_party/quic/core/quic_time.h"
 
-namespace net {
+namespace quic {
 
 // Pure virtual class to be notified when a packet containing a frame is acked
 // or lost.
@@ -38,6 +38,6 @@
   virtual bool HasPendingCryptoData() const = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_SESSION_NOTIFIER_INTERFACE_H_
diff --git a/net/third_party/quic/core/spdy_utils.cc b/net/third_party/quic/core/spdy_utils.cc
index 80b9039..2018cda9 100644
--- a/net/third_party/quic/core/spdy_utils.cc
+++ b/net/third_party/quic/core/spdy_utils.cc
@@ -19,7 +19,7 @@
 #include "net/third_party/spdy/core/spdy_framer.h"
 #include "net/third_party/spdy/core/spdy_protocol.h"
 
-namespace net {
+namespace quic {
 
 // static
 bool SpdyUtils::ExtractContentLengthFromHeaders(
@@ -216,4 +216,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/spdy_utils.h b/net/third_party/quic/core/spdy_utils.h
index 5a7d8f48..a207d26d 100644
--- a/net/third_party/quic/core/spdy_utils.h
+++ b/net/third_party/quic/core/spdy_utils.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/spdy/core/spdy_framer.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE SpdyUtils {
  public:
@@ -59,6 +59,6 @@
   DISALLOW_COPY_AND_ASSIGN(SpdyUtils);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_SPDY_UTILS_H_
diff --git a/net/third_party/quic/core/spdy_utils_test.cc b/net/third_party/quic/core/spdy_utils_test.cc
index 68f6db4..412682cc 100644
--- a/net/third_party/quic/core/spdy_utils_test.cc
+++ b/net/third_party/quic/core/spdy_utils_test.cc
@@ -17,7 +17,7 @@
 using testing::UnorderedElementsAre;
 using testing::Pair;
 
-namespace net {
+namespace quic {
 namespace test {
 
 static std::unique_ptr<QuicHeaderList> FromList(
@@ -386,4 +386,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/stateless_rejector.cc b/net/third_party/quic/core/stateless_rejector.cc
index 360d7d5..8cf1f9f 100644
--- a/net/third_party/quic/core/stateless_rejector.cc
+++ b/net/third_party/quic/core/stateless_rejector.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_flags.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 class StatelessRejector::ValidateCallback
     : public ValidateClientHelloResultCallback {
@@ -158,4 +158,4 @@
   done_cb->Run(std::move(rejector));
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/stateless_rejector.h b/net/third_party/quic/core/stateless_rejector.h
index 15fa698..925d63f 100644
--- a/net/third_party/quic/core/stateless_rejector.h
+++ b/net/third_party/quic/core/stateless_rejector.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // The StatelessRejector receives CHLO messages and generates an SREJ
 // message in response, if the CHLO can be statelessly rejected.
@@ -114,6 +114,6 @@
   DISALLOW_COPY_AND_ASSIGN(StatelessRejector);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_STATELESS_REJECTOR_H_
diff --git a/net/third_party/quic/core/stateless_rejector_test.cc b/net/third_party/quic/core/stateless_rejector_test.cc
index a415feeb..dc7ea263 100644
--- a/net/third_party/quic/core/stateless_rejector_test.cc
+++ b/net/third_party/quic/core/stateless_rejector_test.cc
@@ -23,7 +23,7 @@
 #include "net/third_party/quic/test_tools/quic_crypto_server_config_peer.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -287,4 +287,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/tls_client_handshaker.cc b/net/third_party/quic/core/tls_client_handshaker.cc
index f7e4dcd..752c9ce 100644
--- a/net/third_party/quic/core/tls_client_handshaker.cc
+++ b/net/third_party/quic/core/tls_client_handshaker.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "third_party/boringssl/src/include/openssl/ssl.h"
 
-namespace net {
+namespace quic {
 
 TlsClientHandshaker::ProofVerifierCallbackImpl::ProofVerifierCallbackImpl(
     TlsClientHandshaker* parent)
@@ -272,4 +272,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/tls_client_handshaker.h b/net/third_party/quic/core/tls_client_handshaker.h
index 042cc2d..3162fd0 100644
--- a/net/third_party/quic/core/tls_client_handshaker.h
+++ b/net/third_party/quic/core/tls_client_handshaker.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "third_party/boringssl/src/include/openssl/ssl.h"
 
-namespace net {
+namespace quic {
 
 // An implementation of QuicCryptoClientStream::HandshakerDelegate which uses
 // TLS 1.3 for the crypto handshake protocol.
@@ -119,6 +119,6 @@
   DISALLOW_COPY_AND_ASSIGN(TlsClientHandshaker);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_TLS_CLIENT_HANDSHAKER_H_
diff --git a/net/third_party/quic/core/tls_handshaker.cc b/net/third_party/quic/core/tls_handshaker.cc
index 44ec1ee6..8c64c0c 100644
--- a/net/third_party/quic/core/tls_handshaker.cc
+++ b/net/third_party/quic/core/tls_handshaker.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_singleton.h"
 #include "third_party/boringssl/src/include/openssl/crypto.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -129,4 +129,4 @@
   return &bio_adapter_;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/tls_handshaker.h b/net/third_party/quic/core/tls_handshaker.h
index 20b3535a2..d6fdea4 100644
--- a/net/third_party/quic/core/tls_handshaker.h
+++ b/net/third_party/quic/core/tls_handshaker.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "third_party/boringssl/src/include/openssl/base.h"
 
-namespace net {
+namespace quic {
 
 class QuicCryptoStream;
 class QuicSession;
@@ -85,6 +85,6 @@
   DISALLOW_COPY_AND_ASSIGN(TlsHandshaker);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_TLS_HANDSHAKER_H_
diff --git a/net/third_party/quic/core/tls_handshaker_test.cc b/net/third_party/quic/core/tls_handshaker_test.cc
index 5b672e97..0183d71 100644
--- a/net/third_party/quic/core/tls_handshaker_test.cc
+++ b/net/third_party/quic/core/tls_handshaker_test.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/test_tools/mock_quic_session_visitor.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -401,4 +401,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/tls_server_handshaker.cc b/net/third_party/quic/core/tls_server_handshaker.cc
index 70f8b3e3..c5654daa 100644
--- a/net/third_party/quic/core/tls_server_handshaker.cc
+++ b/net/third_party/quic/core/tls_server_handshaker.cc
@@ -13,7 +13,7 @@
 #include "third_party/boringssl/src/include/openssl/pool.h"
 #include "third_party/boringssl/src/include/openssl/ssl.h"
 
-namespace net {
+namespace quic {
 
 TlsServerHandshaker::SignatureCallback::SignatureCallback(
     TlsServerHandshaker* handshaker)
@@ -335,4 +335,4 @@
   return SSL_TLSEXT_ERR_OK;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/core/tls_server_handshaker.h b/net/third_party/quic/core/tls_server_handshaker.h
index cf4e57be..8dfba85 100644
--- a/net/third_party/quic/core/tls_server_handshaker.h
+++ b/net/third_party/quic/core/tls_server_handshaker.h
@@ -15,7 +15,7 @@
 #include "third_party/boringssl/src/include/openssl/pool.h"
 #include "third_party/boringssl/src/include/openssl/ssl.h"
 
-namespace net {
+namespace quic {
 
 // An implementation of QuicCryptoServerStream::HandshakerDelegate which uses
 // TLS 1.3 for the crypto handshake protocol.
@@ -157,6 +157,6 @@
   DISALLOW_COPY_AND_ASSIGN(TlsServerHandshaker);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_CORE_TLS_SERVER_HANDSHAKER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder.cc
index 3183441f..d8c8e6b 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder.cc
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_fallthrough.h"
 
-namespace net {
+namespace quic {
 
 std::ostream& operator<<(std::ostream& out,
                          QuicHttpAltSvcQuicHttpPayloadDecoder::PayloadState v) {
@@ -152,4 +152,4 @@
   return QuicHttpDecodeStatus::kDecodeInProgress;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder.h
index 8288c33..72e2526c 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpAltSvcQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -65,6 +65,6 @@
   PayloadState payload_state_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_ALTSVC_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder_test.cc
index c549b61..d112b274 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_altsvc_payload_decoder_test.cc
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Provides friend access to an instance of the payload decoder, and also
@@ -133,4 +133,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder.cc
index 2fe977d8..c87823c2 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder.cc
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/http/quic_http_constants.h"
 #include "net/third_party/quic/http/quic_http_structures.h"
 
-namespace net {
+namespace quic {
 
 QuicHttpDecodeStatus
 QuicHttpContinuationQuicHttpPayloadDecoder::StartDecodingPayload(
@@ -62,4 +62,4 @@
   return QuicHttpDecodeStatus::kDecodeInProgress;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder.h
index cae67df..7c3f0938 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/http/decoder/quic_http_frame_decoder_state.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicHttpContinuationQuicHttpPayloadDecoder {
  public:
@@ -29,6 +29,6 @@
                                              QuicHttpDecodeBuffer* db);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_CONTINUATION_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder_test.cc
index 7b8c880f..8c513f0aa2 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_continuation_payload_decoder_test.cc
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Provides friend access to an instance of the payload decoder, and also
@@ -94,4 +94,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder.cc
index a5576909..419fcf9 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder.cc
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_fallthrough.h"
 
-namespace net {
+namespace quic {
 
 std::ostream& operator<<(std::ostream& out,
                          QuicHttpDataQuicHttpPayloadDecoder::PayloadState v) {
@@ -132,4 +132,4 @@
   return QuicHttpDecodeStatus::kDecodeError;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder.h
index 361f6040..136b264 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/http/decoder/quic_http_frame_decoder_state.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpDataQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -52,6 +52,6 @@
   PayloadState payload_state_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_DATA_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder_test.cc
index a675c13..3b27da47 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_data_payload_decoder_test.cc
@@ -23,7 +23,7 @@
 
 using ::testing::AssertionResult;
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Provides friend access to an instance of the payload decoder, and also
@@ -123,4 +123,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder.cc
index 74093ad..052e13db 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder.cc
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_fallthrough.h"
 
-namespace net {
+namespace quic {
 
 std::ostream& operator<<(std::ostream& out,
                          QuicHttpGoAwayQuicHttpPayloadDecoder::PayloadState v) {
@@ -123,4 +123,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder.h
index a3811ab..50e8b273 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder.h
@@ -18,7 +18,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpGoAwayQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -64,6 +64,6 @@
   PayloadState payload_state_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_GOAWAY_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder_test.cc
index 556746a..43d072b 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_goaway_payload_decoder_test.cc
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpGoAwayQuicHttpPayloadDecoderPeer {
@@ -117,4 +117,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder.cc
index 98d3693..d88b649f 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder.cc
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_fallthrough.h"
 
-namespace net {
+namespace quic {
 
 std::ostream& operator<<(
     std::ostream& out,
@@ -185,4 +185,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder.h
index fff676b..38cdb587 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpHeadersQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -69,6 +69,6 @@
   QuicHttpPriorityFields priority_fields_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_HEADERS_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder_test.cc
index 7dd2ac2..8cf0f0b 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_headers_payload_decoder_test.cc
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpHeadersQuicHttpPayloadDecoderPeer {
@@ -169,4 +169,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_payload_decoder_base_test_util.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_payload_decoder_base_test_util.cc
index cca9d02..efaa1c2 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_payload_decoder_base_test_util.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_payload_decoder_base_test_util.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/http/tools/quic_http_random_decoder_test.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 QuicHttpPayloadDecoderBaseTest::QuicHttpPayloadDecoderBaseTest() {
   // If the test adds more data after the frame payload,
@@ -102,4 +102,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_payload_decoder_base_test_util.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_payload_decoder_base_test_util.h
index 3521f935..1a3f7ea 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_payload_decoder_base_test_util.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_payload_decoder_base_test_util.h
@@ -25,7 +25,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Base class for tests of payload decoders. Below this there is a templated
@@ -468,6 +468,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_PAYLOAD_DECODER_BASE_TEST_UTIL_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder.cc
index 2ab9586..30f39a2 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.h"
 #include "net/third_party/quic/http/quic_http_constants.h"
 
-namespace net {
+namespace quic {
 namespace {
 constexpr auto kOpaqueSize = QuicHttpPingFields::EncodedSize();
 }
@@ -92,4 +92,4 @@
   return status;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder.h
index ebdf85b..6b287a11 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder.h
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpPingQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -43,6 +43,6 @@
   QuicHttpPingFields ping_fields_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_PING_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder_test.cc
index 0bff8284..ef0efe9d 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_ping_payload_decoder_test.cc
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/http/tools/quic_http_random_decoder_test.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpPingQuicHttpPayloadDecoderPeer {
@@ -119,4 +119,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder.cc
index 5b04f691..defa735 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/http/quic_http_constants.h"
 #include "net/third_party/quic/http/quic_http_structures.h"
 
-namespace net {
+namespace quic {
 
 QuicHttpDecodeStatus
 QuicHttpPriorityQuicHttpPayloadDecoder::StartDecodingPayload(
@@ -64,4 +64,4 @@
   return status;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder.h
index 3d80973f..adb9851 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpPriorityQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -43,6 +43,6 @@
   QuicHttpPriorityFields priority_fields_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_PRIORITY_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder_test.cc
index 25510a6..376f989 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_priority_payload_decoder_test.cc
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/http/tools/quic_http_random_decoder_test.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpPriorityQuicHttpPayloadDecoderPeer {
@@ -95,4 +95,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder.cc
index 108eb03..82c0f30 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder.cc
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_fallthrough.h"
 
-namespace net {
+namespace quic {
 
 std::ostream& operator<<(
     std::ostream& out,
@@ -177,4 +177,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder.h
index 7e613ea..46bb3ba 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpPushPromiseQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -66,6 +66,6 @@
   QuicHttpPushPromiseFields push_promise_fields_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_PUSH_PROMISE_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder_test.cc
index a1efadc..6e13e2b 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_push_promise_payload_decoder_test.cc
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Provides friend access to an instance of the payload decoder, and also
@@ -144,4 +144,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder.cc
index 093aecd..3f76029 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/http/quic_http_constants.h"
 #include "net/third_party/quic/http/quic_http_structures.h"
 
-namespace net {
+namespace quic {
 
 QuicHttpDecodeStatus
 QuicHttpRstStreamQuicHttpPayloadDecoder::StartDecodingPayload(
@@ -67,4 +67,4 @@
   return status;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder.h
index a6a2b94..756cdb91 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpRstStreamQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -41,6 +41,6 @@
   QuicHttpRstStreamFields rst_stream_fields_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_RST_STREAM_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder_test.cc
index 7b59235..1df2b7f 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_rst_stream_payload_decoder_test.cc
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/http/tools/quic_http_random_decoder_test.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpRstStreamQuicHttpPayloadDecoderPeer {
@@ -97,4 +97,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder.cc
index 34fd64a..63ec83e7 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder.cc
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/http/quic_http_constants.h"
 #include "net/third_party/quic/http/quic_http_structures.h"
 
-namespace net {
+namespace quic {
 
 QuicHttpDecodeStatus
 QuicHttpQuicHttpSettingsQuicHttpPayloadDecoder::StartDecodingPayload(
@@ -107,4 +107,4 @@
   return status;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder.h
index 288b6dcb8..1d33fe0 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder.h
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpQuicHttpSettingsQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -53,6 +53,6 @@
   QuicHttpSettingFields setting_fields_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_SETTINGS_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder_test.cc
index 9c1a734d..e57aa56 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_settings_payload_decoder_test.cc
@@ -21,7 +21,7 @@
 #include "net/third_party/quic/http/tools/quic_http_random_decoder_test.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpQuicHttpSettingsQuicHttpPayloadDecoderPeer {
@@ -167,4 +167,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder.cc
index 72f9d99..ddd024e 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder.cc
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/http/quic_http_constants.h"
 #include "net/third_party/quic/http/quic_http_structures.h"
 
-namespace net {
+namespace quic {
 
 QuicHttpDecodeStatus
 QuicHttpUnknownQuicHttpPayloadDecoder::StartDecodingPayload(
@@ -55,4 +55,4 @@
   return QuicHttpDecodeStatus::kDecodeInProgress;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder.h
index db2dc351..6282bb1 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder.h
@@ -18,7 +18,7 @@
 #include "net/third_party/quic/http/decoder/quic_http_frame_decoder_state.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicHttpUnknownQuicHttpPayloadDecoder {
  public:
@@ -32,6 +32,6 @@
                                              QuicHttpDecodeBuffer* db);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_UNKNOWN_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder_test.cc
index da70b55..3c79d91 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_unknown_payload_decoder_test.cc
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 QuicHttpFrameType g_unknown_frame_type;
@@ -107,4 +107,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder.cc
index 694e540..8470cb83 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/http/quic_http_constants.h"
 #include "net/third_party/quic/http/quic_http_structures.h"
 
-namespace net {
+namespace quic {
 
 QuicHttpDecodeStatus
 QuicHttpWindowUpdateQuicHttpPayloadDecoder::StartDecodingPayload(
@@ -85,4 +85,4 @@
   return status;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder.h b/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder.h
index 58d06e57..03fa0fc5 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder.h
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpWindowUpdateQuicHttpPayloadDecoderPeer;
 }  // namespace test
@@ -41,6 +41,6 @@
   QuicHttpWindowUpdateFields window_update_fields_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_PAYLOAD_DECODERS_QUIC_HTTP_WINDOW_UPDATE_PAYLOAD_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder_test.cc b/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder_test.cc
index db63157..b75fdfbe 100644
--- a/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/payload_decoders/quic_http_window_update_payload_decoder_test.cc
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/http/tools/quic_http_random_decoder_test.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpWindowUpdateQuicHttpPayloadDecoderPeer {
@@ -101,4 +101,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_decode_buffer.cc b/net/third_party/quic/http/decoder/quic_http_decode_buffer.cc
index 52e28c3..4edb795 100644
--- a/net/third_party/quic/http/decoder/quic_http_decode_buffer.cc
+++ b/net/third_party/quic/http/decoder/quic_http_decode_buffer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/http/decoder/quic_http_decode_buffer.h"
 
-namespace net {
+namespace quic {
 
 #ifndef NDEBUG
 // These are part of validating during tests that there is at most one
@@ -57,4 +57,4 @@
 }
 #endif
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_decode_buffer.h b/net/third_party/quic/http/decoder/quic_http_decode_buffer.h
index f84c0b73..168dd13 100644
--- a/net/third_party/quic/http/decoder/quic_http_decode_buffer.h
+++ b/net/third_party/quic/http/decoder/quic_http_decode_buffer.h
@@ -22,7 +22,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 class QuicHttpDecodeBufferSubset;
 
 class QUIC_EXPORT_PRIVATE QuicHttpDecodeBuffer {
@@ -197,6 +197,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicHttpDecodeBufferSubset);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_DECODE_BUFFER_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_decode_buffer_test.cc b/net/third_party/quic/http/decoder/quic_http_decode_buffer_test.cc
index 9e7f38d8..77f13faa 100644
--- a/net/third_party/quic/http/decoder/quic_http_decode_buffer_test.cc
+++ b/net/third_party/quic/http/decoder/quic_http_decode_buffer_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_test_random.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -206,4 +206,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_decode_status.cc b/net/third_party/quic/http/decoder/quic_http_decode_status.cc
index 5ddb4da..34d4090 100644
--- a/net/third_party/quic/http/decoder/quic_http_decode_status.cc
+++ b/net/third_party/quic/http/decoder/quic_http_decode_status.cc
@@ -7,7 +7,7 @@
 #include "base/logging.h"
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 
-namespace net {
+namespace quic {
 
 std::ostream& operator<<(std::ostream& out, QuicHttpDecodeStatus v) {
   switch (v) {
@@ -25,4 +25,4 @@
   return out << "QuicHttpDecodeStatus(" << unknown << ")";
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_decode_status.h b/net/third_party/quic/http/decoder/quic_http_decode_status.h
index 872761a..a1091fc9 100644
--- a/net/third_party/quic/http/decoder/quic_http_decode_status.h
+++ b/net/third_party/quic/http/decoder/quic_http_decode_status.h
@@ -12,7 +12,7 @@
 
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 enum class QuicHttpDecodeStatus {
   // Decoding is done.
@@ -29,6 +29,6 @@
 QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
                                              QuicHttpDecodeStatus v);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_DECODE_STATUS_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_decode_structures.cc b/net/third_party/quic/http/decoder/quic_http_decode_structures.cc
index 1857e82..b870933 100644
--- a/net/third_party/quic/http/decoder/quic_http_decode_structures.cc
+++ b/net/third_party/quic/http/decoder/quic_http_decode_structures.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/http/decoder/quic_http_decode_buffer.h"
 #include "net/third_party/quic/http/quic_http_constants.h"
 
-namespace net {
+namespace quic {
 
 // QuicHttpFrameHeader decoding:
 
@@ -108,4 +108,4 @@
   out->origin_length = b->DecodeUInt16();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_decode_structures.h b/net/third_party/quic/http/decoder/quic_http_decode_structures.h
index 1294f1e..6bac543e 100644
--- a/net/third_party/quic/http/decoder/quic_http_decode_structures.h
+++ b/net/third_party/quic/http/decoder/quic_http_decode_structures.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // DoDecode(STRUCTURE* out, QuicHttpDecodeBuffer* b) decodes the structure from
 // start to end, advancing the cursor by STRUCTURE::EncodedSize(). The decode
@@ -37,6 +37,6 @@
 QUIC_EXPORT_PRIVATE void DoDecode(QuicHttpAltSvcFields* out,
                                   QuicHttpDecodeBuffer* b);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_DECODE_STRUCTURES_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder.cc b/net/third_party/quic/http/decoder/quic_http_frame_decoder.cc
index eec13f24..68183649 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder.cc
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 
 std::ostream& operator<<(std::ostream& out, QuicHttpFrameDecoder::State v) {
   switch (v) {
@@ -452,4 +452,4 @@
   return QuicHttpDecodeStatus::kDecodeInProgress;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder.h b/net/third_party/quic/http/decoder/quic_http_frame_decoder.h
index 99d36b66..84d512b 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder.h
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder.h
@@ -42,7 +42,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpFrameDecoderPeer;
 }  // namespace test
@@ -206,6 +206,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicHttpFrameDecoder);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_FRAME_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_adapter.cc b/net/third_party/quic/http/decoder/quic_http_frame_decoder_adapter.cc
index cd11ed45..53f1b887 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_adapter.cc
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_adapter.cc
@@ -50,7 +50,7 @@
 #endif
 using base::nullopt;
 
-namespace net {
+namespace quic {
 
 using SpdyFramerError = http2::Http2DecoderAdapter::SpdyFramerError;
 
@@ -984,4 +984,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_adapter.h b/net/third_party/quic/http/decoder/quic_http_frame_decoder_adapter.h
index 3a58010..ab40c42 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_adapter.h
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_adapter.h
@@ -26,7 +26,7 @@
 
 class ExtensionVisitorInterface;
 }  // namespace spdy
-namespace net {
+namespace quic {
 
 // Adapts spdy::SpdyFramer interface to use QuicHttpFrameDecoder.
 class SPDY_EXPORT_PRIVATE QuicHttpDecoderAdapter
@@ -294,6 +294,6 @@
   bool process_single_input_frame_ = false;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_FRAME_DECODER_ADAPTER_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.cc b/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.cc
index 0d1245af..084c9b68 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.cc
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.cc
@@ -4,11 +4,11 @@
 
 #include "net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.h"
 
-namespace net {
+namespace quic {
 
 bool QuicHttpFrameDecoderNoOpListener::OnFrameHeader(
     const QuicHttpFrameHeader& header) {
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.h b/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.h
index 8d0c182..347e078 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.h
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener.h
@@ -34,7 +34,7 @@
 #include "net/third_party/quic/http/quic_http_constants.h"
 #include "net/third_party/quic/http/quic_http_structures.h"
 
-namespace net {
+namespace quic {
 
 // TODO(jamessynge): Consider sorting the methods by frequency of call, if that
 // helps at all.
@@ -359,6 +359,6 @@
 static_assert(!std::is_abstract<QuicHttpFrameDecoderNoOpListener>(),
               "QuicHttpFrameDecoderNoOpListener ought to be concrete.");
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_FRAME_DECODER_LISTENER_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener_test_util.cc b/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener_test_util.cc
index 07cd922..2f66ce4 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener_test_util.cc
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener_test_util.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 
 FailingQuicHttpFrameDecoderListener::FailingQuicHttpFrameDecoderListener() {}
 FailingQuicHttpFrameDecoderListener::~FailingQuicHttpFrameDecoderListener() {}
@@ -489,4 +489,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener_test_util.h b/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener_test_util.h
index e8b38ec..a13a4fe 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener_test_util.h
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_listener_test_util.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/http/quic_http_constants.h"
 #include "net/third_party/quic/http/quic_http_structures.h"
 
-namespace net {
+namespace quic {
 
 // Fail if any of the methods are called. Allows a test to override only the
 // expected calls.
@@ -141,6 +141,6 @@
   QuicHttpFrameDecoderListener* wrapped_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_FRAME_DECODER_LISTENER_TEST_UTIL_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_state.cc b/net/third_party/quic/http/decoder/quic_http_frame_decoder_state.cc
index be2de531..f47b5e7 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_state.cc
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_state.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/http/decoder/quic_http_frame_decoder_state.h"
 
-namespace net {
+namespace quic {
 
 QuicHttpDecodeStatus QuicHttpFrameDecoderState::ReadPadLength(
     QuicHttpDecodeBuffer* db,
@@ -79,4 +79,4 @@
   return QuicHttpDecodeStatus::kDecodeError;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_state.h b/net/third_party/quic/http/decoder/quic_http_frame_decoder_state.h
index 02013242..d93a9c38 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_state.h
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_state.h
@@ -25,7 +25,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpFrameDecoderStatePeer;
 }  // namespace test
@@ -254,6 +254,6 @@
   QuicHttpStructureDecoder structure_decoder_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_FRAME_DECODER_STATE_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_state_test_util.cc b/net/third_party/quic/http/decoder/quic_http_frame_decoder_state_test_util.cc
index f2d0a55..7d6058e8 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_state_test_util.cc
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_state_test_util.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/http/quic_http_structures_test_util.h"
 #include "net/third_party/quic/http/tools/quic_http_random_decoder_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -22,4 +22,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_state_test_util.h b/net/third_party/quic/http/decoder/quic_http_frame_decoder_state_test_util.h
index 81314597..da16d250 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_state_test_util.h
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_state_test_util.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/http/tools/quic_http_random_decoder_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpFrameDecoderStatePeer {
@@ -24,6 +24,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_FRAME_DECODER_STATE_TEST_UTIL_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_frame_decoder_test.cc b/net/third_party/quic/http/decoder/quic_http_frame_decoder_test.cc
index d1ee716..e74254102 100644
--- a/net/third_party/quic/http/decoder/quic_http_frame_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/quic_http_frame_decoder_test.cc
@@ -21,7 +21,7 @@
 using ::testing::AssertionResult;
 using ::testing::AssertionSuccess;
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpFrameDecoderPeer {
  public:
@@ -936,4 +936,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_structure_decoder.cc b/net/third_party/quic/http/decoder/quic_http_structure_decoder.cc
index 4aa9979..bd9a10d 100644
--- a/net/third_party/quic/http/decoder/quic_http_structure_decoder.cc
+++ b/net/third_party/quic/http/decoder/quic_http_structure_decoder.cc
@@ -8,7 +8,7 @@
 
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 
-namespace net {
+namespace quic {
 
 // Below we have some defensive coding: if we somehow run off the end, don't
 // overwrite lots of memory. Note that most of this decoder is not defensive
@@ -88,4 +88,4 @@
   return needed == num_to_copy;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_structure_decoder.h b/net/third_party/quic/http/decoder/quic_http_structure_decoder.h
index 89400e26..9f71beb 100644
--- a/net/third_party/quic/http/decoder/quic_http_structure_decoder.h
+++ b/net/third_party/quic/http/decoder/quic_http_structure_decoder.h
@@ -22,7 +22,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 namespace test {
 class QuicHttpStructureDecoderPeer;
 }  // namespace test
@@ -128,6 +128,6 @@
   char buffer_[QuicHttpFrameHeader::EncodedSize()];
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_STRUCTURE_DECODER_H_
diff --git a/net/third_party/quic/http/decoder/quic_http_structure_decoder_test.cc b/net/third_party/quic/http/decoder/quic_http_structure_decoder_test.cc
index 5fbdcd1..e6a6d3c 100644
--- a/net/third_party/quic/http/decoder/quic_http_structure_decoder_test.cc
+++ b/net/third_party/quic/http/decoder/quic_http_structure_decoder_test.cc
@@ -37,7 +37,7 @@
 using ::testing::AssertionResult;
 using ::testing::AssertionSuccess;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 const bool kMayReturnZeroOnFirst = false;
@@ -541,4 +541,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_structure_decoder_test_util.cc b/net/third_party/quic/http/decoder/quic_http_structure_decoder_test_util.cc
index c5c5f434..dcef551 100644
--- a/net/third_party/quic/http/decoder/quic_http_structure_decoder_test_util.cc
+++ b/net/third_party/quic/http/decoder/quic_http_structure_decoder_test_util.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/http/decoder/quic_http_structure_decoder_test_util.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 void QuicHttpStructureDecoderPeer::Randomize(QuicHttpStructureDecoder* p,
@@ -16,4 +16,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/decoder/quic_http_structure_decoder_test_util.h b/net/third_party/quic/http/decoder/quic_http_structure_decoder_test_util.h
index a4add628..f9f1ab7 100644
--- a/net/third_party/quic/http/decoder/quic_http_structure_decoder_test_util.h
+++ b/net/third_party/quic/http/decoder/quic_http_structure_decoder_test_util.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/http/decoder/quic_http_structure_decoder.h"
 #include "net/third_party/quic/platform/api/quic_test_random.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpStructureDecoderPeer {
@@ -18,6 +18,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_DECODER_QUIC_HTTP_STRUCTURE_DECODER_TEST_UTIL_H_
diff --git a/net/third_party/quic/http/quic_http_constants.cc b/net/third_party/quic/http/quic_http_constants.cc
index e93aff55..46b7965 100644
--- a/net/third_party/quic/http/quic_http_constants.cc
+++ b/net/third_party/quic/http/quic_http_constants.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string_utils.h"
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 
-namespace net {
+namespace quic {
 
 QuicString QuicHttpFrameTypeToString(QuicHttpFrameType v) {
   switch (v) {
@@ -153,4 +153,4 @@
   return QuicHttpSettingsParameterToString(static_cast<uint32_t>(v));
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/quic_http_constants.h b/net/third_party/quic/http/quic_http_constants.h
index ad48440..069da04 100644
--- a/net/third_party/quic/http/quic_http_constants.h
+++ b/net/third_party/quic/http/quic_http_constants.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // TODO(jamessynge): create http2_simple_types for types similar to
 // spdy::SpdyStreamId, but not for structures like QuicHttpFrameHeader. Then
@@ -257,6 +257,6 @@
   static constexpr uint32_t MaximumMaxFrameSize() { return (1 << 24) - 1; }
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_QUIC_HTTP_CONSTANTS_H_
diff --git a/net/third_party/quic/http/quic_http_constants_test.cc b/net/third_party/quic/http/quic_http_constants_test.cc
index 96131361..cb955c1 100644
--- a/net/third_party/quic/http/quic_http_constants_test.cc
+++ b/net/third_party/quic/http/quic_http_constants_test.cc
@@ -6,7 +6,7 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -301,4 +301,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/quic_http_constants_test_util.cc b/net/third_party/quic/http/quic_http_constants_test_util.cc
index b99d8cd..8588151 100644
--- a/net/third_party/quic/http/quic_http_constants_test_util.cc
+++ b/net/third_party/quic/http/quic_http_constants_test_util.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/http/quic_http_constants_test_util.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 std::vector<QuicHttpFrameType> AllQuicHttpFrameTypes() {
@@ -142,4 +142,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/quic_http_constants_test_util.h b/net/third_party/quic/http/quic_http_constants_test_util.h
index 1b7d515..6fa587a4 100644
--- a/net/third_party/quic/http/quic_http_constants_test_util.h
+++ b/net/third_party/quic/http/quic_http_constants_test_util.h
@@ -10,7 +10,7 @@
 
 #include "net/third_party/quic/http/quic_http_constants.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Returns a vector of all supported frame types.
@@ -37,6 +37,6 @@
 uint8_t InvalidFlagMaskForFrameType(QuicHttpFrameType type);
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_QUIC_HTTP_CONSTANTS_TEST_UTIL_H_
diff --git a/net/third_party/quic/http/quic_http_structures.cc b/net/third_party/quic/http/quic_http_structures.cc
index 7ab2691..ccd0400 100644
--- a/net/third_party/quic/http/quic_http_structures.cc
+++ b/net/third_party/quic/http/quic_http_structures.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string_utils.h"
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 
-namespace net {
+namespace quic {
 
 // QuicHttpFrameHeader:
 
@@ -139,4 +139,4 @@
   return out << "origin_length=" << v.origin_length;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/quic_http_structures.h b/net/third_party/quic/http/quic_http_structures.h
index 93a7b152..c488c87 100644
--- a/net/third_party/quic/http/quic_http_structures.h
+++ b/net/third_party/quic/http/quic_http_structures.h
@@ -34,7 +34,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 struct QUIC_EXPORT_PRIVATE QuicHttpFrameHeader {
   QuicHttpFrameHeader() {}
@@ -324,6 +324,6 @@
 QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& out,
                                              const QuicHttpAltSvcFields& v);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_QUIC_HTTP_STRUCTURES_H_
diff --git a/net/third_party/quic/http/quic_http_structures_test.cc b/net/third_party/quic/http/quic_http_structures_test.cc
index 812c3c91..41a5259 100644
--- a/net/third_party/quic/http/quic_http_structures_test.cc
+++ b/net/third_party/quic/http/quic_http_structures_test.cc
@@ -31,7 +31,7 @@
 using ::testing::Values;
 using ::testing::ValuesIn;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -497,4 +497,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/quic_http_structures_test_util.cc b/net/third_party/quic/http/quic_http_structures_test_util.cc
index b958325b..7bf443d0 100644
--- a/net/third_party/quic/http/quic_http_structures_test_util.cc
+++ b/net/third_party/quic/http/quic_http_structures_test_util.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/platform/api/quic_test_random.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 void Randomize(QuicHttpFrameHeader* p, QuicTestRandomBase* rng) {
@@ -106,4 +106,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/quic_http_structures_test_util.h b/net/third_party/quic/http/quic_http_structures_test_util.h
index 0e31393..7ad1bdd 100644
--- a/net/third_party/quic/http/quic_http_structures_test_util.h
+++ b/net/third_party/quic/http/quic_http_structures_test_util.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_test_random.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 template <class S>
@@ -55,6 +55,6 @@
 bool FrameCanHaveHpackPayload(const QuicHttpFrameHeader& header);
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_QUIC_HTTP_STRUCTURES_TEST_UTIL_H_
diff --git a/net/third_party/quic/http/test_tools/quic_http_frame_parts.cc b/net/third_party/quic/http/test_tools/quic_http_frame_parts.cc
index 509268f..267015c 100644
--- a/net/third_party/quic/http/test_tools/quic_http_frame_parts.cc
+++ b/net/third_party/quic/http/test_tools/quic_http_frame_parts.cc
@@ -16,7 +16,7 @@
 using ::testing::AssertionSuccess;
 using ::testing::ContainerEq;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -425,18 +425,20 @@
 void QuicHttpFrameParts::OutputTo(std::ostream& out) const {
   out << "QuicHttpFrameParts{\n  frame_header: " << frame_header << "\n";
   if (!payload.empty()) {
-    out << "  payload=\"" << EscapeQueryParamValue(payload, false) << "\"\n";
+    out << "  payload=\"" << net::EscapeQueryParamValue(payload, false)
+        << "\"\n";
   }
   if (!padding.empty()) {
-    out << "  padding=\"" << EscapeQueryParamValue(padding, false) << "\"\n";
+    out << "  padding=\"" << net::EscapeQueryParamValue(padding, false)
+        << "\"\n";
   }
   if (!altsvc_origin.empty()) {
-    out << "  altsvc_origin=\"" << EscapeQueryParamValue(altsvc_origin, false)
-        << "\"\n";
+    out << "  altsvc_origin=\""
+        << net::EscapeQueryParamValue(altsvc_origin, false) << "\"\n";
   }
   if (!altsvc_value.empty()) {
-    out << "  altsvc_value=\"" << EscapeQueryParamValue(altsvc_value, false)
-        << "\"\n";
+    out << "  altsvc_value=\""
+        << net::EscapeQueryParamValue(altsvc_value, false) << "\"\n";
   }
   if (opt_priority) {
     out << "  priority=" << opt_priority.value() << "\n";
@@ -539,4 +541,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/test_tools/quic_http_frame_parts.h b/net/third_party/quic/http/test_tools/quic_http_frame_parts.h
index 368c796..4cd2ff56 100644
--- a/net/third_party/quic/http/test_tools/quic_http_frame_parts.h
+++ b/net/third_party/quic/http/test_tools/quic_http_frame_parts.h
@@ -27,7 +27,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Forward declarations.
@@ -178,6 +178,6 @@
 std::ostream& operator<<(std::ostream& out, const QuicHttpFrameParts& v);
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_TEST_TOOLS_QUIC_HTTP_FRAME_PARTS_H_
diff --git a/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector.cc b/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector.cc
index 2ea3cc7c..8b7ce0d 100644
--- a/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector.cc
+++ b/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_ptr_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 QuicHttpFramePartsCollector::QuicHttpFramePartsCollector() {}
@@ -112,4 +112,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector.h b/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector.h
index 71a8cc1..959af2f 100644
--- a/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector.h
+++ b/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector.h
@@ -18,7 +18,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/http/test_tools/quic_http_frame_parts.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpFramePartsCollector : public FailingQuicHttpFrameDecoderListener {
@@ -109,6 +109,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_TEST_TOOLS_QUIC_HTTP_FRAME_PARTS_COLLECTOR_H_
diff --git a/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector_listener.cc b/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector_listener.cc
index a5a1a09..d3c4e8d 100644
--- a/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector_listener.cc
+++ b/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector_listener.cc
@@ -7,7 +7,7 @@
 #include "base/logging.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 bool QuicHttpFramePartsCollectorListener::OnFrameHeader(
@@ -233,4 +233,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector_listener.h b/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector_listener.h
index 99478b5..2ca7363 100644
--- a/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector_listener.h
+++ b/net/third_party/quic/http/test_tools/quic_http_frame_parts_collector_listener.h
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/http/quic_http_structures.h"
 #include "net/third_party/quic/http/test_tools/quic_http_frame_parts_collector.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpFramePartsCollectorListener : public QuicHttpFramePartsCollector {
@@ -79,6 +79,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_TEST_TOOLS_QUIC_HTTP_FRAME_PARTS_COLLECTOR_LISTENER_H_
diff --git a/net/third_party/quic/http/tools/quic_http_frame_builder.cc b/net/third_party/quic/http/tools/quic_http_frame_builder.cc
index 6e6d309..ac9f6d59 100644
--- a/net/third_party/quic/http/tools/quic_http_frame_builder.cc
+++ b/net/third_party/quic/http/tools/quic_http_frame_builder.cc
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_string_utils.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 QuicHttpFrameBuilder::QuicHttpFrameBuilder(QuicHttpFrameType type,
@@ -178,4 +178,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/tools/quic_http_frame_builder.h b/net/third_party/quic/http/tools/quic_http_frame_builder.h
index 7ab9a21..7d20030 100644
--- a/net/third_party/quic/http/tools/quic_http_frame_builder.h
+++ b/net/third_party/quic/http/tools/quic_http_frame_builder.h
@@ -22,7 +22,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicHttpFrameBuilder {
@@ -98,6 +98,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_TOOLS_QUIC_HTTP_FRAME_BUILDER_H_
diff --git a/net/third_party/quic/http/tools/quic_http_random_decoder_test.cc b/net/third_party/quic/http/tools/quic_http_random_decoder_test.cc
index 15d57b66..fa0c9e2 100644
--- a/net/third_party/quic/http/tools/quic_http_random_decoder_test.cc
+++ b/net/third_party/quic/http/tools/quic_http_random_decoder_test.cc
@@ -24,7 +24,7 @@
 using ::testing::AssertionResult;
 using ::testing::AssertionSuccess;
 
-namespace net {
+namespace quic {
 namespace test {
 
 QuicHttpRandomDecoderTest::QuicHttpRandomDecoderTest() {}
@@ -169,4 +169,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/tools/quic_http_random_decoder_test.h b/net/third_party/quic/http/tools/quic_http_random_decoder_test.h
index 6928f89..9da8e80 100644
--- a/net/third_party/quic/http/tools/quic_http_random_decoder_test.h
+++ b/net/third_party/quic/http/tools/quic_http_random_decoder_test.h
@@ -29,7 +29,7 @@
 #include "net/third_party/quic/platform/api/quic_test_random.h"  // IWYU pragma: export
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Some helpers.
@@ -274,6 +274,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_TOOLS_QUIC_HTTP_RANDOM_DECODER_TEST_H_
diff --git a/net/third_party/quic/http/tools/quic_http_random_util.cc b/net/third_party/quic/http/tools/quic_http_random_util.cc
index 638de93..1254d6f 100644
--- a/net/third_party/quic/http/tools/quic_http_random_util.cc
+++ b/net/third_party/quic/http/tools/quic_http_random_util.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/api/quic_test_random.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -79,4 +79,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/http/tools/quic_http_random_util.h b/net/third_party/quic/http/tools/quic_http_random_util.h
index 7e8f240..3db6a5c4 100644
--- a/net/third_party/quic/http/tools/quic_http_random_util.h
+++ b/net/third_party/quic/http/tools/quic_http_random_util.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test_random.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Returns a random integer in the range [lo, hi).
@@ -28,6 +28,6 @@
 size_t GenerateRandomSizeSkewedLow(size_t max, QuicTestRandomBase* rng);
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_HTTP_TOOLS_QUIC_HTTP_RANDOM_UTIL_H_
diff --git a/net/third_party/quic/platform/api/quic_clock.cc b/net/third_party/quic/platform/api/quic_clock.cc
index 14fd5c8..d4a072c 100644
--- a/net/third_party/quic/platform/api/quic_clock.cc
+++ b/net/third_party/quic/platform/api/quic_clock.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/platform/api/quic_clock.h"
 
-namespace net {
+namespace quic {
 
 QuicClock::QuicClock() {}
 
@@ -28,4 +28,4 @@
                          .ToUNIXMicroseconds());
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_clock.h b/net/third_party/quic/platform/api/quic_clock.h
index 41c1874..06f13a8 100644
--- a/net/third_party/quic/platform/api/quic_clock.h
+++ b/net/third_party/quic/platform/api/quic_clock.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Interface for retreiving the current time.
 class QUIC_EXPORT_PRIVATE QuicClock {
@@ -41,6 +41,6 @@
   }
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_CLOCK_H_
diff --git a/net/third_party/quic/platform/api/quic_containers.h b/net/third_party/quic/platform/api/quic_containers.h
index 08100dd1..3104939 100644
--- a/net/third_party/quic/platform/api/quic_containers.h
+++ b/net/third_party/quic/platform/api/quic_containers.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_containers_impl.h"
 
-namespace net {
+namespace quic {
 
 // A general-purpose unordered map.
 template <typename Key,
@@ -56,6 +56,6 @@
 template <typename T>
 using QuicDeque = QuicDequeImpl<T>;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_CONTAINERS_H_
diff --git a/net/third_party/quic/platform/api/quic_endian.h b/net/third_party/quic/platform/api/quic_endian.h
index c3f239f..dd2081df 100644
--- a/net/third_party/quic/platform/api/quic_endian.h
+++ b/net/third_party/quic/platform/api/quic_endian.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_endian_impl.h"
 
-namespace net {
+namespace quic {
 
 enum Endianness {
   NETWORK_BYTE_ORDER,  // big endian
@@ -49,6 +49,6 @@
   }
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_ENDIAN_H_
diff --git a/net/third_party/quic/platform/api/quic_endian_test.cc b/net/third_party/quic/platform/api/quic_endian_test.cc
index 025fe02..8c11070 100644
--- a/net/third_party/quic/platform/api/quic_endian_test.cc
+++ b/net/third_party/quic/platform/api/quic_endian_test.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -48,4 +48,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_estimate_memory_usage.h b/net/third_party/quic/platform/api/quic_estimate_memory_usage.h
index 27552a1a..683afe4 100644
--- a/net/third_party/quic/platform/api/quic_estimate_memory_usage.h
+++ b/net/third_party/quic/platform/api/quic_estimate_memory_usage.h
@@ -9,13 +9,13 @@
 
 #include "net/third_party/quic/platform/impl/quic_estimate_memory_usage_impl.h"
 
-namespace net {
+namespace quic {
 
 template <class T>
 size_t QuicEstimateMemoryUsage(const T& object) {
   return QuicEstimateMemoryUsageImpl(object);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_ESTIMATE_MEMORY_USAGE_H_
diff --git a/net/third_party/quic/platform/api/quic_hostname_utils.cc b/net/third_party/quic/platform/api/quic_hostname_utils.cc
index ff475bb..97ffff9 100644
--- a/net/third_party/quic/platform/api/quic_hostname_utils.cc
+++ b/net/third_party/quic/platform/api/quic_hostname_utils.cc
@@ -6,7 +6,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 // static
 bool QuicHostnameUtils::IsValidSNI(QuicStringPiece sni) {
@@ -18,4 +18,4 @@
   return QuicHostnameUtilsImpl::NormalizeHostname(hostname);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_hostname_utils.h b/net/third_party/quic/platform/api/quic_hostname_utils.h
index ce08f38..3fa4ffea 100644
--- a/net/third_party/quic/platform/api/quic_hostname_utils.h
+++ b/net/third_party/quic/platform/api/quic_hostname_utils.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/impl/quic_hostname_utils_impl.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicHostnameUtils {
  public:
@@ -28,6 +28,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicHostnameUtils);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_HOSTNAME_UTILS_H_
diff --git a/net/third_party/quic/platform/api/quic_hostname_utils_test.cc b/net/third_party/quic/platform/api/quic_hostname_utils_test.cc
index 4e54d7f..7752ae8 100644
--- a/net/third_party/quic/platform/api/quic_hostname_utils_test.cc
+++ b/net/third_party/quic/platform/api/quic_hostname_utils_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -63,4 +63,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_ip_address.cc b/net/third_party/quic/platform/api/quic_ip_address.cc
index 048b10e..57d85da 100644
--- a/net/third_party/quic/platform/api/quic_ip_address.cc
+++ b/net/third_party/quic/platform/api/quic_ip_address.cc
@@ -5,7 +5,7 @@
 #include "net/third_party/quic/platform/api/quic_ip_address.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicIpAddress QuicIpAddress::Loopback4() {
   return QuicIpAddress(QuicIpAddressImpl::Loopback4());
@@ -82,4 +82,4 @@
   return impl_.InSameSubnet(other.impl(), subnet_length);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_ip_address.h b/net/third_party/quic/platform/api/quic_ip_address.h
index c3ce144..dc5c76a7 100644
--- a/net/third_party/quic/platform/api/quic_ip_address.h
+++ b/net/third_party/quic/platform/api/quic_ip_address.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/impl/quic_ip_address_impl.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicIpAddress {
   // A class representing an IPv4 or IPv6 address in QUIC. The actual
@@ -67,6 +67,6 @@
   QuicIpAddressImpl impl_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_IP_ADDRESS_H_
diff --git a/net/third_party/quic/platform/api/quic_ip_address_family.h b/net/third_party/quic/platform/api/quic_ip_address_family.h
index 92ebcde..96e6cd0 100644
--- a/net/third_party/quic/platform/api/quic_ip_address_family.h
+++ b/net/third_party/quic/platform/api/quic_ip_address_family.h
@@ -5,7 +5,7 @@
 #ifndef NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_IP_ADDRESS_FAMILY_H_
 #define NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_IP_ADDRESS_FAMILY_H_
 
-namespace net {
+namespace quic {
 
 // IP address family type used in QUIC. This hides platform dependant IP address
 // family types.
@@ -15,6 +15,6 @@
   IP_UNSPEC,
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_IP_ADDRESS_FAMILY_H_
diff --git a/net/third_party/quic/platform/api/quic_lru_cache.h b/net/third_party/quic/platform/api/quic_lru_cache.h
index ba6820e..facedb2 100644
--- a/net/third_party/quic/platform/api/quic_lru_cache.h
+++ b/net/third_party/quic/platform/api/quic_lru_cache.h
@@ -9,7 +9,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_lru_cache_impl.h"
 
-namespace net {
+namespace quic {
 
 // A LRU cache that maps from type Key to Value* in QUIC.
 // This cache CANNOT be shared by multiple threads (even with locks) because
@@ -47,6 +47,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicLRUCache);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_LRU_CACHE_H_
diff --git a/net/third_party/quic/platform/api/quic_lru_cache_test.cc b/net/third_party/quic/platform/api/quic_lru_cache_test.cc
index 50bc168..553682d 100644
--- a/net/third_party/quic/platform/api/quic_lru_cache_test.cc
+++ b/net/third_party/quic/platform/api/quic_lru_cache_test.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -75,4 +75,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_map_util.h b/net/third_party/quic/platform/api/quic_map_util.h
index ca81a02..37e6715 100644
--- a/net/third_party/quic/platform/api/quic_map_util.h
+++ b/net/third_party/quic/platform/api/quic_map_util.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_map_util_impl.h"
 
-namespace net {
+namespace quic {
 
 template <class Collection, class Key>
 bool QuicContainsKey(const Collection& collection, const Key& key) {
@@ -19,6 +19,6 @@
   return QuicContainsValueImpl(collection, value);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_MAP_UTIL_H_
diff --git a/net/third_party/quic/platform/api/quic_mem_slice.h b/net/third_party/quic/platform/api/quic_mem_slice.h
index 5bf9f3a..cf56164 100644
--- a/net/third_party/quic/platform/api/quic_mem_slice.h
+++ b/net/third_party/quic/platform/api/quic_mem_slice.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_mem_slice_impl.h"
 
-namespace net {
+namespace quic {
 
 // QuicMemSlice is an internally reference counted data buffer used as the
 // source buffers for write operations. QuicMemSlice implicitly maintains a
@@ -56,6 +56,6 @@
   QuicMemSliceImpl impl_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_MEM_SLICE_H_
diff --git a/net/third_party/quic/platform/api/quic_mem_slice_span.h b/net/third_party/quic/platform/api/quic_mem_slice_span.h
index 3059d24..3a50b0f 100644
--- a/net/third_party/quic/platform/api/quic_mem_slice_span.h
+++ b/net/third_party/quic/platform/api/quic_mem_slice_span.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_mem_slice_span_impl.h"
 
-namespace net {
+namespace quic {
 
 // QuicMemSliceSpan is effectively wrapper around an array of data structures
 // used as QuicMemSlice. So it could implemented with:
@@ -40,6 +40,6 @@
   QuicMemSliceSpanImpl impl_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_MEM_SLICE_SPAN_H_
diff --git a/net/third_party/quic/platform/api/quic_mem_slice_span_test.cc b/net/third_party/quic/platform/api/quic_mem_slice_span_test.cc
index 4a159d49..7c10df4 100644
--- a/net/third_party/quic/platform/api/quic_mem_slice_span_test.cc
+++ b/net/third_party/quic/platform/api/quic_mem_slice_span_test.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/platform/api/quic_test_mem_slice_vector.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -47,4 +47,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_mem_slice_test.cc b/net/third_party/quic/platform/api/quic_mem_slice_test.cc
index 56b7029..1da6f5b5 100644
--- a/net/third_party/quic/platform/api/quic_mem_slice_test.cc
+++ b/net/third_party/quic/platform/api/quic_mem_slice_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/quic_simple_buffer_allocator.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -47,4 +47,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_mutex.cc b/net/third_party/quic/platform/api/quic_mutex.cc
index 981ca166..d43deada 100644
--- a/net/third_party/quic/platform/api/quic_mutex.cc
+++ b/net/third_party/quic/platform/api/quic_mutex.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/platform/api/quic_mutex.h"
 
-namespace net {
+namespace quic {
 
 void QuicMutex::WriterLock() {
   impl_.WriterLock();
@@ -42,4 +42,4 @@
   lock_->WriterUnlock();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_mutex.h b/net/third_party/quic/platform/api/quic_mutex.h
index 6802267d..280bed2 100644
--- a/net/third_party/quic/platform/api/quic_mutex.h
+++ b/net/third_party/quic/platform/api/quic_mutex.h
@@ -8,7 +8,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/platform/impl/quic_mutex_impl.h"
 
-namespace net {
+namespace quic {
 
 // A class representing a non-reentrant mutex in QUIC.
 class QUIC_EXPORT_PRIVATE LOCKABLE QuicMutex {
@@ -66,6 +66,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicWriterMutexLock);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_MUTEX_H_
diff --git a/net/third_party/quic/platform/api/quic_optional.h b/net/third_party/quic/platform/api/quic_optional.h
index b6b80248..d5a2e8a 100644
--- a/net/third_party/quic/platform/api/quic_optional.h
+++ b/net/third_party/quic/platform/api/quic_optional.h
@@ -7,11 +7,11 @@
 
 #include "net/third_party/quic/platform/impl/quic_optional_impl.h"
 
-namespace net {
+namespace quic {
 
 template <typename T>
 using QuicOptional = QuicOptionalImpl<T>;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_OPTIONAL_H_
diff --git a/net/third_party/quic/platform/api/quic_pcc_sender.h b/net/third_party/quic/platform/api/quic_pcc_sender.h
index f209afa..327cf8d 100644
--- a/net/third_party/quic/platform/api/quic_pcc_sender.h
+++ b/net/third_party/quic/platform/api/quic_pcc_sender.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/congestion_control/send_algorithm_interface.h"
 #include "net/third_party/quic/platform/impl/quic_pcc_sender_impl.h"
 
-namespace net {
+namespace quic {
 
 // Interface for creating a PCC SendAlgorithmInterface
 SendAlgorithmInterface* CreatePccSender(
@@ -23,6 +23,6 @@
                              initial_congestion_window, max_congestion_window);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_PCC_SENDER_H_
diff --git a/net/third_party/quic/platform/api/quic_prefetch.h b/net/third_party/quic/platform/api/quic_prefetch.h
index 8960b92..9410ca8e 100644
--- a/net/third_party/quic/platform/api/quic_prefetch.h
+++ b/net/third_party/quic/platform/api/quic_prefetch.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_prefetch_impl.h"
 
-namespace net {
+namespace quic {
 
 // Move data into the cache before it is read, or "prefetch" it.
 //
@@ -34,6 +34,6 @@
   return QuicPrefetchT0Impl(addr);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_PREFETCH_H_
diff --git a/net/third_party/quic/platform/api/quic_ptr_util.h b/net/third_party/quic/platform/api/quic_ptr_util.h
index bc643ce..20368681b 100644
--- a/net/third_party/quic/platform/api/quic_ptr_util.h
+++ b/net/third_party/quic/platform/api/quic_ptr_util.h
@@ -9,7 +9,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_ptr_util_impl.h"
 
-namespace net {
+namespace quic {
 
 template <typename T, typename... Args>
 std::unique_ptr<T> QuicMakeUnique(Args&&... args) {
@@ -21,6 +21,6 @@
   return QuicWrapUniqueImpl<T>(ptr);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_PTR_UTIL_H_
diff --git a/net/third_party/quic/platform/api/quic_reconstruct_object.h b/net/third_party/quic/platform/api/quic_reconstruct_object.h
index 3606758..a65e0cb 100644
--- a/net/third_party/quic/platform/api/quic_reconstruct_object.h
+++ b/net/third_party/quic/platform/api/quic_reconstruct_object.h
@@ -9,7 +9,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_reconstruct_object_impl.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Reconstruct an object so that it is initialized as when it was first
@@ -27,6 +27,6 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_RECONSTRUCT_OBJECT_H_
diff --git a/net/third_party/quic/platform/api/quic_reference_counted.h b/net/third_party/quic/platform/api/quic_reference_counted.h
index 1833c62e..0837b01 100644
--- a/net/third_party/quic/platform/api/quic_reference_counted.h
+++ b/net/third_party/quic/platform/api/quic_reference_counted.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_reference_counted_impl.h"
 
-namespace net {
+namespace quic {
 
 // Base class for explicitly reference-counted objects in QUIC.
 class QUIC_EXPORT_PRIVATE QuicReferenceCounted
@@ -156,6 +156,6 @@
   QuicReferenceCountedPointerImpl<T> impl_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_REFERENCE_COUNTED_H_
diff --git a/net/third_party/quic/platform/api/quic_reference_counted_test.cc b/net/third_party/quic/platform/api/quic_reference_counted_test.cc
index ee885fd..a985f2d 100644
--- a/net/third_party/quic/platform/api/quic_reference_counted_test.cc
+++ b/net/third_party/quic/platform/api/quic_reference_counted_test.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -170,4 +170,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_singleton.h b/net/third_party/quic/platform/api/quic_singleton.h
index b27d709..ca114c8 100644
--- a/net/third_party/quic/platform/api/quic_singleton.h
+++ b/net/third_party/quic/platform/api/quic_singleton.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_singleton_impl.h"
 
-namespace net {
+namespace quic {
 
 // Singleton utility. Example usage:
 //
@@ -19,12 +19,12 @@
 //    void Bar() { ... }
 //   private:
 //    Foo() { ... }
-//    friend net::QuicSingletonFriend<Foo>;
+//    friend quic::QuicSingletonFriend<Foo>;
 //  };
 //
 // In your source file:
 //  Foo* Foo::GetInstance() {
-//    return net::QuicSingleton<Foo>::get();
+//    return quic::QuicSingleton<Foo>::get();
 //  }
 //
 // To use the singleton:
@@ -43,6 +43,6 @@
 template <typename T>
 using QuicSingletonFriend = QuicSingletonFriendImpl<T>;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_SINGLETON_H_
diff --git a/net/third_party/quic/platform/api/quic_singleton_test.cc b/net/third_party/quic/platform/api/quic_singleton_test.cc
index 1f011a51..5a12565 100644
--- a/net/third_party/quic/platform/api/quic_singleton_test.cc
+++ b/net/third_party/quic/platform/api/quic_singleton_test.cc
@@ -6,17 +6,17 @@
 
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
 class Foo {
  public:
-  static Foo* GetInstance() { return net::QuicSingleton<Foo>::get(); }
+  static Foo* GetInstance() { return quic::QuicSingleton<Foo>::get(); }
 
  private:
   Foo() = default;
-  friend net::QuicSingletonFriend<Foo>;
+  friend quic::QuicSingletonFriend<Foo>;
 };
 
 class QuicSingletonTest : public QuicTest {};
@@ -29,4 +29,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_sleep.h b/net/third_party/quic/platform/api/quic_sleep.h
index 1fbc9b4..fe986aa 100644
--- a/net/third_party/quic/platform/api/quic_sleep.h
+++ b/net/third_party/quic/platform/api/quic_sleep.h
@@ -8,12 +8,12 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/impl/quic_sleep_impl.h"
 
-namespace net {
+namespace quic {
 
 inline void QuicSleep(QuicTime::Delta duration) {
   QuicSleepImpl(duration);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_SLEEP_H_
diff --git a/net/third_party/quic/platform/api/quic_socket_address.cc b/net/third_party/quic/platform/api/quic_socket_address.cc
index 311f1ef..392f44bd 100644
--- a/net/third_party/quic/platform/api/quic_socket_address.cc
+++ b/net/third_party/quic/platform/api/quic_socket_address.cc
@@ -5,7 +5,7 @@
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicSocketAddress::QuicSocketAddress(QuicIpAddress address, uint16_t port)
     : impl_(address.impl(), port) {}
@@ -55,4 +55,4 @@
   return impl_.generic_address();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_socket_address.h b/net/third_party/quic/platform/api/quic_socket_address.h
index 6649e1d..7835ef92 100644
--- a/net/third_party/quic/platform/api/quic_socket_address.h
+++ b/net/third_party/quic/platform/api/quic_socket_address.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/impl/quic_socket_address_impl.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicSocketAddress {
   // A class representing a socket endpoint address (i.e., IP address plus a
@@ -44,6 +44,6 @@
   QuicSocketAddressImpl impl_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_SOCKET_ADDRESS_H_
diff --git a/net/third_party/quic/platform/api/quic_stack_trace.h b/net/third_party/quic/platform/api/quic_stack_trace.h
index 1f5bcec..60dc90b 100644
--- a/net/third_party/quic/platform/api/quic_stack_trace.h
+++ b/net/third_party/quic/platform/api/quic_stack_trace.h
@@ -8,12 +8,12 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/impl/quic_stack_trace_impl.h"
 
-namespace net {
+namespace quic {
 
 inline QuicString QuicStackTrace() {
   return QuicStackTraceImpl();
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_STACK_TRACE_H_
diff --git a/net/third_party/quic/platform/api/quic_str_cat.h b/net/third_party/quic/platform/api/quic_str_cat.h
index 54548b2..8fb6e4d 100644
--- a/net/third_party/quic/platform/api/quic_str_cat.h
+++ b/net/third_party/quic/platform/api/quic_str_cat.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/impl/quic_str_cat_impl.h"
 
-namespace net {
+namespace quic {
 
 template <typename... Args>
 inline QuicString QuicStrCat(const Args&... args) {
@@ -22,6 +22,6 @@
   return QuicStringPrintfImpl(std::forward<const Args&>(args)...);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_STR_CAT_H_
diff --git a/net/third_party/quic/platform/api/quic_str_cat_test.cc b/net/third_party/quic/platform/api/quic_str_cat_test.cc
index 0391dd2..18444823 100644
--- a/net/third_party/quic/platform/api/quic_str_cat_test.cc
+++ b/net/third_party/quic/platform/api/quic_str_cat_test.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -164,4 +164,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_string.h b/net/third_party/quic/platform/api/quic_string.h
index 500735b..2e6de6a 100644
--- a/net/third_party/quic/platform/api/quic_string.h
+++ b/net/third_party/quic/platform/api/quic_string.h
@@ -7,10 +7,10 @@
 
 #include "net/third_party/quic/platform/impl/quic_string_impl.h"
 
-namespace net {
+namespace quic {
 
 using QuicString = QuicStringImpl;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_STRING_H_
diff --git a/net/third_party/quic/platform/api/quic_string_piece.h b/net/third_party/quic/platform/api/quic_string_piece.h
index 28bf15d..ab60f426 100644
--- a/net/third_party/quic/platform/api/quic_string_piece.h
+++ b/net/third_party/quic/platform/api/quic_string_piece.h
@@ -7,10 +7,10 @@
 
 #include "net/third_party/quic/platform/impl/quic_string_piece_impl.h"
 
-namespace net {
+namespace quic {
 
 using QuicStringPiece = QuicStringPieceImpl;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_STRING_PIECE_H_
diff --git a/net/third_party/quic/platform/api/quic_string_utils.h b/net/third_party/quic/platform/api/quic_string_utils.h
index 3f53181..3f5c2b8 100644
--- a/net/third_party/quic/platform/api/quic_string_utils.h
+++ b/net/third_party/quic/platform/api/quic_string_utils.h
@@ -11,13 +11,13 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/impl/quic_string_utils_impl.h"
 
-namespace net {
+namespace quic {
 
 template <typename... Args>
 inline void QuicStrAppend(QuicString* output, const Args&... args) {
   QuicStrAppendImpl(output, std::forward<const Args&>(args)...);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_STRING_UTILS_H_
diff --git a/net/third_party/quic/platform/api/quic_string_utils_test.cc b/net/third_party/quic/platform/api/quic_string_utils_test.cc
index c4413dd..df43680b 100644
--- a/net/third_party/quic/platform/api/quic_string_utils_test.cc
+++ b/net/third_party/quic/platform/api/quic_string_utils_test.cc
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -175,4 +175,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_test_loopback.cc b/net/third_party/quic/platform/api/quic_test_loopback.cc
index 0bcc768..a226ab57 100644
--- a/net/third_party/quic/platform/api/quic_test_loopback.cc
+++ b/net/third_party/quic/platform/api/quic_test_loopback.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/platform/api/quic_test_loopback.h"
 
-namespace net {
+namespace quic {
 
 IpAddressFamily AddressFamilyUnderTest() {
   return AddressFamilyUnderTestImpl();
@@ -26,4 +26,4 @@
   return TestLoopbackImpl(index);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_test_loopback.h b/net/third_party/quic/platform/api/quic_test_loopback.h
index 4b37045..b1bf3e6 100644
--- a/net/third_party/quic/platform/api/quic_test_loopback.h
+++ b/net/third_party/quic/platform/api/quic_test_loopback.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_test_loopback_impl.h"
 
-namespace net {
+namespace quic {
 
 // Returns the address family (IPv4 or IPv6) used to run test under.
 IpAddressFamily AddressFamilyUnderTest();
@@ -27,6 +27,6 @@
 // platform-dependent.
 QuicIpAddress TestLoopback(int index);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_TEST_LOOPBACK_H_
diff --git a/net/third_party/quic/platform/api/quic_test_mem_slice_vector.h b/net/third_party/quic/platform/api/quic_test_mem_slice_vector.h
index dc89bcfc..75160838 100644
--- a/net/third_party/quic/platform/api/quic_test_mem_slice_vector.h
+++ b/net/third_party/quic/platform/api/quic_test_mem_slice_vector.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_mem_slice_span.h"
 #include "net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.h"
 
-namespace net {
+namespace quic {
 namespace test {
 // QuicTestMemSliceVector is a test only class which creates a vector of
 // platform-specific data structure (used as QuicMemSlice) from an array of data
@@ -30,6 +30,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_TEST_MEM_SLICE_VECTOR_H_
diff --git a/net/third_party/quic/platform/api/quic_test_output.h b/net/third_party/quic/platform/api/quic_test_output.h
index 631e68c..d9248ea 100644
--- a/net/third_party/quic/platform/api/quic_test_output.h
+++ b/net/third_party/quic/platform/api/quic_test_output.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/impl/quic_test_output_impl.h"
 
-namespace net {
+namespace quic {
 
 // Records a QUIC test output file into a directory specified by QUIC_TRACE_DIR
 // environment variable.  Assumes that it's called from a unit test.
@@ -21,5 +21,5 @@
   QuicRecordTestOutputImpl(identifier, data);
 }
 
-}  // namespace net
+}  // namespace quic
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_TEST_OUTPUT_H_
diff --git a/net/third_party/quic/platform/api/quic_test_random.h b/net/third_party/quic/platform/api/quic_test_random.h
index 6adce3c..3401bb31 100644
--- a/net/third_party/quic/platform/api/quic_test_random.h
+++ b/net/third_party/quic/platform/api/quic_test_random.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/impl/quic_test_random_impl.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 using QuicTestRandomBase = QuicTestRandomBaseImpl;
@@ -20,6 +20,6 @@
 using QuicTestRandom = QuicTestRandomImpl;
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_TEST_RANDOM_H_
diff --git a/net/third_party/quic/platform/api/quic_text_utils.h b/net/third_party/quic/platform/api/quic_text_utils.h
index cf3b434..53a6fe0 100644
--- a/net/third_party/quic/platform/api/quic_text_utils.h
+++ b/net/third_party/quic/platform/api/quic_text_utils.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/impl/quic_text_utils_impl.h"
 
-namespace net {
+namespace quic {
 
 // Various utilities for manipulating text.
 class QuicTextUtils {
@@ -114,6 +114,6 @@
   }
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_TEXT_UTILS_H_
diff --git a/net/third_party/quic/platform/api/quic_text_utils_test.cc b/net/third_party/quic/platform/api/quic_text_utils_test.cc
index 729495491..e97f9a1 100644
--- a/net/third_party/quic/platform/api/quic_text_utils_test.cc
+++ b/net/third_party/quic/platform/api/quic_text_utils_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicTextUtilsTest : public QuicTest {};
@@ -203,4 +203,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_uint128.h b/net/third_party/quic/platform/api/quic_uint128.h
index 1deef77..6b4c816 100644
--- a/net/third_party/quic/platform/api/quic_uint128.h
+++ b/net/third_party/quic/platform/api/quic_uint128.h
@@ -7,13 +7,13 @@
 
 #include "net/third_party/quic/platform/impl/quic_uint128_impl.h"
 
-namespace net {
+namespace quic {
 
 using QuicUint128 = QuicUint128Impl;
 #define MakeQuicUint128(hi, lo) MakeQuicUint128Impl(hi, lo)
 #define QuicUint128Low64(x) QuicUint128Low64Impl(x)
 #define QuicUint128High64(x) QuicUint128High64Impl(x)
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_UINT128_H_
diff --git a/net/third_party/quic/platform/api/quic_url.cc b/net/third_party/quic/platform/api/quic_url.cc
index 1db7471..31953fd4 100644
--- a/net/third_party/quic/platform/api/quic_url.cc
+++ b/net/third_party/quic/platform/api/quic_url.cc
@@ -5,7 +5,7 @@
 #include "net/third_party/quic/platform/api/quic_url.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 QuicUrl::QuicUrl(QuicStringPiece url) : impl_(url) {}
 
@@ -46,4 +46,4 @@
   return impl_.port();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_url.h b/net/third_party/quic/platform/api/quic_url.h
index 54986dc..3725adb 100644
--- a/net/third_party/quic/platform/api/quic_url.h
+++ b/net/third_party/quic/platform/api/quic_url.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/impl/quic_url_impl.h"
 
-namespace net {
+namespace quic {
 
 // QuicUrl stores a representation of a URL.
 class QUIC_EXPORT_PRIVATE QuicUrl {
@@ -65,6 +65,6 @@
   QuicUrlImpl impl_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_URL_H_
diff --git a/net/third_party/quic/platform/api/quic_url_test.cc b/net/third_party/quic/platform/api/quic_url_test.cc
index ff7da1d..fdeb8e62 100644
--- a/net/third_party/quic/platform/api/quic_url_test.cc
+++ b/net/third_party/quic/platform/api/quic_url_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -152,4 +152,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_url_utils.cc b/net/third_party/quic/platform/api/quic_url_utils.cc
index a009b8c7..4cc8f74 100644
--- a/net/third_party/quic/platform/api/quic_url_utils.cc
+++ b/net/third_party/quic/platform/api/quic_url_utils.cc
@@ -5,7 +5,7 @@
 #include "net/third_party/quic/platform/api/quic_url_utils.h"
 #include "net/third_party/quic/platform/api/quic_string.h"
 
-namespace net {
+namespace quic {
 
 // static
 QuicString QuicUrlUtils::HostName(QuicStringPiece url) {
@@ -24,4 +24,4 @@
   return QuicUrlUtilsImpl::GetPushPromiseUrl(scheme, authority, path);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/api/quic_url_utils.h b/net/third_party/quic/platform/api/quic_url_utils.h
index c15e5cb..5580c39 100644
--- a/net/third_party/quic/platform/api/quic_url_utils.h
+++ b/net/third_party/quic/platform/api/quic_url_utils.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/platform/impl/quic_url_utils_impl.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicUrlUtils {
  public:
@@ -34,6 +34,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicUrlUtils);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_API_QUIC_URL_UTILS_H_
diff --git a/net/third_party/quic/platform/impl/quic_chromium_clock.cc b/net/third_party/quic/platform/impl/quic_chromium_clock.cc
index 484dff8..d40b416 100644
--- a/net/third_party/quic/platform/impl/quic_chromium_clock.cc
+++ b/net/third_party/quic/platform/impl/quic_chromium_clock.cc
@@ -7,7 +7,7 @@
 #include "base/memory/singleton.h"
 #include "base/time/time.h"
 
-namespace net {
+namespace quic {
 
 QuicChromiumClock* QuicChromiumClock::GetInstance() {
   return base::Singleton<QuicChromiumClock>::get();
@@ -36,4 +36,4 @@
   return QuicWallTime::FromUNIXMicroseconds(time_since_unix_epoch_micro);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_chromium_clock.h b/net/third_party/quic/platform/impl/quic_chromium_clock.h
index 7d0be92..2bbfeb5 100644
--- a/net/third_party/quic/platform/impl/quic_chromium_clock.h
+++ b/net/third_party/quic/platform/impl/quic_chromium_clock.h
@@ -9,10 +9,10 @@
 #include "net/third_party/quic/platform/api/quic_clock.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // Clock to efficiently retrieve an approximately accurate time from an
-// EpollServer.
+// net::EpollServer.
 class QUIC_EXPORT_PRIVATE QuicChromiumClock : public QuicClock {
  public:
   static QuicChromiumClock* GetInstance();
@@ -29,6 +29,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicChromiumClock);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_CHROMIUM_CLOCK_H_
diff --git a/net/third_party/quic/platform/impl/quic_chromium_clock_test.cc b/net/third_party/quic/platform/impl/quic_chromium_clock_test.cc
index e794f29..2e0b940 100644
--- a/net/third_party/quic/platform/impl/quic_chromium_clock_test.cc
+++ b/net/third_party/quic/platform/impl/quic_chromium_clock_test.cc
@@ -6,7 +6,7 @@
 
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 TEST(QuicChromiumClockTest, Now) {
@@ -35,4 +35,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_containers_impl.h b/net/third_party/quic/platform/impl/quic_containers_impl.h
index c5c534f..09ecacac 100644
--- a/net/third_party/quic/platform/impl/quic_containers_impl.h
+++ b/net/third_party/quic/platform/impl/quic_containers_impl.h
@@ -14,7 +14,7 @@
 #include "net/base/interval_set.h"
 #include "net/base/linked_hash_map.h"
 
-namespace net {
+namespace quic {
 
 // TODO(mpw): s/std::unordered_map/gtl::node_hash_map/ once node_hash_map is
 //   PG3-compatible.
@@ -36,7 +36,7 @@
 
 // A map which offers insertion-ordered iteration.
 template <typename Key, typename Value>
-using QuicLinkedHashMapImpl = linked_hash_map<Key, Value>;
+using QuicLinkedHashMapImpl = net::linked_hash_map<Key, Value>;
 
 // A map which is faster than (for example) hash_map for a certain number of
 // unique key-value-pair elements, and upgrades itself to unordered_map when
@@ -47,7 +47,7 @@
 // A data structure used to represent a sorted set of non-empty, non-adjacent,
 // and mutually disjoint intervals.
 template <typename T>
-using QuicIntervalSetImpl = IntervalSet<T>;
+using QuicIntervalSetImpl = net::IntervalSet<T>;
 
 // Represents a simple queue which may be backed by a list or
 // a flat circular buffer.
@@ -63,6 +63,6 @@
 template <typename T>
 using QuicDequeImpl = base::circular_deque<T>;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_CONTAINERS_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_endian_impl.h b/net/third_party/quic/platform/impl/quic_endian_impl.h
index a03d8e0a..216057b 100644
--- a/net/third_party/quic/platform/impl/quic_endian_impl.h
+++ b/net/third_party/quic/platform/impl/quic_endian_impl.h
@@ -7,7 +7,7 @@
 
 #include "base/sys_byteorder.h"
 
-namespace net {
+namespace quic {
 
 class QuicEndianImpl {
  public:
@@ -33,6 +33,6 @@
   }
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_ENDIAN_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_epoll_clock.cc b/net/third_party/quic/platform/impl/quic_epoll_clock.cc
index f1fe647..f228b23 100644
--- a/net/third_party/quic/platform/impl/quic_epoll_clock.cc
+++ b/net/third_party/quic/platform/impl/quic_epoll_clock.cc
@@ -6,9 +6,9 @@
 
 #include "net/tools/epoll_server/epoll_server.h"
 
-namespace net {
+namespace quic {
 
-QuicEpollClock::QuicEpollClock(EpollServer* epoll_server)
+QuicEpollClock::QuicEpollClock(net::EpollServer* epoll_server)
     : epoll_server_(epoll_server) {}
 
 QuicEpollClock::~QuicEpollClock() = default;
@@ -34,4 +34,4 @@
          QuicTime::Delta::FromMicroseconds(walltime.ToUNIXMicroseconds());
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_epoll_clock.h b/net/third_party/quic/platform/impl/quic_epoll_clock.h
index 178dfa6..2cc21bf 100644
--- a/net/third_party/quic/platform/impl/quic_epoll_clock.h
+++ b/net/third_party/quic/platform/impl/quic_epoll_clock.h
@@ -10,15 +10,17 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_clock.h"
 
+namespace quic {}  // namespace quic
 namespace net {
-
 class EpollServer;
+}  // namespace net
+namespace quic {
 
 // Clock to efficiently retrieve an approximately accurate time from an
-// EpollServer.
+// net::EpollServer.
 class QuicEpollClock : public QuicClock {
  public:
-  explicit QuicEpollClock(EpollServer* epoll_server);
+  explicit QuicEpollClock(net::EpollServer* epoll_server);
   ~QuicEpollClock() override;
 
   // Returns the approximate current time as a QuicTime object.
@@ -38,12 +40,12 @@
       const QuicWallTime& walltime) const override;
 
  protected:
-  EpollServer* epoll_server_;
+  net::EpollServer* epoll_server_;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(QuicEpollClock);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_EPOLL_CLOCK_H_
diff --git a/net/third_party/quic/platform/impl/quic_epoll_clock_test.cc b/net/third_party/quic/platform/impl/quic_epoll_clock_test.cc
index b141423..f0758de5 100644
--- a/net/third_party/quic/platform/impl/quic_epoll_clock_test.cc
+++ b/net/third_party/quic/platform/impl/quic_epoll_clock_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/mock_epoll_server.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicEpollClockTest : public QuicTest {};
@@ -45,4 +45,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_estimate_memory_usage_impl.h b/net/third_party/quic/platform/impl/quic_estimate_memory_usage_impl.h
index 764658d9..5e4a10e 100644
--- a/net/third_party/quic/platform/impl/quic_estimate_memory_usage_impl.h
+++ b/net/third_party/quic/platform/impl/quic_estimate_memory_usage_impl.h
@@ -9,13 +9,13 @@
 
 #include "base/trace_event/memory_usage_estimator.h"
 
-namespace net {
+namespace quic {
 
 template <class T>
 size_t QuicEstimateMemoryUsageImpl(const T& object) {
   return base::trace_event::EstimateMemoryUsage(object);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_ESTIMATE_MEMORY_USAGE_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_flags_impl.h b/net/third_party/quic/platform/impl/quic_flags_impl.h
index 62012592..7dda483 100644
--- a/net/third_party/quic/platform/impl/quic_flags_impl.h
+++ b/net/third_party/quic/platform/impl/quic_flags_impl.h
@@ -15,7 +15,7 @@
 #undef QUIC_FLAG
 
 // API compatibility with new-style flags.
-namespace net {
+namespace quic {
 
 inline bool GetQuicFlagImpl(bool flag) {
   return flag;
@@ -74,5 +74,5 @@
 #define SetQuicRestartFlagImpl(flag, value) \
   SetQuicFlag(&RESTART_FLAG(flag), value)
 
-}  // namespace net
+}  // namespace quic
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_FLAGS_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_hostname_utils_impl.cc b/net/third_party/quic/platform/impl/quic_hostname_utils_impl.cc
index 6b05544d..ab3770e2 100644
--- a/net/third_party/quic/platform/impl/quic_hostname_utils_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_hostname_utils_impl.cc
@@ -10,7 +10,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 // static
 bool QuicHostnameUtilsImpl::IsValidSNI(QuicStringPiece sni) {
@@ -20,16 +20,16 @@
   // would consider valid. By far the most common hostname character NOT
   // accepted by the above spec is '_'.
   url::CanonHostInfo host_info;
-  string canonicalized_host(CanonicalizeHost(sni.as_string(), &host_info));
+  string canonicalized_host(net::CanonicalizeHost(sni.as_string(), &host_info));
   return !host_info.IsIPAddress() &&
-         IsCanonicalizedHostCompliant(canonicalized_host) &&
+         net::IsCanonicalizedHostCompliant(canonicalized_host) &&
          sni.find_last_of('.') != string::npos;
 }
 
 // static
 char* QuicHostnameUtilsImpl::NormalizeHostname(char* hostname) {
   url::CanonHostInfo host_info;
-  string host(CanonicalizeHost(hostname, &host_info));
+  string host(net::CanonicalizeHost(hostname, &host_info));
 
   // Walk backwards over the string, stopping at the first trailing dot.
   size_t host_end = host.length();
@@ -48,4 +48,4 @@
   return hostname;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_hostname_utils_impl.h b/net/third_party/quic/platform/impl/quic_hostname_utils_impl.h
index 9600db7..6d4f9b0 100644
--- a/net/third_party/quic/platform/impl/quic_hostname_utils_impl.h
+++ b/net/third_party/quic/platform/impl/quic_hostname_utils_impl.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicHostnameUtilsImpl {
  public:
@@ -27,6 +27,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicHostnameUtilsImpl);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_HOSTNAME_UTILS_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_ip_address_impl.cc b/net/third_party/quic/platform/impl/quic_ip_address_impl.cc
index b2bc78a..48f4c9b 100644
--- a/net/third_party/quic/platform/impl/quic_ip_address_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_ip_address_impl.cc
@@ -17,25 +17,25 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 QuicIpAddressImpl QuicIpAddressImpl::Loopback4() {
-  return QuicIpAddressImpl(IPAddress::IPv4Localhost());
+  return QuicIpAddressImpl(net::IPAddress::IPv4Localhost());
 }
 
 QuicIpAddressImpl QuicIpAddressImpl::Loopback6() {
-  return QuicIpAddressImpl(IPAddress::IPv6Localhost());
+  return QuicIpAddressImpl(net::IPAddress::IPv6Localhost());
 }
 
 QuicIpAddressImpl QuicIpAddressImpl::Any4() {
-  return QuicIpAddressImpl(IPAddress::IPv4AllZeros());
+  return QuicIpAddressImpl(net::IPAddress::IPv4AllZeros());
 }
 
 QuicIpAddressImpl QuicIpAddressImpl::Any6() {
-  return QuicIpAddressImpl(IPAddress::IPv6AllZeros());
+  return QuicIpAddressImpl(net::IPAddress::IPv6AllZeros());
 }
 
-QuicIpAddressImpl::QuicIpAddressImpl(const IPAddress& addr)
+QuicIpAddressImpl::QuicIpAddressImpl(const net::IPAddress& addr)
     : ip_address_(addr) {}
 
 bool operator==(QuicIpAddressImpl lhs, QuicIpAddressImpl rhs) {
@@ -67,9 +67,9 @@
 
 int QuicIpAddressImpl::AddressFamilyToInt() const {
   switch (ip_address_.size()) {
-    case IPAddress::kIPv4AddressSize:
+    case net::IPAddress::kIPv4AddressSize:
       return AF_INET;
-    case IPAddress::kIPv6AddressSize:
+    case net::IPAddress::kIPv6AddressSize:
       return AF_INET6;
     default:
       NOTREACHED() << "Bad IP address";
@@ -78,7 +78,7 @@
 }
 
 string QuicIpAddressImpl::ToPackedString() const {
-  return IPAddressToPackedString(ip_address_);
+  return net::IPAddressToPackedString(ip_address_);
 }
 
 string QuicIpAddressImpl::ToString() const {
@@ -103,12 +103,12 @@
 }
 
 bool QuicIpAddressImpl::FromPackedString(const char* data, size_t length) {
-  if (length != IPAddress::kIPv4AddressSize &&
-      length != IPAddress::kIPv6AddressSize) {
+  if (length != net::IPAddress::kIPv4AddressSize &&
+      length != net::IPAddress::kIPv6AddressSize) {
     QUIC_BUG << "Invalid packed IP address of length " << length;
     return false;
   }
-  ip_address_ = IPAddress(reinterpret_cast<const uint8_t*>(data), length);
+  ip_address_ = net::IPAddress(reinterpret_cast<const uint8_t*>(data), length);
   return true;
 }
 
@@ -126,7 +126,8 @@
 
 bool QuicIpAddressImpl::InSameSubnet(const QuicIpAddressImpl& other,
                                      int subnet_length) {
-  return IPAddressMatchesPrefix(ip_address_, other.ip_address(), subnet_length);
+  return net::IPAddressMatchesPrefix(ip_address_, other.ip_address(),
+                                     subnet_length);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_ip_address_impl.h b/net/third_party/quic/platform/impl/quic_ip_address_impl.h
index 52ea5c4..769c2fb 100644
--- a/net/third_party/quic/platform/impl/quic_ip_address_impl.h
+++ b/net/third_party/quic/platform/impl/quic_ip_address_impl.h
@@ -11,13 +11,13 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_ip_address_family.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicIpAddressImpl {
  public:
   enum : size_t {
-    kIPv4AddressSize = IPAddress::kIPv4AddressSize,
-    kIPv6AddressSize = IPAddress::kIPv6AddressSize
+    kIPv4AddressSize = net::IPAddress::kIPv4AddressSize,
+    kIPv6AddressSize = net::IPAddress::kIPv6AddressSize
   };
   static QuicIpAddressImpl Loopback4();
   static QuicIpAddressImpl Loopback6();
@@ -26,7 +26,7 @@
 
   QuicIpAddressImpl() = default;
   QuicIpAddressImpl(const QuicIpAddressImpl& other) = default;
-  explicit QuicIpAddressImpl(const IPAddress& addr);
+  explicit QuicIpAddressImpl(const net::IPAddress& addr);
   QuicIpAddressImpl& operator=(const QuicIpAddressImpl& other) = default;
   QuicIpAddressImpl& operator=(QuicIpAddressImpl&& other) = default;
   friend bool operator==(QuicIpAddressImpl lhs, QuicIpAddressImpl rhs);
@@ -45,12 +45,12 @@
   bool IsIPv6() const;
 
   bool InSameSubnet(const QuicIpAddressImpl& other, int subnet_length);
-  const IPAddress& ip_address() const { return ip_address_; }
+  const net::IPAddress& ip_address() const { return ip_address_; }
 
  private:
-  IPAddress ip_address_;
+  net::IPAddress ip_address_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_IP_ADDRESS_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_logging_impl.h b/net/third_party/quic/platform/impl/quic_logging_impl.h
index f4c84012..d13eb146 100644
--- a/net/third_party/quic/platform/impl/quic_logging_impl.h
+++ b/net/third_party/quic/platform/impl/quic_logging_impl.h
@@ -63,7 +63,7 @@
 
 #define QUIC_PLOG_IMPL(severity) DVLOG(1)
 
-namespace net {
+namespace quic {
 template <typename T>
 NET_EXPORT_PRIVATE inline std::ostream& operator<<(std::ostream& out,
                                                    const std::vector<T>& v) {
@@ -75,6 +75,6 @@
   }
   return out << "]";
 }
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_LOGGING_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_lru_cache_impl.h b/net/third_party/quic/platform/impl/quic_lru_cache_impl.h
index 7fa0b24..527173ff 100644
--- a/net/third_party/quic/platform/impl/quic_lru_cache_impl.h
+++ b/net/third_party/quic/platform/impl/quic_lru_cache_impl.h
@@ -7,7 +7,7 @@
 
 #include "base/containers/mru_cache.h"
 
-namespace net {
+namespace quic {
 
 template <class K, class V>
 class QuicLRUCacheImpl {
@@ -45,6 +45,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicLRUCacheImpl);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_LRU_CACHE_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_map_util_impl.h b/net/third_party/quic/platform/impl/quic_map_util_impl.h
index 865d7b60..d6a6216 100644
--- a/net/third_party/quic/platform/impl/quic_map_util_impl.h
+++ b/net/third_party/quic/platform/impl/quic_map_util_impl.h
@@ -7,7 +7,7 @@
 
 #include "base/stl_util.h"
 
-namespace net {
+namespace quic {
 
 template <class Collection, class Key>
 bool QuicContainsKeyImpl(const Collection& collection, const Key& key) {
@@ -19,6 +19,6 @@
   return base::ContainsValue(collection, value);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_MAP_UTIL_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_mem_slice_impl.cc b/net/third_party/quic/platform/impl/quic_mem_slice_impl.cc
index 2387df7..bec52a09 100644
--- a/net/third_party/quic/platform/impl/quic_mem_slice_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_mem_slice_impl.cc
@@ -6,17 +6,17 @@
 
 #include "net/third_party/quic/core/quic_buffer_allocator.h"
 
-namespace net {
+namespace quic {
 
 QuicMemSliceImpl::QuicMemSliceImpl() = default;
 
 QuicMemSliceImpl::QuicMemSliceImpl(QuicBufferAllocator* /*allocator*/,
                                    size_t length) {
-  io_buffer_ = new IOBuffer(length);
+  io_buffer_ = new net::IOBuffer(length);
   length_ = length;
 }
 
-QuicMemSliceImpl::QuicMemSliceImpl(scoped_refptr<IOBuffer> io_buffer,
+QuicMemSliceImpl::QuicMemSliceImpl(scoped_refptr<net::IOBuffer> io_buffer,
                                    size_t length)
     : io_buffer_(std::move(io_buffer)), length_(length) {}
 
@@ -46,4 +46,4 @@
   return io_buffer_->data();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_mem_slice_impl.h b/net/third_party/quic/platform/impl/quic_mem_slice_impl.h
index a5a49ac..f5f7699 100644
--- a/net/third_party/quic/platform/impl/quic_mem_slice_impl.h
+++ b/net/third_party/quic/platform/impl/quic_mem_slice_impl.h
@@ -9,7 +9,7 @@
 #include "net/base/io_buffer.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QuicBufferAllocator;
 
@@ -22,7 +22,7 @@
   // |length|.
   QuicMemSliceImpl(QuicBufferAllocator* allocator, size_t length);
 
-  QuicMemSliceImpl(scoped_refptr<IOBuffer> io_buffer, size_t length);
+  QuicMemSliceImpl(scoped_refptr<net::IOBuffer> io_buffer, size_t length);
 
   QuicMemSliceImpl(const QuicMemSliceImpl& other) = delete;
   QuicMemSliceImpl& operator=(const QuicMemSliceImpl& other) = delete;
@@ -46,11 +46,11 @@
   bool empty() const { return length_ == 0; }
 
  private:
-  scoped_refptr<IOBuffer> io_buffer_;
+  scoped_refptr<net::IOBuffer> io_buffer_;
   // Length of io_buffer_.
   size_t length_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_MEM_SLICE_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_mem_slice_span_impl.cc b/net/third_party/quic/platform/impl/quic_mem_slice_span_impl.cc
index c2dbed3..3440d4e9 100644
--- a/net/third_party/quic/platform/impl/quic_mem_slice_span_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_mem_slice_span_impl.cc
@@ -7,10 +7,10 @@
 #include "net/third_party/quic/core/quic_stream_send_buffer.h"
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 
-namespace net {
+namespace quic {
 
 QuicMemSliceSpanImpl::QuicMemSliceSpanImpl(
-    const scoped_refptr<IOBuffer>* buffers,
+    const scoped_refptr<net::IOBuffer>* buffers,
     const int* lengths,
     size_t num_buffers)
     : buffers_(buffers), lengths_(lengths), num_buffers_(num_buffers) {}
@@ -41,4 +41,4 @@
   return saved_length;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_mem_slice_span_impl.h b/net/third_party/quic/platform/impl/quic_mem_slice_span_impl.h
index 98a684d..663696f 100644
--- a/net/third_party/quic/platform/impl/quic_mem_slice_span_impl.h
+++ b/net/third_party/quic/platform/impl/quic_mem_slice_span_impl.h
@@ -9,14 +9,14 @@
 #include "net/base/io_buffer.h"
 #include "net/third_party/quic/core/quic_types.h"
 
-namespace net {
+namespace quic {
 
 class QuicStreamSendBuffer;
 
 // QuicMemSliceSpanImpl wraps a MemSlice span.
 class QUIC_EXPORT_PRIVATE QuicMemSliceSpanImpl {
  public:
-  QuicMemSliceSpanImpl(const scoped_refptr<IOBuffer>* buffers,
+  QuicMemSliceSpanImpl(const scoped_refptr<net::IOBuffer>* buffers,
                        const int* lengths,
                        size_t num_buffers);
 
@@ -34,12 +34,12 @@
   bool empty() const { return num_buffers_ == 0; }
 
  private:
-  const scoped_refptr<IOBuffer>* buffers_;
+  const scoped_refptr<net::IOBuffer>* buffers_;
   const int* lengths_;
   // Not const so that the move operator can work properly.
   size_t num_buffers_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_MEM_SLICE_SPAN_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_mutex_impl.cc b/net/third_party/quic/platform/impl/quic_mutex_impl.cc
index 9e8c5d92..b6e53b0 100644
--- a/net/third_party/quic/platform/impl/quic_mutex_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_mutex_impl.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_mutex_impl.h"
 
-namespace net {
+namespace quic {
 
 void QuicLockImpl::WriterLock() {
   lock_.Acquire();
@@ -22,4 +22,4 @@
   lock_.Release();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_mutex_impl.h b/net/third_party/quic/platform/impl/quic_mutex_impl.h
index 3d8f6048..cb9d8aff 100644
--- a/net/third_party/quic/platform/impl/quic_mutex_impl.h
+++ b/net/third_party/quic/platform/impl/quic_mutex_impl.h
@@ -41,7 +41,7 @@
 #define SHARED_LOCKS_REQUIRED(...)
 #endif
 
-namespace net {
+namespace quic {
 
 // A class wrapping a non-reentrant mutex.
 class QUIC_EXPORT_PRIVATE QuicLockImpl {
@@ -69,6 +69,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicLockImpl);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_MUTEX_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_optional_impl.h b/net/third_party/quic/platform/impl/quic_optional_impl.h
index e0c9fdb..c75152d 100644
--- a/net/third_party/quic/platform/impl/quic_optional_impl.h
+++ b/net/third_party/quic/platform/impl/quic_optional_impl.h
@@ -7,11 +7,11 @@
 
 #include "base/optional.h"
 
-namespace net {
+namespace quic {
 
 template <typename T>
 using QuicOptionalImpl = base::Optional<T>;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_OPTIONAL_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_pcc_sender_impl.h b/net/third_party/quic/platform/impl/quic_pcc_sender_impl.h
index 9db9459..de8a708 100644
--- a/net/third_party/quic/platform/impl/quic_pcc_sender_impl.h
+++ b/net/third_party/quic/platform/impl/quic_pcc_sender_impl.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/congestion_control/send_algorithm_interface.h"
 #include "net/third_party/quic/core/congestion_control/tcp_cubic_sender_bytes.h"
 
-namespace net {
+namespace quic {
 
 // Interface for creating a PCC SendAlgorithmInterface.  For chromium,
 // this implementation is currently a stub that passes through to
@@ -26,6 +26,6 @@
                                  max_congestion_window, stats);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_PCC_SENDER_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_prefetch_impl.h b/net/third_party/quic/platform/impl/quic_prefetch_impl.h
index 27554d7..1d44637 100644
--- a/net/third_party/quic/platform/impl/quic_prefetch_impl.h
+++ b/net/third_party/quic/platform/impl/quic_prefetch_impl.h
@@ -9,7 +9,7 @@
 #include <intrin.h>
 #endif
 
-namespace net {
+namespace quic {
 
 inline void QuicPrefetchT0Impl(const void* addr) {
 #if defined(__GNUC__)
@@ -19,6 +19,6 @@
 #endif
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_PREFETCH_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_ptr_util_impl.h b/net/third_party/quic/platform/impl/quic_ptr_util_impl.h
index a1c7e29..98f940a4 100644
--- a/net/third_party/quic/platform/impl/quic_ptr_util_impl.h
+++ b/net/third_party/quic/platform/impl/quic_ptr_util_impl.h
@@ -6,7 +6,7 @@
 
 #include "base/memory/ptr_util.h"
 
-namespace net {
+namespace quic {
 
 template <typename T, typename... Args>
 std::unique_ptr<T> QuicMakeUniqueImpl(Args&&... args) {
@@ -18,6 +18,6 @@
   return base::WrapUnique<T>(ptr);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_PTR_UTIL_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_reconstruct_object_impl.h b/net/third_party/quic/platform/impl/quic_reconstruct_object_impl.h
index fe2c81c..d9e7fc2 100644
--- a/net/third_party/quic/platform/impl/quic_reconstruct_object_impl.h
+++ b/net/third_party/quic/platform/impl/quic_reconstruct_object_impl.h
@@ -21,7 +21,7 @@
 #include <new>
 #include <utility>
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Reconstruct an object so that it is initialized as when it was first
@@ -44,6 +44,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_RECONSTRUCT_OBJECT_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_reference_counted_impl.h b/net/third_party/quic/platform/impl/quic_reference_counted_impl.h
index ff9e1369..7414c9f 100644
--- a/net/third_party/quic/platform/impl/quic_reference_counted_impl.h
+++ b/net/third_party/quic/platform/impl/quic_reference_counted_impl.h
@@ -8,7 +8,7 @@
 #include "base/memory/ref_counted.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicReferenceCountedImpl
     : public base::RefCountedThreadSafe<QuicReferenceCountedImpl> {
@@ -109,6 +109,6 @@
   scoped_refptr<T> refptr_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_REFERENCE_COUNTED_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_singleton_impl.h b/net/third_party/quic/platform/impl/quic_singleton_impl.h
index 22eaaa4..eb5523e 100644
--- a/net/third_party/quic/platform/impl/quic_singleton_impl.h
+++ b/net/third_party/quic/platform/impl/quic_singleton_impl.h
@@ -7,7 +7,7 @@
 
 #include "base/memory/singleton.h"
 
-namespace net {
+namespace quic {
 
 template <typename T>
 using QuicSingletonImpl = base::Singleton<T, base::DefaultSingletonTraits<T>>;
@@ -15,6 +15,6 @@
 template <typename T>
 using QuicSingletonFriendImpl = base::DefaultSingletonTraits<T>;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_SINGLETON_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_sleep_impl.h b/net/third_party/quic/platform/impl/quic_sleep_impl.h
index 578fb72..8bcedd6c 100644
--- a/net/third_party/quic/platform/impl/quic_sleep_impl.h
+++ b/net/third_party/quic/platform/impl/quic_sleep_impl.h
@@ -9,13 +9,13 @@
 #include "base/time/time.h"
 #include "net/third_party/quic/core/quic_time.h"
 
-namespace net {
+namespace quic {
 
 inline void QuicSleepImpl(QuicTime::Delta duration) {
   base::PlatformThread::Sleep(
       base::TimeDelta::FromMilliseconds(duration.ToMilliseconds()));
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_SLEEP_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_socket_address_impl.cc b/net/third_party/quic/platform/impl/quic_socket_address_impl.cc
index afcfd05..5041e0a 100644
--- a/net/third_party/quic/platform/impl/quic_socket_address_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_socket_address_impl.cc
@@ -9,9 +9,9 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
-QuicSocketAddressImpl::QuicSocketAddressImpl(const IPEndPoint& address)
+QuicSocketAddressImpl::QuicSocketAddressImpl(const net::IPEndPoint& address)
     : socket_address_(address) {}
 
 QuicSocketAddressImpl::QuicSocketAddressImpl(QuicIpAddressImpl address,
@@ -60,7 +60,7 @@
 }
 
 int QuicSocketAddressImpl::FromSocket(int fd) {
-  SockaddrStorage storage;
+  net::SockaddrStorage storage;
   if (getsockname(fd, storage.addr, &storage.addr_len) != 0 ||
       !socket_address_.FromSockAddr(storage.addr, storage.addr_len)) {
     return 1;
@@ -90,4 +90,4 @@
   return raw_address;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_socket_address_impl.h b/net/third_party/quic/platform/impl/quic_socket_address_impl.h
index 1960782..d2c6130 100644
--- a/net/third_party/quic/platform/impl/quic_socket_address_impl.h
+++ b/net/third_party/quic/platform/impl/quic_socket_address_impl.h
@@ -9,12 +9,12 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/impl/quic_ip_address_impl.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicSocketAddressImpl {
  public:
   QuicSocketAddressImpl() = default;
-  explicit QuicSocketAddressImpl(const IPEndPoint& addr);
+  explicit QuicSocketAddressImpl(const net::IPEndPoint& addr);
   QuicSocketAddressImpl(QuicIpAddressImpl address, uint16_t port);
   explicit QuicSocketAddressImpl(const struct sockaddr_storage& saddr);
   explicit QuicSocketAddressImpl(const struct sockaddr& saddr);
@@ -36,12 +36,12 @@
   uint16_t port() const;
 
   sockaddr_storage generic_address() const;
-  const IPEndPoint& socket_address() const { return socket_address_; }
+  const net::IPEndPoint& socket_address() const { return socket_address_; }
 
  private:
-  IPEndPoint socket_address_;
+  net::IPEndPoint socket_address_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_SOCKET_ADDRESS_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_socket_utils.cc b/net/third_party/quic/platform/impl/quic_socket_utils.cc
index 9ddbd43..09186e6 100644
--- a/net/third_party/quic/platform/impl/quic_socket_utils.cc
+++ b/net/third_party/quic/platform/impl/quic_socket_utils.cc
@@ -25,7 +25,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 // static
 void QuicSocketUtils::GetAddressAndTimestampFromMsghdr(
@@ -218,7 +218,7 @@
            address_string.length());
     return sizeof(in6_pktinfo);
   } else {
-    NOTREACHED() << "Unrecognized IPAddress";
+    NOTREACHED() << "Unrecognized net::IPAddress";
     return 0;
   }
 }
@@ -315,4 +315,4 @@
   return fd;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_socket_utils.h b/net/third_party/quic/platform/impl/quic_socket_utils.h
index b227938..8a6f0fb 100644
--- a/net/third_party/quic/platform/impl/quic_socket_utils.h
+++ b/net/third_party/quic/platform/impl/quic_socket_utils.h
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/core/quic_bandwidth.h"
 #include "net/third_party/quic/core/quic_types.h"
 
-namespace net {
+namespace quic {
 class QuicIpAddress;
 class QuicSocketAddress;
 
@@ -138,6 +138,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSocketUtils);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_SOCKET_UTILS_H_
diff --git a/net/third_party/quic/platform/impl/quic_socket_utils_test.cc b/net/third_party/quic/platform/impl/quic_socket_utils_test.cc
index bbc019a..95be7b47 100644
--- a/net/third_party/quic/platform/impl/quic_socket_utils_test.cc
+++ b/net/third_party/quic/platform/impl/quic_socket_utils_test.cc
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -172,4 +172,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_stack_trace_impl.h b/net/third_party/quic/platform/impl/quic_stack_trace_impl.h
index c1811d3..fd64eab 100644
--- a/net/third_party/quic/platform/impl/quic_stack_trace_impl.h
+++ b/net/third_party/quic/platform/impl/quic_stack_trace_impl.h
@@ -7,12 +7,12 @@
 
 #include "base/debug/stack_trace.h"
 
-namespace net {
+namespace quic {
 
 inline std::string QuicStackTraceImpl() {
   return base::debug::StackTrace().ToString();
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_STACK_TRACE_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_str_cat_impl.h b/net/third_party/quic/platform/impl/quic_str_cat_impl.h
index 24a11e28..462ad3c 100644
--- a/net/third_party/quic/platform/impl/quic_str_cat_impl.h
+++ b/net/third_party/quic/platform/impl/quic_str_cat_impl.h
@@ -11,7 +11,7 @@
 
 #include "base/strings/stringprintf.h"
 
-namespace net {
+namespace quic {
 
 template <typename... Args>
 inline std::string QuicStrCatImpl(const Args&... args) {
@@ -26,6 +26,6 @@
   return base::StringPrintf(std::forward<const Args&>(args)...);
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_STR_CAT_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_string_impl.h b/net/third_party/quic/platform/impl/quic_string_impl.h
index af26a7c..33e3076 100644
--- a/net/third_party/quic/platform/impl/quic_string_impl.h
+++ b/net/third_party/quic/platform/impl/quic_string_impl.h
@@ -7,10 +7,10 @@
 
 #include <string>
 
-namespace net {
+namespace quic {
 
 using QuicStringImpl = std::string;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_STRING_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_string_piece_impl.h b/net/third_party/quic/platform/impl/quic_string_piece_impl.h
index e99dade..d99b8e5 100644
--- a/net/third_party/quic/platform/impl/quic_string_piece_impl.h
+++ b/net/third_party/quic/platform/impl/quic_string_piece_impl.h
@@ -7,10 +7,10 @@
 
 #include "base/strings/string_piece.h"
 
-namespace net {
+namespace quic {
 
 using QuicStringPieceImpl = base::StringPiece;
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_STRING_PIECE_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_string_utils_impl.h b/net/third_party/quic/platform/impl/quic_string_utils_impl.h
index 16e8889..3a745d67 100644
--- a/net/third_party/quic/platform/impl/quic_string_utils_impl.h
+++ b/net/third_party/quic/platform/impl/quic_string_utils_impl.h
@@ -15,13 +15,13 @@
 #include "net/third_party/quic/platform/api/quic_string.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 template <typename... Args>
 inline void QuicStrAppendImpl(QuicString* output, const Args&... args) {
   output->append(QuicStrCatImpl(args...));
 }
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_STRING_UTILS_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_test_loopback_impl.cc b/net/third_party/quic/platform/impl/quic_test_loopback_impl.cc
index 95ce0e16..c072cbb 100644
--- a/net/third_party/quic/platform/impl/quic_test_loopback_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_test_loopback_impl.cc
@@ -4,27 +4,27 @@
 
 #include "net/third_party/quic/platform/impl/quic_test_loopback_impl.h"
 
-namespace net {
+namespace quic {
 
 IpAddressFamily AddressFamilyUnderTestImpl() {
   return IpAddressFamily::IP_V4;
 }
 
 QuicIpAddress TestLoopback4Impl() {
-  return QuicIpAddress(QuicIpAddressImpl(IPAddress::IPv4Localhost()));
+  return QuicIpAddress(QuicIpAddressImpl(net::IPAddress::IPv4Localhost()));
 }
 
 QuicIpAddress TestLoopback6Impl() {
-  return QuicIpAddress(QuicIpAddressImpl(IPAddress::IPv6Localhost()));
+  return QuicIpAddress(QuicIpAddressImpl(net::IPAddress::IPv6Localhost()));
 }
 
 QuicIpAddress TestLoopbackImpl() {
-  return QuicIpAddress(QuicIpAddressImpl(IPAddress::IPv4Localhost()));
+  return QuicIpAddress(QuicIpAddressImpl(net::IPAddress::IPv4Localhost()));
 }
 
 QuicIpAddress TestLoopbackImpl(int index) {
   const uint8_t kLocalhostIPv4[] = {127, 0, 0, index};
-  return QuicIpAddress(QuicIpAddressImpl(IPAddress(kLocalhostIPv4)));
+  return QuicIpAddress(QuicIpAddressImpl(net::IPAddress(kLocalhostIPv4)));
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_test_loopback_impl.h b/net/third_party/quic/platform/impl/quic_test_loopback_impl.h
index 479bab2..13c0209 100644
--- a/net/third_party/quic/platform/impl/quic_test_loopback_impl.h
+++ b/net/third_party/quic/platform/impl/quic_test_loopback_impl.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/platform/api/quic_ip_address.h"
 
-namespace net {
+namespace quic {
 
 // Returns the address family IPv4 used to run test under.
 IpAddressFamily AddressFamilyUnderTestImpl();
@@ -24,6 +24,6 @@
 // Returns an indexed IPv4 loopback address.
 QuicIpAddress TestLoopbackImpl(int index);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_TEST_LOOPBACK_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.cc b/net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.cc
index ce790e9..ed4051e2 100644
--- a/net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 TestIOBuffer::~TestIOBuffer() {
@@ -27,4 +27,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.h b/net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.h
index db5ea80d..5555afe 100644
--- a/net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.h
+++ b/net/third_party/quic/platform/impl/quic_test_mem_slice_vector_impl.h
@@ -7,13 +7,13 @@
 
 #include "net/third_party/quic/platform/impl/quic_mem_slice_span_impl.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
-class TestIOBuffer : public IOBuffer {
+class TestIOBuffer : public net::IOBuffer {
  public:
-  explicit TestIOBuffer(char* data) : IOBuffer(data) {}
+  explicit TestIOBuffer(char* data) : net::IOBuffer(data) {}
 
  private:
   ~TestIOBuffer() override;
@@ -28,12 +28,12 @@
   QuicMemSliceSpanImpl span();
 
  private:
-  std::vector<scoped_refptr<IOBuffer>> buffers_;
+  std::vector<scoped_refptr<net::IOBuffer>> buffers_;
   std::vector<int> lengths_;
 };
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_TEST_MEM_SLICE_VECTOR_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_test_output_impl.cc b/net/third_party/quic/platform/impl/quic_test_output_impl.cc
index fd61cb8..abdd8adb 100644
--- a/net/third_party/quic/platform/impl/quic_test_output_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_test_output_impl.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/platform/api/quic_str_cat.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 
 void QuicRecordTestOutputToFile(QuicStringPiece filename,
                                 QuicStringPiece data) {
@@ -59,4 +59,4 @@
   QuicRecordTestOutputToFile(filename, data);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_test_output_impl.h b/net/third_party/quic/platform/impl/quic_test_output_impl.h
index 881422c..b00cd1e 100644
--- a/net/third_party/quic/platform/impl/quic_test_output_impl.h
+++ b/net/third_party/quic/platform/impl/quic_test_output_impl.h
@@ -7,10 +7,10 @@
 
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 void QuicRecordTestOutputImpl(QuicStringPiece identifier, QuicStringPiece data);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_TEST_OUTPUT_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_test_random_impl.cc b/net/third_party/quic/platform/impl/quic_test_random_impl.cc
index c634a01..0a0965cb 100644
--- a/net/third_party/quic/platform/impl/quic_test_random_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_test_random_impl.cc
@@ -8,7 +8,7 @@
 
 #include "base/rand_util.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 bool QuicTestRandom::OneIn(int n) {
@@ -55,4 +55,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_test_random_impl.h b/net/third_party/quic/platform/impl/quic_test_random_impl.h
index deadc56..e8112f3 100644
--- a/net/third_party/quic/platform/impl/quic_test_random_impl.h
+++ b/net/third_party/quic/platform/impl/quic_test_random_impl.h
@@ -5,7 +5,7 @@
 #ifndef NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_TEST_RANDOM_IMPL_H_
 #define NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_TEST_RANDOM_IMPL_H_
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicTestRandomBaseImpl {
@@ -47,6 +47,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_TEST_RANDOM_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_text_utils_impl.h b/net/third_party/quic/platform/impl/quic_text_utils_impl.h
index a65839d..a5bc805 100644
--- a/net/third_party/quic/platform/impl/quic_text_utils_impl.h
+++ b/net/third_party/quic/platform/impl/quic_text_utils_impl.h
@@ -19,7 +19,7 @@
 #include "net/base/parse_number.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // google3 implementation of QuicTextUtils.
 class QuicTextUtilsImpl {
@@ -59,7 +59,7 @@
   // Returns true if |in| represents a valid uint32, and stores that value in
   // |out|.
   static bool StringToUint32(QuicStringPiece in, uint32_t* out) {
-    return ParseUint32(in, out, nullptr);
+    return net::ParseUint32(in, out, nullptr);
   }
 
   // Returns true if |in| represents a valid size_t, and stores that value in
@@ -132,6 +132,6 @@
   }
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_TEXT_UTILS_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_uint128_impl.h b/net/third_party/quic/platform/impl/quic_uint128_impl.h
index 22149ee..c6e8279 100644
--- a/net/third_party/quic/platform/impl/quic_uint128_impl.h
+++ b/net/third_party/quic/platform/impl/quic_uint128_impl.h
@@ -7,13 +7,13 @@
 
 #include "net/base/int128.h"
 
-namespace net {
+namespace quic {
 
-using QuicUint128Impl = uint128;
-#define MakeQuicUint128Impl(hi, lo) MakeUint128(hi, lo)
+using QuicUint128Impl = net::uint128;
+#define MakeQuicUint128Impl(hi, lo) net::MakeUint128(hi, lo)
 #define QuicUint128Low64Impl(x) Uint128Low64(x)
 #define QuicUint128High64Impl(x) Uint128High64(x)
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_UINT128_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_url_impl.cc b/net/third_party/quic/platform/impl/quic_url_impl.cc
index d093e8b..d9c1fd8d 100644
--- a/net/third_party/quic/platform/impl/quic_url_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_url_impl.cc
@@ -8,7 +8,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 QuicUrlImpl::QuicUrlImpl(QuicStringPiece url) : url_(url) {}
 
@@ -103,4 +103,4 @@
   return port;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_url_impl.h b/net/third_party/quic/platform/impl/quic_url_impl.h
index af500d7..d435dd56 100644
--- a/net/third_party/quic/platform/impl/quic_url_impl.h
+++ b/net/third_party/quic/platform/impl/quic_url_impl.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "url/gurl.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicUrlImpl {
  public:
@@ -62,6 +62,6 @@
   GURL url_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_URL_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_url_utils_impl.cc b/net/third_party/quic/platform/impl/quic_url_utils_impl.cc
index 05f91b81..daf5792 100644
--- a/net/third_party/quic/platform/impl/quic_url_utils_impl.cc
+++ b/net/third_party/quic/platform/impl/quic_url_utils_impl.cc
@@ -6,7 +6,7 @@
 
 #include "url/gurl.h"
 
-namespace net {
+namespace quic {
 
 // static
 std::string QuicUrlUtilsImpl::HostName(QuicStringPiece url) {
@@ -151,4 +151,4 @@
   return full_url.spec();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/platform/impl/quic_url_utils_impl.h b/net/third_party/quic/platform/impl/quic_url_utils_impl.h
index a9a22b54..84facd98 100644
--- a/net/third_party/quic/platform/impl/quic_url_utils_impl.h
+++ b/net/third_party/quic/platform/impl/quic_url_utils_impl.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QUIC_EXPORT_PRIVATE QuicUrlUtilsImpl {
  public:
@@ -33,6 +33,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicUrlUtilsImpl);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_PLATFORM_IMPL_QUIC_URL_UTILS_IMPL_H_
diff --git a/net/third_party/quic/platform/impl/quic_url_utils_impl_test.cc b/net/third_party/quic/platform/impl/quic_url_utils_impl_test.cc
index 1efd505..d0e4b01 100644
--- a/net/third_party/quic/platform/impl/quic_url_utils_impl_test.cc
+++ b/net/third_party/quic/platform/impl/quic_url_utils_impl_test.cc
@@ -11,7 +11,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -138,4 +138,4 @@
 
 };  // namespace
 };  // namespace test
-};  // namespace net
\ No newline at end of file
+};  // namespace quic
\ No newline at end of file
diff --git a/net/third_party/quic/quartc/quartc_clock_interface.h b/net/third_party/quic/quartc/quartc_clock_interface.h
index cc4c2f65..53366d70 100644
--- a/net/third_party/quic/quartc/quartc_clock_interface.h
+++ b/net/third_party/quic/quartc/quartc_clock_interface.h
@@ -7,7 +7,7 @@
 
 #include <stdint.h>
 
-namespace net {
+namespace quic {
 
 // Implemented by the Quartc API user to provide a timebase.
 class QuartcClockInterface {
@@ -16,6 +16,6 @@
   virtual int64_t NowMicroseconds() = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_CLOCK_INTERFACE_H_
diff --git a/net/third_party/quic/quartc/quartc_factory.cc b/net/third_party/quic/quartc/quartc_factory.cc
index bcfacb0..057dba27 100644
--- a/net/third_party/quic/quartc/quartc_factory.cc
+++ b/net/third_party/quic/quartc/quartc_factory.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 #include "net/third_party/quic/quartc/quartc_session.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -237,4 +237,4 @@
       new QuartcFactory(factory_config));
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/quartc/quartc_factory.h b/net/third_party/quic/quartc/quartc_factory.h
index 2020da99..f56c2499 100644
--- a/net/third_party/quic/quartc/quartc_factory.h
+++ b/net/third_party/quic/quartc/quartc_factory.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/quartc/quartc_packet_writer.h"
 #include "net/third_party/quic/quartc/quartc_task_runner_interface.h"
 
-namespace net {
+namespace quic {
 
 // Implements the QuartcFactoryInterface to create the instances of
 // QuartcSessionInterface. Implements the QuicAlarmFactory to create alarms
@@ -58,6 +58,6 @@
   SimpleBufferAllocator buffer_allocator_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_FACTORY_H_
diff --git a/net/third_party/quic/quartc/quartc_factory_interface.cc b/net/third_party/quic/quartc/quartc_factory_interface.cc
index e58733f4..12897fa 100644
--- a/net/third_party/quic/quartc/quartc_factory_interface.cc
+++ b/net/third_party/quic/quartc/quartc_factory_interface.cc
@@ -4,9 +4,9 @@
 
 #include "net/third_party/quic/quartc/quartc_factory_interface.h"
 
-namespace net {
+namespace quic {
 
 QuartcFactoryInterface::QuartcSessionConfig::QuartcSessionConfig() = default;
 QuartcFactoryInterface::QuartcSessionConfig::~QuartcSessionConfig() = default;
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/quartc/quartc_factory_interface.h b/net/third_party/quic/quartc/quartc_factory_interface.h
index 3001cfc..cd27cd26 100644
--- a/net/third_party/quic/quartc/quartc_factory_interface.h
+++ b/net/third_party/quic/quartc/quartc_factory_interface.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/quartc/quartc_session_interface.h"
 #include "net/third_party/quic/quartc/quartc_task_runner_interface.h"
 
-namespace net {
+namespace quic {
 
 // Algorithm to use for congestion control.
 enum class QuartcCongestionControl {
@@ -102,6 +102,6 @@
 std::unique_ptr<QuartcFactoryInterface> CreateQuartcFactory(
     const QuartcFactoryConfig& factory_config);
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_FACTORY_INTERFACE_H_
diff --git a/net/third_party/quic/quartc/quartc_packet_writer.cc b/net/third_party/quic/quartc/quartc_packet_writer.cc
index aafd061..cbd02d42 100644
--- a/net/third_party/quic/quartc/quartc_packet_writer.cc
+++ b/net/third_party/quic/quartc/quartc_packet_writer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/quartc/quartc_packet_writer.h"
 
-namespace net {
+namespace quic {
 
 QuartcPacketWriter::QuartcPacketWriter(QuartcPacketTransport* packet_transport,
                                        QuicByteCount max_packet_size)
@@ -48,4 +48,4 @@
   writable_ = true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/quartc/quartc_packet_writer.h b/net/third_party/quic/quartc/quartc_packet_writer.h
index f1b5c92..0da8f81 100644
--- a/net/third_party/quic/quartc/quartc_packet_writer.h
+++ b/net/third_party/quic/quartc/quartc_packet_writer.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/quartc/quartc_session_interface.h"
 
-namespace net {
+namespace quic {
 
 // Implements a QuicPacketWriter using a QuartcPacketTransport, which allows a
 // QuicConnection to use (for example), a WebRTC IceTransport.
@@ -61,6 +61,6 @@
   bool writable_ = false;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_PACKET_WRITER_H_
diff --git a/net/third_party/quic/quartc/quartc_session.cc b/net/third_party/quic/quartc/quartc_session.cc
index 23877ca..6274d65 100644
--- a/net/third_party/quic/quartc/quartc_session.cc
+++ b/net/third_party/quic/quartc/quartc_session.cc
@@ -10,7 +10,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -443,4 +443,4 @@
   return raw;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/quartc/quartc_session.h b/net/third_party/quic/quartc/quartc_session.h
index 96ce266..1f6cbe0 100644
--- a/net/third_party/quic/quartc/quartc_session.h
+++ b/net/third_party/quic/quartc/quartc_session.h
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/quartc/quartc_session_interface.h"
 #include "net/third_party/quic/quartc/quartc_stream.h"
 
-namespace net {
+namespace quic {
 
 // A helper class is used by the QuicCryptoServerStream.
 class QuartcCryptoServerStreamHelper : public QuicCryptoServerStream::Helper {
@@ -195,6 +195,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuartcSession);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_SESSION_H_
diff --git a/net/third_party/quic/quartc/quartc_session_interface.h b/net/third_party/quic/quartc/quartc_session_interface.h
index bbbf263bf..24bed5cb 100644
--- a/net/third_party/quic/quartc/quartc_session_interface.h
+++ b/net/third_party/quic/quartc/quartc_session_interface.h
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/quartc/quartc_session_visitor_interface.h"
 #include "net/third_party/quic/quartc/quartc_stream_interface.h"
 
-namespace net {
+namespace quic {
 
 // Send and receive packets, like a virtual UDP socket. For example, this
 // could be implemented by WebRTC's IceTransport.
@@ -146,6 +146,6 @@
   virtual void RemoveSessionVisitor(QuartcSessionVisitor* visitor) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_SESSION_INTERFACE_H_
diff --git a/net/third_party/quic/quartc/quartc_session_test.cc b/net/third_party/quic/quartc/quartc_session_test.cc
index b91647db..934c8e20 100644
--- a/net/third_party/quic/quartc/quartc_session_test.cc
+++ b/net/third_party/quic/quartc/quartc_session_test.cc
@@ -22,7 +22,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -829,4 +829,4 @@
 
 }  // namespace
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/quartc/quartc_session_visitor_interface.h b/net/third_party/quic/quartc/quartc_session_visitor_interface.h
index 381e955..7cd75c6 100644
--- a/net/third_party/quic/quartc/quartc_session_visitor_interface.h
+++ b/net/third_party/quic/quartc/quartc_session_visitor_interface.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_connection.h"
 #include "net/third_party/quic/platform/api/quic_export.h"
 
-namespace net {
+namespace quic {
 
 // QuartcSessionVisitor observes internals of a Quartc/QUIC session for the
 // purpose of gathering metrics or debug information.
@@ -48,6 +48,6 @@
       const ParsedQuicVersion& version) {}
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_SESSION_VISITOR_INTERFACE_H_
diff --git a/net/third_party/quic/quartc/quartc_stream.cc b/net/third_party/quic/quartc/quartc_stream.cc
index 33dee02..8c628cf 100644
--- a/net/third_party/quic/quartc/quartc_stream.cc
+++ b/net/third_party/quic/quartc/quartc_stream.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 QuartcStream::QuartcStream(QuicStreamId id, QuicSession* session)
     : QuicStream(id, session, /*is_static=*/false) {}
@@ -91,4 +91,4 @@
   DCHECK(delegate_);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/quartc/quartc_stream.h b/net/third_party/quic/quartc/quartc_stream.h
index 8fedd4d7..7a7173e 100644
--- a/net/third_party/quic/quartc/quartc_stream.h
+++ b/net/third_party/quic/quartc/quartc_stream.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/quartc/quartc_stream_interface.h"
 
-namespace net {
+namespace quic {
 
 // Implements a QuartcStreamInterface using a QuicStream.
 class QUIC_EXPORT_PRIVATE QuartcStream : public QuicStream,
@@ -56,6 +56,6 @@
   QuartcStreamInterface::Delegate* delegate_ = nullptr;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_STREAM_H_
diff --git a/net/third_party/quic/quartc/quartc_stream_interface.h b/net/third_party/quic/quartc/quartc_stream_interface.h
index f99f5659..9f3f600 100644
--- a/net/third_party/quic/quartc/quartc_stream_interface.h
+++ b/net/third_party/quic/quartc/quartc_stream_interface.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_mem_slice_span.h"
 
-namespace net {
+namespace quic {
 
 // Sends and receives data with a particular QUIC stream ID, reliably and
 // in-order. To send/receive data out of order, use separate streams. To
@@ -87,6 +87,6 @@
   virtual void SetDelegate(Delegate* delegate) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_STREAM_INTERFACE_H_
diff --git a/net/third_party/quic/quartc/quartc_stream_test.cc b/net/third_party/quic/quartc/quartc_stream_test.cc
index b014988..62f19e50 100644
--- a/net/third_party/quic/quartc/quartc_stream_test.cc
+++ b/net/third_party/quic/quartc/quartc_stream_test.cc
@@ -18,7 +18,7 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -351,4 +351,4 @@
 
 }  // namespace
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/quartc/quartc_task_runner_interface.h b/net/third_party/quic/quartc/quartc_task_runner_interface.h
index c7d4c96b..b3560b3c 100644
--- a/net/third_party/quic/quartc/quartc_task_runner_interface.h
+++ b/net/third_party/quic/quartc/quartc_task_runner_interface.h
@@ -9,7 +9,7 @@
 
 #include <memory>
 
-namespace net {
+namespace quic {
 
 // Used by platform specific QuicAlarms. For example, WebRTC will use it to set
 // and cancel an alarm. When setting an alarm, the task runner will schedule a
@@ -46,6 +46,6 @@
                                                   uint64_t delay_ms) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_QUARTC_QUARTC_TASK_RUNNER_INTERFACE_H_
diff --git a/net/third_party/quic/test_tools/bad_packet_writer.cc b/net/third_party/quic/test_tools/bad_packet_writer.cc
index c400019..2356bd4 100644
--- a/net/third_party/quic/test_tools/bad_packet_writer.cc
+++ b/net/third_party/quic/test_tools/bad_packet_writer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/bad_packet_writer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 BadPacketWriter::BadPacketWriter(size_t packet_causing_write_error,
@@ -33,4 +33,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/bad_packet_writer.h b/net/third_party/quic/test_tools/bad_packet_writer.h
index b18d990..fc40176 100644
--- a/net/third_party/quic/test_tools/bad_packet_writer.h
+++ b/net/third_party/quic/test_tools/bad_packet_writer.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/core/quic_packet_writer_wrapper.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 // This packet writer allows causing packet write error with specified error
@@ -31,6 +31,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_BAD_PACKET_WRITER_H_
diff --git a/net/third_party/quic/test_tools/crypto_test_utils.cc b/net/third_party/quic/test_tools/crypto_test_utils.cc
index fee49e3..b18bf97 100644
--- a/net/third_party/quic/test_tools/crypto_test_utils.cc
+++ b/net/third_party/quic/test_tools/crypto_test_utils.cc
@@ -42,7 +42,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 TestChannelIDKey::TestChannelIDKey(EVP_PKEY* ecdsa_key)
@@ -1084,4 +1084,4 @@
 
 }  // namespace crypto_test_utils
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/crypto_test_utils.h b/net/third_party/quic/test_tools/crypto_test_utils.h
index 535a6187..a79d742b 100644
--- a/net/third_party/quic/test_tools/crypto_test_utils.h
+++ b/net/third_party/quic/test_tools/crypto_test_utils.h
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 #include "third_party/boringssl/src/include/openssl/evp.h"
 
-namespace net {
+namespace quic {
 
 class ChannelIDSource;
 class CommonCertSets;
@@ -272,6 +272,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_H_
diff --git a/net/third_party/quic/test_tools/crypto_test_utils_test.cc b/net/third_party/quic/test_tools/crypto_test_utils_test.cc
index fd7e9fe..8ff357c8 100644
--- a/net/third_party/quic/test_tools/crypto_test_utils_test.cc
+++ b/net/third_party/quic/test_tools/crypto_test_utils_test.cc
@@ -15,7 +15,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 class ShloVerifier {
@@ -174,4 +174,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/failing_proof_source.cc b/net/third_party/quic/test_tools/failing_proof_source.cc
index 2d31dd0..7fbc02f 100644
--- a/net/third_party/quic/test_tools/failing_proof_source.cc
+++ b/net/third_party/quic/test_tools/failing_proof_source.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/failing_proof_source.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 void FailingProofSource::GetProof(const QuicSocketAddress& server_address,
@@ -32,4 +32,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/failing_proof_source.h b/net/third_party/quic/test_tools/failing_proof_source.h
index df3b32d..bade88a 100644
--- a/net/third_party/quic/test_tools/failing_proof_source.h
+++ b/net/third_party/quic/test_tools/failing_proof_source.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/crypto/proof_source.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class FailingProofSource : public ProofSource {
@@ -33,6 +33,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_FAILING_PROOF_SOURCE_H_
diff --git a/net/third_party/quic/test_tools/fake_proof_source.cc b/net/third_party/quic/test_tools/fake_proof_source.cc
index 4510d9d5..9d868e8 100644
--- a/net/third_party/quic/test_tools/fake_proof_source.cc
+++ b/net/third_party/quic/test_tools/fake_proof_source.cc
@@ -10,7 +10,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 FakeProofSource::FakeProofSource()
@@ -127,4 +127,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/fake_proof_source.h b/net/third_party/quic/test_tools/fake_proof_source.h
index ccdce1b..f0f31f88 100644
--- a/net/third_party/quic/test_tools/fake_proof_source.h
+++ b/net/third_party/quic/test_tools/fake_proof_source.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/core/crypto/proof_source.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Implementation of ProofSource which delegates to a ProofSourceForTesting,
@@ -112,6 +112,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_FAKE_PROOF_SOURCE_H_
diff --git a/net/third_party/quic/test_tools/limited_mtu_test_writer.cc b/net/third_party/quic/test_tools/limited_mtu_test_writer.cc
index d5a9311..1c1dba82 100644
--- a/net/third_party/quic/test_tools/limited_mtu_test_writer.cc
+++ b/net/third_party/quic/test_tools/limited_mtu_test_writer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/limited_mtu_test_writer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 LimitedMtuTestWriter::LimitedMtuTestWriter(QuicByteCount mtu) : mtu_(mtu) {}
@@ -27,4 +27,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/limited_mtu_test_writer.h b/net/third_party/quic/test_tools/limited_mtu_test_writer.h
index fe7408b..105252b 100644
--- a/net/third_party/quic/test_tools/limited_mtu_test_writer.h
+++ b/net/third_party/quic/test_tools/limited_mtu_test_writer.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_packet_writer_wrapper.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Simulates a connection over a link with fixed MTU.  Drops packets which
@@ -33,6 +33,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_LIMITED_MTU_TEST_WRITER_H_
diff --git a/net/third_party/quic/test_tools/mock_clock.cc b/net/third_party/quic/test_tools/mock_clock.cc
index 651f2b1..d4ea43e9 100644
--- a/net/third_party/quic/test_tools/mock_clock.cc
+++ b/net/third_party/quic/test_tools/mock_clock.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/mock_clock.h"
 
-namespace net {
+namespace quic {
 
 MockClock::MockClock() : now_(QuicTime::Zero()) {}
 
@@ -32,4 +32,4 @@
                      (now_ - QuicTime::Zero()).ToMicroseconds());
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_clock.h b/net/third_party/quic/test_tools/mock_clock.h
index bb107c7..3eba3c8 100644
--- a/net/third_party/quic/test_tools/mock_clock.h
+++ b/net/third_party/quic/test_tools/mock_clock.h
@@ -11,7 +11,7 @@
 #include "base/time/time.h"
 #include "net/third_party/quic/platform/api/quic_clock.h"
 
-namespace net {
+namespace quic {
 
 class MockClock : public QuicClock {
  public:
@@ -35,6 +35,6 @@
   DISALLOW_COPY_AND_ASSIGN(MockClock);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_CLOCK_H_
diff --git a/net/third_party/quic/test_tools/mock_crypto_client_stream.cc b/net/third_party/quic/test_tools/mock_crypto_client_stream.cc
index 92aa7e8..6d6bdfe 100644
--- a/net/third_party/quic/test_tools/mock_crypto_client_stream.cc
+++ b/net/third_party/quic/test_tools/mock_crypto_client_stream.cc
@@ -17,7 +17,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 
 MockCryptoClientStream::MockCryptoClientStream(
     const QuicServerId& server_id,
@@ -26,7 +26,7 @@
     const QuicConfig& config,
     QuicCryptoClientConfig* crypto_config,
     HandshakeMode handshake_mode,
-    const ProofVerifyDetailsChromium* proof_verify_details,
+    const net::ProofVerifyDetailsChromium* proof_verify_details,
     bool use_mock_crypter)
     : QuicCryptoClientStream(server_id,
                              session,
@@ -215,4 +215,4 @@
   session()->OnConfigNegotiated();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_crypto_client_stream.h b/net/third_party/quic/test_tools/mock_crypto_client_stream.h
index 42f656f..1bf24465 100644
--- a/net/third_party/quic/test_tools/mock_crypto_client_stream.h
+++ b/net/third_party/quic/test_tools/mock_crypto_client_stream.h
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/core/quic_session.h"
 #include "net/third_party/quic/core/quic_spdy_client_session_base.h"
 
-namespace net {
+namespace quic {
 
 class MockCryptoClientStream : public QuicCryptoClientStream,
                                public QuicCryptoHandshaker {
@@ -52,7 +52,7 @@
       const QuicConfig& config,
       QuicCryptoClientConfig* crypto_config,
       HandshakeMode handshake_mode,
-      const ProofVerifyDetailsChromium* proof_verify_details_,
+      const net::ProofVerifyDetailsChromium* proof_verify_details_,
       bool use_mock_crypter);
   ~MockCryptoClientStream() override;
 
@@ -87,12 +87,12 @@
   bool use_mock_crypter_;
 
   const QuicServerId server_id_;
-  const ProofVerifyDetailsChromium* proof_verify_details_;
+  const net::ProofVerifyDetailsChromium* proof_verify_details_;
   const QuicConfig config_;
 
   DISALLOW_COPY_AND_ASSIGN(MockCryptoClientStream);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_CRYPTO_CLIENT_STREAM_H_
diff --git a/net/third_party/quic/test_tools/mock_decrypter.cc b/net/third_party/quic/test_tools/mock_decrypter.cc
index fdd560c..d4480343 100644
--- a/net/third_party/quic/test_tools/mock_decrypter.cc
+++ b/net/third_party/quic/test_tools/mock_decrypter.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/quic_utils.h"
 #include "net/third_party/quic/platform/api/quic_bug_tracker.h"
 
-namespace net {
+namespace quic {
 
 MockDecrypter::MockDecrypter(Perspective perspective) {}
 
@@ -69,4 +69,4 @@
   return 0;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_decrypter.h b/net/third_party/quic/test_tools/mock_decrypter.h
index 72aea9d7..9d27c15 100644
--- a/net/third_party/quic/test_tools/mock_decrypter.h
+++ b/net/third_party/quic/test_tools/mock_decrypter.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // A MockDecrypter is a QuicDecrypter that does no validation of
 // the given ciphertext and returns it untouched, ignoring the
@@ -50,6 +50,6 @@
   DISALLOW_COPY_AND_ASSIGN(MockDecrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_DECRYPTER_H_
diff --git a/net/third_party/quic/test_tools/mock_encrypter.cc b/net/third_party/quic/test_tools/mock_encrypter.cc
index 74485a38..14f03cd 100644
--- a/net/third_party/quic/test_tools/mock_encrypter.cc
+++ b/net/third_party/quic/test_tools/mock_encrypter.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/quic_data_writer.h"
 #include "net/third_party/quic/core/quic_utils.h"
 
-namespace net {
+namespace quic {
 
 MockEncrypter::MockEncrypter(Perspective perspective) {}
 
@@ -66,4 +66,4 @@
   return QuicStringPiece();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_encrypter.h b/net/third_party/quic/test_tools/mock_encrypter.h
index 8946eb0..6ce86a4a 100644
--- a/net/third_party/quic/test_tools/mock_encrypter.h
+++ b/net/third_party/quic/test_tools/mock_encrypter.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/platform/api/quic_export.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 // A MockEncrypter is a QuicEncrypter that returns a plaintext
 // unmodified. No encryption or MAC is applied. This is used
@@ -47,6 +47,6 @@
   DISALLOW_COPY_AND_ASSIGN(MockEncrypter);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_ENCRYPTER_H_
diff --git a/net/third_party/quic/test_tools/mock_epoll_server.cc b/net/third_party/quic/test_tools/mock_epoll_server.cc
index 0e88c30..2670f1a1 100644
--- a/net/third_party/quic/test_tools/mock_epoll_server.cc
+++ b/net/third_party/quic/test_tools/mock_epoll_server.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/mock_epoll_server.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 FakeTimeEpollServer::FakeTimeEpollServer() : now_in_usec_(0) {}
@@ -46,7 +46,7 @@
       set_now_in_usec(until_in_usec_);
       // And reset until_in_usec_ to signal no waiting (as
       // the AdvanceByExactly* stuff is meant to be one-shot,
-      // as are all similar EpollServer functions)
+      // as are all similar net::EpollServer functions)
       until_in_usec_ = -1;
     }
   }
@@ -57,4 +57,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_epoll_server.h b/net/third_party/quic/test_tools/mock_epoll_server.h
index c1a3dbad..26afef2 100644
--- a/net/third_party/quic/test_tools/mock_epoll_server.h
+++ b/net/third_party/quic/test_tools/mock_epoll_server.h
@@ -16,18 +16,18 @@
 #include "net/tools/epoll_server/epoll_server.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Unlike the full MockEpollServer, this only lies about the time but lets
 // fd events operate normally.  Usefully when interacting with real backends
 // but wanting to skip forward in time to trigger timeouts.
-class FakeTimeEpollServer : public EpollServer {
+class FakeTimeEpollServer : public net::EpollServer {
  public:
   FakeTimeEpollServer();
   ~FakeTimeEpollServer() override;
 
-  // Replaces the EpollServer NowInUsec.
+  // Replaces the net::EpollServer NowInUsec.
   int64_t NowInUsec() const override;
 
   void set_now_in_usec(int64_t nius) { now_in_usec_ = nius; }
@@ -110,6 +110,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_EPOLL_SERVER_H_
diff --git a/net/third_party/quic/test_tools/mock_quic_client_promised_info.cc b/net/third_party/quic/test_tools/mock_quic_client_promised_info.cc
index 8eda265d..4877854 100644
--- a/net/third_party/quic/test_tools/mock_quic_client_promised_info.cc
+++ b/net/third_party/quic/test_tools/mock_quic_client_promised_info.cc
@@ -6,7 +6,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 MockQuicClientPromisedInfo::MockQuicClientPromisedInfo(
@@ -18,4 +18,4 @@
 MockQuicClientPromisedInfo::~MockQuicClientPromisedInfo() {}
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_quic_client_promised_info.h b/net/third_party/quic/test_tools/mock_quic_client_promised_info.h
index cae7f2d..9623afc4 100644
--- a/net/third_party/quic/test_tools/mock_quic_client_promised_info.h
+++ b/net/third_party/quic/test_tools/mock_quic_client_promised_info.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class MockQuicClientPromisedInfo : public QuicClientPromisedInfo {
@@ -28,6 +28,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_QUIC_CLIENT_PROMISED_INFO_H_
diff --git a/net/third_party/quic/test_tools/mock_quic_dispatcher.cc b/net/third_party/quic/test_tools/mock_quic_dispatcher.cc
index 1a46b9a..bb888d5 100644
--- a/net/third_party/quic/test_tools/mock_quic_dispatcher.cc
+++ b/net/third_party/quic/test_tools/mock_quic_dispatcher.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 MockQuicDispatcher::MockQuicDispatcher(
@@ -28,4 +28,4 @@
 MockQuicDispatcher::~MockQuicDispatcher() {}
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_quic_dispatcher.h b/net/third_party/quic/test_tools/mock_quic_dispatcher.h
index 01292cb..d6637f9 100644
--- a/net/third_party/quic/test_tools/mock_quic_dispatcher.h
+++ b/net/third_party/quic/test_tools/mock_quic_dispatcher.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/tools/quic_simple_server_backend.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class MockQuicDispatcher : public QuicSimpleDispatcher {
@@ -39,6 +39,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_QUIC_DISPATCHER_H_
diff --git a/net/third_party/quic/test_tools/mock_quic_session_visitor.cc b/net/third_party/quic/test_tools/mock_quic_session_visitor.cc
index 21be342..1aaadd85 100644
--- a/net/third_party/quic/test_tools/mock_quic_session_visitor.cc
+++ b/net/third_party/quic/test_tools/mock_quic_session_visitor.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/mock_quic_session_visitor.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 MockQuicSessionVisitor::MockQuicSessionVisitor() = default;
@@ -16,4 +16,4 @@
 MockQuicCryptoServerStreamHelper::~MockQuicCryptoServerStreamHelper() = default;
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_quic_session_visitor.h b/net/third_party/quic/test_tools/mock_quic_session_visitor.h
index 2ca7970..0de9146c 100644
--- a/net/third_party/quic/test_tools/mock_quic_session_visitor.h
+++ b/net/third_party/quic/test_tools/mock_quic_session_visitor.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_time_wait_list_manager.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class MockQuicSessionVisitor : public QuicTimeWaitListManager::Visitor {
@@ -49,6 +49,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_QUIC_SESSION_VISITOR_H_
diff --git a/net/third_party/quic/test_tools/mock_quic_spdy_client_stream.cc b/net/third_party/quic/test_tools/mock_quic_spdy_client_stream.cc
index 210636d..40741a9 100644
--- a/net/third_party/quic/test_tools/mock_quic_spdy_client_stream.cc
+++ b/net/third_party/quic/test_tools/mock_quic_spdy_client_stream.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/mock_quic_spdy_client_stream.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 MockQuicSpdyClientStream::MockQuicSpdyClientStream(
@@ -15,4 +15,4 @@
 MockQuicSpdyClientStream::~MockQuicSpdyClientStream() {}
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_quic_spdy_client_stream.h b/net/third_party/quic/test_tools/mock_quic_spdy_client_stream.h
index bd39d89..e1c8531 100644
--- a/net/third_party/quic/test_tools/mock_quic_spdy_client_stream.h
+++ b/net/third_party/quic/test_tools/mock_quic_spdy_client_stream.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/quic_spdy_client_stream.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class MockQuicSpdyClientStream : public QuicSpdyClientStream {
@@ -28,6 +28,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_QUIC_SPDY_CLIENT_STREAM_H_
diff --git a/net/third_party/quic/test_tools/mock_quic_time_wait_list_manager.cc b/net/third_party/quic/test_tools/mock_quic_time_wait_list_manager.cc
index 44e227c9..abba287 100644
--- a/net/third_party/quic/test_tools/mock_quic_time_wait_list_manager.cc
+++ b/net/third_party/quic/test_tools/mock_quic_time_wait_list_manager.cc
@@ -7,7 +7,7 @@
 using testing::_;
 using testing::Invoke;
 
-namespace net {
+namespace quic {
 namespace test {
 
 MockTimeWaitListManager::MockTimeWaitListManager(
@@ -29,4 +29,4 @@
 MockTimeWaitListManager::~MockTimeWaitListManager() = default;
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_quic_time_wait_list_manager.h b/net/third_party/quic/test_tools/mock_quic_time_wait_list_manager.h
index 9a4f83e..908fc10 100644
--- a/net/third_party/quic/test_tools/mock_quic_time_wait_list_manager.h
+++ b/net/third_party/quic/test_tools/mock_quic_time_wait_list_manager.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_time_wait_list_manager.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class MockTimeWaitListManager : public QuicTimeWaitListManager {
@@ -52,6 +52,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_QUIC_TIME_WAIT_LIST_MANAGER_H_
diff --git a/net/third_party/quic/test_tools/mock_random.cc b/net/third_party/quic/test_tools/mock_random.cc
index 95dd342..baf29ee 100644
--- a/net/third_party/quic/test_tools/mock_random.cc
+++ b/net/third_party/quic/test_tools/mock_random.cc
@@ -6,7 +6,7 @@
 
 #include <string.h>
 
-namespace net {
+namespace quic {
 namespace test {
 
 MockRandom::MockRandom() : base_(0xDEADBEEF), increment_(0) {}
@@ -28,4 +28,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/mock_random.h b/net/third_party/quic/test_tools/mock_random.h
index 6e333a5..728249e6 100644
--- a/net/third_party/quic/test_tools/mock_random.h
+++ b/net/third_party/quic/test_tools/mock_random.h
@@ -9,7 +9,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/core/crypto/quic_random.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class MockRandom : public QuicRandom {
@@ -38,6 +38,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_MOCK_RANDOM_H_
diff --git a/net/third_party/quic/test_tools/packet_dropping_test_writer.cc b/net/third_party/quic/test_tools/packet_dropping_test_writer.cc
index 2e3d6c6..991b5ab3 100644
--- a/net/third_party/quic/test_tools/packet_dropping_test_writer.cc
+++ b/net/third_party/quic/test_tools/packet_dropping_test_writer.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_logging.h"
 #include "net/third_party/quic/platform/impl/quic_socket_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // An alarm that is scheduled if a blocked socket is simulated to indicate
@@ -242,4 +242,4 @@
 PacketDroppingTestWriter::DelayedWrite::~DelayedWrite() = default;
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/packet_dropping_test_writer.h b/net/third_party/quic/test_tools/packet_dropping_test_writer.h
index cfa813cd..1f2b1b2 100644
--- a/net/third_party/quic/test_tools/packet_dropping_test_writer.h
+++ b/net/third_party/quic/test_tools/packet_dropping_test_writer.h
@@ -22,7 +22,7 @@
 #include "net/third_party/quic/test_tools/quic_test_client.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Simulates a connection that drops packets a configured percentage of the time
@@ -157,7 +157,7 @@
   std::unique_ptr<QuicAlarm> write_unblocked_alarm_;
   std::unique_ptr<QuicAlarm> delay_alarm_;
   std::unique_ptr<Delegate> on_can_write_;
-  net::test::SimpleRandom simple_random_;
+  SimpleRandom simple_random_;
   // Stored packets delayed by fake packet delay or bandwidth restrictions.
   DelayedPacketList delayed_packets_;
   QuicByteCount cur_buffer_size_;
@@ -176,6 +176,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_PACKET_DROPPING_TEST_WRITER_H_
diff --git a/net/third_party/quic/test_tools/packet_reordering_writer.cc b/net/third_party/quic/test_tools/packet_reordering_writer.cc
index b7b6150e..29be4a8 100644
--- a/net/third_party/quic/test_tools/packet_reordering_writer.cc
+++ b/net/third_party/quic/test_tools/packet_reordering_writer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/packet_reordering_writer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 PacketReorderingWriter::PacketReorderingWriter() = default;
@@ -50,4 +50,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/packet_reordering_writer.h b/net/third_party/quic/test_tools/packet_reordering_writer.h
index 7ad30ca..7d3afbe9 100644
--- a/net/third_party/quic/test_tools/packet_reordering_writer.h
+++ b/net/third_party/quic/test_tools/packet_reordering_writer.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/core/quic_packet_writer_wrapper.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -40,6 +40,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_PACKET_REORDERING_WRITER_H_
diff --git a/net/third_party/quic/test_tools/quic_buffered_packet_store_peer.cc b/net/third_party/quic/test_tools/quic_buffered_packet_store_peer.cc
index 8d78c99..526ff08 100644
--- a/net/third_party/quic/test_tools/quic_buffered_packet_store_peer.cc
+++ b/net/third_party/quic/test_tools/quic_buffered_packet_store_peer.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/core/quic_buffered_packet_store.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -22,4 +22,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_buffered_packet_store_peer.h b/net/third_party/quic/test_tools/quic_buffered_packet_store_peer.h
index 4bd9d11..f2ee116 100644
--- a/net/third_party/quic/test_tools/quic_buffered_packet_store_peer.h
+++ b/net/third_party/quic/test_tools/quic_buffered_packet_store_peer.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_alarm.h"
 #include "net/third_party/quic/platform/api/quic_clock.h"
 
-namespace net {
+namespace quic {
 
 class QuicBufferedPacketStore;
 
@@ -28,6 +28,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_BUFFERED_PACKET_STORE_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_client_peer.cc b/net/third_party/quic/test_tools/quic_client_peer.cc
index c7c2851..e6d0801 100644
--- a/net/third_party/quic/test_tools/quic_client_peer.cc
+++ b/net/third_party/quic/test_tools/quic_client_peer.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/tools/quic_client.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -32,4 +32,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_client_peer.h b/net/third_party/quic/test_tools/quic_client_peer.h
index 2e34ef4c..c0061062 100644
--- a/net/third_party/quic/test_tools/quic_client_peer.h
+++ b/net/third_party/quic/test_tools/quic_client_peer.h
@@ -7,7 +7,7 @@
 
 #include "base/macros.h"
 
-namespace net {
+namespace quic {
 
 class QuicClient;
 class QuicPacketWriter;
@@ -26,6 +26,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_CLIENT_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_client_promised_info_peer.cc b/net/third_party/quic/test_tools/quic_client_promised_info_peer.cc
index c8fe389..0808507 100644
--- a/net/third_party/quic/test_tools/quic_client_promised_info_peer.cc
+++ b/net/third_party/quic/test_tools/quic_client_promised_info_peer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/quic_client_promised_info_peer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -14,4 +14,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_client_promised_info_peer.h b/net/third_party/quic/test_tools/quic_client_promised_info_peer.h
index c457fe6..d169531 100644
--- a/net/third_party/quic/test_tools/quic_client_promised_info_peer.h
+++ b/net/third_party/quic/test_tools/quic_client_promised_info_peer.h
@@ -8,7 +8,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/core/quic_client_promised_info.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicClientPromisedInfoPeer {
@@ -19,6 +19,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicClientPromisedInfoPeer);
 };
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_CLIENT_PROMISED_INFO_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_config_peer.cc b/net/third_party/quic/test_tools/quic_config_peer.cc
index 9fcb835cf..95c43a91 100644
--- a/net/third_party/quic/test_tools/quic_config_peer.cc
+++ b/net/third_party/quic/test_tools/quic_config_peer.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/core/quic_config.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -64,4 +64,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_config_peer.h b/net/third_party/quic/test_tools/quic_config_peer.h
index 8aa1f80..33a802d 100644
--- a/net/third_party/quic/test_tools/quic_config_peer.h
+++ b/net/third_party/quic/test_tools/quic_config_peer.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/platform/api/quic_uint128.h"
 
-namespace net {
+namespace quic {
 
 class QuicConfig;
 
@@ -47,6 +47,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_CONFIG_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_connection_peer.cc b/net/third_party/quic/test_tools/quic_connection_peer.cc
index 1fe57a7..45112e5 100644
--- a/net/third_party/quic/test_tools/quic_connection_peer.cc
+++ b/net/third_party/quic/test_tools/quic_connection_peer.cc
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/test_tools/quic_packet_generator_peer.h"
 #include "net/third_party/quic/test_tools/quic_sent_packet_manager_peer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -307,4 +307,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_connection_peer.h b/net/third_party/quic/test_tools/quic_connection_peer.h
index 08077674..31d6d94 100644
--- a/net/third_party/quic/test_tools/quic_connection_peer.h
+++ b/net/third_party/quic/test_tools/quic_connection_peer.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 struct QuicPacketHeader;
 class QuicAlarm;
@@ -133,6 +133,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_CONNECTION_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_crypto_server_config_peer.cc b/net/third_party/quic/test_tools/quic_crypto_server_config_peer.cc
index 46a0324..1fd588a 100644
--- a/net/third_party/quic/test_tools/quic_crypto_server_config_peer.cc
+++ b/net/third_party/quic/test_tools/quic_crypto_server_config_peer.cc
@@ -10,7 +10,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 QuicReferenceCountedPointer<QuicCryptoServerConfig::Config>
@@ -161,4 +161,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_crypto_server_config_peer.h b/net/third_party/quic/test_tools/quic_crypto_server_config_peer.h
index b14676b..1a71674 100644
--- a/net/third_party/quic/test_tools/quic_crypto_server_config_peer.h
+++ b/net/third_party/quic/test_tools/quic_crypto_server_config_peer.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/crypto/quic_crypto_server_config.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Peer for accessing otherwise private members of a QuicCryptoServerConfig.
@@ -93,6 +93,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_CRYPTO_SERVER_CONFIG_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_dispatcher_peer.cc b/net/third_party/quic/test_tools/quic_dispatcher_peer.cc
index 738f002..619f765 100644
--- a/net/third_party/quic/test_tools/quic_dispatcher_peer.cc
+++ b/net/third_party/quic/test_tools/quic_dispatcher_peer.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/quic_dispatcher.h"
 #include "net/third_party/quic/core/quic_packet_writer_wrapper.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -106,4 +106,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_dispatcher_peer.h b/net/third_party/quic/test_tools/quic_dispatcher_peer.h
index 18f4c098..b97aa8f2 100644
--- a/net/third_party/quic/test_tools/quic_dispatcher_peer.h
+++ b/net/third_party/quic/test_tools/quic_dispatcher_peer.h
@@ -8,7 +8,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/core/quic_dispatcher.h"
 
-namespace net {
+namespace quic {
 
 class QuicPacketWriterWrapper;
 
@@ -66,6 +66,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_DISPATCHER_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_flow_controller_peer.cc b/net/third_party/quic/test_tools/quic_flow_controller_peer.cc
index 30f4ce8..cac9227 100644
--- a/net/third_party/quic/test_tools/quic_flow_controller_peer.cc
+++ b/net/third_party/quic/test_tools/quic_flow_controller_peer.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_flow_controller.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -65,4 +65,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_flow_controller_peer.h b/net/third_party/quic/test_tools/quic_flow_controller_peer.h
index 6031020..f423f36 100644
--- a/net/third_party/quic/test_tools/quic_flow_controller_peer.h
+++ b/net/third_party/quic/test_tools/quic_flow_controller_peer.h
@@ -8,7 +8,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 
 class QuicFlowController;
 
@@ -42,6 +42,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_FLOW_CONTROLLER_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_framer_peer.cc b/net/third_party/quic/test_tools/quic_framer_peer.cc
index 27fe678..04bea72 100644
--- a/net/third_party/quic/test_tools/quic_framer_peer.cc
+++ b/net/third_party/quic/test_tools/quic_framer_peer.cc
@@ -10,7 +10,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -301,4 +301,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_framer_peer.h b/net/third_party/quic/test_tools/quic_framer_peer.h
index dcd7a28..d51b10d8 100644
--- a/net/third_party/quic/test_tools/quic_framer_peer.h
+++ b/net/third_party/quic/test_tools/quic_framer_peer.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_framer.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -150,6 +150,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_FRAMER_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_packet_creator_peer.cc b/net/third_party/quic/test_tools/quic_packet_creator_peer.cc
index b1eb7be..6c6823c 100644
--- a/net/third_party/quic/test_tools/quic_packet_creator_peer.cc
+++ b/net/third_party/quic/test_tools/quic_packet_creator_peer.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/core/quic_packet_creator.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -103,4 +103,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_packet_creator_peer.h b/net/third_party/quic/test_tools/quic_packet_creator_peer.h
index 85f37d6..a94cf8d0 100644
--- a/net/third_party/quic/test_tools/quic_packet_creator_peer.h
+++ b/net/third_party/quic/test_tools/quic_packet_creator_peer.h
@@ -8,7 +8,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 class QuicFramer;
 class QuicPacketCreator;
 
@@ -50,6 +50,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_PACKET_CREATOR_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_packet_generator_peer.cc b/net/third_party/quic/test_tools/quic_packet_generator_peer.cc
index 0b1bd10..6628c64 100644
--- a/net/third_party/quic/test_tools/quic_packet_generator_peer.cc
+++ b/net/third_party/quic/test_tools/quic_packet_generator_peer.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/quic_packet_creator.h"
 #include "net/third_party/quic/core/quic_packet_generator.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -17,4 +17,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_packet_generator_peer.h b/net/third_party/quic/test_tools/quic_packet_generator_peer.h
index 5e58780..fbf853b1 100644
--- a/net/third_party/quic/test_tools/quic_packet_generator_peer.h
+++ b/net/third_party/quic/test_tools/quic_packet_generator_peer.h
@@ -8,7 +8,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 
 class QuicPacketCreator;
 class QuicPacketGenerator;
@@ -25,6 +25,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_PACKET_GENERATOR_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.cc b/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.cc
index d624f58..9347a72 100644
--- a/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.cc
+++ b/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/core/quic_sent_packet_manager.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -232,4 +232,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.h b/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.h
index 0eeec3a..b75b195a 100644
--- a/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.h
+++ b/net/third_party/quic/test_tools/quic_sent_packet_manager_peer.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/core/quic_sent_packet_manager.h"
 
-namespace net {
+namespace quic {
 
 class SendAlgorithmInterface;
 
@@ -111,6 +111,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_server_peer.cc b/net/third_party/quic/test_tools/quic_server_peer.cc
index 05d4fc67..e180c21 100644
--- a/net/third_party/quic/test_tools/quic_server_peer.cc
+++ b/net/third_party/quic/test_tools/quic_server_peer.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_packet_reader.h"
 #include "net/third_party/quic/tools/quic_server.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -29,4 +29,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_server_peer.h b/net/third_party/quic/test_tools/quic_server_peer.h
index dd7a046b..5759a3b 100644
--- a/net/third_party/quic/test_tools/quic_server_peer.h
+++ b/net/third_party/quic/test_tools/quic_server_peer.h
@@ -7,7 +7,7 @@
 
 #include "base/macros.h"
 
-namespace net {
+namespace quic {
 
 class QuicDispatcher;
 class QuicServer;
@@ -26,6 +26,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_SERVER_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_session_peer.cc b/net/third_party/quic/test_tools/quic_session_peer.cc
index 1b95dcc..a5202e9 100644
--- a/net/third_party/quic/test_tools/quic_session_peer.cc
+++ b/net/third_party/quic/test_tools/quic_session_peer.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_stream.h"
 #include "net/third_party/quic/platform/api/quic_map_util.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -136,4 +136,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_session_peer.h b/net/third_party/quic/test_tools/quic_session_peer.h
index 20a5802e..a3a57310 100644
--- a/net/third_party/quic/test_tools/quic_session_peer.h
+++ b/net/third_party/quic/test_tools/quic_session_peer.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/core/quic_write_blocked_list.h"
 #include "net/third_party/quic/platform/api/quic_containers.h"
 
-namespace net {
+namespace quic {
 
 class QuicCryptoStream;
 class QuicSession;
@@ -62,6 +62,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_SESSION_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_spdy_session_peer.cc b/net/third_party/quic/test_tools/quic_spdy_session_peer.cc
index 87a3747..ae763a14 100644
--- a/net/third_party/quic/test_tools/quic_spdy_session_peer.cc
+++ b/net/third_party/quic/test_tools/quic_spdy_session_peer.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/core/quic_spdy_session.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -83,4 +83,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_spdy_session_peer.h b/net/third_party/quic/test_tools/quic_spdy_session_peer.h
index 661fdfe..c98986b8 100644
--- a/net/third_party/quic/test_tools/quic_spdy_session_peer.h
+++ b/net/third_party/quic/test_tools/quic_spdy_session_peer.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_write_blocked_list.h"
 #include "net/third_party/spdy/core/spdy_framer.h"
 
-namespace net {
+namespace quic {
 
 class QuicHeadersStream;
 class QuicSpdySession;
@@ -61,6 +61,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_SPDY_SESSION_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_spdy_stream_peer.h b/net/third_party/quic/test_tools/quic_spdy_stream_peer.h
index 34d022e..88cb151e 100644
--- a/net/third_party/quic/test_tools/quic_spdy_stream_peer.h
+++ b/net/third_party/quic/test_tools/quic_spdy_stream_peer.h
@@ -7,7 +7,7 @@
 
 #include "base/macros.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -19,6 +19,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_SPDY_STREAM_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_stream_peer.cc b/net/third_party/quic/test_tools/quic_stream_peer.cc
index de2bc3e..e944573 100644
--- a/net/third_party/quic/test_tools/quic_stream_peer.cc
+++ b/net/third_party/quic/test_tools/quic_stream_peer.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_stream.h"
 #include "net/third_party/quic/test_tools/quic_stream_send_buffer_peer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -90,4 +90,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_stream_peer.h b/net/third_party/quic/test_tools/quic_stream_peer.h
index 381dd92..fad55440 100644
--- a/net/third_party/quic/test_tools/quic_stream_peer.h
+++ b/net/third_party/quic/test_tools/quic_stream_peer.h
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/core/quic_stream_sequencer.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class QuicStream;
 class QuicSession;
@@ -56,6 +56,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_STREAM_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_stream_send_buffer_peer.cc b/net/third_party/quic/test_tools/quic_stream_send_buffer_peer.cc
index 3b1e8d7..37e8b1f 100644
--- a/net/third_party/quic/test_tools/quic_stream_send_buffer_peer.cc
+++ b/net/third_party/quic/test_tools/quic_stream_send_buffer_peer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/quic_stream_send_buffer_peer.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -36,4 +36,4 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_stream_send_buffer_peer.h b/net/third_party/quic/test_tools/quic_stream_send_buffer_peer.h
index 1cc134e..24de936 100644
--- a/net/third_party/quic/test_tools/quic_stream_send_buffer_peer.h
+++ b/net/third_party/quic/test_tools/quic_stream_send_buffer_peer.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/core/quic_stream_send_buffer.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -24,6 +24,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_STREAM_SEND_BUFFER_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_stream_sequencer_buffer_peer.cc b/net/third_party/quic/test_tools/quic_stream_sequencer_buffer_peer.cc
index 190b91cb..527093f 100644
--- a/net/third_party/quic/test_tools/quic_stream_sequencer_buffer_peer.cc
+++ b/net/third_party/quic/test_tools/quic_stream_sequencer_buffer_peer.cc
@@ -9,13 +9,13 @@
 #include "net/third_party/quic/platform/api/quic_logging.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 
-typedef net::QuicStreamSequencerBuffer::BufferBlock BufferBlock;
-typedef net::QuicStreamSequencerBuffer::Gap Gap;
+typedef quic::QuicStreamSequencerBuffer::BufferBlock BufferBlock;
+typedef quic::QuicStreamSequencerBuffer::Gap Gap;
 
 static const size_t kBlockSizeBytes =
-    net::QuicStreamSequencerBuffer::kBlockSizeBytes;
+    quic::QuicStreamSequencerBuffer::kBlockSizeBytes;
 
-namespace net {
+namespace quic {
 namespace test {
 
 QuicStreamSequencerBufferPeer::QuicStreamSequencerBufferPeer(
@@ -154,4 +154,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_stream_sequencer_buffer_peer.h b/net/third_party/quic/test_tools/quic_stream_sequencer_buffer_peer.h
index a05c959..7937766 100644
--- a/net/third_party/quic/test_tools/quic_stream_sequencer_buffer_peer.h
+++ b/net/third_party/quic/test_tools/quic_stream_sequencer_buffer_peer.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/core/quic_stream_sequencer_buffer.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -56,6 +56,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_STREAM_SEQUENCER_BUFFER_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_stream_sequencer_peer.cc b/net/third_party/quic/test_tools/quic_stream_sequencer_peer.cc
index d62495b..4ba2a69 100644
--- a/net/third_party/quic/test_tools/quic_stream_sequencer_peer.cc
+++ b/net/third_party/quic/test_tools/quic_stream_sequencer_peer.cc
@@ -9,7 +9,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -39,4 +39,4 @@
   buffer_peer.set_total_bytes_read(total_bytes_read);
 }
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_stream_sequencer_peer.h b/net/third_party/quic/test_tools/quic_stream_sequencer_peer.h
index 7250434a..aa97588d 100644
--- a/net/third_party/quic/test_tools/quic_stream_sequencer_peer.h
+++ b/net/third_party/quic/test_tools/quic_stream_sequencer_peer.h
@@ -8,7 +8,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 
 class QuicStreamSequencer;
 
@@ -30,6 +30,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_STREAM_SEQUENCER_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_sustained_bandwidth_recorder_peer.cc b/net/third_party/quic/test_tools/quic_sustained_bandwidth_recorder_peer.cc
index 3bab6718..8a8a1f3 100644
--- a/net/third_party/quic/test_tools/quic_sustained_bandwidth_recorder_peer.cc
+++ b/net/third_party/quic/test_tools/quic_sustained_bandwidth_recorder_peer.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/core/quic_sustained_bandwidth_recorder.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -31,4 +31,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_sustained_bandwidth_recorder_peer.h b/net/third_party/quic/test_tools/quic_sustained_bandwidth_recorder_peer.h
index abc6c2c..e398b7d 100644
--- a/net/third_party/quic/test_tools/quic_sustained_bandwidth_recorder_peer.h
+++ b/net/third_party/quic/test_tools/quic_sustained_bandwidth_recorder_peer.h
@@ -10,7 +10,7 @@
 #include "base/macros.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 
 class QuicSustainedBandwidthRecorder;
 
@@ -32,6 +32,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_SUSTAINED_BANDWIDTH_RECORDER_PEER_H_
diff --git a/net/third_party/quic/test_tools/quic_test_client.cc b/net/third_party/quic/test_tools/quic_test_client.cc
index aa716ab4..18f7c0e 100644
--- a/net/third_party/quic/test_tools/quic_test_client.cc
+++ b/net/third_party/quic/test_tools/quic_test_client.cc
@@ -30,7 +30,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -165,7 +165,7 @@
     QuicSocketAddress server_address,
     const QuicServerId& server_id,
     const ParsedQuicVersionVector& supported_versions,
-    EpollServer* epoll_server)
+    net::EpollServer* epoll_server)
     : MockableQuicClient(server_address,
                          server_id,
                          QuicConfig(),
@@ -177,7 +177,7 @@
     const QuicServerId& server_id,
     const QuicConfig& config,
     const ParsedQuicVersionVector& supported_versions,
-    EpollServer* epoll_server)
+    net::EpollServer* epoll_server)
     : MockableQuicClient(server_address,
                          server_id,
                          config,
@@ -190,7 +190,7 @@
     const QuicServerId& server_id,
     const QuicConfig& config,
     const ParsedQuicVersionVector& supported_versions,
-    EpollServer* epoll_server,
+    net::EpollServer* epoll_server,
     std::unique_ptr<ProofVerifier> proof_verifier)
     : QuicClient(
           server_address,
@@ -264,7 +264,7 @@
     : client_(new MockableQuicClient(server_address,
                                      QuicServerId(server_hostname,
                                                   server_address.port(),
-                                                  PRIVACY_MODE_DISABLED),
+                                                  net::PRIVACY_MODE_DISABLED),
                                      config,
                                      supported_versions,
                                      &epoll_server_)) {
@@ -280,7 +280,7 @@
     : client_(new MockableQuicClient(server_address,
                                      QuicServerId(server_hostname,
                                                   server_address.port(),
-                                                  PRIVACY_MODE_DISABLED),
+                                                  net::PRIVACY_MODE_DISABLED),
                                      config,
                                      supported_versions,
                                      &epoll_server_,
@@ -537,8 +537,8 @@
 
   // If we've been asked to override SNI, set it now
   if (override_sni_set_) {
-    client_->set_server_id(
-        QuicServerId(override_sni_, address().port(), PRIVACY_MODE_DISABLED));
+    client_->set_server_id(QuicServerId(override_sni_, address().port(),
+                                        net::PRIVACY_MODE_DISABLED));
   }
 
   client_->Connect();
@@ -874,4 +874,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_test_client.h b/net/third_party/quic/test_tools/quic_test_client.h
index 1b48aca6..4f1bc8f 100644
--- a/net/third_party/quic/test_tools/quic_test_client.h
+++ b/net/third_party/quic/test_tools/quic_test_client.h
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/tools/quic_client.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace net {
+namespace quic {
 
 class ProofVerifier;
 class QuicPacketWriterWrapper;
@@ -35,19 +35,19 @@
   MockableQuicClient(QuicSocketAddress server_address,
                      const QuicServerId& server_id,
                      const ParsedQuicVersionVector& supported_versions,
-                     EpollServer* epoll_server);
+                     net::EpollServer* epoll_server);
 
   MockableQuicClient(QuicSocketAddress server_address,
                      const QuicServerId& server_id,
                      const QuicConfig& config,
                      const ParsedQuicVersionVector& supported_versions,
-                     EpollServer* epoll_server);
+                     net::EpollServer* epoll_server);
 
   MockableQuicClient(QuicSocketAddress server_address,
                      const QuicServerId& server_id,
                      const QuicConfig& config,
                      const ParsedQuicVersionVector& supported_versions,
-                     EpollServer* epoll_server,
+                     net::EpollServer* epoll_server,
                      std::unique_ptr<ProofVerifier> proof_verifier);
 
   ~MockableQuicClient() override;
@@ -245,7 +245,7 @@
 
   void WaitForWriteToFlush();
 
-  EpollServer* epoll_server() { return &epoll_server_; }
+  net::EpollServer* epoll_server() { return &epoll_server_; }
 
   size_t num_requests() const { return num_requests_; }
 
@@ -342,7 +342,7 @@
   // tracking its state.
   void SetLatestCreatedStream(QuicSpdyClientStream* stream);
 
-  EpollServer epoll_server_;
+  net::EpollServer epoll_server_;
   std::unique_ptr<MockableQuicClient> client_;  // The actual client
   QuicSpdyClientStream* latest_created_stream_;
   std::map<QuicStreamId, QuicSpdyClientStream*> open_streams_;
@@ -392,6 +392,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_
diff --git a/net/third_party/quic/test_tools/quic_test_server.cc b/net/third_party/quic/test_tools/quic_test_server.cc
index 2e8b349..ac575b9b 100644
--- a/net/third_party/quic/test_tools/quic_test_server.cc
+++ b/net/third_party/quic/test_tools/quic_test_server.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/tools/quic_simple_dispatcher.h"
 #include "net/third_party/quic/tools/quic_simple_server_session.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -208,4 +208,4 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_test_server.h b/net/third_party/quic/test_tools/quic_test_server.h
index a28a88c..1282ef9 100644
--- a/net/third_party/quic/test_tools/quic_test_server.h
+++ b/net/third_party/quic/test_tools/quic_test_server.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/tools/quic_simple_server_session.h"
 #include "net/third_party/quic/tools/quic_simple_server_stream.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -103,6 +103,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_TEST_SERVER_H_
diff --git a/net/third_party/quic/test_tools/quic_test_utils.cc b/net/third_party/quic/test_tools/quic_test_utils.cc
index 1d78b03..cf0d5f8 100644
--- a/net/third_party/quic/test_tools/quic_test_utils.cc
+++ b/net/third_party/quic/test_tools/quic_test_utils.cc
@@ -32,7 +32,7 @@
 using testing::_;
 using testing::Invoke;
 
-namespace net {
+namespace quic {
 namespace test {
 
 QuicAckFrame InitAckFrame(const std::vector<QuicAckBlock>& ack_blocks) {
@@ -969,4 +969,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_test_utils.h b/net/third_party/quic/test_tools/quic_test_utils.h
index 0a13c63..bfae84df 100644
--- a/net/third_party/quic/test_tools/quic_test_utils.h
+++ b/net/third_party/quic/test_tools/quic_test_utils.h
@@ -39,7 +39,7 @@
 // For external QUIC, EXPECT_QUIC_BUG should be #defined to EXPECT_DFATAL.
 #define EXPECT_QUIC_BUG EXPECT_DFATAL
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -1078,6 +1078,6 @@
 QuicStreamId GetNthServerInitiatedStreamId(QuicTransportVersion version, int n);
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_TEST_UTILS_H_
diff --git a/net/third_party/quic/test_tools/quic_test_utils_test.cc b/net/third_party/quic/test_tools/quic_test_utils_test.cc
index 2384bb19..95a3638 100644
--- a/net/third_party/quic/test_tools/quic_test_utils_test.cc
+++ b/net/third_party/quic/test_tools/quic_test_utils_test.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "testing/gtest/include/gtest/gtest-spi.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicTestUtilsTest : public QuicTest {};
@@ -48,4 +48,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_time_wait_list_manager_peer.cc b/net/third_party/quic/test_tools/quic_time_wait_list_manager_peer.cc
index ee3161e4..679dc6a 100644
--- a/net/third_party/quic/test_tools/quic_time_wait_list_manager_peer.cc
+++ b/net/third_party/quic/test_tools/quic_time_wait_list_manager_peer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/quic_time_wait_list_manager_peer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 bool QuicTimeWaitListManagerPeer::ShouldSendResponse(
@@ -37,4 +37,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/quic_time_wait_list_manager_peer.h b/net/third_party/quic/test_tools/quic_time_wait_list_manager_peer.h
index 2fe0f6ca..27bd8bef 100644
--- a/net/third_party/quic/test_tools/quic_time_wait_list_manager_peer.h
+++ b/net/third_party/quic/test_tools/quic_time_wait_list_manager_peer.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/core/quic_time_wait_list_manager.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class QuicTimeWaitListManagerPeer {
@@ -28,6 +28,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_QUIC_TIME_WAIT_LIST_MANAGER_PEER_H_
diff --git a/net/third_party/quic/test_tools/rtt_stats_peer.cc b/net/third_party/quic/test_tools/rtt_stats_peer.cc
index 09cba999..07d349d 100644
--- a/net/third_party/quic/test_tools/rtt_stats_peer.cc
+++ b/net/third_party/quic/test_tools/rtt_stats_peer.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/test_tools/rtt_stats_peer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // static
@@ -18,4 +18,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/rtt_stats_peer.h b/net/third_party/quic/test_tools/rtt_stats_peer.h
index 29105cb56..b508c84 100644
--- a/net/third_party/quic/test_tools/rtt_stats_peer.h
+++ b/net/third_party/quic/test_tools/rtt_stats_peer.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/congestion_control/rtt_stats.h"
 #include "net/third_party/quic/core/quic_time.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 class RttStatsPeer {
@@ -23,6 +23,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_RTT_STATS_PEER_H_
diff --git a/net/third_party/quic/test_tools/server_thread.cc b/net/third_party/quic/test_tools/server_thread.cc
index 4cb0405..ef9f734 100644
--- a/net/third_party/quic/test_tools/server_thread.cc
+++ b/net/third_party/quic/test_tools/server_thread.cc
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/test_tools/crypto_test_utils.h"
 #include "net/third_party/quic/test_tools/quic_server_peer.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 ServerThread::ServerThread(QuicServer* server, const QuicSocketAddress& address)
@@ -126,4 +126,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/server_thread.h b/net/third_party/quic/test_tools/server_thread.h
index a59fa19..e75e64b 100644
--- a/net/third_party/quic/test_tools/server_thread.h
+++ b/net/third_party/quic/test_tools/server_thread.h
@@ -16,7 +16,7 @@
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 #include "net/third_party/quic/tools/quic_server.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 // Simple wrapper class to run QuicServer in a dedicated thread.
@@ -85,6 +85,6 @@
 };
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SERVER_THREAD_H_
diff --git a/net/third_party/quic/test_tools/simple_data_producer.cc b/net/third_party/quic/test_tools/simple_data_producer.cc
index 48ebf74..3a0bd46 100644
--- a/net/third_party/quic/test_tools/simple_data_producer.cc
+++ b/net/third_party/quic/test_tools/simple_data_producer.cc
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/platform/api/quic_map_util.h"
 #include "net/third_party/quic/platform/api/quic_ptr_util.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -39,4 +39,4 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simple_data_producer.h b/net/third_party/quic/test_tools/simple_data_producer.h
index 7c37512..cf21feb 100644
--- a/net/third_party/quic/test_tools/simple_data_producer.h
+++ b/net/third_party/quic/test_tools/simple_data_producer.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_stream_send_buffer.h"
 #include "net/third_party/quic/platform/api/quic_containers.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -45,6 +45,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMPLE_DATA_PRODUCER_H_
diff --git a/net/third_party/quic/test_tools/simple_quic_framer.cc b/net/third_party/quic/test_tools/simple_quic_framer.cc
index a786639..d1c3400d 100644
--- a/net/third_party/quic/test_tools/simple_quic_framer.cc
+++ b/net/third_party/quic/test_tools/simple_quic_framer.cc
@@ -14,7 +14,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace test {
 
 class SimpleFramerVisitor : public QuicFramerVisitorInterface {
@@ -275,4 +275,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simple_quic_framer.h b/net/third_party/quic/test_tools/simple_quic_framer.h
index 3ec72e1..886facd9 100644
--- a/net/third_party/quic/test_tools/simple_quic_framer.h
+++ b/net/third_party/quic/test_tools/simple_quic_framer.h
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/core/quic_framer.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
+namespace quic {
 
 struct QuicAckFrame;
 
@@ -59,6 +59,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMPLE_QUIC_FRAMER_H_
diff --git a/net/third_party/quic/test_tools/simple_session_notifier.cc b/net/third_party/quic/test_tools/simple_session_notifier.cc
index b1b543a..3dbb671 100644
--- a/net/third_party/quic/test_tools/simple_session_notifier.cc
+++ b/net/third_party/quic/test_tools/simple_session_notifier.cc
@@ -7,7 +7,7 @@
 #include "net/third_party/quic/platform/api/quic_map_util.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 
@@ -535,4 +535,4 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simple_session_notifier.h b/net/third_party/quic/test_tools/simple_session_notifier.h
index 749e51e..5e8b882 100644
--- a/net/third_party/quic/test_tools/simple_session_notifier.h
+++ b/net/third_party/quic/test_tools/simple_session_notifier.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/session_notifier_interface.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace net {
+namespace quic {
 
 class QuicConnection;
 
@@ -138,6 +138,6 @@
 
 }  // namespace test
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMPLE_SESSION_NOTIFIER_H_
diff --git a/net/third_party/quic/test_tools/simple_session_notifier_test.cc b/net/third_party/quic/test_tools/simple_session_notifier_test.cc
index cfa3a62..ffae4bc 100644
--- a/net/third_party/quic/test_tools/simple_session_notifier_test.cc
+++ b/net/third_party/quic/test_tools/simple_session_notifier_test.cc
@@ -13,7 +13,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -216,4 +216,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/actor.cc b/net/third_party/quic/test_tools/simulator/actor.cc
index a99bb526..cd6e536 100644
--- a/net/third_party/quic/test_tools/simulator/actor.cc
+++ b/net/third_party/quic/test_tools/simulator/actor.cc
@@ -7,7 +7,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 Actor::Actor(Simulator* simulator, string name)
@@ -28,4 +28,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/actor.h b/net/third_party/quic/test_tools/simulator/actor.h
index 02a20f36..d2698f7d 100644
--- a/net/third_party/quic/test_tools/simulator/actor.h
+++ b/net/third_party/quic/test_tools/simulator/actor.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/core/quic_time.h"
 #include "net/third_party/quic/platform/api/quic_clock.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 class Simulator;
@@ -61,6 +61,6 @@
 };
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_ACTOR_H_
diff --git a/net/third_party/quic/test_tools/simulator/alarm_factory.cc b/net/third_party/quic/test_tools/simulator/alarm_factory.cc
index 1ae181a..9b51fa30 100644
--- a/net/third_party/quic/test_tools/simulator/alarm_factory.cc
+++ b/net/third_party/quic/test_tools/simulator/alarm_factory.cc
@@ -8,7 +8,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // Alarm is an implementation of QuicAlarm which can schedule alarms in the
@@ -79,4 +79,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/alarm_factory.h b/net/third_party/quic/test_tools/simulator/alarm_factory.h
index e7dfa75..d10cd47 100644
--- a/net/third_party/quic/test_tools/simulator/alarm_factory.h
+++ b/net/third_party/quic/test_tools/simulator/alarm_factory.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_alarm_factory.h"
 #include "net/third_party/quic/test_tools/simulator/actor.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // AlarmFactory allows to schedule QuicAlarms using the simulation event queue.
@@ -34,6 +34,6 @@
 };
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_ALARM_FACTORY_H_
diff --git a/net/third_party/quic/test_tools/simulator/link.cc b/net/third_party/quic/test_tools/simulator/link.cc
index a0f2cfe..433583b 100644
--- a/net/third_party/quic/test_tools/simulator/link.cc
+++ b/net/third_party/quic/test_tools/simulator/link.cc
@@ -9,7 +9,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // Parameters for random noise delay.
@@ -120,4 +120,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/link.h b/net/third_party/quic/test_tools/simulator/link.h
index b0e7889e..8636ee5 100644
--- a/net/third_party/quic/test_tools/simulator/link.h
+++ b/net/third_party/quic/test_tools/simulator/link.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/test_tools/simulator/actor.h"
 #include "net/third_party/quic/test_tools/simulator/port.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // A reliable simplex link between two endpoints with constrained bandwidth.  A
@@ -86,6 +86,6 @@
 };
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_LINK_H_
diff --git a/net/third_party/quic/test_tools/simulator/packet_filter.cc b/net/third_party/quic/test_tools/simulator/packet_filter.cc
index 195f1450..1e2e18b 100644
--- a/net/third_party/quic/test_tools/simulator/packet_filter.cc
+++ b/net/third_party/quic/test_tools/simulator/packet_filter.cc
@@ -6,7 +6,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 PacketFilter::PacketFilter(Simulator* simulator, string name, Endpoint* input)
@@ -37,4 +37,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/packet_filter.h b/net/third_party/quic/test_tools/simulator/packet_filter.h
index 4a1967a..4c4878e3 100644
--- a/net/third_party/quic/test_tools/simulator/packet_filter.h
+++ b/net/third_party/quic/test_tools/simulator/packet_filter.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/test_tools/simulator/port.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // Packet filter allows subclasses to filter out the packets that enter the
@@ -71,5 +71,5 @@
 };
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_PACKET_FILTER_H_
diff --git a/net/third_party/quic/test_tools/simulator/port.cc b/net/third_party/quic/test_tools/simulator/port.cc
index 27b9dd1..5d5de94 100644
--- a/net/third_party/quic/test_tools/simulator/port.cc
+++ b/net/third_party/quic/test_tools/simulator/port.cc
@@ -6,7 +6,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 Packet::Packet()
@@ -20,4 +20,4 @@
     : Actor(simulator, name) {}
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/port.h b/net/third_party/quic/test_tools/simulator/port.h
index 6675bc56..c98cb6b8 100644
--- a/net/third_party/quic/test_tools/simulator/port.h
+++ b/net/third_party/quic/test_tools/simulator/port.h
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/core/quic_packets.h"
 #include "net/third_party/quic/test_tools/simulator/actor.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 struct Packet {
@@ -61,6 +61,6 @@
 };
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_PORT_H_
diff --git a/net/third_party/quic/test_tools/simulator/queue.cc b/net/third_party/quic/test_tools/simulator/queue.cc
index 0e80622..967c3b0 100644
--- a/net/third_party/quic/test_tools/simulator/queue.cc
+++ b/net/third_party/quic/test_tools/simulator/queue.cc
@@ -9,7 +9,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 Queue::ListenerInterface::~ListenerInterface() {}
@@ -122,4 +122,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/queue.h b/net/third_party/quic/test_tools/simulator/queue.h
index 230b9c5..2d57fee 100644
--- a/net/third_party/quic/test_tools/simulator/queue.h
+++ b/net/third_party/quic/test_tools/simulator/queue.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_alarm.h"
 #include "net/third_party/quic/test_tools/simulator/link.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // A finitely sized queue which egresses packets onto a constrained link.  The
@@ -115,6 +115,6 @@
 };
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_QUEUE_H_
diff --git a/net/third_party/quic/test_tools/simulator/quic_endpoint.cc b/net/third_party/quic/test_tools/simulator/quic_endpoint.cc
index aaec13a4..c3f1062 100644
--- a/net/third_party/quic/test_tools/simulator/quic_endpoint.cc
+++ b/net/third_party/quic/test_tools/simulator/quic_endpoint.cc
@@ -17,7 +17,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 const QuicStreamId kDataStream = 3;
@@ -372,4 +372,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/quic_endpoint.h b/net/third_party/quic/test_tools/simulator/quic_endpoint.h
index 114392f..1fef081f 100644
--- a/net/third_party/quic/test_tools/simulator/quic_endpoint.h
+++ b/net/third_party/quic/test_tools/simulator/quic_endpoint.h
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/test_tools/simulator/link.h"
 #include "net/third_party/quic/test_tools/simulator/queue.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // Size of the TX queue used by the kernel/NIC.  1000 is the Linux
@@ -204,6 +204,6 @@
 };
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_QUIC_ENDPOINT_H_
diff --git a/net/third_party/quic/test_tools/simulator/quic_endpoint_test.cc b/net/third_party/quic/test_tools/simulator/quic_endpoint_test.cc
index e17fb67..7a4295a 100644
--- a/net/third_party/quic/test_tools/simulator/quic_endpoint_test.cc
+++ b/net/third_party/quic/test_tools/simulator/quic_endpoint_test.cc
@@ -15,7 +15,7 @@
 using ::testing::NiceMock;
 using ::testing::Return;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 const QuicBandwidth kDefaultBandwidth =
@@ -197,4 +197,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/simulator.cc b/net/third_party/quic/test_tools/simulator/simulator.cc
index 7943c53..e0807b0 100644
--- a/net/third_party/quic/test_tools/simulator/simulator.cc
+++ b/net/third_party/quic/test_tools/simulator/simulator.cc
@@ -6,7 +6,7 @@
 #include "net/third_party/quic/core/crypto/quic_random.h"
 #include "net/third_party/quic/platform/api/quic_logging.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 Simulator::Simulator()
@@ -144,4 +144,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/simulator.h b/net/third_party/quic/test_tools/simulator/simulator.h
index b6d715cb..ebb882c 100644
--- a/net/third_party/quic/test_tools/simulator/simulator.h
+++ b/net/third_party/quic/test_tools/simulator/simulator.h
@@ -14,7 +14,7 @@
 #include "net/third_party/quic/test_tools/simulator/actor.h"
 #include "net/third_party/quic/test_tools/simulator/alarm_factory.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // Simulator is responsible for scheduling actors in the simulation and
@@ -157,6 +157,6 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_SIMULATOR_H_
diff --git a/net/third_party/quic/test_tools/simulator/simulator_test.cc b/net/third_party/quic/test_tools/simulator/simulator_test.cc
index 4d780f1..86f22da 100644
--- a/net/third_party/quic/test_tools/simulator/simulator_test.cc
+++ b/net/third_party/quic/test_tools/simulator/simulator_test.cc
@@ -21,7 +21,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // A simple counter that increments its value by 1 every specified period.
@@ -806,4 +806,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/switch.cc b/net/third_party/quic/test_tools/simulator/switch.cc
index 967b8cb..b8e5c0bc 100644
--- a/net/third_party/quic/test_tools/simulator/switch.cc
+++ b/net/third_party/quic/test_tools/simulator/switch.cc
@@ -11,7 +11,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 Switch::Switch(Simulator* simulator,
@@ -86,4 +86,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/switch.h b/net/third_party/quic/test_tools/simulator/switch.h
index 5e05b1d3..f344a425 100644
--- a/net/third_party/quic/test_tools/simulator/switch.h
+++ b/net/third_party/quic/test_tools/simulator/switch.h
@@ -10,7 +10,7 @@
 #include "net/third_party/quic/platform/api/quic_containers.h"
 #include "net/third_party/quic/test_tools/simulator/queue.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 typedef size_t SwitchPortNumber;
@@ -84,6 +84,6 @@
 };
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_SWITCH_H_
diff --git a/net/third_party/quic/test_tools/simulator/traffic_policer.cc b/net/third_party/quic/test_tools/simulator/traffic_policer.cc
index f68d4f4..3e62791 100644
--- a/net/third_party/quic/test_tools/simulator/traffic_policer.cc
+++ b/net/third_party/quic/test_tools/simulator/traffic_policer.cc
@@ -8,7 +8,7 @@
 
 using std::string;
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 TrafficPolicer::TrafficPolicer(Simulator* simulator,
@@ -59,4 +59,4 @@
 }
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/test_tools/simulator/traffic_policer.h b/net/third_party/quic/test_tools/simulator/traffic_policer.h
index 986a01a..8e389de9 100644
--- a/net/third_party/quic/test_tools/simulator/traffic_policer.h
+++ b/net/third_party/quic/test_tools/simulator/traffic_policer.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/test_tools/simulator/packet_filter.h"
 #include "net/third_party/quic/test_tools/simulator/port.h"
 
-namespace net {
+namespace quic {
 namespace simulator {
 
 // Traffic policer uses a token bucket to limit the bandwidth of the traffic
@@ -49,6 +49,6 @@
 };
 
 }  // namespace simulator
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TEST_TOOLS_SIMULATOR_TRAFFIC_POLICER_H_
diff --git a/net/third_party/quic/tools/quic_backend_response.cc b/net/third_party/quic/tools/quic_backend_response.cc
index 80a4633..7969f988 100644
--- a/net/third_party/quic/tools/quic_backend_response.cc
+++ b/net/third_party/quic/tools/quic_backend_response.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/tools/quic_backend_response.h"
 
-namespace net {
+namespace quic {
 
 QuicBackendResponse::ServerPushInfo::ServerPushInfo(
     QuicUrl request_url,
@@ -26,4 +26,4 @@
 
 QuicBackendResponse::~QuicBackendResponse() = default;
 
-}  // namespace net
\ No newline at end of file
+}  // namespace quic
\ No newline at end of file
diff --git a/net/third_party/quic/tools/quic_backend_response.h b/net/third_party/quic/tools/quic_backend_response.h
index a5a86de..05bc6e5 100644
--- a/net/third_party/quic/tools/quic_backend_response.h
+++ b/net/third_party/quic/tools/quic_backend_response.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/spdy_utils.h"
 #include "net/third_party/quic/platform/api/quic_url.h"
 
-namespace net {
+namespace quic {
 
 // Container for HTTP response header/body pairs
 // fetched by the QuicSimpleServerBackend
@@ -70,6 +70,6 @@
   QuicString body_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_BACKEND_RESPONSE_H_
\ No newline at end of file
diff --git a/net/third_party/quic/tools/quic_client.cc b/net/third_party/quic/tools/quic_client.cc
index 314acee..97b3feec4 100644
--- a/net/third_party/quic/tools/quic_client.cc
+++ b/net/third_party/quic/tools/quic_client.cc
@@ -34,12 +34,12 @@
 #define MMSG_MORE 0
 using std::string;
 
-namespace net {
+namespace quic {
 
 QuicClient::QuicClient(QuicSocketAddress server_address,
                        const QuicServerId& server_id,
                        const ParsedQuicVersionVector& supported_versions,
-                       EpollServer* epoll_server,
+                       net::EpollServer* epoll_server,
                        std::unique_ptr<ProofVerifier> proof_verifier)
     : QuicClient(
           server_address,
@@ -54,7 +54,7 @@
     QuicSocketAddress server_address,
     const QuicServerId& server_id,
     const ParsedQuicVersionVector& supported_versions,
-    EpollServer* epoll_server,
+    net::EpollServer* epoll_server,
     std::unique_ptr<QuicClientEpollNetworkHelper> network_helper,
     std::unique_ptr<ProofVerifier> proof_verifier)
     : QuicClient(server_address,
@@ -70,7 +70,7 @@
     const QuicServerId& server_id,
     const ParsedQuicVersionVector& supported_versions,
     const QuicConfig& config,
-    EpollServer* epoll_server,
+    net::EpollServer* epoll_server,
     std::unique_ptr<QuicClientEpollNetworkHelper> network_helper,
     std::unique_ptr<ProofVerifier> proof_verifier)
     : QuicSpdyClientBase(
@@ -101,4 +101,4 @@
   return static_cast<const QuicClientEpollNetworkHelper*>(network_helper());
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_client.h b/net/third_party/quic/tools/quic_client.h
index 5f4af09..14747f4 100644
--- a/net/third_party/quic/tools/quic_client.h
+++ b/net/third_party/quic/tools/quic_client.h
@@ -26,7 +26,7 @@
 #include "net/third_party/quic/tools/quic_spdy_client_base.h"
 #include "net/tools/epoll_server/epoll_server.h"
 
-namespace net {
+namespace quic {
 
 class QuicServerId;
 
@@ -40,20 +40,20 @@
   QuicClient(QuicSocketAddress server_address,
              const QuicServerId& server_id,
              const ParsedQuicVersionVector& supported_versions,
-             EpollServer* epoll_server,
+             net::EpollServer* epoll_server,
              std::unique_ptr<ProofVerifier> proof_verifier);
   // This will take ownership of a passed in network primitive.
   QuicClient(QuicSocketAddress server_address,
              const QuicServerId& server_id,
              const ParsedQuicVersionVector& supported_versions,
-             EpollServer* epoll_server,
+             net::EpollServer* epoll_server,
              std::unique_ptr<QuicClientEpollNetworkHelper> network_helper,
              std::unique_ptr<ProofVerifier> proof_verifier);
   QuicClient(QuicSocketAddress server_address,
              const QuicServerId& server_id,
              const ParsedQuicVersionVector& supported_versions,
              const QuicConfig& config,
-             EpollServer* epoll_server,
+             net::EpollServer* epoll_server,
              std::unique_ptr<QuicClientEpollNetworkHelper> network_helper,
              std::unique_ptr<ProofVerifier> proof_verifier);
 
@@ -79,6 +79,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicClient);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_CLIENT_H_
diff --git a/net/third_party/quic/tools/quic_client_base.cc b/net/third_party/quic/tools/quic_client_base.cc
index 8f28f47..3f29e8e4 100644
--- a/net/third_party/quic/tools/quic_client_base.cc
+++ b/net/third_party/quic/tools/quic_client_base.cc
@@ -15,7 +15,7 @@
 using base::StringToInt;
 using std::string;
 
-namespace net {
+namespace quic {
 
 QuicClientBase::NetworkHelper::~NetworkHelper() = default;
 
@@ -304,4 +304,4 @@
   return QuicRandom::GetInstance()->RandUint64();
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_client_base.h b/net/third_party/quic/tools/quic_client_base.h
index 3d873dc..d1f2eb12 100644
--- a/net/third_party/quic/tools/quic_client_base.h
+++ b/net/third_party/quic/tools/quic_client_base.h
@@ -19,7 +19,7 @@
 #include "net/third_party/quic/platform/api/quic_socket_address.h"
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 
-namespace net {
+namespace quic {
 
 class ProofVerifier;
 class QuicServerId;
@@ -356,6 +356,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicClientBase);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_CLIENT_BASE_H_
diff --git a/net/third_party/quic/tools/quic_client_bin.cc b/net/third_party/quic/tools/quic_client_bin.cc
index 534ce3e..f02a9d2 100644
--- a/net/third_party/quic/tools/quic_client_bin.cc
+++ b/net/third_party/quic/tools/quic_client_bin.cc
@@ -69,11 +69,11 @@
 using net::CertVerifier;
 using net::CTVerifier;
 using net::MultiLogCTVerifier;
-using net::ProofVerifier;
 using net::ProofVerifierChromium;
-using net::QuicStringPiece;
-using net::QuicTextUtils;
-using net::QuicUrl;
+using quic::ProofVerifier;
+using quic::QuicStringPiece;
+using quic::QuicTextUtils;
+using quic::QuicUrl;
 using spdy::SpdyHeaderBlock;
 using net::TransportSecurityState;
 using std::cout;
@@ -110,30 +110,30 @@
 
 class FakeProofVerifier : public ProofVerifier {
  public:
-  net::QuicAsyncStatus VerifyProof(
+  quic::QuicAsyncStatus VerifyProof(
       const string& /*hostname*/,
       const uint16_t /*port*/,
       const string& /*server_config*/,
-      net::QuicTransportVersion /*quic_version*/,
+      quic::QuicTransportVersion /*quic_version*/,
       QuicStringPiece /*chlo_hash*/,
       const std::vector<string>& /*certs*/,
       const string& /*cert_sct*/,
       const string& /*signature*/,
-      const net::ProofVerifyContext* /*context*/,
+      const quic::ProofVerifyContext* /*context*/,
       string* /*error_details*/,
-      std::unique_ptr<net::ProofVerifyDetails>* /*details*/,
-      std::unique_ptr<net::ProofVerifierCallback> /*callback*/) override {
-    return net::QUIC_SUCCESS;
+      std::unique_ptr<quic::ProofVerifyDetails>* /*details*/,
+      std::unique_ptr<quic::ProofVerifierCallback> /*callback*/) override {
+    return quic::QUIC_SUCCESS;
   }
 
-  net::QuicAsyncStatus VerifyCertChain(
+  quic::QuicAsyncStatus VerifyCertChain(
       const std::string& /*hostname*/,
       const std::vector<std::string>& /*certs*/,
-      const net::ProofVerifyContext* /*verify_context*/,
+      const quic::ProofVerifyContext* /*verify_context*/,
       std::string* /*error_details*/,
-      std::unique_ptr<net::ProofVerifyDetails>* /*verify_details*/,
-      std::unique_ptr<net::ProofVerifierCallback> /*callback*/) override {
-    return net::QUIC_SUCCESS;
+      std::unique_ptr<quic::ProofVerifyDetails>* /*verify_details*/,
+      std::unique_ptr<quic::ProofVerifierCallback> /*callback*/) override {
+    return quic::QUIC_SUCCESS;
   }
 };
 
@@ -230,7 +230,7 @@
   base::MessageLoopForIO message_loop;
 
   // Determine IP address to connect to from supplied hostname.
-  net::QuicIpAddress ip_addr;
+  quic::QuicIpAddress ip_addr;
 
   QuicUrl url(urls[0], "https");
   string host = FLAGS_host;
@@ -250,22 +250,22 @@
       return 1;
     }
     ip_addr =
-        net::QuicIpAddress(net::QuicIpAddressImpl(addresses[0].address()));
+        quic::QuicIpAddress(quic::QuicIpAddressImpl(addresses[0].address()));
   }
 
-  string host_port = net::QuicStrCat(ip_addr.ToString(), ":", port);
+  string host_port = quic::QuicStrCat(ip_addr.ToString(), ":", port);
   VLOG(1) << "Resolved " << host << " to " << host_port << endl;
 
   // Build the client, and try to connect.
   net::EpollServer epoll_server;
-  net::QuicServerId server_id(url.host(), url.port(),
-                              net::PRIVACY_MODE_DISABLED);
-  net::ParsedQuicVersionVector versions = net::CurrentSupportedVersions();
+  quic::QuicServerId server_id(url.host(), url.port(),
+                               net::PRIVACY_MODE_DISABLED);
+  quic::ParsedQuicVersionVector versions = quic::CurrentSupportedVersions();
   if (FLAGS_quic_version != -1) {
     versions.clear();
-    versions.push_back(net::ParsedQuicVersion(
-        net::PROTOCOL_QUIC_CRYPTO,
-        static_cast<net::QuicTransportVersion>(FLAGS_quic_version)));
+    versions.push_back(quic::ParsedQuicVersion(
+        quic::PROTOCOL_QUIC_CRYPTO,
+        static_cast<quic::QuicTransportVersion>(FLAGS_quic_version)));
   }
   // For secure QUIC we need to verify the cert chain.
   std::unique_ptr<CertVerifier> cert_verifier(CertVerifier::CreateDefault());
@@ -276,24 +276,24 @@
       new net::DefaultCTPolicyEnforcer());
   std::unique_ptr<ProofVerifier> proof_verifier;
   if (line->HasSwitch("disable-certificate-verification")) {
-    proof_verifier = net::QuicMakeUnique<FakeProofVerifier>();
+    proof_verifier = quic::QuicMakeUnique<FakeProofVerifier>();
   } else {
-    proof_verifier = net::QuicMakeUnique<ProofVerifierChromium>(
+    proof_verifier = quic::QuicMakeUnique<ProofVerifierChromium>(
         cert_verifier.get(), ct_policy_enforcer.get(),
         transport_security_state.get(), ct_verifier.get());
   }
-  net::QuicClient client(net::QuicSocketAddress(ip_addr, port), server_id,
-                         versions, &epoll_server, std::move(proof_verifier));
+  quic::QuicClient client(quic::QuicSocketAddress(ip_addr, port), server_id,
+                          versions, &epoll_server, std::move(proof_verifier));
   client.set_initial_max_packet_length(
-      FLAGS_initial_mtu != 0 ? FLAGS_initial_mtu : net::kDefaultMaxPacketSize);
+      FLAGS_initial_mtu != 0 ? FLAGS_initial_mtu : quic::kDefaultMaxPacketSize);
   client.set_drop_response_body(FLAGS_drop_response_body);
   if (!client.Initialize()) {
     cerr << "Failed to initialize client." << endl;
     return 1;
   }
   if (!client.Connect()) {
-    net::QuicErrorCode error = client.session()->error();
-    if (error == net::QUIC_INVALID_VERSION) {
+    quic::QuicErrorCode error = client.session()->error();
+    if (error == quic::QUIC_INVALID_VERSION) {
       cout << "Server talks QUIC, but none of the versions supported by "
            << "this client: " << ParsedQuicVersionVectorToString(versions)
            << endl;
@@ -302,7 +302,7 @@
       return FLAGS_version_mismatch_ok ? 0 : 20;
     }
     cerr << "Failed to connect to " << host_port
-         << ". Error: " << net::QuicErrorCodeToString(error) << endl;
+         << ". Error: " << quic::QuicErrorCodeToString(error) << endl;
     return 1;
   }
   cout << "Connected to " << host_port << endl;
diff --git a/net/third_party/quic/tools/quic_client_epoll_network_helper.cc b/net/third_party/quic/tools/quic_client_epoll_network_helper.cc
index e1fcc3a..47ac060 100644
--- a/net/third_party/quic/tools/quic_client_epoll_network_helper.cc
+++ b/net/third_party/quic/tools/quic_client_epoll_network_helper.cc
@@ -33,14 +33,14 @@
 #define MMSG_MORE 0
 using std::string;
 
-namespace net {
+namespace quic {
 
 namespace {
 const int kEpollFlags = EPOLLIN | EPOLLOUT | EPOLLET;
 }  // namespace
 
 QuicClientEpollNetworkHelper::QuicClientEpollNetworkHelper(
-    EpollServer* epoll_server,
+    net::EpollServer* epoll_server,
     QuicClientBase* client)
     : epoll_server_(epoll_server),
       packets_dropped_(0),
@@ -122,14 +122,14 @@
   epoll_server_->WaitForEventsAndExecuteCallbacks();
 }
 
-void QuicClientEpollNetworkHelper::OnRegistration(EpollServer* eps,
+void QuicClientEpollNetworkHelper::OnRegistration(net::EpollServer* eps,
                                                   int fd,
                                                   int event_mask) {}
 void QuicClientEpollNetworkHelper::OnModification(int fd, int event_mask) {}
 void QuicClientEpollNetworkHelper::OnUnregistration(int fd, bool replaced) {}
-void QuicClientEpollNetworkHelper::OnShutdown(EpollServer* eps, int fd) {}
+void QuicClientEpollNetworkHelper::OnShutdown(net::EpollServer* eps, int fd) {}
 
-void QuicClientEpollNetworkHelper::OnEvent(int fd, EpollEvent* event) {
+void QuicClientEpollNetworkHelper::OnEvent(int fd, net::EpollEvent* event) {
   DCHECK_EQ(fd, GetLatestFD());
 
   if (event->in_events & EPOLLIN) {
@@ -201,4 +201,4 @@
       /*receive_buffer_size =*/kDefaultSocketReceiveBuffer,
       /*send_buffer_size =*/kDefaultSocketReceiveBuffer, overflow_supported);
 }
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_client_epoll_network_helper.h b/net/third_party/quic/tools/quic_client_epoll_network_helper.h
index 4ec5b55..0a2a35c 100644
--- a/net/third_party/quic/tools/quic_client_epoll_network_helper.h
+++ b/net/third_party/quic/tools/quic_client_epoll_network_helper.h
@@ -25,7 +25,7 @@
 #include "net/third_party/quic/tools/quic_spdy_client_base.h"
 #include "net/tools/epoll_server/epoll_server.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicClientPeer;
@@ -34,25 +34,25 @@
 // An implementation of the QuicClientBase::NetworkHelper based off
 // the epoll server.
 class QuicClientEpollNetworkHelper : public QuicClientBase::NetworkHelper,
-                                     public EpollCallbackInterface,
+                                     public net::EpollCallbackInterface,
                                      public ProcessPacketInterface {
  public:
   // Create a quic client, which will have events managed by an externally owned
-  // EpollServer.
-  QuicClientEpollNetworkHelper(EpollServer* epoll_server,
+  // net::EpollServer.
+  QuicClientEpollNetworkHelper(net::EpollServer* epoll_server,
                                QuicClientBase* client);
 
   ~QuicClientEpollNetworkHelper() override;
 
-  // From EpollCallbackInterface
-  void OnRegistration(EpollServer* eps, int fd, int event_mask) override;
+  // From net::EpollCallbackInterface
+  void OnRegistration(net::EpollServer* eps, int fd, int event_mask) override;
   void OnModification(int fd, int event_mask) override;
-  void OnEvent(int fd, EpollEvent* event) override;
+  void OnEvent(int fd, net::EpollEvent* event) override;
   // |fd_| can be unregistered without the client being disconnected. This
   // happens in b3m QuicProber where we unregister |fd_| to feed in events to
   // the client from the SelectServer.
   void OnUnregistration(int fd, bool replaced) override;
-  void OnShutdown(EpollServer* eps, int fd) override;
+  void OnShutdown(net::EpollServer* eps, int fd) override;
 
   // From ProcessPacketInterface. This will be called for each received
   // packet.
@@ -71,7 +71,7 @@
 
   // Accessors provided for convenience, not part of any interface.
 
-  EpollServer* epoll_server() { return epoll_server_; }
+  net::EpollServer* epoll_server() { return epoll_server_; }
 
   const QuicLinkedHashMap<int, QuicSocketAddress>& fd_address_map() const {
     return fd_address_map_;
@@ -106,7 +106,7 @@
   void CleanUpUDPSocketImpl(int fd);
 
   // Listens for events on the client socket.
-  EpollServer* epoll_server_;
+  net::EpollServer* epoll_server_;
 
   // Map mapping created UDP sockets to their addresses. By using linked hash
   // map, the order of socket creation can be recorded.
@@ -131,6 +131,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicClientEpollNetworkHelper);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_CLIENT_EPOLL_NETWORK_HELPER_H_
diff --git a/net/third_party/quic/tools/quic_client_test.cc b/net/third_party/quic/tools/quic_client_test.cc
index 10905780ef3..0e12694 100644
--- a/net/third_party/quic/tools/quic_client_test.cc
+++ b/net/third_party/quic/tools/quic_client_test.cc
@@ -20,7 +20,7 @@
 #include "net/tools/epoll_server/epoll_server.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 
@@ -49,10 +49,11 @@
 
 // Creates a new QuicClient and Initializes it. Caller is responsible for
 // deletion.
-QuicClient* CreateAndInitializeQuicClient(EpollServer* eps, uint16_t port) {
+QuicClient* CreateAndInitializeQuicClient(net::EpollServer* eps,
+                                          uint16_t port) {
   QuicSocketAddress server_address(QuicSocketAddress(TestLoopback(), port));
   QuicServerId server_id("hostname", server_address.port(),
-                         PRIVACY_MODE_DISABLED);
+                         net::PRIVACY_MODE_DISABLED);
   ParsedQuicVersionVector versions = AllSupportedVersions();
   QuicClient* client =
       new QuicClient(server_address, server_id, versions, eps,
@@ -71,8 +72,8 @@
   // around some memory corruption detector weirdness.
   crypto_test_utils::ProofVerifierForTesting().reset();
 
-  // Record initial number of FDs, after creation of EpollServer.
-  EpollServer eps;
+  // Record initial number of FDs, after creation of net::EpollServer.
+  net::EpollServer eps;
   size_t number_of_open_fds = NumOpenSocketFDs();
 
   // Create a number of clients, initialize them, and verify this has resulted
@@ -80,7 +81,7 @@
   const int kNumClients = 50;
   for (int i = 0; i < kNumClients; ++i) {
     std::unique_ptr<QuicClient> client(
-        CreateAndInitializeQuicClient(&eps, net::test::kTestPort + i));
+        CreateAndInitializeQuicClient(&eps, kTestPort + i));
 
     // Initializing the client will create a new FD.
     EXPECT_LT(number_of_open_fds, NumOpenSocketFDs());
@@ -95,11 +96,11 @@
   // around some memory corruption detector weirdness.
   crypto_test_utils::ProofVerifierForTesting().reset();
 
-  EpollServer eps;
+  net::EpollServer eps;
   size_t number_of_open_fds = NumOpenSocketFDs();
 
   std::unique_ptr<QuicClient> client(
-      CreateAndInitializeQuicClient(&eps, net::test::kTestPort));
+      CreateAndInitializeQuicClient(&eps, kTestPort));
   EXPECT_EQ(number_of_open_fds + 1, NumOpenSocketFDs());
   // Create more UDP sockets.
   EXPECT_TRUE(QuicClientPeer::CreateUDPSocketAndBind(client.get()));
@@ -116,4 +117,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_memory_cache_backend.cc b/net/third_party/quic/tools/quic_memory_cache_backend.cc
index 10c332b..279dd99 100644
--- a/net/third_party/quic/tools/quic_memory_cache_backend.cc
+++ b/net/third_party/quic/tools/quic_memory_cache_backend.cc
@@ -19,7 +19,7 @@
 using base::FilePath;
 using base::IntToString;
 
-namespace net {
+namespace quic {
 
 QuicMemoryCacheBackend::ResourceFile::ResourceFile(
     const base::FilePath& file_name)
@@ -408,4 +408,4 @@
   return false;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_memory_cache_backend.h b/net/third_party/quic/tools/quic_memory_cache_backend.h
index 5c5b564..76a0c84 100644
--- a/net/third_party/quic/tools/quic_memory_cache_backend.h
+++ b/net/third_party/quic/tools/quic_memory_cache_backend.h
@@ -21,7 +21,7 @@
 #include "net/third_party/quic/tools/quic_simple_server_backend.h"
 #include "net/third_party/spdy/core/spdy_framer.h"
 
-namespace net {
+namespace quic {
 
 // In-memory cache for HTTP responses.
 // Reads from disk cache generated by:
@@ -185,6 +185,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicMemoryCacheBackend);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_MEMORY_CACHE_BACKEND_H_
diff --git a/net/third_party/quic/tools/quic_memory_cache_backend_test.cc b/net/third_party/quic/tools/quic_memory_cache_backend_test.cc
index a7233848..fd562ed 100644
--- a/net/third_party/quic/tools/quic_memory_cache_backend_test.cc
+++ b/net/third_party/quic/tools/quic_memory_cache_backend_test.cc
@@ -11,7 +11,7 @@
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 #include "net/third_party/quic/tools/quic_backend_response.h"
 
-namespace net {
+namespace quic {
 namespace test {
 
 namespace {
@@ -239,4 +239,4 @@
 }
 
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_packet_printer_bin.cc b/net/third_party/quic/tools/quic_packet_printer_bin.cc
index 7f6db29..3ba02fc 100644
--- a/net/third_party/quic/tools/quic_packet_printer_bin.cc
+++ b/net/third_party/quic/tools/quic_packet_printer_bin.cc
@@ -57,7 +57,7 @@
 }
 }  // namespace
 
-namespace net {
+namespace quic {
 
 class QuicPacketPrinter : public QuicFramerVisitorInterface {
  public:
@@ -167,7 +167,7 @@
   QuicFramer* framer_;  // Unowned.
 };
 
-}  // namespace net
+}  // namespace quic
 
 int main(int argc, char* argv[]) {
   base::CommandLine::Init(argc, argv);
@@ -185,31 +185,31 @@
   }
 
   string perspective_string = ArgToString(args[0]);
-  net::Perspective perspective;
+  quic::Perspective perspective;
   if (perspective_string == "client") {
-    perspective = net::Perspective::IS_CLIENT;
+    perspective = quic::Perspective::IS_CLIENT;
   } else if (perspective_string == "server") {
-    perspective = net::Perspective::IS_SERVER;
+    perspective = quic::Perspective::IS_SERVER;
   } else {
     std::cerr << "Invalid perspective. " << perspective_string
               << " Usage: " << args[0] << " client|server <hex>\n";
     return 1;
   }
-  string hex = net::QuicTextUtils::HexDecode(argv[2]);
-  net::ParsedQuicVersionVector versions = net::AllSupportedVersions();
+  string hex = quic::QuicTextUtils::HexDecode(argv[2]);
+  quic::ParsedQuicVersionVector versions = quic::AllSupportedVersions();
   // Fake a time since we're not actually generating acks.
-  net::QuicTime start(net::QuicTime::Zero());
-  net::QuicFramer framer(versions, start, perspective);
+  quic::QuicTime start(quic::QuicTime::Zero());
+  quic::QuicFramer framer(versions, start, perspective);
   if (!FLAGS_quic_version.empty()) {
-    for (net::ParsedQuicVersion version : versions) {
-      if (net::QuicVersionToString(version.transport_version) ==
+    for (quic::ParsedQuicVersion version : versions) {
+      if (quic::QuicVersionToString(version.transport_version) ==
           FLAGS_quic_version) {
         framer.set_version(version);
       }
     }
   }
-  net::QuicPacketPrinter visitor(&framer);
+  quic::QuicPacketPrinter visitor(&framer);
   framer.set_visitor(&visitor);
-  net::QuicEncryptedPacket encrypted(hex.c_str(), hex.length());
+  quic::QuicEncryptedPacket encrypted(hex.c_str(), hex.length());
   return framer.ProcessPacket(encrypted);
 }
diff --git a/net/third_party/quic/tools/quic_reject_reason_decoder_bin.cc b/net/third_party/quic/tools/quic_reject_reason_decoder_bin.cc
index c2e823c..9eaf8f1 100644
--- a/net/third_party/quic/tools/quic_reject_reason_decoder_bin.cc
+++ b/net/third_party/quic/tools/quic_reject_reason_decoder_bin.cc
@@ -13,9 +13,9 @@
 #include "net/third_party/quic/core/crypto/crypto_utils.h"
 
 using base::CommandLine;
-using net::HandshakeFailureReason;
-using net::CryptoUtils;
-using net::MAX_FAILURE_REASON;
+using quic::HandshakeFailureReason;
+using quic::CryptoUtils;
+using quic::MAX_FAILURE_REASON;
 
 int main(int argc, char* argv[]) {
   CommandLine::Init(argc, argv);
diff --git a/net/third_party/quic/tools/quic_server.cc b/net/third_party/quic/tools/quic_server.cc
index 318192a..3459f927 100644
--- a/net/third_party/quic/tools/quic_server.cc
+++ b/net/third_party/quic/tools/quic_server.cc
@@ -37,7 +37,7 @@
 #define SO_RXQ_OVFL 40
 #endif
 
-namespace net {
+namespace quic {
 
 namespace {
 
@@ -183,7 +183,7 @@
   fd_ = -1;
 }
 
-void QuicServer::OnEvent(int fd, EpollEvent* event) {
+void QuicServer::OnEvent(int fd, net::EpollEvent* event) {
   DCHECK_EQ(fd, fd_);
   event->out_ready_mask = 0;
 
@@ -214,4 +214,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_server.h b/net/third_party/quic/tools/quic_server.h
index b9540a90..7e734598 100644
--- a/net/third_party/quic/tools/quic_server.h
+++ b/net/third_party/quic/tools/quic_server.h
@@ -24,7 +24,7 @@
 #include "net/third_party/quic/tools/quic_simple_server_backend.h"
 #include "net/tools/epoll_server/epoll_server.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicServerPeer;
@@ -33,7 +33,7 @@
 class QuicDispatcher;
 class QuicPacketReader;
 
-class QuicServer : public EpollCallbackInterface {
+class QuicServer : public net::EpollCallbackInterface {
  public:
   QuicServer(std::unique_ptr<ProofSource> proof_source,
              QuicSimpleServerBackend* quic_simple_server_backend);
@@ -57,13 +57,13 @@
   // Server deletion is imminent.  Start cleaning up the epoll server.
   virtual void Shutdown();
 
-  // From EpollCallbackInterface
-  void OnRegistration(EpollServer* eps, int fd, int event_mask) override {}
+  // From net::EpollCallbackInterface
+  void OnRegistration(net::EpollServer* eps, int fd, int event_mask) override {}
   void OnModification(int fd, int event_mask) override {}
-  void OnEvent(int fd, EpollEvent* event) override;
+  void OnEvent(int fd, net::EpollEvent* event) override;
   void OnUnregistration(int fd, bool replaced) override {}
 
-  void OnShutdown(EpollServer* eps, int fd) override {}
+  void OnShutdown(net::EpollServer* eps, int fd) override {}
 
   void SetChloMultiplier(size_t multiplier) {
     crypto_config_.set_chlo_multiplier(multiplier);
@@ -86,7 +86,7 @@
 
   const QuicConfig& config() const { return config_; }
   const QuicCryptoServerConfig& crypto_config() const { return crypto_config_; }
-  EpollServer* epoll_server() { return &epoll_server_; }
+  net::EpollServer* epoll_server() { return &epoll_server_; }
 
   QuicDispatcher* dispatcher() { return dispatcher_.get(); }
 
@@ -99,7 +99,7 @@
   void set_silent_close(bool value) { silent_close_ = value; }
 
  private:
-  friend class net::test::QuicServerPeer;
+  friend class quic::test::QuicServerPeer;
 
   // Initialize the internal state of the server.
   void Initialize();
@@ -107,7 +107,7 @@
   // Accepts data from the framer and demuxes clients to sessions.
   std::unique_ptr<QuicDispatcher> dispatcher_;
   // Frames incoming packets and hands them to the dispatcher.
-  EpollServer epoll_server_;
+  net::EpollServer epoll_server_;
 
   // The port the server is listening on.
   int port_;
@@ -150,6 +150,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicServer);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_SERVER_H_
diff --git a/net/third_party/quic/tools/quic_server_bin.cc b/net/third_party/quic/tools/quic_server_bin.cc
index 42dee84..b3c365d 100644
--- a/net/third_party/quic/tools/quic_server_bin.cc
+++ b/net/third_party/quic/tools/quic_server_bin.cc
@@ -24,13 +24,13 @@
 // The port the quic server will listen on.
 int32_t FLAGS_port = 6121;
 // Mode of operations: currently only support in-memory cache
-net::QuicString FLAGS_quic_mode = "cache";
+quic::QuicString FLAGS_quic_mode = "cache";
 // Specifies the directory used during QuicHttpResponseCache
 // construction to seed the cache. Cache directory can be
 // generated using `wget -p --save-headers <url>`
-net::QuicString FLAGS_quic_response_cache_dir = "";
+quic::QuicString FLAGS_quic_response_cache_dir = "";
 
-std::unique_ptr<net::ProofSource> CreateProofSource(
+std::unique_ptr<quic::ProofSource> CreateProofSource(
     const base::FilePath& cert_path,
     const base::FilePath& key_path) {
   std::unique_ptr<net::ProofSourceChromium> proof_source(
@@ -71,7 +71,7 @@
     exit(0);
   }
 
-  net::QuicMemoryCacheBackend memory_cache_backend;
+  quic::QuicMemoryCacheBackend memory_cache_backend;
   if (line->HasSwitch("mode")) {
     FLAGS_quic_mode = line->GetSwitchValueASCII("mode");
   }
@@ -108,15 +108,15 @@
     return 1;
   }
 
-  net::QuicConfig config;
-  net::QuicServer server(
+  quic::QuicConfig config;
+  quic::QuicServer server(
       CreateProofSource(line->GetSwitchValuePath("certificate_file"),
                         line->GetSwitchValuePath("key_file")),
-      config, net::QuicCryptoServerConfig::ConfigOptions(),
-      net::AllSupportedVersions(), &memory_cache_backend);
+      config, quic::QuicCryptoServerConfig::ConfigOptions(),
+      quic::AllSupportedVersions(), &memory_cache_backend);
 
   int rc = server.CreateUDPSocketAndListen(
-      net::QuicSocketAddress(net::QuicIpAddress::Any6(), FLAGS_port));
+      quic::QuicSocketAddress(quic::QuicIpAddress::Any6(), FLAGS_port));
   if (rc < 0) {
     return 1;
   }
diff --git a/net/third_party/quic/tools/quic_server_test.cc b/net/third_party/quic/tools/quic_server_test.cc
index a6a26e6..cb961c6 100644
--- a/net/third_party/quic/tools/quic_server_test.cc
+++ b/net/third_party/quic/tools/quic_server_test.cc
@@ -23,7 +23,7 @@
 
 using ::testing::_;
 
-namespace net {
+namespace quic {
 namespace test {
 
 namespace {
@@ -85,8 +85,7 @@
 class QuicServerEpollInTest : public QuicTest {
  public:
   QuicServerEpollInTest()
-      : port_(net::test::kTestPort),
-        server_address_(QuicIpAddress::Loopback4(), port_) {}
+      : port_(kTestPort), server_address_(QuicIpAddress::Loopback4(), port_) {}
 
   void StartListening() {
     server_.CreateUDPSocketAndListen(server_address_);
@@ -179,7 +178,7 @@
   QuicConfig config_;
   QuicCryptoServerConfig crypto_config_;
   QuicVersionManager version_manager_;
-  EpollServer eps_;
+  net::EpollServer eps_;
   QuicMemoryCacheBackend quic_simple_server_backend_;
   MockQuicDispatcher dispatcher_;
 };
@@ -209,4 +208,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_simple_client_session.cc b/net/third_party/quic/tools/quic_simple_client_session.cc
index ff48d8d..5eafaa7 100644
--- a/net/third_party/quic/tools/quic_simple_client_session.cc
+++ b/net/third_party/quic/tools/quic_simple_client_session.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/platform/api/quic_ptr_util.h"
 
-namespace net {
+namespace quic {
 
 std::unique_ptr<QuicSpdyClientStream>
 QuicSimpleClientSession::CreateClientStream() {
@@ -14,4 +14,4 @@
                                                 drop_response_body_);
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_simple_client_session.h b/net/third_party/quic/tools/quic_simple_client_session.h
index db3a580..195b40a 100644
--- a/net/third_party/quic/tools/quic_simple_client_session.h
+++ b/net/third_party/quic/tools/quic_simple_client_session.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/quic_spdy_client_session.h"
 #include "net/third_party/quic/tools/quic_simple_client_stream.h"
 
-namespace net {
+namespace quic {
 
 class QuicSimpleClientSession : public QuicSpdyClientSession {
  public:
@@ -31,6 +31,6 @@
   const bool drop_response_body_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_SIMPLE_CLIENT_SESSION_H_
diff --git a/net/third_party/quic/tools/quic_simple_client_stream.cc b/net/third_party/quic/tools/quic_simple_client_stream.cc
index 9d9002b..b921b76e 100644
--- a/net/third_party/quic/tools/quic_simple_client_stream.cc
+++ b/net/third_party/quic/tools/quic_simple_client_stream.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/tools/quic_simple_client_stream.h"
 
-namespace net {
+namespace quic {
 
 void QuicSimpleClientStream::OnDataAvailable() {
   if (!drop_response_body_) {
@@ -26,4 +26,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_simple_client_stream.h b/net/third_party/quic/tools/quic_simple_client_stream.h
index 846d5e2..d50c107 100644
--- a/net/third_party/quic/tools/quic_simple_client_stream.h
+++ b/net/third_party/quic/tools/quic_simple_client_stream.h
@@ -7,7 +7,7 @@
 
 #include "net/third_party/quic/core/quic_spdy_client_stream.h"
 
-namespace net {
+namespace quic {
 
 class QuicSimpleClientStream : public QuicSpdyClientStream {
  public:
@@ -23,6 +23,6 @@
   const bool drop_response_body_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_SIMPLE_CLIENT_STREAM_H_
diff --git a/net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.cc b/net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.cc
index 975533a..7524f65e 100644
--- a/net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.cc
+++ b/net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.cc
@@ -4,7 +4,7 @@
 
 #include "net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.h"
 
-namespace net {
+namespace quic {
 
 QuicSimpleCryptoServerStreamHelper::QuicSimpleCryptoServerStreamHelper(
     QuicRandom* random)
@@ -28,4 +28,4 @@
   return true;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.h b/net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.h
index 6e2d3830..f6b2677 100644
--- a/net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.h
+++ b/net/third_party/quic/tools/quic_simple_crypto_server_stream_helper.h
@@ -8,7 +8,7 @@
 #include "net/third_party/quic/core/crypto/quic_random.h"
 #include "net/third_party/quic/core/quic_crypto_server_stream.h"
 
-namespace net {
+namespace quic {
 
 // Simple helper for server crypto streams which generates a new random
 // connection ID for stateless rejects.
@@ -32,6 +32,6 @@
   QuicRandom* random_;  // Unowned.
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_SIMPLE_CRYPTO_SERVER_STREAM_HELPER_H_
diff --git a/net/third_party/quic/tools/quic_simple_dispatcher.cc b/net/third_party/quic/tools/quic_simple_dispatcher.cc
index 901fce202..41979cd1 100644
--- a/net/third_party/quic/tools/quic_simple_dispatcher.cc
+++ b/net/third_party/quic/tools/quic_simple_dispatcher.cc
@@ -6,7 +6,7 @@
 
 #include "net/third_party/quic/tools/quic_simple_server_session.h"
 
-namespace net {
+namespace quic {
 
 QuicSimpleDispatcher::QuicSimpleDispatcher(
     const QuicConfig& config,
@@ -63,4 +63,4 @@
   return session;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_simple_dispatcher.h b/net/third_party/quic/tools/quic_simple_dispatcher.h
index 9df45b8..fa460723 100644
--- a/net/third_party/quic/tools/quic_simple_dispatcher.h
+++ b/net/third_party/quic/tools/quic_simple_dispatcher.h
@@ -9,7 +9,7 @@
 #include "net/third_party/quic/core/quic_server_session_base.h"
 #include "net/third_party/quic/tools/quic_simple_server_backend.h"
 
-namespace net {
+namespace quic {
 
 class QuicSimpleDispatcher : public QuicDispatcher {
  public:
@@ -45,6 +45,6 @@
   std::map<QuicRstStreamErrorCode, int> rst_error_map_;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_SIMPLE_DISPATCHER_H_
diff --git a/net/third_party/quic/tools/quic_simple_server_backend.h b/net/third_party/quic/tools/quic_simple_server_backend.h
index a4010e0..74a77c10 100644
--- a/net/third_party/quic/tools/quic_simple_server_backend.h
+++ b/net/third_party/quic/tools/quic_simple_server_backend.h
@@ -10,7 +10,7 @@
 namespace spdy {
 class SpdyHeaderBlock;
 }  // namespace spdy
-namespace net {
+namespace quic {
 
 // This interface implements the functionality to fetch a response
 // from the backend (such as cache, http-proxy etc) to serve
@@ -54,6 +54,6 @@
   virtual void CloseBackendResponseStream(RequestHandler* request_handler) = 0;
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_SIMPLE_SERVER_BACKEND_H_
\ No newline at end of file
diff --git a/net/third_party/quic/tools/quic_simple_server_session.cc b/net/third_party/quic/tools/quic_simple_server_session.cc
index cce6a3ad..4f63c26 100644
--- a/net/third_party/quic/tools/quic_simple_server_session.cc
+++ b/net/third_party/quic/tools/quic_simple_server_session.cc
@@ -12,7 +12,7 @@
 #include "net/third_party/quic/platform/api/quic_ptr_util.h"
 #include "net/third_party/quic/tools/quic_simple_server_stream.h"
 
-namespace net {
+namespace quic {
 
 QuicSimpleServerSession::QuicSimpleServerSession(
     const QuicConfig& config,
@@ -206,4 +206,4 @@
   }
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_simple_server_session.h b/net/third_party/quic/tools/quic_simple_server_session.h
index 291f53f..423e433 100644
--- a/net/third_party/quic/tools/quic_simple_server_session.h
+++ b/net/third_party/quic/tools/quic_simple_server_session.h
@@ -26,7 +26,7 @@
 #include "net/third_party/quic/tools/quic_simple_server_backend.h"
 #include "net/third_party/quic/tools/quic_simple_server_stream.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicSimpleServerSessionPeer;
@@ -153,6 +153,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerSession);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_SIMPLE_SERVER_SESSION_H_
diff --git a/net/third_party/quic/tools/quic_simple_server_session_test.cc b/net/third_party/quic/tools/quic_simple_server_session_test.cc
index 6cb1d08..5db7a01 100644
--- a/net/third_party/quic/tools/quic_simple_server_session_test.cc
+++ b/net/third_party/quic/tools/quic_simple_server_session_test.cc
@@ -44,7 +44,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 namespace {
 typedef QuicSimpleServerSession::PromisedStreamInfo PromisedStreamInfo;
@@ -654,4 +654,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_simple_server_stream.cc b/net/third_party/quic/tools/quic_simple_server_stream.cc
index d0e62ec..3250f23 100644
--- a/net/third_party/quic/tools/quic_simple_server_stream.cc
+++ b/net/third_party/quic/tools/quic_simple_server_stream.cc
@@ -17,7 +17,7 @@
 #include "net/third_party/quic/tools/quic_simple_server_session.h"
 #include "net/third_party/spdy/core/spdy_protocol.h"
 
-namespace net {
+namespace quic {
 
 QuicSimpleServerStream::QuicSimpleServerStream(
     QuicStreamId id,
@@ -291,4 +291,4 @@
 const char* const QuicSimpleServerStream::kNotFoundResponseBody =
     "file not found";
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_simple_server_stream.h b/net/third_party/quic/tools/quic_simple_server_stream.h
index affa103..fae0e74 100644
--- a/net/third_party/quic/tools/quic_simple_server_stream.h
+++ b/net/third_party/quic/tools/quic_simple_server_stream.h
@@ -15,7 +15,7 @@
 #include "net/third_party/quic/tools/quic_simple_server_backend.h"
 #include "net/third_party/spdy/core/spdy_framer.h"
 
-namespace net {
+namespace quic {
 
 namespace test {
 class QuicSimpleServerStreamPeer;
@@ -97,6 +97,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSimpleServerStream);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_SIMPLE_SERVER_STREAM_H_
diff --git a/net/third_party/quic/tools/quic_simple_server_stream_test.cc b/net/third_party/quic/tools/quic_simple_server_stream_test.cc
index 51e2b12a..c4a298fa 100644
--- a/net/third_party/quic/tools/quic_simple_server_stream_test.cc
+++ b/net/third_party/quic/tools/quic_simple_server_stream_test.cc
@@ -33,7 +33,7 @@
 using testing::Return;
 using testing::StrictMock;
 
-namespace net {
+namespace quic {
 namespace test {
 
 size_t kFakeFrameLen = 60;
@@ -620,4 +620,4 @@
 
 }  // namespace
 }  // namespace test
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_spdy_client_base.cc b/net/third_party/quic/tools/quic_spdy_client_base.cc
index 53cf9bf..0d34d46 100644
--- a/net/third_party/quic/tools/quic_spdy_client_base.cc
+++ b/net/third_party/quic/tools/quic_spdy_client_base.cc
@@ -15,7 +15,7 @@
 using base::StringToInt;
 using std::string;
 
-namespace net {
+namespace quic {
 
 void QuicSpdyClientBase::ClientQuicDataToResend::Resend() {
   client_->SendRequest(*headers_, body_, fin_);
@@ -270,4 +270,4 @@
   return latest_response_trailers_;
 }
 
-}  // namespace net
+}  // namespace quic
diff --git a/net/third_party/quic/tools/quic_spdy_client_base.h b/net/third_party/quic/tools/quic_spdy_client_base.h
index d501b25..c896447 100644
--- a/net/third_party/quic/tools/quic_spdy_client_base.h
+++ b/net/third_party/quic/tools/quic_spdy_client_base.h
@@ -20,7 +20,7 @@
 #include "net/third_party/quic/platform/api/quic_string_piece.h"
 #include "net/third_party/quic/tools/quic_client_base.h"
 
-namespace net {
+namespace quic {
 
 class ProofVerifier;
 class QuicServerId;
@@ -211,6 +211,6 @@
   DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientBase);
 };
 
-}  // namespace net
+}  // namespace quic
 
 #endif  // NET_THIRD_PARTY_QUIC_TOOLS_QUIC_SPDY_CLIENT_BASE_H_
diff --git a/net/tools/quic/crypto_message_printer_bin.cc b/net/tools/quic/crypto_message_printer_bin.cc
index dfb5db2..b438ee16 100644
--- a/net/tools/quic/crypto_message_printer_bin.cc
+++ b/net/tools/quic/crypto_message_printer_bin.cc
@@ -13,7 +13,7 @@
 #include "net/third_party/quic/core/crypto/crypto_framer.h"
 #include "net/third_party/quic/platform/api/quic_text_utils.h"
 
-using net::Perspective;
+using quic::Perspective;
 using std::cerr;
 using std::cout;
 using std::endl;
@@ -22,21 +22,22 @@
 
 namespace net {
 
-class CryptoMessagePrinter : public net::CryptoFramerVisitorInterface {
+class CryptoMessagePrinter : public quic::CryptoFramerVisitorInterface {
  public:
-  explicit CryptoMessagePrinter(Perspective perspective)
+  explicit CryptoMessagePrinter(quic::Perspective perspective)
       : perspective_(perspective) {}
 
-  void OnHandshakeMessage(const CryptoHandshakeMessage& message) override {
+  void OnHandshakeMessage(
+      const quic::CryptoHandshakeMessage& message) override {
     cout << message.DebugString(perspective_) << endl;
   }
 
-  void OnError(CryptoFramer* framer) override {
+  void OnError(quic::CryptoFramer* framer) override {
     cerr << "Error code: " << framer->error() << endl;
     cerr << "Error details: " << framer->error_detail() << endl;
   }
 
-  Perspective perspective_;
+  quic::Perspective perspective_;
 };
 
 }  // namespace net
@@ -61,15 +62,15 @@
     return 1;
   }
 
-  Perspective perspective = FLAGS_perspective == "server"
-                                ? Perspective::IS_SERVER
-                                : Perspective::IS_CLIENT;
+  quic::Perspective perspective = FLAGS_perspective == "server"
+                                      ? quic::Perspective::IS_SERVER
+                                      : quic::Perspective::IS_CLIENT;
 
   net::CryptoMessagePrinter printer(perspective);
-  net::CryptoFramer framer;
+  quic::CryptoFramer framer;
   framer.set_visitor(&printer);
   framer.set_process_truncated_messages(true);
-  std::string input = net::QuicTextUtils::HexDecode(argv[1]);
+  std::string input = quic::QuicTextUtils::HexDecode(argv[1]);
   if (!framer.ProcessInput(input, perspective)) {
     return 1;
   }
diff --git a/net/tools/quic/quic_client_message_loop_network_helper.cc b/net/tools/quic/quic_client_message_loop_network_helper.cc
index 0075af62..c6154de 100644
--- a/net/tools/quic/quic_client_message_loop_network_helper.cc
+++ b/net/tools/quic/quic_client_message_loop_network_helper.cc
@@ -34,26 +34,30 @@
 namespace net {
 
 QuicClientMessageLooplNetworkHelper::QuicClientMessageLooplNetworkHelper(
-    QuicChromiumClock* clock,
-    QuicClientBase* client)
+    quic::QuicChromiumClock* clock,
+    quic::QuicClientBase* client)
     : packet_reader_started_(false), clock_(clock), client_(client) {}
 
 QuicClientMessageLooplNetworkHelper::~QuicClientMessageLooplNetworkHelper() =
     default;
 
 bool QuicClientMessageLooplNetworkHelper::CreateUDPSocketAndBind(
-    QuicSocketAddress server_address,
-    QuicIpAddress bind_to_address,
+    quic::QuicSocketAddress server_address,
+    quic::QuicIpAddress bind_to_address,
     int bind_to_port) {
   auto socket = std::make_unique<UDPClientSocket>(DatagramSocket::DEFAULT_BIND,
                                                   &net_log_, NetLogSource());
 
   if (bind_to_address.IsInitialized()) {
-    client_address_ = QuicSocketAddress(bind_to_address, client_->local_port());
-  } else if (server_address.host().address_family() == IpAddressFamily::IP_V4) {
-    client_address_ = QuicSocketAddress(QuicIpAddress::Any4(), bind_to_port);
+    client_address_ =
+        quic::QuicSocketAddress(bind_to_address, client_->local_port());
+  } else if (server_address.host().address_family() ==
+             quic::IpAddressFamily::IP_V4) {
+    client_address_ =
+        quic::QuicSocketAddress(quic::QuicIpAddress::Any4(), bind_to_port);
   } else {
-    client_address_ = QuicSocketAddress(QuicIpAddress::Any6(), bind_to_port);
+    client_address_ =
+        quic::QuicSocketAddress(quic::QuicIpAddress::Any6(), bind_to_port);
   }
 
   int rc = socket->Connect(server_address.impl().socket_address());
@@ -62,13 +66,13 @@
     return false;
   }
 
-  rc = socket->SetReceiveBufferSize(kDefaultSocketReceiveBuffer);
+  rc = socket->SetReceiveBufferSize(quic::kDefaultSocketReceiveBuffer);
   if (rc != OK) {
     LOG(ERROR) << "SetReceiveBufferSize() failed: " << ErrorToShortString(rc);
     return false;
   }
 
-  rc = socket->SetSendBufferSize(kDefaultSocketReceiveBuffer);
+  rc = socket->SetSendBufferSize(quic::kDefaultSocketReceiveBuffer);
   if (rc != OK) {
     LOG(ERROR) << "SetSendBufferSize() failed: " << ErrorToShortString(rc);
     return false;
@@ -80,12 +84,14 @@
     LOG(ERROR) << "GetLocalAddress failed: " << ErrorToShortString(rc);
     return false;
   }
-  client_address_ = QuicSocketAddress(QuicSocketAddressImpl(address));
+  client_address_ =
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(address));
 
   socket_.swap(socket);
   packet_reader_.reset(new QuicChromiumPacketReader(
       socket_.get(), clock_, this, kQuicYieldAfterPacketsRead,
-      QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds),
+      quic::QuicTime::Delta::FromMilliseconds(
+          kQuicYieldAfterDurationMilliseconds),
       NetLogWithSource()));
 
   if (socket != nullptr) {
@@ -113,7 +119,7 @@
   base::RunLoop().RunUntilIdle();
 }
 
-QuicPacketWriter*
+quic::QuicPacketWriter*
 QuicClientMessageLooplNetworkHelper::CreateQuicPacketWriter() {
   return new QuicChromiumPacketWriter(
       socket_.get(), base::ThreadTaskRunnerHandle::Get().get());
@@ -126,15 +132,15 @@
   client_->Disconnect();
 }
 
-QuicSocketAddress QuicClientMessageLooplNetworkHelper::GetLatestClientAddress()
-    const {
+quic::QuicSocketAddress
+QuicClientMessageLooplNetworkHelper::GetLatestClientAddress() const {
   return client_address_;
 }
 
 bool QuicClientMessageLooplNetworkHelper::OnPacket(
-    const QuicReceivedPacket& packet,
-    const QuicSocketAddress& local_address,
-    const QuicSocketAddress& peer_address) {
+    const quic::QuicReceivedPacket& packet,
+    const quic::QuicSocketAddress& local_address,
+    const quic::QuicSocketAddress& peer_address) {
   client_->session()->connection()->ProcessUdpPacket(local_address,
                                                      peer_address, packet);
   if (!client_->session()->connection()->connected()) {
diff --git a/net/tools/quic/quic_client_message_loop_network_helper.h b/net/tools/quic/quic_client_message_loop_network_helper.h
index 2a754441..a41f7fd3 100644
--- a/net/tools/quic/quic_client_message_loop_network_helper.h
+++ b/net/tools/quic/quic_client_message_loop_network_helper.h
@@ -29,39 +29,39 @@
 
 class UDPClientSocket;
 
-// An implementation of the QuicClientBase::NetworkHelper based off
+// An implementation of the quic::QuicClientBase::NetworkHelper based off
 // the chromium epoll server.
 class QuicClientMessageLooplNetworkHelper
-    : public QuicClientBase::NetworkHelper,
+    : public quic::QuicClientBase::NetworkHelper,
       public QuicChromiumPacketReader::Visitor {
  public:
   // Create a quic client, which will have events managed by an externally owned
   // EpollServer.
-  QuicClientMessageLooplNetworkHelper(QuicChromiumClock* clock,
-                                      QuicClientBase* client);
+  QuicClientMessageLooplNetworkHelper(quic::QuicChromiumClock* clock,
+                                      quic::QuicClientBase* client);
 
   ~QuicClientMessageLooplNetworkHelper() override;
 
   // QuicChromiumPacketReader::Visitor
   void OnReadError(int result, const DatagramClientSocket* socket) override;
-  bool OnPacket(const QuicReceivedPacket& packet,
-                const QuicSocketAddress& local_address,
-                const QuicSocketAddress& peer_address) override;
+  bool OnPacket(const quic::QuicReceivedPacket& packet,
+                const quic::QuicSocketAddress& local_address,
+                const quic::QuicSocketAddress& peer_address) override;
 
   // From NetworkHelper.
   void RunEventLoop() override;
-  bool CreateUDPSocketAndBind(QuicSocketAddress server_address,
-                              QuicIpAddress bind_to_address,
+  bool CreateUDPSocketAndBind(quic::QuicSocketAddress server_address,
+                              quic::QuicIpAddress bind_to_address,
                               int bind_to_port) override;
   void CleanUpAllUDPSockets() override;
-  QuicSocketAddress GetLatestClientAddress() const override;
-  QuicPacketWriter* CreateQuicPacketWriter() override;
+  quic::QuicSocketAddress GetLatestClientAddress() const override;
+  quic::QuicPacketWriter* CreateQuicPacketWriter() override;
 
  private:
   void StartPacketReaderIfNotStarted();
 
   // Address of the client if the client is connected to the server.
-  QuicSocketAddress client_address_;
+  quic::QuicSocketAddress client_address_;
 
   // UDP socket connected to the server.
   std::unique_ptr<UDPClientSocket> socket_;
@@ -73,8 +73,8 @@
 
   bool packet_reader_started_;
 
-  QuicChromiumClock* clock_;
-  QuicClientBase* client_;
+  quic::QuicChromiumClock* clock_;
+  quic::QuicClientBase* client_;
 
   DISALLOW_COPY_AND_ASSIGN(QuicClientMessageLooplNetworkHelper);
 };
diff --git a/net/tools/quic/quic_simple_client.cc b/net/tools/quic/quic_simple_client.cc
index dbd6fff..ac17ee6c 100644
--- a/net/tools/quic/quic_simple_client.cc
+++ b/net/tools/quic/quic_simple_client.cc
@@ -34,17 +34,17 @@
 namespace net {
 
 QuicSimpleClient::QuicSimpleClient(
-    QuicSocketAddress server_address,
-    const QuicServerId& server_id,
-    const ParsedQuicVersionVector& supported_versions,
-    std::unique_ptr<ProofVerifier> proof_verifier)
-    : QuicSpdyClientBase(
+    quic::QuicSocketAddress server_address,
+    const quic::QuicServerId& server_id,
+    const quic::ParsedQuicVersionVector& supported_versions,
+    std::unique_ptr<quic::ProofVerifier> proof_verifier)
+    : quic::QuicSpdyClientBase(
           server_id,
           supported_versions,
-          QuicConfig(),
+          quic::QuicConfig(),
           CreateQuicConnectionHelper(),
           CreateQuicAlarmFactory(),
-          QuicWrapUnique(
+          quic::QuicWrapUnique(
               new QuicClientMessageLooplNetworkHelper(&clock_, this)),
           std::move(proof_verifier)),
       initialized_(false),
@@ -55,13 +55,14 @@
 QuicSimpleClient::~QuicSimpleClient() {
   if (connected()) {
     session()->connection()->CloseConnection(
-        QUIC_PEER_GOING_AWAY, "Shutting down",
-        ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
+        quic::QUIC_PEER_GOING_AWAY, "Shutting down",
+        quic::ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
   }
 }
 
 QuicChromiumConnectionHelper* QuicSimpleClient::CreateQuicConnectionHelper() {
-  return new QuicChromiumConnectionHelper(&clock_, QuicRandom::GetInstance());
+  return new QuicChromiumConnectionHelper(&clock_,
+                                          quic::QuicRandom::GetInstance());
 }
 
 QuicChromiumAlarmFactory* QuicSimpleClient::CreateQuicAlarmFactory() {
diff --git a/net/tools/quic/quic_simple_client.h b/net/tools/quic/quic_simple_client.h
index d3329f659..d9144b36 100644
--- a/net/tools/quic/quic_simple_client.h
+++ b/net/tools/quic/quic_simple_client.h
@@ -35,13 +35,13 @@
 class QuicClientPeer;
 }  // namespace test
 
-class QuicSimpleClient : public QuicSpdyClientBase {
+class QuicSimpleClient : public quic::QuicSpdyClientBase {
  public:
   // Create a quic client, which will have events managed by the message loop.
-  QuicSimpleClient(QuicSocketAddress server_address,
-                   const QuicServerId& server_id,
-                   const ParsedQuicVersionVector& supported_versions,
-                   std::unique_ptr<ProofVerifier> proof_verifier);
+  QuicSimpleClient(quic::QuicSocketAddress server_address,
+                   const quic::QuicServerId& server_id,
+                   const quic::ParsedQuicVersionVector& supported_versions,
+                   std::unique_ptr<quic::ProofVerifier> proof_verifier);
 
   ~QuicSimpleClient() override;
 
@@ -52,7 +52,7 @@
   QuicChromiumConnectionHelper* CreateQuicConnectionHelper();
 
   //  Used by |helper_| to time alarms.
-  QuicChromiumClock clock_;
+  quic::QuicChromiumClock clock_;
 
   // Tracks if the client is initialized to connect.
   bool initialized_;
diff --git a/net/tools/quic/quic_simple_client_bin.cc b/net/tools/quic/quic_simple_client_bin.cc
index f21ef04..ba5173f 100644
--- a/net/tools/quic/quic_simple_client_bin.cc
+++ b/net/tools/quic/quic_simple_client_bin.cc
@@ -69,10 +69,10 @@
 using net::CertVerifier;
 using net::CTVerifier;
 using net::MultiLogCTVerifier;
-using net::ProofVerifier;
+using quic::ProofVerifier;
 using net::ProofVerifierChromium;
-using net::QuicStringPiece;
-using net::QuicTextUtils;
+using quic::QuicStringPiece;
+using quic::QuicTextUtils;
 using net::TransportSecurityState;
 using spdy::SpdyHeaderBlock;
 using std::cout;
@@ -105,32 +105,32 @@
 // Initial MTU of the connection.
 int32_t FLAGS_initial_mtu = 0;
 
-class FakeProofVerifier : public ProofVerifier {
+class FakeProofVerifier : public quic::ProofVerifier {
  public:
-  net::QuicAsyncStatus VerifyProof(
+  quic::QuicAsyncStatus VerifyProof(
       const string& hostname,
       const uint16_t port,
       const string& server_config,
-      net::QuicTransportVersion quic_version,
-      QuicStringPiece chlo_hash,
+      quic::QuicTransportVersion quic_version,
+      quic::QuicStringPiece chlo_hash,
       const std::vector<string>& certs,
       const string& cert_sct,
       const string& signature,
-      const net::ProofVerifyContext* context,
+      const quic::ProofVerifyContext* context,
       string* error_details,
-      std::unique_ptr<net::ProofVerifyDetails>* details,
-      std::unique_ptr<net::ProofVerifierCallback> callback) override {
-    return net::QUIC_SUCCESS;
+      std::unique_ptr<quic::ProofVerifyDetails>* details,
+      std::unique_ptr<quic::ProofVerifierCallback> callback) override {
+    return quic::QUIC_SUCCESS;
   }
 
-  net::QuicAsyncStatus VerifyCertChain(
+  quic::QuicAsyncStatus VerifyCertChain(
       const std::string& hostname,
       const std::vector<std::string>& certs,
-      const net::ProofVerifyContext* verify_context,
+      const quic::ProofVerifyContext* verify_context,
       std::string* error_details,
-      std::unique_ptr<net::ProofVerifyDetails>* verify_details,
-      std::unique_ptr<net::ProofVerifierCallback> callback) override {
-    return net::QUIC_SUCCESS;
+      std::unique_ptr<quic::ProofVerifyDetails>* verify_details,
+      std::unique_ptr<quic::ProofVerifierCallback> callback) override {
+    return quic::QUIC_SUCCESS;
   }
 };
 
@@ -224,7 +224,7 @@
   base::MessageLoopForIO message_loop;
 
   // Determine IP address to connect to from supplied hostname.
-  net::QuicIpAddress ip_addr;
+  quic::QuicIpAddress ip_addr;
 
   GURL url(urls[0]);
   string host = FLAGS_host;
@@ -244,21 +244,21 @@
       return 1;
     }
     ip_addr =
-        net::QuicIpAddress(net::QuicIpAddressImpl(addresses[0].address()));
+        quic::QuicIpAddress(quic::QuicIpAddressImpl(addresses[0].address()));
   }
 
-  string host_port = net::QuicStrCat(ip_addr.ToString(), ":", port);
+  string host_port = quic::QuicStrCat(ip_addr.ToString(), ":", port);
   VLOG(1) << "Resolved " << host << " to " << host_port << endl;
 
   // Build the client, and try to connect.
-  net::QuicServerId server_id(url.host(), url.EffectiveIntPort(),
-                              net::PRIVACY_MODE_DISABLED);
-  net::ParsedQuicVersionVector versions = net::AllSupportedVersions();
+  quic::QuicServerId server_id(url.host(), url.EffectiveIntPort(),
+                               net::PRIVACY_MODE_DISABLED);
+  quic::ParsedQuicVersionVector versions = quic::AllSupportedVersions();
   if (FLAGS_quic_version != -1) {
     versions.clear();
-    versions.push_back(net::ParsedQuicVersion(
-        net::PROTOCOL_QUIC_CRYPTO,
-        static_cast<net::QuicTransportVersion>(FLAGS_quic_version)));
+    versions.push_back(quic::ParsedQuicVersion(
+        quic::PROTOCOL_QUIC_CRYPTO,
+        static_cast<quic::QuicTransportVersion>(FLAGS_quic_version)));
   }
   // For secure QUIC we need to verify the cert chain.
   std::unique_ptr<CertVerifier> cert_verifier(CertVerifier::CreateDefault());
@@ -267,7 +267,7 @@
   std::unique_ptr<MultiLogCTVerifier> ct_verifier(new MultiLogCTVerifier());
   std::unique_ptr<net::CTPolicyEnforcer> ct_policy_enforcer(
       new net::DefaultCTPolicyEnforcer());
-  std::unique_ptr<ProofVerifier> proof_verifier;
+  std::unique_ptr<quic::ProofVerifier> proof_verifier;
   if (line->HasSwitch("disable-certificate-verification")) {
     proof_verifier.reset(new FakeProofVerifier());
   } else {
@@ -275,17 +275,17 @@
         cert_verifier.get(), ct_policy_enforcer.get(),
         transport_security_state.get(), ct_verifier.get()));
   }
-  net::QuicSimpleClient client(net::QuicSocketAddress(ip_addr, port), server_id,
-                               versions, std::move(proof_verifier));
+  net::QuicSimpleClient client(quic::QuicSocketAddress(ip_addr, port),
+                               server_id, versions, std::move(proof_verifier));
   client.set_initial_max_packet_length(
-      FLAGS_initial_mtu != 0 ? FLAGS_initial_mtu : net::kDefaultMaxPacketSize);
+      FLAGS_initial_mtu != 0 ? FLAGS_initial_mtu : quic::kDefaultMaxPacketSize);
   if (!client.Initialize()) {
     cerr << "Failed to initialize client." << endl;
     return 1;
   }
   if (!client.Connect()) {
-    net::QuicErrorCode error = client.session()->error();
-    if (FLAGS_version_mismatch_ok && error == net::QUIC_INVALID_VERSION) {
+    quic::QuicErrorCode error = client.session()->error();
+    if (FLAGS_version_mismatch_ok && error == quic::QUIC_INVALID_VERSION) {
       cout << "Server talks QUIC, but none of the versions supported by "
            << "this client: " << ParsedQuicVersionVectorToString(versions)
            << endl;
@@ -293,7 +293,7 @@
       return 0;
     }
     cerr << "Failed to connect to " << host_port
-         << ". Error: " << net::QuicErrorCodeToString(error) << endl;
+         << ". Error: " << quic::QuicErrorCodeToString(error) << endl;
     return 1;
   }
   cout << "Connected to " << host_port << endl;
@@ -302,7 +302,7 @@
   string body = FLAGS_body;
   if (!FLAGS_body_hex.empty()) {
     DCHECK(FLAGS_body.empty()) << "Only set one of --body and --body_hex.";
-    body = QuicTextUtils::HexDecode(FLAGS_body_hex);
+    body = quic::QuicTextUtils::HexDecode(FLAGS_body_hex);
   }
 
   // Construct a GET or POST request for supplied URL.
@@ -313,14 +313,15 @@
   header_block[":path"] = url.path();
 
   // Append any additional headers supplied on the command line.
-  for (QuicStringPiece sp : QuicTextUtils::Split(FLAGS_headers, ';')) {
-    QuicTextUtils::RemoveLeadingAndTrailingWhitespace(&sp);
+  for (quic::QuicStringPiece sp :
+       quic::QuicTextUtils::Split(FLAGS_headers, ';')) {
+    quic::QuicTextUtils::RemoveLeadingAndTrailingWhitespace(&sp);
     if (sp.empty()) {
       continue;
     }
-    std::vector<QuicStringPiece> kv = QuicTextUtils::Split(sp, ':');
-    QuicTextUtils::RemoveLeadingAndTrailingWhitespace(&kv[0]);
-    QuicTextUtils::RemoveLeadingAndTrailingWhitespace(&kv[1]);
+    std::vector<quic::QuicStringPiece> kv = quic::QuicTextUtils::Split(sp, ':');
+    quic::QuicTextUtils::RemoveLeadingAndTrailingWhitespace(&kv[0]);
+    quic::QuicTextUtils::RemoveLeadingAndTrailingWhitespace(&kv[1]);
     header_block[kv[0]] = kv[1];
   }
 
@@ -337,7 +338,8 @@
     if (!FLAGS_body_hex.empty()) {
       // Print the user provided hex, rather than binary body.
       cout << "body:\n"
-           << QuicTextUtils::HexDump(QuicTextUtils::HexDecode(FLAGS_body_hex))
+           << quic::QuicTextUtils::HexDump(
+                  quic::QuicTextUtils::HexDecode(FLAGS_body_hex))
            << endl;
     } else {
       cout << "body: " << body << endl;
@@ -348,7 +350,7 @@
     string response_body = client.latest_response_body();
     if (!FLAGS_body_hex.empty()) {
       // Assume response is binary data.
-      cout << "body:\n" << QuicTextUtils::HexDump(response_body) << endl;
+      cout << "body:\n" << quic::QuicTextUtils::HexDump(response_body) << endl;
     } else {
       cout << "body: " << response_body << endl;
     }
diff --git a/net/tools/quic/quic_simple_client_test.cc b/net/tools/quic/quic_simple_client_test.cc
index 39ccbe63..849507c 100644
--- a/net/tools/quic/quic_simple_client_test.cc
+++ b/net/tools/quic/quic_simple_client_test.cc
@@ -15,12 +15,13 @@
 
 TEST(QuicSimpleClientTest, Initialize) {
   base::test::ScopedTaskEnvironment scoped_task_environment;
-  QuicSocketAddress server_address(QuicIpAddress::Loopback4(), 80);
-  QuicServerId server_id("hostname", server_address.port(),
-                         PRIVACY_MODE_DISABLED);
-  ParsedQuicVersionVector versions = AllSupportedVersions();
-  QuicSimpleClient client(server_address, server_id, versions,
-                          crypto_test_utils::ProofVerifierForTesting());
+  quic::QuicSocketAddress server_address(quic::QuicIpAddress::Loopback4(), 80);
+  quic::QuicServerId server_id("hostname", server_address.port(),
+                               PRIVACY_MODE_DISABLED);
+  quic::ParsedQuicVersionVector versions = quic::AllSupportedVersions();
+  QuicSimpleClient client(
+      server_address, server_id, versions,
+      quic::test::crypto_test_utils::ProofVerifierForTesting());
   EXPECT_TRUE(client.Initialize());
 }
 
diff --git a/net/tools/quic/quic_simple_per_connection_packet_writer.cc b/net/tools/quic/quic_simple_per_connection_packet_writer.cc
index 9046a9b..d57af46a 100644
--- a/net/tools/quic/quic_simple_per_connection_packet_writer.cc
+++ b/net/tools/quic/quic_simple_per_connection_packet_writer.cc
@@ -18,16 +18,17 @@
 QuicSimplePerConnectionPacketWriter::~QuicSimplePerConnectionPacketWriter() =
     default;
 
-QuicPacketWriter* QuicSimplePerConnectionPacketWriter::shared_writer() const {
+quic::QuicPacketWriter* QuicSimplePerConnectionPacketWriter::shared_writer()
+    const {
   return shared_writer_;
 }
 
-WriteResult QuicSimplePerConnectionPacketWriter::WritePacket(
+quic::WriteResult QuicSimplePerConnectionPacketWriter::WritePacket(
     const char* buffer,
     size_t buf_len,
-    const QuicIpAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    PerPacketOptions* options) {
+    const quic::QuicIpAddress& self_address,
+    const quic::QuicSocketAddress& peer_address,
+    quic::PerPacketOptions* options) {
   return shared_writer_->WritePacketWithCallback(
       buffer, buf_len, self_address, peer_address, options,
       base::Bind(&QuicSimplePerConnectionPacketWriter::OnWriteComplete,
@@ -46,14 +47,15 @@
   shared_writer_->SetWritable();
 }
 
-void QuicSimplePerConnectionPacketWriter::OnWriteComplete(WriteResult result) {
-  if (connection_ && result.status == WRITE_STATUS_ERROR) {
+void QuicSimplePerConnectionPacketWriter::OnWriteComplete(
+    quic::WriteResult result) {
+  if (connection_ && result.status == quic::WRITE_STATUS_ERROR) {
     connection_->OnWriteError(result.error_code);
   }
 }
 
-QuicByteCount QuicSimplePerConnectionPacketWriter::GetMaxPacketSize(
-    const QuicSocketAddress& peer_address) const {
+quic::QuicByteCount QuicSimplePerConnectionPacketWriter::GetMaxPacketSize(
+    const quic::QuicSocketAddress& peer_address) const {
   return shared_writer_->GetMaxPacketSize(peer_address);
 }
 
diff --git a/net/tools/quic/quic_simple_per_connection_packet_writer.h b/net/tools/quic/quic_simple_per_connection_packet_writer.h
index 7e5132e..08d615b 100644
--- a/net/tools/quic/quic_simple_per_connection_packet_writer.h
+++ b/net/tools/quic/quic_simple_per_connection_packet_writer.h
@@ -20,35 +20,37 @@
 // writes to the shared QuicServerPacketWriter complete.
 // This class is necessary because multiple connections can share the same
 // QuicServerPacketWriter, so it has no way to know which connection to notify.
-class QuicSimplePerConnectionPacketWriter : public QuicPacketWriter {
+class QuicSimplePerConnectionPacketWriter : public quic::QuicPacketWriter {
  public:
   // Does not take ownership of |shared_writer| or |connection|.
   QuicSimplePerConnectionPacketWriter(
       QuicSimpleServerPacketWriter* shared_writer);
   ~QuicSimplePerConnectionPacketWriter() override;
 
-  QuicPacketWriter* shared_writer() const;
-  void set_connection(QuicConnection* connection) { connection_ = connection; }
-  QuicConnection* connection() const { return connection_; }
+  quic::QuicPacketWriter* shared_writer() const;
+  void set_connection(quic::QuicConnection* connection) {
+    connection_ = connection;
+  }
+  quic::QuicConnection* connection() const { return connection_; }
 
-  // Default implementation of the QuicPacketWriter interface: Passes everything
-  // to |shared_writer_|.
-  WriteResult WritePacket(const char* buffer,
-                          size_t buf_len,
-                          const QuicIpAddress& self_address,
-                          const QuicSocketAddress& peer_address,
-                          PerPacketOptions* options) override;
+  // Default implementation of the quic::QuicPacketWriter interface: Passes
+  // everything to |shared_writer_|.
+  quic::WriteResult WritePacket(const char* buffer,
+                                size_t buf_len,
+                                const quic::QuicIpAddress& self_address,
+                                const quic::QuicSocketAddress& peer_address,
+                                quic::PerPacketOptions* options) override;
   bool IsWriteBlockedDataBuffered() const override;
   bool IsWriteBlocked() const override;
   void SetWritable() override;
-  QuicByteCount GetMaxPacketSize(
-      const QuicSocketAddress& peer_address) const override;
+  quic::QuicByteCount GetMaxPacketSize(
+      const quic::QuicSocketAddress& peer_address) const override;
 
  private:
-  void OnWriteComplete(WriteResult result);
+  void OnWriteComplete(quic::WriteResult result);
 
   QuicSimpleServerPacketWriter* shared_writer_;  // Not owned.
-  QuicConnection* connection_;                   // Not owned.
+  quic::QuicConnection* connection_;             // Not owned.
 
   base::WeakPtrFactory<QuicSimplePerConnectionPacketWriter> weak_factory_;
 
diff --git a/net/tools/quic/quic_simple_server.cc b/net/tools/quic/quic_simple_server.cc
index 1e990db9..2d1c704 100644
--- a/net/tools/quic/quic_simple_server.cc
+++ b/net/tools/quic/quic_simple_server.cc
@@ -33,28 +33,29 @@
 
 // Allocate some extra space so we can send an error if the client goes over
 // the limit.
-const int kReadBufferSize = 2 * kMaxPacketSize;
+const int kReadBufferSize = 2 * quic::kMaxPacketSize;
 
 }  // namespace
 
 QuicSimpleServer::QuicSimpleServer(
-    std::unique_ptr<ProofSource> proof_source,
-    const QuicConfig& config,
-    const QuicCryptoServerConfig::ConfigOptions& crypto_config_options,
-    const ParsedQuicVersionVector& supported_versions,
-    QuicSimpleServerBackend* quic_simple_server_backend)
+    std::unique_ptr<quic::ProofSource> proof_source,
+    const quic::QuicConfig& config,
+    const quic::QuicCryptoServerConfig::ConfigOptions& crypto_config_options,
+    const quic::ParsedQuicVersionVector& supported_versions,
+    quic::QuicSimpleServerBackend* quic_simple_server_backend)
     : version_manager_(supported_versions),
       helper_(
-          new QuicChromiumConnectionHelper(&clock_, QuicRandom::GetInstance())),
+          new QuicChromiumConnectionHelper(&clock_,
+                                           quic::QuicRandom::GetInstance())),
       alarm_factory_(new QuicChromiumAlarmFactory(
           base::ThreadTaskRunnerHandle::Get().get(),
           &clock_)),
       config_(config),
       crypto_config_options_(crypto_config_options),
       crypto_config_(kSourceAddressTokenSecret,
-                     QuicRandom::GetInstance(),
+                     quic::QuicRandom::GetInstance(),
                      std::move(proof_source),
-                     TlsServerHandshaker::CreateSslCtx()),
+                     quic::TlsServerHandshaker::CreateSslCtx()),
       read_pending_(false),
       synchronous_read_count_(0),
       read_buffer_(new IOBufferWithSize(kReadBufferSize)),
@@ -73,19 +74,20 @@
   const uint32_t kInitialSessionFlowControlWindow = 1 * 1024 * 1024;  // 1 MB
   const uint32_t kInitialStreamFlowControlWindow = 64 * 1024;         // 64 KB
   if (config_.GetInitialStreamFlowControlWindowToSend() ==
-      kMinimumFlowControlSendWindow) {
+      quic::kMinimumFlowControlSendWindow) {
     config_.SetInitialStreamFlowControlWindowToSend(
         kInitialStreamFlowControlWindow);
   }
   if (config_.GetInitialSessionFlowControlWindowToSend() ==
-      kMinimumFlowControlSendWindow) {
+      quic::kMinimumFlowControlSendWindow) {
     config_.SetInitialSessionFlowControlWindowToSend(
         kInitialSessionFlowControlWindow);
   }
 
-  std::unique_ptr<CryptoHandshakeMessage> scfg(crypto_config_.AddDefaultConfig(
-      helper_->GetRandomGenerator(), helper_->GetClock(),
-      crypto_config_options_));
+  std::unique_ptr<quic::CryptoHandshakeMessage> scfg(
+      crypto_config_.AddDefaultConfig(helper_->GetRandomGenerator(),
+                                      helper_->GetClock(),
+                                      crypto_config_options_));
 }
 
 QuicSimpleServer::~QuicSimpleServer() = default;
@@ -106,13 +108,13 @@
   // because the default usage of QuicSimpleServer is as a test server with
   // one or two clients.  Adjust higher for use with many clients.
   rc = socket->SetReceiveBufferSize(
-      static_cast<int32_t>(kDefaultSocketReceiveBuffer));
+      static_cast<int32_t>(quic::kDefaultSocketReceiveBuffer));
   if (rc < 0) {
     LOG(ERROR) << "SetReceiveBufferSize() failed: " << ErrorToString(rc);
     return rc;
   }
 
-  rc = socket->SetSendBufferSize(20 * kMaxPacketSize);
+  rc = socket->SetSendBufferSize(20 * quic::kMaxPacketSize);
   if (rc < 0) {
     LOG(ERROR) << "SetSendBufferSize() failed: " << ErrorToString(rc);
     return rc;
@@ -128,12 +130,12 @@
 
   socket_.swap(socket);
 
-  dispatcher_.reset(new QuicSimpleDispatcher(
+  dispatcher_.reset(new quic::QuicSimpleDispatcher(
       config_, &crypto_config_, &version_manager_,
-      std::unique_ptr<QuicConnectionHelperInterface>(helper_),
-      std::unique_ptr<QuicCryptoServerStream::Helper>(
-          new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())),
-      std::unique_ptr<QuicAlarmFactory>(alarm_factory_),
+      std::unique_ptr<quic::QuicConnectionHelperInterface>(helper_),
+      std::unique_ptr<quic::QuicCryptoServerStream::Helper>(
+          new QuicSimpleServerSessionHelper(quic::QuicRandom::GetInstance())),
+      std::unique_ptr<quic::QuicAlarmFactory>(alarm_factory_),
       quic_simple_server_backend_));
   QuicSimpleServerPacketWriter* writer =
       new QuicSimpleServerPacketWriter(socket_.get(), dispatcher_.get());
@@ -205,11 +207,12 @@
     return;
   }
 
-  QuicReceivedPacket packet(read_buffer_->data(), result,
-                            helper_->GetClock()->Now(), false);
+  quic::QuicReceivedPacket packet(read_buffer_->data(), result,
+                                  helper_->GetClock()->Now(), false);
   dispatcher_->ProcessPacket(
-      QuicSocketAddress(QuicSocketAddressImpl(server_address_)),
-      QuicSocketAddress(QuicSocketAddressImpl(client_address_)), packet);
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(server_address_)),
+      quic::QuicSocketAddress(quic::QuicSocketAddressImpl(client_address_)),
+      packet);
 
   StartReading();
 }
diff --git a/net/tools/quic/quic_simple_server.h b/net/tools/quic/quic_simple_server.h
index faae4fb4..9e6fde18 100644
--- a/net/tools/quic/quic_simple_server.h
+++ b/net/tools/quic/quic_simple_server.h
@@ -26,8 +26,11 @@
 
 class UDPServerSocket;
 
-
+}  // namespace net
+namespace quic {
 class QuicDispatcher;
+}  // namespace quic
+namespace net {
 
 namespace test {
 class QuicSimpleServerPeer;
@@ -36,11 +39,11 @@
 class QuicSimpleServer {
  public:
   QuicSimpleServer(
-      std::unique_ptr<ProofSource> proof_source,
-      const QuicConfig& config,
-      const QuicCryptoServerConfig::ConfigOptions& crypto_config_options,
-      const ParsedQuicVersionVector& supported_versions,
-      QuicSimpleServerBackend* quic_simple_server_backend);
+      std::unique_ptr<quic::ProofSource> proof_source,
+      const quic::QuicConfig& config,
+      const quic::QuicCryptoServerConfig::ConfigOptions& crypto_config_options,
+      const quic::ParsedQuicVersionVector& supported_versions,
+      quic::QuicSimpleServerBackend* quic_simple_server_backend);
 
   virtual ~QuicSimpleServer();
 
@@ -58,7 +61,7 @@
   // continues the read loop.
   void OnReadComplete(int result);
 
-  QuicDispatcher* dispatcher() { return dispatcher_.get(); }
+  quic::QuicDispatcher* dispatcher() { return dispatcher_.get(); }
 
   IPEndPoint server_address() const { return server_address_; }
 
@@ -68,13 +71,13 @@
   // Initialize the internal state of the server.
   void Initialize();
 
-  QuicVersionManager version_manager_;
+  quic::QuicVersionManager version_manager_;
 
   // Accepts data from the framer and demuxes clients to sessions.
-  std::unique_ptr<QuicDispatcher> dispatcher_;
+  std::unique_ptr<quic::QuicDispatcher> dispatcher_;
 
   // Used by the helper_ to time alarms.
-  QuicChromiumClock clock_;
+  quic::QuicChromiumClock clock_;
 
   // Used to manage the message loop. Owned by dispatcher_.
   QuicChromiumConnectionHelper* helper_;
@@ -87,12 +90,12 @@
 
   // config_ contains non-crypto parameters that are negotiated in the crypto
   // handshake.
-  QuicConfig config_;
+  quic::QuicConfig config_;
   // crypto_config_ contains crypto parameters that are negotiated in the crypto
   // handshake.
-  QuicCryptoServerConfig::ConfigOptions crypto_config_options_;
+  quic::QuicCryptoServerConfig::ConfigOptions crypto_config_options_;
   // crypto_config_ contains crypto parameters for the handshake.
-  QuicCryptoServerConfig crypto_config_;
+  quic::QuicCryptoServerConfig crypto_config_;
 
   // The address that the server listens on.
   IPEndPoint server_address_;
@@ -114,7 +117,7 @@
   // The log to use for the socket.
   NetLog net_log_;
 
-  QuicSimpleServerBackend* quic_simple_server_backend_;
+  quic::QuicSimpleServerBackend* quic_simple_server_backend_;
 
   base::WeakPtrFactory<QuicSimpleServer> weak_factory_;
 
diff --git a/net/tools/quic/quic_simple_server_bin.cc b/net/tools/quic/quic_simple_server_bin.cc
index 57c4f1a..42cc3ca 100644
--- a/net/tools/quic/quic_simple_server_bin.cc
+++ b/net/tools/quic/quic_simple_server_bin.cc
@@ -30,7 +30,7 @@
 // generated using `wget -p --save-headers <url>`
 std::string FLAGS_quic_response_cache_dir = "";
 
-std::unique_ptr<net::ProofSource> CreateProofSource(
+std::unique_ptr<quic::ProofSource> CreateProofSource(
     const base::FilePath& cert_path,
     const base::FilePath& key_path) {
   std::unique_ptr<net::ProofSourceChromium> proof_source(
@@ -71,7 +71,7 @@
     exit(0);
   }
 
-  net::QuicMemoryCacheBackend memory_cache_backend;
+  quic::QuicMemoryCacheBackend memory_cache_backend;
   if (line->HasSwitch("mode")) {
     FLAGS_quic_mode = line->GetSwitchValueASCII("mode");
   }
@@ -110,12 +110,12 @@
 
   net::IPAddress ip = net::IPAddress::IPv6AllZeros();
 
-  net::QuicConfig config;
+  quic::QuicConfig config;
   net::QuicSimpleServer server(
       CreateProofSource(line->GetSwitchValuePath("certificate_file"),
                         line->GetSwitchValuePath("key_file")),
-      config, net::QuicCryptoServerConfig::ConfigOptions(),
-      net::AllSupportedVersions(), &memory_cache_backend);
+      config, quic::QuicCryptoServerConfig::ConfigOptions(),
+      quic::AllSupportedVersions(), &memory_cache_backend);
 
   int rc = server.Listen(net::IPEndPoint(ip, FLAGS_port));
   if (rc < 0) {
diff --git a/net/tools/quic/quic_simple_server_packet_writer.cc b/net/tools/quic/quic_simple_server_packet_writer.cc
index c20b835b..16de0fe7 100644
--- a/net/tools/quic/quic_simple_server_packet_writer.cc
+++ b/net/tools/quic/quic_simple_server_packet_writer.cc
@@ -17,7 +17,7 @@
 
 QuicSimpleServerPacketWriter::QuicSimpleServerPacketWriter(
     UDPServerSocket* socket,
-    QuicDispatcher* dispatcher)
+    quic::QuicDispatcher* dispatcher)
     : socket_(socket),
       dispatcher_(dispatcher),
       write_blocked_(false),
@@ -25,18 +25,18 @@
 
 QuicSimpleServerPacketWriter::~QuicSimpleServerPacketWriter() = default;
 
-WriteResult QuicSimpleServerPacketWriter::WritePacketWithCallback(
+quic::WriteResult QuicSimpleServerPacketWriter::WritePacketWithCallback(
     const char* buffer,
     size_t buf_len,
-    const QuicIpAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    PerPacketOptions* options,
+    const quic::QuicIpAddress& self_address,
+    const quic::QuicSocketAddress& peer_address,
+    quic::PerPacketOptions* options,
     WriteCallback callback) {
   DCHECK(callback_.is_null());
   callback_ = callback;
-  WriteResult result =
+  quic::WriteResult result =
       WritePacket(buffer, buf_len, self_address, peer_address, options);
-  if (result.status != WRITE_STATUS_BLOCKED) {
+  if (result.status != quic::WRITE_STATUS_BLOCKED) {
     callback_.Reset();
   }
   return result;
@@ -45,7 +45,8 @@
 void QuicSimpleServerPacketWriter::OnWriteComplete(int rv) {
   DCHECK_NE(rv, ERR_IO_PENDING);
   write_blocked_ = false;
-  WriteResult result(rv < 0 ? WRITE_STATUS_ERROR : WRITE_STATUS_OK, rv);
+  quic::WriteResult result(
+      rv < 0 ? quic::WRITE_STATUS_ERROR : quic::WRITE_STATUS_OK, rv);
   if (!callback_.is_null()) {
     base::ResetAndReturn(&callback_).Run(result);
   }
@@ -65,12 +66,12 @@
   write_blocked_ = false;
 }
 
-WriteResult QuicSimpleServerPacketWriter::WritePacket(
+quic::WriteResult QuicSimpleServerPacketWriter::WritePacket(
     const char* buffer,
     size_t buf_len,
-    const QuicIpAddress& self_address,
-    const QuicSocketAddress& peer_address,
-    PerPacketOptions* options) {
+    const quic::QuicIpAddress& self_address,
+    const quic::QuicSocketAddress& peer_address,
+    quic::PerPacketOptions* options) {
   scoped_refptr<StringIOBuffer> buf(
       new StringIOBuffer(std::string(buffer, buf_len)));
   DCHECK(!IsWriteBlocked());
@@ -84,22 +85,22 @@
   } else {
     rv = ERR_MSG_TOO_BIG;
   }
-  WriteStatus status = WRITE_STATUS_OK;
+  quic::WriteStatus status = quic::WRITE_STATUS_OK;
   if (rv < 0) {
     if (rv != ERR_IO_PENDING) {
-      base::UmaHistogramSparse("Net.QuicSession.WriteError", -rv);
-      status = WRITE_STATUS_ERROR;
+      base::UmaHistogramSparse("Net.quic::QuicSession.WriteError", -rv);
+      status = quic::WRITE_STATUS_ERROR;
     } else {
-      status = WRITE_STATUS_BLOCKED;
+      status = quic::WRITE_STATUS_BLOCKED;
       write_blocked_ = true;
     }
   }
-  return WriteResult(status, rv);
+  return quic::WriteResult(status, rv);
 }
 
-QuicByteCount QuicSimpleServerPacketWriter::GetMaxPacketSize(
-    const QuicSocketAddress& peer_address) const {
-  return kMaxPacketSize;
+quic::QuicByteCount QuicSimpleServerPacketWriter::GetMaxPacketSize(
+    const quic::QuicSocketAddress& peer_address) const {
+  return quic::kMaxPacketSize;
 }
 
 }  // namespace net
diff --git a/net/tools/quic/quic_simple_server_packet_writer.h b/net/tools/quic/quic_simple_server_packet_writer.h
index 5b266aa..8b811df 100644
--- a/net/tools/quic/quic_simple_server_packet_writer.h
+++ b/net/tools/quic/quic_simple_server_packet_writer.h
@@ -14,51 +14,56 @@
 #include "net/third_party/quic/core/quic_packet_writer.h"
 #include "net/third_party/quic/core/quic_packets.h"
 
-namespace net {
-
+namespace quic {
 class QuicDispatcher;
+}  // namespace quic
+namespace net {
 class UDPServerSocket;
+}  // namespace net
+namespace quic {
 struct WriteResult;
-
+}  // namespace quic
+namespace net {
 
 // Chrome specific packet writer which uses a UDPServerSocket for writing
 // data.
-class QuicSimpleServerPacketWriter : public QuicPacketWriter {
+class QuicSimpleServerPacketWriter : public quic::QuicPacketWriter {
  public:
-  typedef base::Callback<void(WriteResult)> WriteCallback;
+  typedef base::Callback<void(quic::WriteResult)> WriteCallback;
 
   QuicSimpleServerPacketWriter(UDPServerSocket* socket,
-                               QuicDispatcher* dispatcher);
+                               quic::QuicDispatcher* dispatcher);
   ~QuicSimpleServerPacketWriter() override;
 
   // Wraps WritePacket, and ensures that |callback| is run on successful write.
-  WriteResult WritePacketWithCallback(const char* buffer,
-                                      size_t buf_len,
-                                      const QuicIpAddress& self_address,
-                                      const QuicSocketAddress& peer_address,
-                                      PerPacketOptions* options,
-                                      WriteCallback callback);
+  quic::WriteResult WritePacketWithCallback(
+      const char* buffer,
+      size_t buf_len,
+      const quic::QuicIpAddress& self_address,
+      const quic::QuicSocketAddress& peer_address,
+      quic::PerPacketOptions* options,
+      WriteCallback callback);
 
-  WriteResult WritePacket(const char* buffer,
-                          size_t buf_len,
-                          const QuicIpAddress& self_address,
-                          const QuicSocketAddress& peer_address,
-                          PerPacketOptions* options) override;
+  quic::WriteResult WritePacket(const char* buffer,
+                                size_t buf_len,
+                                const quic::QuicIpAddress& self_address,
+                                const quic::QuicSocketAddress& peer_address,
+                                quic::PerPacketOptions* options) override;
 
   void OnWriteComplete(int rv);
 
-  // QuicPacketWriter implementation:
+  // quic::QuicPacketWriter implementation:
   bool IsWriteBlockedDataBuffered() const override;
   bool IsWriteBlocked() const override;
   void SetWritable() override;
-  QuicByteCount GetMaxPacketSize(
-      const QuicSocketAddress& peer_address) const override;
+  quic::QuicByteCount GetMaxPacketSize(
+      const quic::QuicSocketAddress& peer_address) const override;
 
  private:
   UDPServerSocket* socket_;
 
   // To be notified after every successful asynchronous write.
-  QuicDispatcher* dispatcher_;
+  quic::QuicDispatcher* dispatcher_;
 
   // To call once the write completes.
   WriteCallback callback_;
diff --git a/net/tools/quic/quic_simple_server_session_helper.cc b/net/tools/quic/quic_simple_server_session_helper.cc
index 21a7977..1e212ea 100644
--- a/net/tools/quic/quic_simple_server_session_helper.cc
+++ b/net/tools/quic/quic_simple_server_session_helper.cc
@@ -6,21 +6,23 @@
 
 namespace net {
 
-QuicSimpleServerSessionHelper::QuicSimpleServerSessionHelper(QuicRandom* random)
+QuicSimpleServerSessionHelper::QuicSimpleServerSessionHelper(
+    quic::QuicRandom* random)
     : random_(random) {}
 
 QuicSimpleServerSessionHelper::~QuicSimpleServerSessionHelper() = default;
 
-QuicConnectionId QuicSimpleServerSessionHelper::GenerateConnectionIdForReject(
-    QuicConnectionId /*connection_id*/) const {
+quic::QuicConnectionId
+QuicSimpleServerSessionHelper::GenerateConnectionIdForReject(
+    quic::QuicConnectionId /*connection_id*/) const {
   return random_->RandUint64();
 }
 
 bool QuicSimpleServerSessionHelper::CanAcceptClientHello(
-    const CryptoHandshakeMessage& message,
-    const QuicSocketAddress& client_address,
-    const QuicSocketAddress& peer_address,
-    const QuicSocketAddress& self_address,
+    const quic::CryptoHandshakeMessage& message,
+    const quic::QuicSocketAddress& client_address,
+    const quic::QuicSocketAddress& peer_address,
+    const quic::QuicSocketAddress& self_address,
     std::string* error_details) const {
   return true;
 }
diff --git a/net/tools/quic/quic_simple_server_session_helper.h b/net/tools/quic/quic_simple_server_session_helper.h
index 6ddd5d96..b176e26 100644
--- a/net/tools/quic/quic_simple_server_session_helper.h
+++ b/net/tools/quic/quic_simple_server_session_helper.h
@@ -12,23 +12,24 @@
 
 // Simple helper for server sessions which generates a new random
 // connection ID for stateless rejects.
-class QuicSimpleServerSessionHelper : public QuicCryptoServerStream::Helper {
+class QuicSimpleServerSessionHelper
+    : public quic::QuicCryptoServerStream::Helper {
  public:
-  explicit QuicSimpleServerSessionHelper(QuicRandom* random);
+  explicit QuicSimpleServerSessionHelper(quic::QuicRandom* random);
 
   ~QuicSimpleServerSessionHelper() override;
 
-  QuicConnectionId GenerateConnectionIdForReject(
-      QuicConnectionId /*connection_id*/) const override;
+  quic::QuicConnectionId GenerateConnectionIdForReject(
+      quic::QuicConnectionId /*connection_id*/) const override;
 
-  bool CanAcceptClientHello(const CryptoHandshakeMessage& message,
-                            const QuicSocketAddress& client_address,
-                            const QuicSocketAddress& peer_address,
-                            const QuicSocketAddress& self_address,
+  bool CanAcceptClientHello(const quic::CryptoHandshakeMessage& message,
+                            const quic::QuicSocketAddress& client_address,
+                            const quic::QuicSocketAddress& peer_address,
+                            const quic::QuicSocketAddress& self_address,
                             std::string* error_details) const override;
 
  private:
-  QuicRandom* random_;  // Unowned.
+  quic::QuicRandom* random_;  // Unowned.
 };
 
 }  // namespace net
diff --git a/net/tools/quic/quic_simple_server_session_helper_test.cc b/net/tools/quic/quic_simple_server_session_helper_test.cc
index b2bd7a92..f3afa02 100644
--- a/net/tools/quic/quic_simple_server_session_helper_test.cc
+++ b/net/tools/quic/quic_simple_server_session_helper_test.cc
@@ -10,8 +10,8 @@
 namespace net {
 
 TEST(QuicSimpleCryptoServerStreamHelperTest, GenerateConnectionIdForReject) {
-  test::MockRandom random;
-  QuicSimpleCryptoServerStreamHelper helper(&random);
+  quic::test::MockRandom random;
+  quic::QuicSimpleCryptoServerStreamHelper helper(&random);
 
   EXPECT_EQ(random.RandUint64(), helper.GenerateConnectionIdForReject(42));
 }
diff --git a/net/tools/quic/quic_simple_server_test.cc b/net/tools/quic/quic_simple_server_test.cc
index 2b99b65..0b64733a 100644
--- a/net/tools/quic/quic_simple_server_test.cc
+++ b/net/tools/quic/quic_simple_server_test.cc
@@ -26,36 +26,38 @@
  public:
   QuicChromeServerDispatchPacketTest()
       : crypto_config_("blah",
-                       QuicRandom::GetInstance(),
-                       crypto_test_utils::ProofSourceForTesting(),
-                       TlsServerHandshaker::CreateSslCtx()),
-        version_manager_(AllSupportedVersions()),
-        dispatcher_(
-            config_,
-            &crypto_config_,
-            &version_manager_,
-            std::unique_ptr<MockQuicConnectionHelper>(
-                new net::test::MockQuicConnectionHelper),
-            std::unique_ptr<QuicCryptoServerStream::Helper>(
-                new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())),
-            std::unique_ptr<MockAlarmFactory>(new net::test::MockAlarmFactory),
-            &memory_cache_backend_) {
+                       quic::QuicRandom::GetInstance(),
+                       quic::test::crypto_test_utils::ProofSourceForTesting(),
+                       quic::TlsServerHandshaker::CreateSslCtx()),
+        version_manager_(quic::AllSupportedVersions()),
+        dispatcher_(config_,
+                    &crypto_config_,
+                    &version_manager_,
+                    std::unique_ptr<quic::test::MockQuicConnectionHelper>(
+                        new quic::test::MockQuicConnectionHelper),
+                    std::unique_ptr<quic::QuicCryptoServerStream::Helper>(
+                        new QuicSimpleServerSessionHelper(
+                            quic::QuicRandom::GetInstance())),
+                    std::unique_ptr<quic::test::MockAlarmFactory>(
+                        new quic::test::MockAlarmFactory),
+                    &memory_cache_backend_) {
     dispatcher_.InitializeWithWriter(nullptr);
   }
 
-  void DispatchPacket(const QuicReceivedPacket& packet) {
+  void DispatchPacket(const quic::QuicReceivedPacket& packet) {
     IPEndPoint client_addr, server_addr;
     dispatcher_.ProcessPacket(
-        QuicSocketAddress(QuicSocketAddressImpl(server_addr)),
-        QuicSocketAddress(QuicSocketAddressImpl(client_addr)), packet);
+        quic::QuicSocketAddress(quic::QuicSocketAddressImpl(server_addr)),
+        quic::QuicSocketAddress(quic::QuicSocketAddressImpl(client_addr)),
+        packet);
   }
 
  protected:
-  QuicConfig config_;
-  QuicCryptoServerConfig crypto_config_;
-  QuicVersionManager version_manager_;
-  net::test::MockQuicDispatcher dispatcher_;
-  QuicMemoryCacheBackend memory_cache_backend_;
+  quic::QuicConfig config_;
+  quic::QuicCryptoServerConfig crypto_config_;
+  quic::QuicVersionManager version_manager_;
+  quic::test::MockQuicDispatcher dispatcher_;
+  quic::QuicMemoryCacheBackend memory_cache_backend_;
 };
 
 TEST_F(QuicChromeServerDispatchPacketTest, DispatchPacket) {
@@ -68,9 +70,9 @@
                                   0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12,
                                   // private flags
                                   0x00};
-  QuicReceivedPacket encrypted_valid_packet(
+  quic::QuicReceivedPacket encrypted_valid_packet(
       reinterpret_cast<char*>(valid_packet), arraysize(valid_packet),
-      QuicTime::Zero(), false);
+      quic::QuicTime::Zero(), false);
 
   EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1);
   DispatchPacket(encrypted_valid_packet);
diff --git a/net/url_request/url_request_quic_perftest.cc b/net/url_request/url_request_quic_perftest.cc
index 569b97f..c516a30 100644
--- a/net/url_request/url_request_quic_perftest.cc
+++ b/net/url_request/url_request_quic_perftest.cc
@@ -142,13 +142,13 @@
 
  private:
   void StartQuicServer() {
-    net::QuicConfig config;
+    quic::QuicConfig config;
     memory_cache_backend_.AddSimpleResponse(kOriginHost, kHelloPath,
                                             kHelloStatus, kHelloAltSvcResponse);
     quic_server_.reset(new QuicSimpleServer(
-        test::crypto_test_utils::ProofSourceForTesting(), config,
-        net::QuicCryptoServerConfig::ConfigOptions(), AllSupportedVersions(),
-        &memory_cache_backend_));
+        quic::test::crypto_test_utils::ProofSourceForTesting(), config,
+        quic::QuicCryptoServerConfig::ConfigOptions(),
+        quic::AllSupportedVersions(), &memory_cache_backend_));
     int rv = quic_server_->Listen(
         net::IPEndPoint(net::IPAddress::IPv4AllZeros(), kAltSvcPort));
     ASSERT_GE(rv, 0) << "Quic server fails to start";
@@ -178,7 +178,7 @@
   std::unique_ptr<QuicSimpleServer> quic_server_;
   std::unique_ptr<base::MessageLoop> message_loop_;
   std::unique_ptr<TestURLRequestContext> context_;
-  QuicMemoryCacheBackend memory_cache_backend_;
+  quic::QuicMemoryCacheBackend memory_cache_backend_;
   MockCertVerifier cert_verifier_;
 };
 
diff --git a/net/url_request/url_request_quic_unittest.cc b/net/url_request/url_request_quic_unittest.cc
index 7564b112..a1de0e4 100644
--- a/net/url_request/url_request_quic_unittest.cc
+++ b/net/url_request/url_request_quic_unittest.cc
@@ -103,8 +103,8 @@
   }
 
   unsigned int GetRstErrorCountReceivedByServer(
-      QuicRstStreamErrorCode error_code) const {
-    return (static_cast<QuicSimpleDispatcher*>(server_->dispatcher()))
+      quic::QuicRstStreamErrorCode error_code) const {
+    return (static_cast<quic::QuicSimpleDispatcher*>(server_->dispatcher()))
         ->GetRstErrorCount(error_code);
   }
 
@@ -141,7 +141,7 @@
     memory_cache_backend_.AddSimpleResponse(kTestServerHost, kHelloPath,
                                             kHelloStatus, kHelloBodyValue);
     memory_cache_backend_.InitializeBackend(ServerPushCacheDirectory());
-    net::QuicConfig config;
+    quic::QuicConfig config;
     // Set up server certs.
     std::unique_ptr<net::ProofSourceChromium> proof_source(
         new net::ProofSourceChromium());
@@ -151,9 +151,9 @@
         directory.Append(FILE_PATH_LITERAL("quic-leaf-cert.key")),
         base::FilePath()));
     server_.reset(new QuicSimpleServer(
-        test::crypto_test_utils::ProofSourceForTesting(), config,
-        net::QuicCryptoServerConfig::ConfigOptions(), AllSupportedVersions(),
-        &memory_cache_backend_));
+        quic::test::crypto_test_utils::ProofSourceForTesting(), config,
+        quic::QuicCryptoServerConfig::ConfigOptions(),
+        quic::AllSupportedVersions(), &memory_cache_backend_));
     int rv =
         server_->Listen(net::IPEndPoint(net::IPAddress::IPv4AllZeros(), 0));
     EXPECT_GE(rv, 0) << "Quic server fails to start";
@@ -181,7 +181,7 @@
   std::unique_ptr<QuicSimpleServer> server_;
   std::unique_ptr<TestURLRequestContext> context_;
   TestNetLog net_log_;
-  QuicMemoryCacheBackend memory_cache_backend_;
+  quic::QuicMemoryCacheBackend memory_cache_backend_;
   MockCertVerifier cert_verifier_;
 };
 
@@ -342,7 +342,7 @@
   EXPECT_EQ(net_error, -400);
 
   // Verify the reset error count received on the server side.
-  EXPECT_LE(1u, GetRstErrorCountReceivedByServer(QUIC_STREAM_CANCELLED));
+  EXPECT_LE(1u, GetRstErrorCountReceivedByServer(quic::QUIC_STREAM_CANCELLED));
 }
 
 TEST_F(URLRequestQuicTest, CancelPushIfCached_AllCached) {
@@ -434,7 +434,7 @@
   EXPECT_FALSE(end_entry_2->GetIntegerValue("net_error", &net_error));
 
   // Verify the reset error count received on the server side.
-  EXPECT_LE(2u, GetRstErrorCountReceivedByServer(QUIC_STREAM_CANCELLED));
+  EXPECT_LE(2u, GetRstErrorCountReceivedByServer(quic::QUIC_STREAM_CANCELLED));
 }
 
 TEST_F(URLRequestQuicTest, DoNotCancelPushIfNotFoundInCache) {
@@ -487,7 +487,7 @@
   EXPECT_EQ(net_error, -400);
 
   // Verify the reset error count received on the server side.
-  EXPECT_EQ(0u, GetRstErrorCountReceivedByServer(QUIC_STREAM_CANCELLED));
+  EXPECT_EQ(0u, GetRstErrorCountReceivedByServer(quic::QUIC_STREAM_CANCELLED));
 }
 
 // Tests that if two requests use the same QUIC session, the second request
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc
index 8142aa30..4afdd58 100644
--- a/net/websockets/websocket_stream_test.cc
+++ b/net/websockets/websocket_stream_test.cc
@@ -696,7 +696,7 @@
         "chatv11.chromium.org, chatv20.chromium.org"}},
       {{"Sec-WebSocket-Protocol", "chatv20.chromium.org"}});
   WaitUntilConnectDone();
-  EXPECT_TRUE(stream_);
+  ASSERT_TRUE(stream_);
   EXPECT_FALSE(has_failed());
   EXPECT_EQ("chatv20.chromium.org", stream_->GetSubProtocol());
 }
diff --git a/services/audio/loopback_stream.cc b/services/audio/loopback_stream.cc
index d9e2a50..c4f4d6df 100644
--- a/services/audio/loopback_stream.cc
+++ b/services/audio/loopback_stream.cc
@@ -355,13 +355,15 @@
       (now - first_generate_time_).InMicroseconds() *
       output_params_.sample_rate() / base::Time::kMicrosecondsPerSecond;
   if (frames_elapsed_ < required_frames_elapsed) {
-    // Audio generation has fallen behind. Skip ahead to the next interval.
     TRACE_EVENT_INSTANT1("audio", "GenerateMoreAudio Is Behind",
                          TRACE_EVENT_SCOPE_THREAD, "frames_behind",
                          (required_frames_elapsed - frames_elapsed_));
-    frames_elapsed_ = ((required_frames_elapsed + frames_per_buffer - 1) /
-                       frames_per_buffer) *
-                      frames_per_buffer;
+    // Audio generation has fallen behind. Skip-ahead the frame counter so that
+    // audio generation will resume for the next buffer after the one that
+    // should be generating right now. http://crbug.com/847487
+    const int64_t required_buffers_elapsed =
+        ((required_frames_elapsed + frames_per_buffer - 1) / frames_per_buffer);
+    frames_elapsed_ = (required_buffers_elapsed + 1) * frames_per_buffer;
   }
   next_generate_time_ =
       first_generate_time_ +
diff --git a/services/device/device_service.cc b/services/device/device_service.cc
index 201227b..0881215 100644
--- a/services/device/device_service.cc
+++ b/services/device/device_service.cc
@@ -50,12 +50,13 @@
     const GeolocationProvider::RequestContextProducer
         geolocation_request_context_producer,
     const std::string& geolocation_api_key,
+    bool use_gms_core_location_provider,
     const WakeLockContextCallback& wake_lock_context_callback,
     const CustomLocationProviderCallback& custom_location_provider_callback,
     const base::android::JavaRef<jobject>& java_nfc_delegate) {
-  GeolocationProviderImpl::SetGeolocationGlobals(
+  GeolocationProviderImpl::SetGeolocationConfiguration(
       geolocation_request_context_producer, geolocation_api_key,
-      custom_location_provider_callback);
+      custom_location_provider_callback, use_gms_core_location_provider);
   return std::make_unique<DeviceService>(
       std::move(file_task_runner), std::move(io_task_runner),
       std::move(geolocation_request_context_producer), geolocation_api_key,
@@ -69,7 +70,7 @@
         geolocation_request_context_producer,
     const std::string& geolocation_api_key,
     const CustomLocationProviderCallback& custom_location_provider_callback) {
-  GeolocationProviderImpl::SetGeolocationGlobals(
+  GeolocationProviderImpl::SetGeolocationConfiguration(
       geolocation_request_context_producer, geolocation_api_key,
       custom_location_provider_callback);
   return std::make_unique<DeviceService>(
diff --git a/services/device/device_service.h b/services/device/device_service.h
index 09fc1969..fae952cc 100644
--- a/services/device/device_service.h
+++ b/services/device/device_service.h
@@ -71,6 +71,7 @@
     GeolocationProvider::RequestContextProducer
         geolocation_request_context_producer,
     const std::string& geolocation_api_key,
+    bool use_gms_core_location_provider,
     const WakeLockContextCallback& wake_lock_context_callback,
     const CustomLocationProviderCallback& custom_location_provider_callback,
     const base::android::JavaRef<jobject>& java_nfc_delegate);
diff --git a/services/device/device_service_test_base.cc b/services/device/device_service_test_base.cc
index fac970bed..5f80712 100644
--- a/services/device/device_service_test_base.cc
+++ b/services/device/device_service_test_base.cc
@@ -73,7 +73,7 @@
           CreateDeviceService(
               file_task_runner_, io_task_runner_,
               base::Bind(&TestRequestContextProducer, io_task_runner_),
-              kTestGeolocationApiKey, wake_lock_context_callback_,
+              kTestGeolocationApiKey, false, wake_lock_context_callback_,
               base::Bind(&GetCustomLocationProviderForTest), nullptr),
           std::move(request)));
 #else
diff --git a/services/ui/ws2/client_change.cc b/services/ui/ws2/client_change.cc
index eae0ac8..ed98bafa 100644
--- a/services/ui/ws2/client_change.cc
+++ b/services/ui/ws2/client_change.cc
@@ -18,7 +18,8 @@
     : tracker_(tracker), type_(type) {
   DCHECK(!tracker_->current_change_);
   tracker_->current_change_ = this;
-  window_tracker_.Add(window);
+  if (window)
+    window_tracker_.Add(window);
 }
 
 ClientChange::~ClientChange() {
diff --git a/services/ui/ws2/client_window.cc b/services/ui/ws2/client_window.cc
index 7d9e42b3..a3c63d43 100644
--- a/services/ui/ws2/client_window.cc
+++ b/services/ui/ws2/client_window.cc
@@ -4,6 +4,7 @@
 
 #include "services/ui/ws2/client_window.h"
 
+#include "base/containers/flat_map.h"
 #include "components/viz/host/host_frame_sink_manager.h"
 #include "services/ui/ws2/embedding.h"
 #include "services/ui/ws2/window_service_client.h"
@@ -51,6 +52,31 @@
   return true;
 }
 
+bool IsPointerPressedEvent(const Event& event) {
+  return event.type() == ET_MOUSE_PRESSED || event.type() == ET_TOUCH_PRESSED;
+}
+
+bool IsPointerEvent(const Event& event) {
+  return event.IsMouseEvent() || event.IsTouchEvent();
+}
+
+bool IsLastMouseButtonRelease(const Event& event) {
+  return event.type() == ET_MOUSE_RELEASED &&
+         event.AsMouseEvent()->button_flags() ==
+             event.AsMouseEvent()->changed_button_flags();
+}
+
+bool IsPointerReleased(const Event& event) {
+  return IsLastMouseButtonRelease(event) || event.type() == ET_TOUCH_RELEASED;
+}
+
+PointerId GetPointerId(const Event& event) {
+  if (event.IsMouseEvent())
+    return MouseEvent::kMousePointerId;
+  DCHECK(event.IsTouchEvent());
+  return event.AsTouchEvent()->pointer_details().id;
+}
+
 // WindowTargeter used for ClientWindows. This is used for two purposes:
 // . If the location is in the non-client area, then child Windows are not
 //   considered. This is done to ensure the delegate of the window (which is
@@ -72,6 +98,14 @@
       // would go to a descendant).
       return event_target->CanAcceptEvent(*event) ? window : nullptr;
     }
+
+    // Ensure presses in the non-client area target the top-level window.
+    // TopLevelEventHandler will ensure these are routed correctly.
+    if (IsPointerPressedEvent(*event) &&
+        IsLocationInNonClientArea(window,
+                                  event->AsLocatedEvent()->location())) {
+      return window;
+    }
     return aura::WindowTargeter::FindTargetForEvent(event_target, event);
   }
 
@@ -99,6 +133,10 @@
 
   // ui::EventHandler:
   void OnEvent(ui::Event* event) override {
+    // This code doesn't handle PointerEvents, because they should never be
+    // generated at this layer.
+    DCHECK(!event->IsPointerEvent());
+
     if (event->phase() != EP_PRETARGET) {
       // All work is done in the pre-phase. If this branch is hit, it means
       // event propagation was not stopped, and normal processing should
@@ -192,6 +230,7 @@
                             public aura::WindowObserver {
  public:
   PointerPressHandler(TopLevelEventHandler* top_level_event_handler,
+                      PointerId pointer_id,
                       const gfx::Point& location);
   ~PointerPressHandler() override;
 
@@ -210,6 +249,9 @@
   // True if the pointer down occurred in the non-client area.
   const bool in_non_client_area_;
 
+  // Id of the pointer the handler was created for.
+  const PointerId pointer_id_;
+
   DISALLOW_COPY_AND_ASSIGN(PointerPressHandler);
 };
 
@@ -228,16 +270,23 @@
 
   ~TopLevelEventHandler() override = default;
 
-  void DestroyPointerPressHandler() { pointer_press_handler_.reset(); }
+  void DestroyPointerPressHandler(PointerId id) {
+    pointer_press_handlers_.erase(id);
+  }
 
-  // Returns true if the pointer was pressed over the top-level, such that
-  // pointer events are forwarded to the client until the pointer is released.
-  bool IsInPointerPressed() const {
-    return pointer_press_handler_.get() != nullptr;
+  // Returns true if the pointer with |pointer_id| was pressed over the
+  // top-level. If this returns true, TopLevelEventHandler is waiting on a
+  // release to reset state.
+  bool IsHandlingPointerPress(PointerId pointer_id) const {
+    return pointer_press_handlers_.count(pointer_id) > 0;
   }
 
   // ClientWindowEventHandler:
   void OnEvent(ui::Event* event) override {
+    // This code doesn't handle PointerEvents, because they should never be
+    // generated at this layer.
+    DCHECK(!event->IsPointerEvent());
+
     if (event->phase() != EP_PRETARGET) {
       // All work is done in the pre-phase. If this branch is hit, it means
       // event propagation was not stopped, and normal processing should
@@ -250,7 +299,8 @@
       return;
     }
 
-    if (ShouldIgnoreEvent(*event))
+    // Gestures are always handled locally.
+    if (ShouldIgnoreEvent(*event) || event->IsGestureEvent())
       return;
 
     // This code does has two specific behaviors. It's used to ensure events
@@ -258,26 +308,27 @@
     // . a press-release sequence targets only one. If in non-client area then
     //   local, otherwise remote client.
     // . mouse-moves (not drags) go to both targets.
-    // TODO(sky): handle touch events too.
     bool stop_propagation = false;
-    if (client_window()->HasNonClientArea() && event->IsMouseEvent()) {
-      if (!pointer_press_handler_) {
-        if (event->type() == ui::ET_MOUSE_PRESSED) {
-          pointer_press_handler_ = std::make_unique<PointerPressHandler>(
-              this, event->AsLocatedEvent()->location());
-          if (pointer_press_handler_->in_non_client_area())
-            return;  // Don't send presses to client.
+    if (client_window()->HasNonClientArea() && IsPointerEvent(*event)) {
+      const PointerId pointer_id = GetPointerId(*event);
+      if (!pointer_press_handlers_.count(pointer_id)) {
+        if (IsPointerPressedEvent(*event)) {
+          std::unique_ptr<PointerPressHandler> handler_ptr =
+              std::make_unique<PointerPressHandler>(
+                  this, pointer_id, event->AsLocatedEvent()->location());
+          PointerPressHandler* handler = handler_ptr.get();
+          pointer_press_handlers_[pointer_id] = std::move(handler_ptr);
+          if (handler->in_non_client_area())
+            return;  // Don't send presses in non-client area to client.
           stop_propagation = true;
         }
       } else {
-        // Else case, in a press-release.
-        const bool was_press_in_non_client_area =
-            pointer_press_handler_->in_non_client_area();
-        if (event->type() == ui::ET_MOUSE_RELEASED &&
-            event->AsMouseEvent()->button_flags() ==
-                event->AsMouseEvent()->changed_button_flags()) {
-          pointer_press_handler_.reset();
-        }
+        // Currently handling a pointer press and waiting on release.
+        PointerPressHandler* handler =
+            pointer_press_handlers_[pointer_id].get();
+        const bool was_press_in_non_client_area = handler->in_non_client_area();
+        if (IsPointerReleased(*event))
+          pointer_press_handlers_.erase(pointer_id);
         if (was_press_in_non_client_area)
           return;  // Don't send release to client since press didn't go there.
         stop_propagation = true;
@@ -290,19 +341,23 @@
   }
 
  private:
-  // Non-null while in a pointer press press-drag-release cycle.
-  std::unique_ptr<PointerPressHandler> pointer_press_handler_;
+  // Non-null while in a pointer press press-drag-release cycle. Maps from
+  // pointer-id of the pointer that is down to the handler.
+  base::flat_map<PointerId, std::unique_ptr<PointerPressHandler>>
+      pointer_press_handlers_;
 
   DISALLOW_COPY_AND_ASSIGN(TopLevelEventHandler);
 };
 
 PointerPressHandler::PointerPressHandler(
     TopLevelEventHandler* top_level_event_handler,
+    PointerId pointer_id,
     const gfx::Point& location)
     : top_level_event_handler_(top_level_event_handler),
       in_non_client_area_(
           IsLocationInNonClientArea(top_level_event_handler->window(),
-                                    location)) {
+                                    location)),
+      pointer_id_(pointer_id) {
   wm::CaptureController::Get()->AddObserver(this);
   top_level_event_handler_->window()->AddObserver(this);
 }
@@ -315,13 +370,13 @@
 void PointerPressHandler::OnCaptureChanged(aura::Window* lost_capture,
                                            aura::Window* gained_capture) {
   if (gained_capture != top_level_event_handler_->window())
-    top_level_event_handler_->DestroyPointerPressHandler();
+    top_level_event_handler_->DestroyPointerPressHandler(pointer_id_);
 }
 
 void PointerPressHandler::OnWindowVisibilityChanged(aura::Window* window,
                                                     bool visible) {
   if (!top_level_event_handler_->window()->IsVisible())
-    top_level_event_handler_->DestroyPointerPressHandler();
+    top_level_event_handler_->DestroyPointerPressHandler(pointer_id_);
 }
 
 }  // namespace
@@ -421,9 +476,9 @@
     window_->SetTargetHandler(event_handler_.get());
 }
 
-bool ClientWindow::IsInPointerPressedForTesting() {
+bool ClientWindow::IsHandlingPointerPressForTesting(PointerId pointer_id) {
   return static_cast<TopLevelEventHandler*>(event_handler_.get())
-      ->IsInPointerPressed();
+      ->IsHandlingPointerPress(pointer_id);
 }
 
 }  // namespace ws2
diff --git a/services/ui/ws2/client_window.h b/services/ui/ws2/client_window.h
index a9927cf..3d4f8d0 100644
--- a/services/ui/ws2/client_window.h
+++ b/services/ui/ws2/client_window.h
@@ -12,6 +12,7 @@
 #include "components/viz/common/surfaces/frame_sink_id.h"
 #include "services/ui/ws2/ids.h"
 #include "services/viz/public/interfaces/compositing/compositor_frame_sink.mojom.h"
+#include "ui/events/event.h"
 #include "ui/gfx/geometry/insets.h"
 #include "ui/gfx/geometry/rect.h"
 
@@ -112,7 +113,7 @@
 
   // Forwards to TopLevelEventHandler, see it for details.
   // NOTE: this is only applicable to top-levels.
-  bool IsInPointerPressedForTesting();
+  bool IsHandlingPointerPressForTesting(PointerId pointer_id);
 
   aura::Window* window_;
 
diff --git a/services/ui/ws2/client_window_test_helper.cc b/services/ui/ws2/client_window_test_helper.cc
index 6bcee8f..049762bf 100644
--- a/services/ui/ws2/client_window_test_helper.cc
+++ b/services/ui/ws2/client_window_test_helper.cc
@@ -14,8 +14,8 @@
 
 ClientWindowTestHelper::~ClientWindowTestHelper() = default;
 
-bool ClientWindowTestHelper::IsInPointerPressed() {
-  return client_window_->IsInPointerPressedForTesting();
+bool ClientWindowTestHelper::IsHandlingPointerPress(PointerId pointer_id) {
+  return client_window_->IsHandlingPointerPressForTesting(pointer_id);
 }
 
 }  // namespace ws2
diff --git a/services/ui/ws2/client_window_test_helper.h b/services/ui/ws2/client_window_test_helper.h
index f5a2e8b..fc37446 100644
--- a/services/ui/ws2/client_window_test_helper.h
+++ b/services/ui/ws2/client_window_test_helper.h
@@ -6,6 +6,7 @@
 #define SERVICES_UI_WS2_CLIENT_WINDOW_TEST_HELPER_H_
 
 #include "base/macros.h"
+#include "ui/events/event.h"
 
 namespace ui {
 namespace ws2 {
@@ -18,7 +19,7 @@
   explicit ClientWindowTestHelper(ClientWindow* client_window);
   ~ClientWindowTestHelper();
 
-  bool IsInPointerPressed();
+  bool IsHandlingPointerPress(PointerId pointer_id);
 
  private:
   ClientWindow* client_window_;
diff --git a/services/ui/ws2/focus_handler_unittest.cc b/services/ui/ws2/focus_handler_unittest.cc
index 09a2cea..965e58b 100644
--- a/services/ui/ws2/focus_handler_unittest.cc
+++ b/services/ui/ws2/focus_handler_unittest.cc
@@ -16,7 +16,6 @@
 #include "services/ui/ws2/window_service_test_setup.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/aura/layout_manager.h"
-#include "ui/aura/test/test_window_delegate.h"
 #include "ui/aura/window.h"
 #include "ui/events/event_constants.h"
 #include "ui/events/keycodes/keyboard_codes.h"
@@ -28,10 +27,7 @@
 namespace {
 
 TEST(FocusHandlerTest, FocusTopLevel) {
-  aura::test::TestWindowDelegate test_window_delegate;
   WindowServiceTestSetup setup;
-  test_window_delegate.set_can_focus(true);
-  setup.delegate()->set_delegate_for_next_top_level(&test_window_delegate);
   aura::Window* top_level = setup.client_test_helper()->NewTopLevelWindow(1);
   ASSERT_TRUE(top_level);
 
@@ -43,11 +39,19 @@
   EXPECT_TRUE(top_level->HasFocus());
 }
 
-TEST(FocusHandlerTest, FocusChild) {
-  aura::test::TestWindowDelegate test_window_delegate;
+TEST(FocusHandlerTest, FocusNull) {
   WindowServiceTestSetup setup;
-  test_window_delegate.set_can_focus(true);
-  setup.delegate()->set_delegate_for_next_top_level(&test_window_delegate);
+  aura::Window* top_level = setup.client_test_helper()->NewTopLevelWindow(1);
+  ASSERT_TRUE(top_level);
+  top_level->Show();
+  EXPECT_TRUE(setup.client_test_helper()->SetFocus(top_level));
+  EXPECT_TRUE(top_level->HasFocus());
+  EXPECT_TRUE(setup.client_test_helper()->SetFocus(nullptr));
+  EXPECT_FALSE(top_level->HasFocus());
+}
+
+TEST(FocusHandlerTest, FocusChild) {
+  WindowServiceTestSetup setup;
   aura::Window* top_level = setup.client_test_helper()->NewTopLevelWindow(1);
   ASSERT_TRUE(top_level);
   top_level->Show();
@@ -71,10 +75,7 @@
 }
 
 TEST(FocusHandlerTest, NotifyOnFocusChange) {
-  aura::test::TestWindowDelegate test_window_delegate;
   WindowServiceTestSetup setup;
-  test_window_delegate.set_can_focus(true);
-  setup.delegate()->set_delegate_for_next_top_level(&test_window_delegate);
   aura::Window* top_level = setup.client_test_helper()->NewTopLevelWindow(1);
   ASSERT_TRUE(top_level);
   top_level->Show();
@@ -101,10 +102,7 @@
 }
 
 TEST(FocusHandlerTest, FocusChangeFromEmbedded) {
-  aura::test::TestWindowDelegate test_window_delegate;
   WindowServiceTestSetup setup;
-  test_window_delegate.set_can_focus(true);
-  setup.delegate()->set_delegate_for_next_top_level(&test_window_delegate);
   aura::Window* top_level = setup.client_test_helper()->NewTopLevelWindow(1);
   ASSERT_TRUE(top_level);
   top_level->Show();
@@ -151,10 +149,7 @@
 }
 
 TEST(FocusHandlerTest, EmbedderGetsInterceptedKeyEvents) {
-  aura::test::TestWindowDelegate test_window_delegate;
   WindowServiceTestSetup setup;
-  test_window_delegate.set_can_focus(true);
-  setup.delegate()->set_delegate_for_next_top_level(&test_window_delegate);
   aura::Window* top_level = setup.client_test_helper()->NewTopLevelWindow(1);
   ASSERT_TRUE(top_level);
   top_level->Show();
diff --git a/services/ui/ws2/window_service_client.cc b/services/ui/ws2/window_service_client.cc
index 1b7e8769..f2b53727 100644
--- a/services/ui/ws2/window_service_client.cc
+++ b/services/ui/ws2/window_service_client.cc
@@ -287,9 +287,6 @@
 void WindowServiceClient::RemoveWindowFromKnownWindows(aura::Window* window,
                                                        bool delete_if_owned) {
   DCHECK(IsWindowKnown(window));
-  auto iter = window_to_client_window_id_map_.find(window);
-  client_window_id_to_window_map_.erase(iter->second);
-  window_to_client_window_id_map_.erase(iter);
   auto client_iter = client_created_windows_.find(window);
   if (client_iter != client_created_windows_.end()) {
     window->RemoveObserver(this);
@@ -300,6 +297,11 @@
     }
     client_created_windows_.erase(client_iter);
   }
+  // Remove from these maps after destruction. This is necessary as destruction
+  // may end up expecting to find a ClientWindow.
+  auto iter = window_to_client_window_id_map_.find(window);
+  client_window_id_to_window_map_.erase(iter->second);
+  window_to_client_window_id_map_.erase(iter);
 }
 
 bool WindowServiceClient::IsValidIdForNewWindow(
diff --git a/services/ui/ws2/window_service_client_test_helper.cc b/services/ui/ws2/window_service_client_test_helper.cc
index ff0d343..dca6559 100644
--- a/services/ui/ws2/window_service_client_test_helper.cc
+++ b/services/ui/ws2/window_service_client_test_helper.cc
@@ -115,13 +115,13 @@
 }
 
 Id WindowServiceClientTestHelper::TransportIdForWindow(aura::Window* window) {
-  return window_service_client_->TransportIdForWindow(window);
+  return window ? window_service_client_->TransportIdForWindow(window)
+                : kInvalidTransportId;
 }
 
 bool WindowServiceClientTestHelper::SetFocus(aura::Window* window) {
   return window_service_client_->SetFocusImpl(
-      window_service_client_->MakeClientWindowId(
-          window_service_client_->TransportIdForWindow(window)));
+      window_service_client_->MakeClientWindowId(TransportIdForWindow(window)));
 }
 
 void WindowServiceClientTestHelper::SetCanFocus(aura::Window* window,
diff --git a/services/ui/ws2/window_service_client_unittest.cc b/services/ui/ws2/window_service_client_unittest.cc
index 5672f8d..06116786 100644
--- a/services/ui/ws2/window_service_client_unittest.cc
+++ b/services/ui/ws2/window_service_client_unittest.cc
@@ -248,6 +248,45 @@
                 window_tree_client->PopInputEvent().event.get()));
 }
 
+// Used to verify destruction with a touch pointer down doesn't crash.
+TEST(WindowServiceClientTest, ShutdownWithTouchDown) {
+  WindowServiceTestSetup setup;
+  aura::Window* top_level = setup.client_test_helper()->NewTopLevelWindow(1);
+  ASSERT_TRUE(top_level);
+  top_level->Show();
+  top_level->SetBounds(gfx::Rect(10, 10, 100, 100));
+
+  test::EventGenerator event_generator(setup.root());
+  event_generator.set_current_location(gfx::Point(50, 51));
+  event_generator.PressTouch();
+}
+
+TEST(WindowServiceClientTest, TouchPressDragRelease) {
+  WindowServiceTestSetup setup;
+  TestWindowTreeClient* window_tree_client = setup.window_tree_client();
+  aura::Window* top_level = setup.client_test_helper()->NewTopLevelWindow(1);
+  ASSERT_TRUE(top_level);
+  top_level->Show();
+  top_level->SetBounds(gfx::Rect(10, 11, 100, 100));
+
+  test::EventGenerator event_generator(setup.root());
+  event_generator.set_current_location(gfx::Point(50, 51));
+  event_generator.PressTouch();
+  EXPECT_EQ("POINTER_DOWN 40,40",
+            LocatedEventToEventTypeAndLocation(
+                window_tree_client->PopInputEvent().event.get()));
+
+  event_generator.MoveTouch(gfx::Point(5, 6));
+  EXPECT_EQ("POINTER_MOVED -5,-5",
+            LocatedEventToEventTypeAndLocation(
+                window_tree_client->PopInputEvent().event.get()));
+
+  event_generator.ReleaseTouch();
+  EXPECT_EQ("POINTER_UP -5,-5",
+            LocatedEventToEventTypeAndLocation(
+                window_tree_client->PopInputEvent().event.get()));
+}
+
 class EventRecordingWindowDelegate : public aura::test::TestWindowDelegate {
  public:
   EventRecordingWindowDelegate() = default;
@@ -356,6 +395,42 @@
   ASSERT_FALSE(window_delegate.PopEvent().get());
 }
 
+TEST(WindowServiceClientTest, MouseDownInNonClientWithChildWindow) {
+  EventRecordingWindowDelegate window_delegate;
+  WindowServiceTestSetup setup;
+  TestWindowTreeClient* window_tree_client = setup.window_tree_client();
+  setup.delegate()->set_delegate_for_next_top_level(&window_delegate);
+  aura::Window* top_level = setup.client_test_helper()->NewTopLevelWindow(1);
+  ASSERT_TRUE(top_level);
+  top_level->Show();
+  top_level->SetBounds(gfx::Rect(10, 10, 100, 100));
+  setup.client_test_helper()->SetClientArea(top_level,
+                                            gfx::Insets(10, 0, 0, 0));
+
+  // Add a child Window that is sized to fill the top-level.
+  aura::Window* window = setup.client_test_helper()->NewWindow(2);
+  ASSERT_TRUE(window);
+  window->Show();
+  window->SetBounds(gfx::Rect(top_level->bounds().size()));
+  top_level->AddChild(window);
+
+  window_delegate.ClearEvents();
+
+  // Move the mouse over the non-client area.
+  test::EventGenerator event_generator(setup.root());
+  event_generator.MoveMouseTo(15, 16);
+  EXPECT_EQ("POINTER_MOVED 5,6",
+            LocatedEventToEventTypeAndLocation(
+                window_tree_client->PopInputEvent().event.get()));
+
+  // Press over the non-client. The client should not be notified as the event
+  // should be handled locally.
+  event_generator.PressLeftButton();
+  ASSERT_FALSE(window_tree_client->PopInputEvent().event.get());
+  EXPECT_EQ("MOUSE_PRESSED 5,6", LocatedEventToEventTypeAndLocation(
+                                     window_delegate.PopEvent().get()));
+}
+
 TEST(WindowServiceClientTest, PointerWatcher) {
   WindowServiceTestSetup setup;
   TestWindowTreeClient* window_tree_client = setup.window_tree_client();
@@ -563,12 +638,14 @@
   ASSERT_TRUE(top_level_client_window);
   ClientWindowTestHelper top_level_client_window_helper(
       top_level_client_window);
-  EXPECT_TRUE(top_level_client_window_helper.IsInPointerPressed());
+  EXPECT_TRUE(top_level_client_window_helper.IsHandlingPointerPress(
+      MouseEvent::kMousePointerId));
 
   // Set capture on |window|, top_level should no longer be in pointer-down
   // (because capture changed).
   EXPECT_TRUE(setup.client_test_helper()->SetCapture(window));
-  EXPECT_FALSE(top_level_client_window_helper.IsInPointerPressed());
+  EXPECT_FALSE(top_level_client_window_helper.IsHandlingPointerPress(
+      MouseEvent::kMousePointerId));
 }
 
 TEST(WindowServiceClientTest, PointerDownResetOnHide) {
@@ -587,11 +664,13 @@
   ASSERT_TRUE(top_level_client_window);
   ClientWindowTestHelper top_level_client_window_helper(
       top_level_client_window);
-  EXPECT_TRUE(top_level_client_window_helper.IsInPointerPressed());
+  EXPECT_TRUE(top_level_client_window_helper.IsHandlingPointerPress(
+      MouseEvent::kMousePointerId));
 
   // Hiding should implicitly cancel capture.
   top_level->Hide();
-  EXPECT_FALSE(top_level_client_window_helper.IsInPointerPressed());
+  EXPECT_FALSE(top_level_client_window_helper.IsHandlingPointerPress(
+      MouseEvent::kMousePointerId));
 }
 
 TEST(WindowServiceClientTest, DeleteWindow) {
diff --git a/testing/buildbot/chromium.clang.json b/testing/buildbot/chromium.clang.json
index 90280d05..cd1af24 100644
--- a/testing/buildbot/chromium.clang.json
+++ b/testing/buildbot/chromium.clang.json
@@ -689,7 +689,8 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "shards": 2
         },
         "test": "interactive_ui_tests"
       },
@@ -1143,6 +1144,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -1601,6 +1609,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -2052,6 +2067,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -2510,6 +2532,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -2968,6 +2997,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -3426,6 +3462,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -3884,6 +3927,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -7464,7 +7514,8 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "shards": 2
         },
         "test": "interactive_ui_tests"
       },
@@ -7903,7 +7954,8 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "shards": 2
         },
         "test": "interactive_ui_tests"
       },
@@ -8330,7 +8382,8 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "shards": 2
         },
         "test": "interactive_ui_tests"
       },
@@ -9593,7 +9646,8 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "shards": 2
         },
         "test": "interactive_ui_tests"
       },
@@ -10072,7 +10126,8 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "shards": 2
         },
         "test": "interactive_ui_tests"
       },
@@ -10502,6 +10557,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -10960,6 +11022,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -11418,6 +11487,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -11876,6 +11952,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -12334,6 +12417,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -12792,6 +12882,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -13250,6 +13347,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -13708,6 +13812,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -14166,6 +14277,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -14624,6 +14742,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
@@ -15674,6 +15799,18 @@
             {
               "os": "Windows-10"
             }
+          ],
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
+          "can_use_on_swarming_builders": true,
+          "dimension_sets": [
+            {
+              "os": "Windows-10"
+            }
           ]
         },
         "test": "ipc_tests"
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json
index 3e2a027..ce5a0e28 100644
--- a/testing/buildbot/chromium.fyi.json
+++ b/testing/buildbot/chromium.fyi.json
@@ -1011,7 +1011,8 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "shards": 2
         },
         "test": "interactive_ui_tests"
       },
@@ -5066,7 +5067,8 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "shards": 2
         },
         "test": "interactive_ui_tests"
       },
@@ -5947,6 +5949,13 @@
       },
       {
         "swarming": {
+          "can_use_on_swarming_builders": true,
+          "shards": 2
+        },
+        "test": "interactive_ui_tests"
+      },
+      {
+        "swarming": {
           "can_use_on_swarming_builders": true
         },
         "test": "ipc_tests"
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json
index 6098a138..5cd4f08 100644
--- a/testing/buildbot/chromium.memory.json
+++ b/testing/buildbot/chromium.memory.json
@@ -4795,7 +4795,8 @@
       },
       {
         "swarming": {
-          "can_use_on_swarming_builders": true
+          "can_use_on_swarming_builders": true,
+          "shards": 2
         },
         "test": "interactive_ui_tests"
       },
diff --git a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
index 18e510c..094232b 100644
--- a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
+++ b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
@@ -227,6 +227,9 @@
 # to work with network service.
 -ConditionalCacheCountingHelperBrowserTest.Count
 
+# https://crbug.com/839982
+-ExtensionApiTest.SharedWorker_ControlledByServiceWorker
+
 # NOTE: if adding an exclusion for an existing failure (e.g. additional test for
 # feature X that is already not working), please add it beside the existing
 # failures. Otherwise please reach out to network-service-dev@.
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl
index d01b4ec7..d27acb3 100644
--- a/testing/buildbot/test_suites.pyl
+++ b/testing/buildbot/test_suites.pyl
@@ -436,6 +436,7 @@
     },
     'components_browsertests': {},
     'content_browsertests': {},
+    'interactive_ui_tests': {},
   },
 
   'chromium_gtests': {
@@ -935,11 +936,6 @@
     },
   },
 
-  'interactive_ui_tests_gtests': {
-    # TODO: merge back into non_android_chromium_gtests.
-    'interactive_ui_tests': {},
-  },
-
   'leak_detection_isolated_scripts': {
     'memory.leak_detection': {
       'args': [
@@ -1307,6 +1303,11 @@
     },
     'extensions_unittests': {},
     'gin_unittests': {}, # crbug.com/843124
+    'interactive_ui_tests': {
+      'swarming': {
+        'shards': 2,
+      },
+    },
     'message_center_unittests': {},
     'native_theme_unittests': {},
     'pdf_unittests': {},
@@ -1335,15 +1336,6 @@
     'chrome_app_unittests': {},
   },
 
-  'non_android_and_clang_linux_mac_win_chromium_gtests': {
-    # TODO(kbr): merge back into non_android_chromium_gtests.
-    'interactive_ui_tests': {
-      'swarming': {
-        'shards': 2,
-      },
-    },
-  },
-
   'non_android_and_clang_linux_win_chromium_gtests': {
     'sync_integration_tests': {},
   },
@@ -1833,7 +1825,6 @@
     'aura_gtests',
     'chromium_gtests',
     'chromium_gtests_for_devices_with_graphical_output',
-    'interactive_ui_tests_gtests',
     'linux_clang_and_fyi_specific_chromium_gtests',
     'linux_flavor_specific_chromium_gtests',
     'linux_incl_clang_specific_chromium_gtests',
@@ -1849,7 +1840,6 @@
     'chromium_gtests',
     'chromium_gtests_for_devices_with_graphical_output',
     'clang_gl_gtests',
-    'interactive_ui_tests_gtests',
     'linux_clang_and_fyi_specific_chromium_gtests',
     'linux_flavor_specific_chromium_gtests',
     'linux_incl_clang_specific_chromium_gtests',
@@ -1874,7 +1864,6 @@
     'non_android_and_cast_and_chromeos_chromium_gtests',
     'non_android_and_cast_and_chromeos_and_clang_and_mac_fyi_chromium_gtests',
     'non_android_and_clang_linux_mac_chromium_gtests',
-    'non_android_and_clang_linux_mac_win_chromium_gtests',
     'non_android_and_clang_linux_win_chromium_gtests',
     'non_android_and_clang_mac_win_chromium_gtests',
     'non_android_and_clang_win_chromium_gtests',
@@ -1899,7 +1888,6 @@
     'linux_chromeos_specific_gtests',
     'linux_flavor_specific_chromium_gtests',
     'non_android_chromium_gtests',
-    'non_android_and_clang_linux_mac_win_chromium_gtests',
     'non_android_and_clang_linux_mac_chromium_gtests',
     'non_android_and_clang_linux_win_chromium_gtests',
     'non_android_and_clang_mac_win_chromium_gtests',
@@ -1922,7 +1910,6 @@
     'linux_flavor_specific_chromium_gtests',
     'mash_chromium_gtests',
     'non_android_chromium_gtests',
-    'non_android_and_clang_linux_mac_win_chromium_gtests',
     'non_android_and_clang_linux_mac_chromium_gtests',
     'non_android_and_clang_linux_win_chromium_gtests',
     'non_android_and_clang_mac_win_chromium_gtests',
@@ -1947,7 +1934,6 @@
   'chromium_mac_clang_gtests': [
     'chromium_gtests',
     'chromium_gtests_for_devices_with_graphical_output',
-    'interactive_ui_tests_gtests',
     'mac_specific_chromium_gtests',
     'non_android_chromium_gtests',
     'non_android_and_cast_and_chromeos_chromium_gtests',
@@ -1964,7 +1950,6 @@
     'non_android_chromium_gtests',
     'non_android_and_cast_and_chromeos_chromium_gtests',
     'non_android_and_clang_linux_mac_chromium_gtests',
-    'non_android_and_clang_linux_mac_win_chromium_gtests',
     'non_android_and_clang_linux_win_chromium_gtests',
     'non_android_and_clang_mac_win_chromium_gtests',
     'non_android_and_clang_win_chromium_gtests',
@@ -1981,7 +1966,6 @@
     'non_android_and_cast_and_chromeos_chromium_gtests',
     'non_android_and_cast_and_chromeos_and_clang_and_mac_fyi_chromium_gtests',
     'non_android_and_clang_linux_mac_chromium_gtests',
-    'non_android_and_clang_linux_mac_win_chromium_gtests',
     'non_android_and_clang_linux_win_chromium_gtests',
     'non_android_and_clang_mac_win_chromium_gtests',
     'non_android_and_clang_win_chromium_gtests',
@@ -1996,7 +1980,6 @@
     'linux_flavor_specific_chromium_gtests',
     'linux_incl_clang_specific_chromium_gtests',
     'mash_chromium_gtests',
-    'non_android_and_clang_linux_mac_win_chromium_gtests',
     'non_android_and_clang_mac_win_chromium_gtests',
     'non_android_and_clang_win_chromium_gtests',
     'non_android_chromium_gtests',
@@ -2008,7 +1991,6 @@
     'chromium_gtests',
     'chromium_gtests_for_devices_with_graphical_output',
     'clang_gl_gtests',
-    'interactive_ui_tests_gtests',
     'linux_and_mac_specific_chromium_gtests',
     'linux_flavor_specific_chromium_gtests',
     'linux_incl_clang_specific_chromium_gtests',
@@ -2023,10 +2005,8 @@
   'chromium_memory_mac_gtests': [
     'chromium_gtests',
     'chromium_gtests_for_devices_with_graphical_output',
-    'interactive_ui_tests_gtests',
     'linux_and_mac_specific_chromium_gtests',
     'non_android_and_cast_and_chromeos_chromium_gtests',
-    'non_android_and_clang_linux_mac_win_chromium_gtests',
     'non_android_and_clang_win_chromium_gtests',
     'non_android_chromium_gtests',
   ],
@@ -2036,7 +2016,6 @@
     'aura_gtests',
     'chromium_gtests',
     'chromium_gtests_for_devices_with_graphical_output',
-    'interactive_ui_tests_gtests',
     'non_android_chromium_gtests',
     'non_android_and_cast_and_chromeos_chromium_gtests',
     'non_android_and_clang_linux_mac_chromium_gtests',
@@ -2064,7 +2043,6 @@
     'non_android_and_cast_and_chromeos_chromium_gtests',
     'non_android_and_cast_and_chromeos_and_clang_and_mac_fyi_chromium_gtests',
     'non_android_and_clang_linux_mac_chromium_gtests',
-    'non_android_and_clang_linux_mac_win_chromium_gtests',
     'non_android_and_clang_linux_win_chromium_gtests',
     'non_android_and_clang_mac_win_chromium_gtests',
     'non_android_and_clang_win_chromium_gtests',
@@ -2082,7 +2060,6 @@
     'non_android_and_cast_and_chromeos_chromium_gtests',
     'non_android_and_cast_and_chromeos_and_clang_and_mac_fyi_chromium_gtests',
     'non_android_and_clang_linux_mac_chromium_gtests',
-    'non_android_and_clang_linux_mac_win_chromium_gtests',
     'non_android_and_clang_linux_win_chromium_gtests',
     'non_android_and_clang_mac_win_chromium_gtests',
     'non_android_and_clang_win_chromium_gtests',
@@ -2118,7 +2095,6 @@
 
   'sandboxed_chromium_memory_linux_gtests': [
     'chromium_browser_tests',
-    'interactive_ui_tests_gtests',
   ],
 
   'site_isolation_android_fyi_gtests': [
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
index 95c30c9..327ac043c 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-features=LayoutNG
@@ -1,6 +1,7 @@
 # These tests currently fail when they run with --enable-blink-features=LayoutNG
 # See https://crbug.com/591099.
 
+
 # Need support for Range.getClientRects() and Range.getBoundingClientRect()
 crbug.com/755750 accessibility/selection-affinity.html [ Failure ]
 
@@ -133,7 +134,6 @@
 crbug.com/591099 compositing/overflow/scroll-ancestor-update.html [ Failure ]
 crbug.com/591099 compositing/self-painting-layers.html [ Failure ]
 crbug.com/591099 compositing/squashing/add-remove-squashed-layers.html [ Failure ]
-crbug.com/591099 compositing/squashing/selection-repaint-with-gaps.html [ Failure Pass ]
 crbug.com/591099 crypto/subtle/hmac/cloneKey.html [ Timeout ]
 crbug.com/591099 css1/box_properties/float_on_text_elements.html [ Failure ]
 crbug.com/591099 css1/classification/list_style_image.html [ Failure ]
@@ -234,6 +234,14 @@
 crbug.com/714962 external/wpt/css/css-fonts/font-features-across-space-1.html [ Pass ]
 crbug.com/714962 external/wpt/css/css-fonts/font-features-across-space-3.html [ Pass ]
 crbug.com/591099 external/wpt/css/css-fonts/font-variant-ligatures-11.html [ Pass ]
+crbug.com/591099 external/wpt/css/css-grid/alignment/grid-column-axis-self-baseline-synthesized-001.html [ Failure ]
+crbug.com/591099 external/wpt/css/css-grid/alignment/grid-column-axis-self-baseline-synthesized-002.html [ Failure ]
+crbug.com/591099 external/wpt/css/css-grid/alignment/grid-column-axis-self-baseline-synthesized-003.html [ Failure ]
+crbug.com/591099 external/wpt/css/css-grid/alignment/grid-column-axis-self-baseline-synthesized-004.html [ Failure ]
+crbug.com/591099 external/wpt/css/css-grid/alignment/grid-row-axis-self-baseline-synthesized-001.html [ Failure ]
+crbug.com/591099 external/wpt/css/css-grid/alignment/grid-row-axis-self-baseline-synthesized-002.html [ Failure ]
+crbug.com/591099 external/wpt/css/css-grid/alignment/grid-row-axis-self-baseline-synthesized-003.html [ Failure ]
+crbug.com/591099 external/wpt/css/css-grid/alignment/grid-row-axis-self-baseline-synthesized-004.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-009.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-010.html [ Failure ]
 crbug.com/591099 external/wpt/css/css-grid/alignment/grid-self-alignment-non-static-positioned-items-011.html [ Failure ]
@@ -393,6 +401,7 @@
 crbug.com/591099 external/wpt/css/selectors/focus-visible-003-manual.html [ Timeout ]
 crbug.com/591099 external/wpt/css/selectors/focus-visible-004-manual.html [ Timeout ]
 crbug.com/591099 external/wpt/css/selectors/focus-within-004.html [ Pass ]
+crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-baseline-multi-item-vert-001b.html [ Pass ]
 crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-definite-sizes-002.html [ Failure ]
 crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-definite-sizes-004.html [ Failure ]
 crbug.com/591099 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/flexbox-intrinsic-ratio-003v.html [ Pass ]
@@ -754,7 +763,7 @@
 crbug.com/591099 fast/sub-pixel/sub-pixel-border-2.html [ Failure ]
 crbug.com/591099 fast/table/032.html [ Failure ]
 crbug.com/591099 fast/table/background-gradient-border-collapsed.html [ Failure ]
-crbug.com/591099 fast/table/border-collapsing/003-vertical.html [ Failure ]
+crbug.com/591099 fast/table/border-collapsing/003-vertical.html [ Failure Pass ]
 crbug.com/591099 fast/table/border-collapsing/004-vertical.html [ Failure ]
 crbug.com/591099 fast/table/border-collapsing/border-collapsing-head-foot-vertical.html [ Failure ]
 crbug.com/591099 fast/table/border-collapsing/composited-cell-collapsed-border.html [ Failure ]
@@ -893,6 +902,7 @@
 crbug.com/591099 fast/writing-mode/vertical-baseline-alignment.html [ Failure ]
 crbug.com/591099 fast/writing-mode/vertical-font-fallback.html [ Failure ]
 crbug.com/591099 fast/writing-mode/vertical-lr-replaced-selection.html [ Failure ]
+crbug.com/591099 fast/xmlhttprequest/xmlhttprequest-recursive-sync-event.html [ Failure ]
 crbug.com/591099 fullscreen/full-screen-with-flex-item.html [ Failure ]
 crbug.com/591099 hittesting/border-hittest-inlineFlowBox.html [ Failure ]
 crbug.com/714962 hittesting/culled-inline.html [ Failure ]
@@ -912,11 +922,9 @@
 crbug.com/591099 http/tests/devtools/console/console-search.js [ Timeout ]
 crbug.com/591099 http/tests/devtools/console/console-viewport-control.js [ Failure ]
 crbug.com/591099 http/tests/devtools/editor/text-editor-ctrl-d-2.js [ Pass Timeout ]
-crbug.com/591099 http/tests/devtools/editor/text-editor-indent-autodetection.js [ Pass Timeout ]
 crbug.com/714962 http/tests/devtools/elements/edit/edit-dom-actions-4.js [ Crash ]
 crbug.com/714962 http/tests/devtools/elements/inspect-pseudo-element.js [ Timeout ]
 crbug.com/591099 http/tests/devtools/persistence/persistence-merge-editor-tabs.js [ Failure ]
-crbug.com/591099 http/tests/devtools/sources/debugger-ui/debugger-inline-values.js [ Failure Pass ]
 crbug.com/591099 http/tests/devtools/text-autosizing-override.js [ Failure ]
 crbug.com/591099 http/tests/devtools/tracing/timeline-misc/timeline-grouped-invalidations.js [ Failure ]
 crbug.com/591099 http/tests/devtools/tracing/timeline-paint/timeline-paint-and-multiple-style-invalidations.js [ Failure ]
@@ -944,7 +952,7 @@
 crbug.com/591099 http/tests/security/xssAuditor/block-does-not-leak-location.html [ Failure ]
 crbug.com/591099 http/tests/text-autosizing/narrow-iframe.html [ Failure ]
 crbug.com/591099 http/tests/text-autosizing/wide-iframe.html [ Failure ]
-crbug.com/591099 http/tests/websocket/invalid-subprotocol-characters.html [ Timeout ]
+crbug.com/591099 http/tests/websocket/invalid-subprotocol-characters.html [ Pass Timeout ]
 crbug.com/591099 ietestcenter/css3/bordersbackgrounds/background-attachment-local-scrolling.htm [ Failure ]
 crbug.com/714962 images/color-profile-background-clip-text.html [ Failure ]
 crbug.com/591099 images/color-profile-image-filter-all.html [ Failure ]
@@ -1050,7 +1058,7 @@
 crbug.com/591099 paint/invalidation/offset-change-wrong-invalidation-with-float.html [ Failure ]
 crbug.com/591099 paint/invalidation/outline/focus-continuations.html [ Failure ]
 crbug.com/591099 paint/invalidation/outline/focus-enable-continuations.html [ Failure ]
-crbug.com/591099 paint/invalidation/outline/focus-layers.html [ Crash Failure ]
+crbug.com/591099 paint/invalidation/outline/focus-layers.html [ Failure ]
 crbug.com/591099 paint/invalidation/outline/focus-ring-on-continuation-move.html [ Failure ]
 crbug.com/591099 paint/invalidation/outline/focus-ring-on-inline-continuation-move.html [ Failure ]
 crbug.com/591099 paint/invalidation/outline/inline-focus.html [ Failure ]
@@ -1117,7 +1125,7 @@
 crbug.com/591099 paint/invalidation/selection/selection-within-composited-scroller.html [ Failure ]
 crbug.com/714962 paint/invalidation/selection/text-selection-rect-in-overflow-2.html [ Failure ]
 crbug.com/714962 paint/invalidation/selection/text-selection-rect-in-overflow.html [ Failure ]
-crbug.com/591099 paint/invalidation/shadow-multiple.html [ Failure ]
+crbug.com/591099 paint/invalidation/shadow-multiple.html [ Failure Pass ]
 crbug.com/591099 paint/invalidation/stacked-diacritics.html [ Failure ]
 crbug.com/591099 paint/invalidation/stacking-context-lost.html [ Failure ]
 crbug.com/591099 paint/invalidation/svg/add-background-property-on-root.html [ Failure ]
@@ -1223,6 +1231,7 @@
 crbug.com/591099 svg/in-html/sizing/svg-inline.html [ Failure ]
 crbug.com/714962 svg/text/tspan-multiple-outline.svg [ Failure ]
 crbug.com/591099 svg/transforms/text-with-pattern-inside-transformed-html.xhtml [ Failure ]
+crbug.com/591099 svg/wicd/rightsizing-grid.html [ Failure ]
 crbug.com/591099 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]
 crbug.com/591099 svg/zoom/page/zoom-svg-through-object-with-absolute-size-2.xhtml [ Failure ]
 crbug.com/591099 svg/zoom/page/zoom-svg-through-object-with-absolute-size.xhtml [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index c639238..509e38b6 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -4761,8 +4761,6 @@
 crbug.com/833658 [ Linux Win Mac ] media/video-controls-focus-movement-on-hide.html [ Pass Failure ]
 crbug.com/833100 [ Mac ] external/wpt/battery-status/battery-full-manual.https.html [ Failure ]
 
-crbug.com/834446 [ Linux ] http/tests/misc/performance-memory.html [ Pass Failure ]
-
 # Sheriff 2018-04-23
 crbug.com/833331 [ Win10 ] inspector-protocol/page/pageNavigateToFragment.js [ Pass Failure ]
 crbug.com/831796 virtual/mouseevent_fractional/fast/events/autoscroll-in-textfield.html [ Failure Pass ]
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_21_ltr.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_21_ltr.html
new file mode 100644
index 0000000..6ffa4ea
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_21_ltr.html
@@ -0,0 +1,197 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-0 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-1 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-2 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-3 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-4 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-5 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-6 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-7 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-8 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-9 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-10 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-11 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-12 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-13 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-14 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-15 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-16 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  '21-17 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  '21-18 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-19 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-20 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  '21-21 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  '21-22 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  '21-23 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  '21-24 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  '21-25 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  '21-26 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  '21-27 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  '21-28 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  '21-29 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  '21-30 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  '21-31 ltr left character');
+</script>
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_21_rtl.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_21_rtl.html
new file mode 100644
index 0000000..0a3605c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_21_rtl.html
@@ -0,0 +1,209 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+const isMac = navigator.platform.indexOf('Mac') === 0;
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-0 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-1 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-2 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-3 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-4 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-5 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-6 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-7 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-8 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-9 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-10 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-11 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-12 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-13 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-14 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-15 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-16 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  '21-17 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  '21-18 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  '21-19 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  '21-20 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  '21-21 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  '21-22 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  '21-23 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  '21-24 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  '21-25 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  '21-26 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  '21-27 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  '21-28 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  '21-29 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  '21-30 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  '21-31 rtl left character');
+</script>
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_22_ltr.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_22_ltr.html
new file mode 100644
index 0000000..d8529378
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_22_ltr.html
@@ -0,0 +1,197 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-0 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-1 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-2 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-3 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-4 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-5 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-6 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-7 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-8 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-9 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-10 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-11 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-12 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-13 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-14 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-15 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-16 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  '22-17 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  '22-18 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-19 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-20 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  '22-21 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  '22-22 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  '22-23 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  '22-24 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  '22-25 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  '22-26 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  '22-27 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  '22-28 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  '22-29 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  '22-30 ltr left character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  '22-31 ltr left character');
+</script>
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_22_rtl.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_22_rtl.html
new file mode 100644
index 0000000..b22d368
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_left_character_22_rtl.html
@@ -0,0 +1,209 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+const isMac = navigator.platform.indexOf('Mac') === 0;
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-0 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-1 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-2 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-3 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-4 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-5 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-6 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-7 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-8 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-9 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-10 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-11 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-12 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-13 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-14 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-15 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-16 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  '22-17 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  '22-18 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  '22-19 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  '22-20 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  '22-21 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  '22-22 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  '22-23 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  '22-24 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  '22-25 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  '22-26 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  '22-27 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  '22-28 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  '22-29 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  '22-30 rtl left character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  selection => selection.modify('move', 'left', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  '22-31 rtl left character');
+</script>
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_21_ltr.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_21_ltr.html
new file mode 100644
index 0000000..cba98b84
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_21_ltr.html
@@ -0,0 +1,197 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-0 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-1 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-2 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-3 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-4 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-5 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-6 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-7 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-8 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-9 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-10 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-11 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-12 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-13 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-14 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-15 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  '21-16 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  '21-17 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-18 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  '21-19 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  '21-20 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  '21-21 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  '21-22 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  '21-23 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  '21-24 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  '21-25 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  '21-26 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  '21-27 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  '21-28 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  '21-29 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  '21-30 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  '21-31 ltr right character');
+</script>
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_21_rtl.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_21_rtl.html
new file mode 100644
index 0000000..487a33c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_21_rtl.html
@@ -0,0 +1,209 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+const isMac = navigator.platform.indexOf('Mac') === 0;
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-0 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-1 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-2 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-3 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-4 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-5 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-6 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-7 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-8 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-9 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-10 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-11 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-12 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-13 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-14 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-15 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-16 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-17 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  '21-18 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  '21-19 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  '21-20 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  '21-21 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  '21-22 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  '21-23 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  '21-24 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  '21-25 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  '21-26 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  '21-27 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  '21-28 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  '21-29 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  '21-30 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  '21-31 rtl right character');
+</script>
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_22_ltr.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_22_ltr.html
new file mode 100644
index 0000000..c297174d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_22_ltr.html
@@ -0,0 +1,197 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-0 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-1 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-2 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-3 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-4 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-5 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-6 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-7 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-8 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-9 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-10 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-11 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-12 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-13 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-14 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-15 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  '22-16 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  '22-17 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-18 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  '22-19 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  '22-20 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  '22-21 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  '22-22 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  '22-23 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  '22-24 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  '22-25 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  '22-26 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  '22-27 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  '22-28 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  '22-29 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  '22-30 ltr right character');
+
+selection_test(
+  '<div contenteditable dir="ltr" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="ltr" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  '22-31 ltr right character');
+</script>
diff --git a/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_22_rtl.html b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_22_rtl.html
new file mode 100644
index 0000000..53a53ef
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/modify_move/move_right_character_22_rtl.html
@@ -0,0 +1,209 @@
+<!doctype html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<script src="../../assert_selection.js"></script>
+<script>
+const isMac = navigator.platform.indexOf('Mac') === 0;
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-0 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-1 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">Th|is is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-2 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">Thi|s is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-3 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This| is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-4 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This |is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-5 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This i|s \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">|This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-6 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">T|his is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-7 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is| \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-8 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is |\u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-9 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9|\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-10 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5|\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-11 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA|\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-12 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8| \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-13 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 |\u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-14 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6|\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-15 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8| \u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-16 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 |\u05DE\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-17 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE|\u05D9\u05EA\u05E8 the boxes.</div>',
+  '22-18 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9|\u05EA\u05E8 the boxes.</div>',
+  '22-19 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA|\u05E8 the boxes.</div>',
+  '22-20 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8| the boxes.</div>',
+  '22-21 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  '22-22 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 th|e boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  '22-23 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  '22-24 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the| boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  '22-25 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  '22-26 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the bo|xes.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  '22-27 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the box|es.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  '22-28 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxe|s.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the |boxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 |the boxes.</div>',
+  '22-29 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  isMac
+  ? '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the b|oxes.</div>'
+  : '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 t|he boxes.</div>',
+  '22-30 rtl right character');
+
+selection_test(
+  '<div contenteditable dir="rtl" contenteditable style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes.|</div>',
+  selection => selection.modify('move', 'right', 'character'),
+  '<div contenteditable dir="rtl" style="width: 100px;">This is \u05D9\u05D5\u05EA\u05E8 \u05E6\u05E8 \u05DE\u05D9\u05EA\u05E8 the boxes|.</div>',
+  '22-31 rtl right character');
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
index 618006d..0c012a5 100644
--- a/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
+++ b/third_party/WebKit/LayoutTests/external/WPT_BASE_MANIFEST.json
@@ -51481,6 +51481,18 @@
      {}
     ]
    ],
+   "css/css-scoping/shadow-at-import.html": [
+    [
+     "/css/css-scoping/shadow-at-import.html",
+     [
+      [
+       "/css/css-scoping/reference/green-box.html",
+       "=="
+      ]
+     ],
+     {}
+    ]
+   ],
    "css/css-scoping/shadow-disabled-sheet-001.html": [
     [
      "/css/css-scoping/shadow-disabled-sheet-001.html",
@@ -122520,6 +122532,11 @@
      {}
     ]
    ],
+   "css/css-scoping/resources/host-green-box.css": [
+    [
+     {}
+    ]
+   ],
    "css/css-scoping/slotted-with-pseudo-element-ref.html": [
     [
      {}
@@ -192847,6 +192864,12 @@
      {}
     ]
    ],
+   "css/cssom/at-namespace.html": [
+    [
+     "/css/cssom/at-namespace.html",
+     {}
+    ]
+   ],
    "css/cssom/computed-style-001.html": [
     [
      "/css/cssom/computed-style-001.html",
@@ -239157,6 +239180,12 @@
      {}
     ]
    ],
+   "web-animations/animation-model/keyframe-effects/effect-value-interval-distance.html": [
+    [
+     "/web-animations/animation-model/keyframe-effects/effect-value-interval-distance.html",
+     {}
+    ]
+   ],
    "web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html": [
     [
      "/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation.html",
@@ -302140,10 +302169,18 @@
    "a736f68dc602c0fccab56ec5cc6234cb3298c88d",
    "support"
   ],
+  "css/css-scoping/resources/host-green-box.css": [
+   "2680b68f5c1720ce6d2b82d942ea21b0b1518587",
+   "support"
+  ],
   "css/css-scoping/shadow-assign-dynamic-001.html": [
    "c57e0fd5aa5be63e1cadf65a4e382798c5e05ec4",
    "reftest"
   ],
+  "css/css-scoping/shadow-at-import.html": [
+   "67295000ad3c24c2d9ab0ac556d34758f3ce654c",
+   "reftest"
+  ],
   "css/css-scoping/shadow-cascade-order-001.html": [
    "46913ea7e47811b11be898de5c3bd0a330ea6637",
    "testharness"
@@ -325977,7 +326014,7 @@
    "testharness"
   ],
   "css/cssom-view/scrollIntoView-smooth.html": [
-   "0561564f185dcaf2ad3a8e14e081efb3c2c273e3",
+   "7461663514681b85aaa1b2be6e2e2807c71a9e51",
    "testharness"
   ],
   "css/cssom-view/scrollTop-display-change-ref.html": [
@@ -326292,6 +326329,10 @@
    "0a1cd8ed56ac3a5b1a9556835d94fb80325199bf",
    "testharness"
   ],
+  "css/cssom/at-namespace.html": [
+   "cd3845557f5c40f51f7e3cbdfff52f440fe689b6",
+   "testharness"
+  ],
   "css/cssom/computed-style-001.html": [
    "0331a648e6b0d56f0e7365f1ff7d991ea77ce3e4",
    "testharness"
@@ -326429,19 +326470,19 @@
    "testharness"
   ],
   "css/cssom/insertRule-charset-no-index.html": [
-   "cd3a96351a4c8dcd417fb03963f9d4fb0760c746",
+   "2be98274fe292089f381d216dc415ddc812a105f",
    "testharness"
   ],
   "css/cssom/insertRule-import-no-index.html": [
-   "ba89bad41a8d243f89ec91a0c02a34e97b378bc8",
+   "44ef5a2c490675d0088651dc101dbbb1fc83fdd1",
    "testharness"
   ],
   "css/cssom/insertRule-namespace-no-index.html": [
-   "109ed203fabac2da4279419deb34d5bc5a393d09",
+   "b9b63240c4a7bf52524b8e3dd36d6ca2ecb4bcdc",
    "testharness"
   ],
   "css/cssom/insertRule-no-index.html": [
-   "812f2b02d7694dd270b7a3e1ef205b99890ab216",
+   "825eb56d8e78bbdbd3bfb1861e6d40c245cd8f4b",
    "testharness"
   ],
   "css/cssom/insertRule-syntax-error-01.html": [
@@ -388032,6 +388073,10 @@
    "da405e4bfc35d5d0b4c151706b09eb1a84d2f0da",
    "testharness"
   ],
+  "web-animations/animation-model/keyframe-effects/effect-value-interval-distance.html": [
+   "1610fc05399b88b92f35d556b80a8623d03a5a87",
+   "testharness"
+  ],
   "web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt": [
    "8122d93f30e7f51fbfd089a3404b576d2636685b",
    "support"
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/resources/host-green-box.css b/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/resources/host-green-box.css
new file mode 100644
index 0000000..a77b3fd
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/resources/host-green-box.css
@@ -0,0 +1,5 @@
+:host {
+  background: green;
+  width: 100px;
+  height: 100px;
+}
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/shadow-at-import.html b/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/shadow-at-import.html
new file mode 100644
index 0000000..1adf516
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping/shadow-at-import.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<title>CSS Test: @import in Shadow DOM</title>
+<link rel="help" href="https://drafts.csswg.org/css-cascade/#at-import">
+<link rel="match" href="reference/green-box.html"/>
+<p>Test passes if you see a single 100px by 100px green box below.</p>
+<div id="host">FAIL</div>
+<script>
+  host.attachShadow({ mode: "open" }).innerHTML = `
+    <style>
+      @import url("resources/host-green-box.css");
+    </style>
+  `;
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/scrollIntoView-smooth.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/scrollIntoView-smooth.html
index 8799b8b..70343cb 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/scrollIntoView-smooth.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom-view/scrollIntoView-smooth.html
@@ -45,13 +45,13 @@
   window.scrollTo(0, 0);
   var expected_x = content.offsetLeft + content_width - window_width;
   var expected_y = content.offsetTop + content_height - window_height;
-  assert_not_equals(window.scrollX, expected_x);
-  assert_not_equals(window.scrollY, expected_y);
+  assert_not_equals(window.scrollX, expected_x, "scrollX");
+  assert_not_equals(window.scrollY, expected_y, "scrollY");
   content.scrollIntoView({behavior: "smooth", block: "nearest", inline:
 "nearest"});
   return waitForScrollEnd().then(() => {
-    assert_approx_equals(window.scrollX, expected_x, 1);
-    assert_approx_equals(window.scrollY, expected_y, 1);
+    assert_approx_equals(window.scrollX, expected_x, 1, "scrollX");
+    assert_approx_equals(window.scrollY, expected_y, 1, "scrollY");
   });
 }, "Smooth scrollIntoView should scroll the element to the 'nearest' position");
 
@@ -59,13 +59,13 @@
   window.scrollTo(0, 0);
   var expected_x = content.offsetLeft;
   var expected_y = content.offsetTop;
-  assert_not_equals(window.scrollX, expected_x);
-  assert_not_equals(window.scrollY, expected_y);
+  assert_not_equals(window.scrollX, expected_x, "scrollX");
+  assert_not_equals(window.scrollY, expected_y, "scrollY");
   content.scrollIntoView({behavior: "smooth", block: "start", inline:
 "start"});
   return waitForScrollEnd().then(() => {
-    assert_approx_equals(window.scrollX, expected_x, 1);
-    assert_approx_equals(window.scrollY, expected_y, 1);
+    assert_approx_equals(window.scrollX, expected_x, 1, "scrollX");
+    assert_approx_equals(window.scrollY, expected_y, 1, "scrollY");
   });
 }, "Smooth scrollIntoView should scroll the element to the 'start' position");
 
@@ -73,13 +73,13 @@
   window.scrollTo(0, 0);
   var expected_x = content.offsetLeft + (content_width - window_width) / 2;
   var expected_y = content.offsetTop + (content_height - window_height) / 2;
-  assert_not_equals(window.scrollX, expected_x);
-  assert_not_equals(window.scrollY, expected_y);
+  assert_not_equals(window.scrollX, expected_x, "scrollX");
+  assert_not_equals(window.scrollY, expected_y, "scrollY");
   content.scrollIntoView({behavior: "smooth", block: "center", inline:
 "center"});
   return waitForScrollEnd().then(() => {
-    assert_approx_equals(window.scrollX, expected_x, 1);
-    assert_approx_equals(window.scrollY, expected_y, 1);
+    assert_approx_equals(window.scrollX, expected_x, 1, "scrollX");
+    assert_approx_equals(window.scrollY, expected_y, 1, "scrollY");
   });
 }, "Smooth scrollIntoView should scroll the element to the 'center' position");
 
@@ -87,15 +87,15 @@
   window.scrollTo(0, 0);
   var expected_x = content.offsetLeft + content_width - window_width;
   var expected_y = content.offsetTop + content_height - window_height;
-  assert_not_equals(window.scrollX, expected_x);
-  assert_not_equals(window.scrollY, expected_y);
+  assert_not_equals(window.scrollX, expected_x, "scrollX");
+  assert_not_equals(window.scrollY, expected_y, "scrollY");
   content.scrollIntoView({behavior: "smooth", block: "end", inline:
 "end"});
   return waitForScrollEnd().then(() => {
-    assert_approx_equals(window.scrollX, expected_x, 1);
-    assert_approx_equals(window.scrollY, expected_y, 1);
+    assert_approx_equals(window.scrollX, expected_x, 1, "scrollX");
+    assert_approx_equals(window.scrollY, expected_y, 1, "scrollY");
   });
 }, "Smooth scrollIntoView should scroll the element to the 'end' position");
 
 });
-</script>
\ No newline at end of file
+</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/at-namespace.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/at-namespace.html
new file mode 100644
index 0000000..04a8a22
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/at-namespace.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<title>CSS Test: @namespace in CSSOM is not severely broken</title>
+<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1464865">
+<link rel="help" href="https://drafts.csswg.org/cssom/#insert-a-css-rule">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style id="s">
+  div { color: green }
+</style>
+<div>Should be green</div>
+<script>
+test(function() {
+  assert_throws("InvalidStateError", function() {
+    s.sheet.insertRule('@namespace myhtml url("http://www.w3.org/1999/xhtml")', 0);
+  });
+  assert_equals(s.sheet.cssRules.length, 1, "Shouldn't have been inserted");
+  assert_throws("SyntaxError", function() {
+    s.sheet.insertRule("myhtml|div { color: red !important }", 0);
+  });
+  assert_equals(s.sheet.cssRules.length, 1);
+  assert_equals(
+    getComputedStyle(document.querySelector("div")).color,
+    "rgb(0, 128, 0)",
+    "Namespace shouldn't be registered"
+  );
+});
+</script>
+
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-charset-no-index.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-charset-no-index.html
index b94dc11..16f2358 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-charset-no-index.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-charset-no-index.html
@@ -19,7 +19,7 @@
         sheet.insertRule("p { color: green; }");
         assert_equals(sheet.cssRules.length, 1);
         assert_equals(sheet.cssRules.item(0).cssText, "p { color: green; }");
-    }, "inserRule with charset and omitted index argument");
+    }, "insertRule with charset and omitted index argument");
 
     test(function() {
         assert_equals(sheet.cssRules.length, 1);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-import-no-index.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-import-no-index.html
index c97d3949..ad3622f8 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-import-no-index.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-import-no-index.html
@@ -20,7 +20,7 @@
         assert_equals(sheet.cssRules.length, 1);
         assert_throws("HierarchyRequestError", function() { sheet.insertRule("p { color: green; }"); });
         assert_equals(sheet.cssRules.length, 1);
-    }, "inserRule with import and omitted index argument");
+    }, "insertRule with import and omitted index argument");
 
     test(function() {
         assert_equals(sheet.cssRules.length, 1);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-namespace-no-index.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-namespace-no-index.html
index 8a3315d..c1628ee 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-namespace-no-index.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-namespace-no-index.html
@@ -22,7 +22,7 @@
         assert_equals(sheet.cssRules.length, 3);
         assert_throws("HierarchyRequestError", function() { sheet.insertRule("p { color: green; }"); });
         assert_equals(sheet.cssRules.length, 3);
-    }, "inserRule with namespace and omitted index argument");
+    }, "insertRule with namespace and omitted index argument");
 
     test(function() {
         assert_equals(sheet.cssRules.length, 3);
@@ -34,7 +34,7 @@
         assert_equals(sheet.cssRules.length, 3);
         sheet.insertRule("@import url(\"support/a-green.css\");");
         assert_equals(sheet.cssRules.length, 4);
-    }, "inserRule with namespace and omitted index argument should insert import");
+    }, "insertRule with namespace and omitted index argument should insert import");
 </script>
 </body>
 </html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-no-index.html b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-no-index.html
index c9704b74..b4370bd 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-no-index.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/css/cssom/insertRule-no-index.html
@@ -22,7 +22,7 @@
         sheet.insertRule("p { color: green; }");
         assert_equals(sheet.cssRules.length, 2);
         assert_equals(sheet.cssRules.item(0).cssText, "p { color: green; }");
-    }, "inserRule with omitted index argument");
+    }, "insertRule with omitted index argument");
 
     test(function() {
         assert_equals(sheet.cssRules.length, 2);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/request/request-reset-attributes.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/request/request-reset-attributes.https-expected.txt
index a09a1c06..ea8f0af 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/fetch/api/request/request-reset-attributes.https-expected.txt
+++ b/third_party/WebKit/LayoutTests/external/wpt/fetch/api/request/request-reset-attributes.https-expected.txt
@@ -1,6 +1,6 @@
 This is a testharness.js-based test.
-FAIL Request.isReloadNavigation is reset with non-empty RequestInit assert_equals: expected "old: false, new: false" but got "hello\n"
-FAIL Request.isHistoryNavigation is reset with non-empty RequestInit assert_equals: expected "old: false, new: false" but got "{\"error\": {\"message\": \"\", \"code\": 404}}"
-FAIL Request.mode is reset with non-empty RequestInit when it's "navigate" assert_equals: expected "old: navigate, new: same-origin" but got "hello\n"
+FAIL Request.isReloadNavigation is reset with non-empty RequestInit assert_equals: expected "old: false, new: false" but got "old: undefined, new: undefined"
+FAIL Request.isHistoryNavigation is reset with non-empty RequestInit assert_equals: expected "old: false, new: false" but got "old: undefined, new: undefined"
+PASS Request.mode is reset with non-empty RequestInit when it's "navigate"
 Harness: the test ran to completion.
 
diff --git a/third_party/WebKit/LayoutTests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-interval-distance.html b/third_party/WebKit/LayoutTests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-interval-distance.html
new file mode 100644
index 0000000..6bf5d8c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/web-animations/animation-model/keyframe-effects/effect-value-interval-distance.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>The effect value of a keyframe effect: Calculating the interval
+  distance between keyframes</title>
+<link rel="help" href="https://drafts.csswg.org/web-animations/#the-effect-value-of-a-keyframe-animation-effect">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../../testcommon.js"></script>
+<body>
+<div id="log"></div>
+<script>
+'use strict';
+
+test(t => {
+  // In Firefox there was a floating precision bug in the calculation of the
+  // progress at the end of the 0.2<->1.0 interval. This test exercises that
+  // calculation in case other UAs suffer from the same problem.
+  const target = createDiv(t);
+  const anim = target.animate(
+    [
+      { opacity: 0 },
+      { offset: 0.2, opacity: 1, easing: 'step-end' },
+      { opacity: 0 },
+    ],
+    {
+      duration: 1000,
+      fill: 'forwards',
+    }
+  );
+
+  anim.currentTime = 1000;
+  assert_equals(getComputedStyle(target).opacity, '0');
+}, 'Interval distance is calculated correctly (precision test)');
+
+</script>
+</body>
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-cert-not-found-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-cert-not-found-expected.txt
index daea0cb..b7097fad 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-cert-not-found-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-cert-not-found-expected.txt
@@ -2,16 +2,16 @@
 
 inspected-page.html:1 Invalid reponse code: 404
 inspected-page.html:1 Failed to fetch the certificate.
-* http://127.0.0.1:8000/loading/htxg/resources/htxg-cert-not-found.htxg
+* http://127.0.0.1:8000/loading/htxg/resources/htxg-cert-not-found.sxg
   failed: true
   statusCode: 200
   resourceType: document
   SignedExchangeInfo
     Request URL: https://www.127.0.0.1/not_found_cert.html
-    Certificate URL: http://localhost:8000/loading/htxg/resources/not_found_cert.pem.msg
+    Certificate URL: http://localhost:8000/loading/htxg/resources/not_found_cert.pem.cbor
     Error: Invalid reponse code: 404
     Error: Failed to fetch the certificate.
-* http://localhost:8000/loading/htxg/resources/not_found_cert.pem.msg
+* http://localhost:8000/loading/htxg/resources/not_found_cert.pem.cbor
   failed: false
   statusCode: 404
   resourceType: other
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-cert-not-found.js b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-cert-not-found.js
index 1e0b752..d5c24b1 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-cert-not-found.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-cert-not-found.js
@@ -7,12 +7,12 @@
   await TestRunner.loadModule('console_test_runner');
   await TestRunner.showPanel('network');
   await TestRunner.addScriptTag('/loading/htxg/resources/htxg-util.js');
-  // The timestamp of the test HTXG file is "Apr 1 2018 00:00 UTC" and valid
+  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
   // until "Apr 8 2018 00:00 UTC".
   await TestRunner.evaluateInPageAsync(
     'setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"))');
   BrowserSDK.networkLog.reset();
-  await TestRunner.addIframe('/loading/htxg/resources/htxg-cert-not-found.htxg');
+  await TestRunner.addIframe('/loading/htxg/resources/htxg-cert-not-found.sxg');
   ConsoleTestRunner.dumpConsoleMessages();
   NetworkTestRunner.dumpNetworkRequestsWithSignedExchangeInfo();
   TestRunner.completeTest();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expected.txt
index e249f2d..7c1d6757 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expected.txt
@@ -1,15 +1,15 @@
 Tests the signed exchange information are available when the navigation succeeded.
 
-* http://127.0.0.1:8000/loading/htxg/resources/htxg-location.htxg
+* http://127.0.0.1:8000/loading/htxg/resources/htxg-location.sxg
   failed: false
   statusCode: 200
   resourceType: signed-exchange
   SignedExchangeInfo
     Request URL: https://www.127.0.0.1/test.html
-    Certificate URL: http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.msg
+    Certificate URL: http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.cbor
     Certificate Subject: 127.0.0.1
     Certificate Issuer: web-platform-tests
-* http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.msg
+* http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.cbor
   failed: false
   statusCode: 200
   resourceType: other
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expired-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expired-expected.txt
index 932b5cc..95d6eb69 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expired-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expired-expected.txt
@@ -2,16 +2,16 @@
 
 inspected-page.html:1 Invalid timestamp. creation_time: 1522540800, expires_time: 1523145600, verification_time: 1523318460
 inspected-page.html:1 Failed to verify the signed exchange header.
-* http://127.0.0.1:8000/loading/htxg/resources/htxg-location.htxg
+* http://127.0.0.1:8000/loading/htxg/resources/htxg-location.sxg
   failed: true
   statusCode: 200
   resourceType: document
   SignedExchangeInfo
     Request URL: https://www.127.0.0.1/test.html
-    Certificate URL: http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.msg
+    Certificate URL: http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.cbor
     Error: Invalid timestamp. creation_time: 1522540800, expires_time: 1523145600, verification_time: 1523318460
     Error: Failed to verify the signed exchange header.
-* http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.msg
+* http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.cbor
   failed: false
   statusCode: 200
   resourceType: other
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expired.js b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expired.js
index 060efa98..08b50ab 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expired.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation-expired.js
@@ -7,12 +7,12 @@
   await TestRunner.loadModule('console_test_runner');
   await TestRunner.showPanel('network');
   await TestRunner.addScriptTag('/loading/htxg/resources/htxg-util.js');
-  // The timestamp of the test HTXG file is "Apr 1 2018 00:00 UTC" and valid
+  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
   // until "Apr 8 2018 00:00 UTC". So in Apr 10, the page load should fail.
   await TestRunner.evaluateInPageAsync(
     'setSignedExchangeVerificationTime(new Date("Apr 10 2018 00:01 UTC"))');
   BrowserSDK.networkLog.reset();
-  await TestRunner.addIframe('/loading/htxg/resources/htxg-location.htxg');
+  await TestRunner.addIframe('/loading/htxg/resources/htxg-location.sxg');
   ConsoleTestRunner.dumpConsoleMessages();
   NetworkTestRunner.dumpNetworkRequestsWithSignedExchangeInfo();
   TestRunner.completeTest();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation.js b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation.js
index 550337c..5e2c1f5d 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-navigation.js
@@ -7,12 +7,12 @@
   await TestRunner.loadModule('console_test_runner');
   await TestRunner.showPanel('network');
   await TestRunner.addScriptTag('/loading/htxg/resources/htxg-util.js');
-  // The timestamp of the test HTXG file is "Apr 1 2018 00:00 UTC" and valid
+  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
   // until "Apr 8 2018 00:00 UTC".
   await TestRunner.evaluateInPageAsync(
     'setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"))');
   BrowserSDK.networkLog.reset();
-  await TestRunner.addIframe('/loading/htxg/resources/htxg-location.htxg');
+  await TestRunner.addIframe('/loading/htxg/resources/htxg-location.sxg');
   ConsoleTestRunner.dumpConsoleMessages();
   NetworkTestRunner.dumpNetworkRequestsWithSignedExchangeInfo();
   TestRunner.completeTest();
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expected.txt
index 3d62110e..1df50be 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expected.txt
@@ -1,15 +1,15 @@
 Tests the signed exchange information are available when the prefetch succeeded.
 
-* http://127.0.0.1:8000/loading/htxg/resources/htxg-location.htxg
+* http://127.0.0.1:8000/loading/htxg/resources/htxg-location.sxg
   failed: false
   statusCode: 200
   resourceType: signed-exchange
   SignedExchangeInfo
     Request URL: https://www.127.0.0.1/test.html
-    Certificate URL: http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.msg
+    Certificate URL: http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.cbor
     Certificate Subject: 127.0.0.1
     Certificate Issuer: web-platform-tests
-* http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.msg
+* http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.cbor
   failed: false
   statusCode: 200
   resourceType: other
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expired-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expired-expected.txt
index ae7936e..3977cba 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expired-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expired-expected.txt
@@ -1,15 +1,15 @@
 Tests the signed exchange information are available when the prefetch failed.
 
-* http://127.0.0.1:8000/loading/htxg/resources/htxg-location.htxg
+* http://127.0.0.1:8000/loading/htxg/resources/htxg-location.sxg
   failed: true
   statusCode: 200
   resourceType: other
   SignedExchangeInfo
     Request URL: https://www.127.0.0.1/test.html
-    Certificate URL: http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.msg
+    Certificate URL: http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.cbor
     Error: Invalid timestamp. creation_time: 1522540800, expires_time: 1523145600, verification_time: 1523318460
     Error: Failed to verify the signed exchange header.
-* http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.msg
+* http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.cbor
   failed: false
   statusCode: 200
   resourceType: other
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expired.js b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expired.js
index 9e0b6dc..5bf402c 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expired.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch-expired.js
@@ -7,7 +7,7 @@
   await TestRunner.loadModule('console_test_runner');
   await TestRunner.showPanel('network');
   await TestRunner.addScriptTag('/loading/htxg/resources/htxg-util.js');
-  // The timestamp of the test HTXG file is "Apr 1 2018 00:00 UTC" and valid
+  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
   // until "Apr 8 2018 00:00 UTC". So in Apr 10, the prefetch should fail.
   await TestRunner.evaluateInPageAsync(
     'setSignedExchangeVerificationTime(new Date("Apr 10 2018 00:01 UTC"))');
@@ -17,7 +17,7 @@
     TestRunner.addSniffer(SDK.NetworkDispatcher.prototype, 'loadingFailed', loadingFailed, true);
     function loadingFailed(requestId, time, localizedDescription, canceled) {
       var request = BrowserSDK.networkLog.requestByManagerAndId(TestRunner.networkManager, requestId);
-      if (/htxg-location\.htxg/.exec(request.url()))
+      if (/htxg-location\.sxg/.exec(request.url()))
         resolve();
     }
   });
@@ -26,7 +26,7 @@
     (function () {
       const link = document.createElement('link');
       link.rel = 'prefetch';
-      link.href = '/loading/htxg/resources/htxg-location.htxg';
+      link.href = '/loading/htxg/resources/htxg-location.sxg';
       document.body.appendChild(link);
     })()
   `);
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch.js b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch.js
index 327e314..67b403d 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/htxg/htxg-prefetch.js
@@ -7,7 +7,7 @@
   await TestRunner.loadModule('console_test_runner');
   await TestRunner.showPanel('network');
   await TestRunner.addScriptTag('/loading/htxg/resources/htxg-util.js');
-  // The timestamp of the test HTXG file is "Apr 1 2018 00:00 UTC" and valid
+  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
   // until "Apr 8 2018 00:00 UTC".
   await TestRunner.evaluateInPageAsync(
     'setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"))');
@@ -26,7 +26,7 @@
     (function () {
       const link = document.createElement('link');
       link.rel = 'prefetch';
-      link.href = '/loading/htxg/resources/htxg-location.htxg';
+      link.href = '/loading/htxg/resources/htxg-location.sxg';
       document.body.appendChild(link);
     })()
   `);
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-double-prefetch.html b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-double-prefetch.html
index 4c5dcf5..096ade8 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-double-prefetch.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-double-prefetch.html
@@ -12,13 +12,13 @@
   document.body.appendChild(link);
 }
 promise_test(async (t) => {
-  // The timestamp of the test HTXG file is "Apr 1 2018 00:00 UTC" and valid
+  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
   // until "Apr 8 2018 00:00 UTC".
   await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
   const htxg1_url =
-      'http://127.0.0.1:8000/loading/htxg/resources/htxg-location.htxg?1';
+      'http://127.0.0.1:8000/loading/htxg/resources/htxg-location.sxg?1';
   const htxg2_url =
-      'http://127.0.0.1:8000/loading/htxg/resources/htxg-location.htxg?2';
+      'http://127.0.0.1:8000/loading/htxg/resources/htxg-location.sxg?2';
   addPrefetch(htxg1_url);
   addPrefetch(htxg2_url);
   await new Promise(resolve => {
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-expired.html b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-expired.html
index b74f8fa..e8ca389 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-expired.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-expired.html
@@ -8,7 +8,7 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test HTXG file is "Apr 1 2018 00:00 UTC" and valid
+  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
   // until "Apr 8 2018 00:00 UTC". So in Apr 10, the page load should fail.
   await setSignedExchangeVerificationTime(new Date("Apr 10 2018 00:01 UTC"));
 
@@ -17,7 +17,7 @@
     t.step_timeout(() => resolve(), 1000);
 
     const frame =
-        await withIframe('resources/htxg-location.htxg', 'htxg_iframe');
+        await withIframe('resources/htxg-location.sxg', 'htxg_iframe');
     const channel = new MessageChannel();
     channel.port1.onmessage = () => {
       reject('Page load should fail');
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-location-b1.html b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-location-b1.html
deleted file mode 100644
index ff00df53..0000000
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-location-b1.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<title>Location of SignedHTTPExchange</title>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<script src="./resources/htxg-util.js"></script>
-<body>
-<script>
-promise_test(async (t) => {
-  await waitUntilDidFinishLoadForFrame;
-
-  // The timestamp of the test .sxg file is "May 15 2018 00:00 UTC" and valid
-  // until "May 22 2018 00:00 UTC".
-  await setSignedExchangeVerificationTime(new Date("May 15 2018 00:01 UTC"));
-
-  const event = await new Promise(async (resolve, reject) => {
-    // We can't catch the network error on iframe. So we use the timer.
-    t.step_timeout(() => reject('timeout'), 1000);
-
-    const frame =
-        await withIframe('resources/htxg-location.sxg', 'htxg_iframe');
-    const channel = new MessageChannel();
-    channel.port1.onmessage = resolve;
-    frame.contentWindow.postMessage(
-        {port: channel.port2}, '*', [channel.port2]);
-  });
-  assert_equals(event.data.location, 'https://www.127.0.0.1/test.html');
-}, 'Location of SignedHTTPExchange');
-
-</script>
-</body>
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-location.html b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-location.html
index 859b4e7..8be17090 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-location.html
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/htxg-location.html
@@ -8,7 +8,7 @@
 promise_test(async (t) => {
   await waitUntilDidFinishLoadForFrame;
 
-  // The timestamp of the test HTXG file is "Apr 1 2018 00:00 UTC" and valid
+  // The timestamp of the test SXG file is "Apr 1 2018 00:00 UTC" and valid
   // until "Apr 8 2018 00:00 UTC".
   await setSignedExchangeVerificationTime(new Date("Apr 1 2018 00:01 UTC"));
 
@@ -17,7 +17,7 @@
     t.step_timeout(() => reject('timeout'), 1000);
 
     const frame =
-        await withIframe('resources/htxg-location.htxg', 'htxg_iframe');
+        await withIframe('resources/htxg-location.sxg', 'htxg_iframe');
     const channel = new MessageChannel();
     channel.port1.onmessage = resolve;
     frame.contentWindow.postMessage(
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/127.0.0.1.pem.cbor b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/127.0.0.1.pem.cbor
index 1d979b01..32eb8ad8 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/127.0.0.1.pem.cbor
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/127.0.0.1.pem.cbor
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/127.0.0.1.pem.msg b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/127.0.0.1.pem.msg
deleted file mode 100644
index b39c509..0000000
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/127.0.0.1.pem.msg
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/README.md b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/README.md
index 162d5d5..ee23a5fd 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/README.md
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/README.md
@@ -10,55 +10,22 @@
 [3]: https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html
 
 ```
-# Install gen-certurl command
-go get github.com/nyaxt/webpackage/go/signedexchange/cmd/gen-certurl
-
-# Install gen-signedexchange command
-go get github.com/nyaxt/webpackage/go/signedexchange/cmd/gen-signedexchange
-
-# Generate the certificate message file of "127.0.0.1.pem".
-gen-certurl  \
-  ../../../../../../../blink/tools/blinkpy/third_party/wpt/certs/127.0.0.1.pem \
-  > 127.0.0.1.pem.msg
-
-# Generate the signed exchange file.
-gen-signedexchange \
-  -uri https://www.127.0.0.1/test.html \
-  -status 200 \
-  -content htxg-location.html \
-  -certificate ../../../../../../../blink/tools/blinkpy/third_party/wpt/certs/127.0.0.1.pem \
-  -certUrl http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.msg \
-  -validityUrl http://localhost:8000/loading/htxg/resources/resource.validity.msg \
-  -privateKey ../../../../../../../blink/tools/blinkpy/third_party/wpt/certs/127.0.0.1.key \
-  -date 2018-04-01T00:00:00Z \
-  -expire 168h \
-  -o htxg-location.htxg \
-  -miRecordSize 100
-
-# Generate the signed exchange file which certificate file is not available.
-gen-signedexchange \
-  -uri https://www.127.0.0.1/not_found_cert.html \
-  -status 200 \
-  -content htxg-location.html \
-  -certificate ../../../../../../../blink/tools/blinkpy/third_party/wpt/certs/127.0.0.1.pem \
-  -certUrl http://localhost:8000/loading/htxg/resources/not_found_cert.pem.msg \
-  -validityUrl http://localhost:8000/loading/htxg/resources/not_found_cert.validity.msg \
-  -privateKey ../../../../../../../blink/tools/blinkpy/third_party/wpt/certs/127.0.0.1.key \
-  -date 2018-04-01T00:00:00Z \
-  -expire 168h \
-  -o htxg-cert-not-found.htxg \
-  -miRecordSize 100
-
-# Install gen-certurl command from the original WICG repository [1].
-# (Note: this overwrites gen-certurl fetched from [2] in the above.)
+# Install gen-certurl command from [1]
 go get github.com/WICG/webpackage/go/signedexchange/cmd/gen-certurl
 
-# Generate the certificate chain CBOR of "127.0.0.1.pem".
+# Install gen-signedexchange command from [2]
+go get github.com/nyaxt/webpackage/go/signedexchange/cmd/gen-signedexchange
+
+# Make dummy OCSP data for cbor certificate chains.
+echo -n OCSP >/tmp/ocsp
+
+# Generate the certificate chain of "127.0.0.1.pem".
 gen-certurl  \
   -pem ../../../../../../../blink/tools/blinkpy/third_party/wpt/certs/127.0.0.1.pem \
+  -ocsp /tmp/ocsp \
   > 127.0.0.1.pem.cbor
 
-# Generate the b1 version of signed exchange file.
+# Generate the signed exchange file.
 gen-signedexchange \
   -uri https://www.127.0.0.1/test.html \
   -status 200 \
@@ -67,8 +34,22 @@
   -certUrl http://localhost:8000/loading/htxg/resources/127.0.0.1.pem.cbor \
   -validityUrl http://localhost:8000/loading/htxg/resources/resource.validity.msg \
   -privateKey ../../../../../../../blink/tools/blinkpy/third_party/wpt/certs/127.0.0.1.key \
-  -date 2018-05-15T00:00:00Z \
+  -date 2018-04-01T00:00:00Z \
   -expire 168h \
   -o htxg-location.sxg \
   -miRecordSize 100
+
+# Generate the signed exchange file which certificate file is not available.
+gen-signedexchange \
+  -uri https://www.127.0.0.1/not_found_cert.html \
+  -status 200 \
+  -content htxg-location.html \
+  -certificate ../../../../../../../blink/tools/blinkpy/third_party/wpt/certs/127.0.0.1.pem \
+  -certUrl http://localhost:8000/loading/htxg/resources/not_found_cert.pem.cbor \
+  -validityUrl http://localhost:8000/loading/htxg/resources/not_found_cert.validity.msg \
+  -privateKey ../../../../../../../blink/tools/blinkpy/third_party/wpt/certs/127.0.0.1.key \
+  -date 2018-04-01T00:00:00Z \
+  -expire 168h \
+  -o htxg-cert-not-found.sxg \
+  -miRecordSize 100
 ```
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-cert-not-found.htxg b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-cert-not-found.htxg
deleted file mode 100644
index d769e74..0000000
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-cert-not-found.htxg
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-cert-not-found.sxg b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-cert-not-found.sxg
new file mode 100644
index 0000000..40278c2e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-cert-not-found.sxg
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location-origin-trial.php b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location-origin-trial.php
index 98168681..848c2ab6 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location-origin-trial.php
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location-origin-trial.php
@@ -2,8 +2,8 @@
 header('HTTP/1.0 200 OK');
 // generate_token.py http://127.0.0.1:8000 SignedHTTPExchange --expire-timestamp=2000000000
 header("Origin-Trial: AgeFm+W/+DvAEn/vDjtqgd5PQX73YxKJLGBwLp14SiMjKFNTEUK2Bx5R3gH23JOfP+IL2EGNj+x9uhzh2krVRgsAAABaeyJvcmlnaW4iOiAiaHR0cDovLzEyNy4wLjAuMTo4MDAwIiwgImZlYXR1cmUiOiAiU2lnbmVkSFRUUEV4Y2hhbmdlIiwgImV4cGlyeSI6IDIwMDAwMDAwMDB9");
-header("Content-Type: application/signed-exchange;v=b0");
-$name = 'htxg-location.htxg';
+header("Content-Type: application/signed-exchange;v=b1");
+$name = 'htxg-location.sxg';
 $fp = fopen($name, 'rb');
 header("Content-Length: " . filesize($name));
 fpassthru($fp);
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location.htxg b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location.htxg
deleted file mode 100644
index a84551e..0000000
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location.htxg
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location.sxg b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location.sxg
index c5783e6..9e361e91 100644
--- a/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location.sxg
+++ b/third_party/WebKit/LayoutTests/http/tests/loading/htxg/resources/htxg-location.sxg
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/request-end-to-end.html b/third_party/WebKit/LayoutTests/http/tests/serviceworker/request-end-to-end.html
index 9185e17..50d6f05 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/request-end-to-end.html
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/request-end-to-end.html
@@ -28,10 +28,6 @@
           assert_equals(result.method, 'GET', 'request.method');
           assert_equals(result.referrer, location.href, 'request.referrer');
           assert_equals(result.mode, 'navigate', 'request.mode');
-          assert_equals(result.request_construct_error, 'TypeError',
-                        'Constructing a Request with a Request whose mode ' +
-                        'is navigate and non-empty RequestInit must throw a ' +
-                        'TypeError.')
           assert_equals(result.credentials, 'include', 'request.credentials');
           assert_equals(result.redirect, 'manual', 'request.redirect');
           // TODO(falken): Chromium should fail this assertion but currently
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js
index 6bd2b72..1d5741d 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/request-end-to-end-worker.js
@@ -13,13 +13,6 @@
     append_header_error = error.name;
   }
 
-  var request_construct_error = '';
-  try {
-    new Request(e.request, {method: 'GET'});
-  } catch (error) {
-    request_construct_error = error.name;
-  }
-
   e.respondWith(new Response(JSON.stringify({
     url: e.request.url,
     method: e.request.method,
@@ -28,7 +21,6 @@
     mode: e.request.mode,
     credentials: e.request.credentials,
     redirect: e.request.redirect,
-    append_header_error: append_header_error,
-    request_construct_error: request_construct_error
+    append_header_error: append_header_error
   })));
 };
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/set-scrollbars-hidden-expected.txt b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/set-scrollbars-hidden-expected.txt
new file mode 100644
index 0000000..ceb91813
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/set-scrollbars-hidden-expected.txt
@@ -0,0 +1,3 @@
+Tests Emulation.setScrollbarsHidden.
+Scrollbar width = 0
+
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/emulation/set-scrollbars-hidden.js b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/set-scrollbars-hidden.js
new file mode 100644
index 0000000..36fc4bf
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/emulation/set-scrollbars-hidden.js
@@ -0,0 +1,11 @@
+(async function(testRunner) {
+  var {page, session, dp} = await testRunner.startBlank('Tests Emulation.setScrollbarsHidden.');
+  await dp.Emulation.setScrollbarsHidden({ hidden: true });
+  await session.navigate('../resources/set-scrollbars-hidden.html');
+  testRunner.log('Scrollbar width = ' + await session.evaluate(`
+    var outer = document.querySelector('.outer');
+    outer.scrollTop = 200;
+    outer.offsetWidth - outer.clientWidth
+  `));
+  testRunner.completeTest();
+})
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/resources/set-scrollbars-hidden.html b/third_party/WebKit/LayoutTests/inspector-protocol/resources/set-scrollbars-hidden.html
new file mode 100644
index 0000000..c7dab51
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/resources/set-scrollbars-hidden.html
@@ -0,0 +1,22 @@
+  <html>
+    <style>
+      html, body, div.outer {
+        margin: 0;
+        padding: 0;
+        height: 1000px;
+        overflow: hidden;
+      }
+      body {
+        padding-right: 20px;
+      }
+      div.outer {
+        overflow: auto !important;
+      }
+      div.inner {
+        height: 10000px;
+        width: 100%;
+        margin: 0;
+      }
+    </style>
+    <body><div class=outer><div class=inner></div></div></body>
+  </html>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/virtual/htxg-origin-trial-with-network-service/http/tests/loading/htxg/htxg-location-b1-expected.txt b/third_party/WebKit/LayoutTests/virtual/htxg-origin-trial-with-network-service/http/tests/loading/htxg/htxg-location-b1-expected.txt
deleted file mode 100644
index aa831eeb..0000000
--- a/third_party/WebKit/LayoutTests/virtual/htxg-origin-trial-with-network-service/http/tests/loading/htxg/htxg-location-b1-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-main frame - didStartProvisionalLoadForFrame
-main frame - didCommitLoadForFrame
-main frame - didReceiveTitle: Location of SignedHTTPExchange
-main frame - didFinishDocumentLoadForFrame
-main frame - didHandleOnloadEventsForFrame
-main frame - didFinishLoadForFrame
-frame "htxg_iframe" - didReceiveTitle: 
-frame "htxg_iframe" - didStartProvisionalLoadForFrame
-frame "htxg_iframe" - didFailProvisionalLoadWithError
-This is a testharness.js-based test.
-FAIL Location of SignedHTTPExchange promise_test: Unhandled rejection with value: "timeout"
-Harness: the test ran to completion.
-
diff --git a/third_party/WebKit/LayoutTests/virtual/htxg-origin-trial/http/tests/loading/htxg/htxg-location-b1-expected.txt b/third_party/WebKit/LayoutTests/virtual/htxg-origin-trial/http/tests/loading/htxg/htxg-location-b1-expected.txt
deleted file mode 100644
index aa831eeb..0000000
--- a/third_party/WebKit/LayoutTests/virtual/htxg-origin-trial/http/tests/loading/htxg/htxg-location-b1-expected.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-main frame - didStartProvisionalLoadForFrame
-main frame - didCommitLoadForFrame
-main frame - didReceiveTitle: Location of SignedHTTPExchange
-main frame - didFinishDocumentLoadForFrame
-main frame - didHandleOnloadEventsForFrame
-main frame - didFinishLoadForFrame
-frame "htxg_iframe" - didReceiveTitle: 
-frame "htxg_iframe" - didStartProvisionalLoadForFrame
-frame "htxg_iframe" - didFailProvisionalLoadWithError
-This is a testharness.js-based test.
-FAIL Location of SignedHTTPExchange promise_test: Unhandled rejection with value: "timeout"
-Harness: the test ran to completion.
-
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 112ad27..a1595fb 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -303,6 +303,12 @@
   // Returns a unique FrameSinkID for the current renderer process
   virtual viz::FrameSinkId GenerateFrameSinkId() { return viz::FrameSinkId(); }
 
+  // Returns whether this process is locked to a single site (i.e. a scheme
+  // plus eTLD+1, such as https://google.com), or to a more specific origin.
+  // This means the process will not be used to load documents or workers from
+  // URLs outside that site.
+  virtual bool IsLockedToSite() const { return false; }
+
   // Network -------------------------------------------------------------
 
   // Returns the platform's default URLLoaderFactory. It is expected that the
diff --git a/third_party/blink/public/web/web_history_item.h b/third_party/blink/public/web/web_history_item.h
index 1026017..a806e08 100644
--- a/third_party/blink/public/web/web_history_item.h
+++ b/third_party/blink/public/web/web_history_item.h
@@ -49,11 +49,6 @@
 template <typename T>
 class WebVector;
 
-enum WebHistoryLoadType {
-  kWebHistorySameDocumentLoad,
-  kWebHistoryDifferentDocumentLoad
-};
-
 // Represents a frame-level navigation entry in session history.  A
 // WebHistoryItem is a node in a tree.
 //
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index 52b3d9c4..1f72a82 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -212,7 +212,6 @@
       const WebURLRequest&,
       WebFrameLoadType,
       const WebHistoryItem&,
-      WebHistoryLoadType,
       bool is_client_redirect,
       const base::UnguessableToken& devtools_navigation_token) = 0;
 
@@ -251,7 +250,6 @@
                         bool replace = false,
                         WebFrameLoadType = WebFrameLoadType::kStandard,
                         const WebHistoryItem& = WebHistoryItem(),
-                        WebHistoryLoadType = kWebHistoryDifferentDocumentLoad,
                         bool is_client_redirect = false) = 0;
 
   // Returns the document loader that is currently loading.  May be null.
diff --git a/third_party/blink/renderer/bindings/core/v8/script_wrappable_marking_visitor_test.cc b/third_party/blink/renderer/bindings/core/v8/script_wrappable_marking_visitor_test.cc
index c1e27bf..353a374 100644
--- a/third_party/blink/renderer/bindings/core/v8/script_wrappable_marking_visitor_test.cc
+++ b/third_party/blink/renderer/bindings/core/v8/script_wrappable_marking_visitor_test.cc
@@ -169,7 +169,7 @@
           ->GetScriptWrappableMarkingVisitor();
   visitor->TracePrologue();
 
-  visitor->TraceWrappersWithManualWriteBarrier(object);
+  visitor->TraceWithWrappers(object);
 
   EXPECT_EQ(visitor->MarkingDeque()->front().RawObjectPointer(), object);
 
@@ -250,9 +250,6 @@
   void Trace(blink::Visitor* visitor) {
     visitor->Trace(handle_.Cast<v8::Value>());
   }
-  void TraceWrappers(ScriptWrappableVisitor* visitor) const override {
-    visitor->TraceWrappers(handle_.Cast<v8::Value>());
-  }
   const char* NameInHeapSnapshot() const override { return "HandleContainer"; }
 
   void SetValue(v8::Isolate* isolate, v8::Local<v8::String> string) {
@@ -455,10 +452,6 @@
 
   void Trace(Visitor* visitor) override { visitor->Trace(wrapper_in_mixin_); }
 
-  void TraceWrappers(ScriptWrappableVisitor* visitor) const {
-    visitor->TraceWrappers(wrapper_in_mixin_);
-  }
-
  protected:
   DeathAwareScriptWrappable::Wrapper wrapper_in_mixin_;
 };
@@ -485,11 +478,6 @@
     Mixin::Trace(visitor);
   }
 
-  void TraceWrappers(ScriptWrappableVisitor* visitor) const override {
-    visitor->TraceWrappers(wrapper_in_base_);
-    Mixin::TraceWrappers(visitor);
-  }
-
   const char* NameInHeapSnapshot() const override { return "HandleContainer"; }
 
  protected:
diff --git a/third_party/blink/renderer/bindings/core/v8/script_wrappable_visitor_test.cc b/third_party/blink/renderer/bindings/core/v8/script_wrappable_visitor_test.cc
index 9c32e7b..415b8a4 100644
--- a/third_party/blink/renderer/bindings/core/v8/script_wrappable_visitor_test.cc
+++ b/third_party/blink/renderer/bindings/core/v8/script_wrappable_visitor_test.cc
@@ -18,7 +18,7 @@
   void Visit(DOMWrapperMap<ScriptWrappable>*,
              const ScriptWrappable* key) override {}
 
-  void Visit(void*, TraceWrapperDescriptor desc) override {
+  void VisitWithWrappers(void*, TraceDescriptor desc) override {
     visited_objects_.push_back(desc.base_object_payload);
   }
 
@@ -66,8 +66,9 @@
   parent->SetWrappedDependency(child);
   {
     ExpectObjectsVisited expected(&verifying_visitor, {child});
-    TraceTrait<DeathAwareScriptWrappable>::TraceWrappers(&verifying_visitor,
-                                                         parent);
+    TraceDescriptor desc =
+        TraceTrait<DeathAwareScriptWrappable>::GetTraceDescriptor(parent);
+    desc.callback(&verifying_visitor, parent);
   }
 }
 
@@ -78,8 +79,9 @@
   parent->AddWrappedVectorDependency(child);
   {
     ExpectObjectsVisited expected(&verifying_visitor, {child});
-    TraceTrait<DeathAwareScriptWrappable>::TraceWrappers(&verifying_visitor,
-                                                         parent);
+    TraceDescriptor desc =
+        TraceTrait<DeathAwareScriptWrappable>::GetTraceDescriptor(parent);
+    desc.callback(&verifying_visitor, parent);
   }
 }
 
@@ -91,8 +93,9 @@
   parent->AddWrappedHashMapDependency(key, value);
   {
     ExpectObjectsVisited expected(&verifying_visitor, {key, value});
-    TraceTrait<DeathAwareScriptWrappable>::TraceWrappers(&verifying_visitor,
-                                                         parent);
+    TraceDescriptor desc =
+        TraceTrait<DeathAwareScriptWrappable>::GetTraceDescriptor(parent);
+    desc.callback(&verifying_visitor, parent);
   }
 }
 
@@ -103,8 +106,9 @@
   parent->AddInObjectDependency(child);
   {
     ExpectObjectsVisited expected(&verifying_visitor, {child});
-    TraceTrait<DeathAwareScriptWrappable>::TraceWrappers(&verifying_visitor,
-                                                         parent);
+    TraceDescriptor desc =
+        TraceTrait<DeathAwareScriptWrappable>::GetTraceDescriptor(parent);
+    desc.callback(&verifying_visitor, parent);
   }
 }
 
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc b/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc
index cf1d574..a548ab0c 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc
@@ -109,9 +109,9 @@
   DomTreeState dom_tree_state = DomTreeStateFromWrapper(class_id, v8_value);
   EmbedderNode* graph_node = GraphNode(
       traceable, traceable->NameInHeapSnapshot(), wrapper, dom_tree_state);
-  const TraceWrapperDescriptor& wrapper_descriptor =
-      TraceWrapperDescriptorFor<ScriptWrappable>(traceable);
-  WorklistItem item = ToWorklistItem(graph_node, wrapper_descriptor);
+  const TraceDescriptor& descriptor =
+      TraceDescriptorFor<ScriptWrappable>(traceable);
+  WorklistItem item = ToWorklistItem(graph_node, descriptor);
   switch (graph_node->GetDomTreeState()) {
     case DomTreeState::kAttached:
       PushToWorklist(item);
@@ -135,8 +135,9 @@
   }
 }
 
-void V8EmbedderGraphBuilder::Visit(void* object,
-                                   TraceWrapperDescriptor wrapper_descriptor) {
+void V8EmbedderGraphBuilder::VisitWithWrappers(
+    void* object,
+    TraceDescriptor wrapper_descriptor) {
   // Add an edge from the current parent to this object.
   // Also push the object to the worklist in order to process its members.
   const void* traceable = wrapper_descriptor.base_object_payload;
@@ -201,9 +202,8 @@
 
 V8EmbedderGraphBuilder::WorklistItem V8EmbedderGraphBuilder::ToWorklistItem(
     EmbedderNode* node,
-    const TraceWrapperDescriptor& wrapper_descriptor) const {
-  return {node, wrapper_descriptor.base_object_payload,
-          wrapper_descriptor.trace_wrappers_callback};
+    const TraceDescriptor& descriptor) const {
+  return {node, descriptor.base_object_payload, descriptor.callback};
 }
 
 void V8EmbedderGraphBuilder::PushToWorklist(WorklistItem item) const {
@@ -219,7 +219,7 @@
     auto item = worklist_.back();
     worklist_.pop_back();
     ParentScope parent(this, item.node);
-    item.trace_wrappers_callback(this, const_cast<void*>(item.traceable));
+    item.trace_callback(this, const_cast<void*>(item.traceable));
   }
 }
 
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.h b/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.h
index ed58b6e..79c4395 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.h
+++ b/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.h
@@ -28,7 +28,7 @@
 
   // Visitor overrides.
   void Visit(const TraceWrapperV8Reference<v8::Value>&) final;
-  void Visit(void*, TraceWrapperDescriptor) final;
+  void VisitWithWrappers(void*, TraceDescriptor) final;
   void Visit(DOMWrapperMap<ScriptWrappable>*, const ScriptWrappable*) final;
   void VisitBackingStoreStrongly(void* object,
                                  void** object_slot,
@@ -114,11 +114,10 @@
   struct WorklistItem {
     EmbedderNode* node;
     Traceable traceable;
-    TraceWrappersCallback trace_wrappers_callback;
+    TraceCallback trace_callback;
   };
 
-  WorklistItem ToWorklistItem(EmbedderNode*,
-                              const TraceWrapperDescriptor&) const;
+  WorklistItem ToWorklistItem(EmbedderNode*, const TraceDescriptor&) const;
 
   Graph::Node* GraphNode(const v8::Local<v8::Value>&) const;
   EmbedderNode* GraphNode(Traceable,
diff --git a/third_party/blink/renderer/core/dom/frame_request_callback_collection.h b/third_party/blink/renderer/core/dom/frame_request_callback_collection.h
index 595aeb5..f0fcfe0 100644
--- a/third_party/blink/renderer/core/dom/frame_request_callback_collection.h
+++ b/third_party/blink/renderer/core/dom/frame_request_callback_collection.h
@@ -15,8 +15,8 @@
 
 class ExecutionContext;
 
-class CORE_EXPORT FrameRequestCallbackCollection final
-    : public TraceWrapperBase {
+class GC_PLUGIN_IGNORE("crbug.com/841830")
+    CORE_EXPORT FrameRequestCallbackCollection final : public TraceWrapperBase {
   DISALLOW_NEW();
 
  public:
diff --git a/third_party/blink/renderer/core/editing/finder/text_finder.cc b/third_party/blink/renderer/core/editing/finder/text_finder.cc
index 83a38a0..cdef0fc6 100644
--- a/third_party/blink/renderer/core/editing/finder/text_finder.cc
+++ b/third_party/blink/renderer/core/editing/finder/text_finder.cc
@@ -55,6 +55,7 @@
 #include "third_party/blink/renderer/core/frame/settings.h"
 #include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
 #include "third_party/blink/renderer/core/layout/layout_object.h"
+#include "third_party/blink/renderer/core/layout/layout_view.h"
 #include "third_party/blink/renderer/core/layout/text_autosizer.h"
 #include "third_party/blink/renderer/core/page/page.h"
 #include "third_party/blink/renderer/platform/timer.h"
@@ -175,7 +176,7 @@
     if (!options.find_next)
       ClearFindMatchesCache();
 
-    OwnerFrame().GetFrameView()->InvalidatePaintForTickmarks();
+    InvalidatePaintForTickmarks();
     return false;
   }
   ScrollToVisible(active_match_);
@@ -347,7 +348,7 @@
   ResetActiveMatch();
 
   // Let the frame know that we don't want tickmarks anymore.
-  OwnerFrame().GetFrameView()->InvalidatePaintForTickmarks();
+  InvalidatePaintForTickmarks();
 }
 
 void TextFinder::ReportFindInPageResultToAccessibility(int identifier) {
@@ -570,7 +571,7 @@
   last_find_request_completed_with_no_matches_ = !last_match_count_;
 
   // This frame is done, so show any scrollbar tickmarks we haven't drawn yet.
-  OwnerFrame().GetFrameView()->InvalidatePaintForTickmarks();
+  InvalidatePaintForTickmarks();
 }
 
 void TextFinder::CancelPendingScopingEffort() {
@@ -894,13 +895,17 @@
 
   int i = last_match_count_ / kStartSlowingDownAfter;
   next_invalidate_after_ += i * kSlowdown;
-  OwnerFrame().GetFrameView()->InvalidatePaintForTickmarks();
+  InvalidatePaintForTickmarks();
 }
 
 void TextFinder::FlushCurrentScoping() {
   FlushCurrentScopingEffort(find_request_identifier_);
 }
 
+void TextFinder::InvalidatePaintForTickmarks() {
+  OwnerFrame().GetFrame()->ContentLayoutObject()->InvalidatePaintForTickmarks();
+}
+
 void TextFinder::Trace(blink::Visitor* visitor) {
   visitor->Trace(owner_frame_);
   visitor->Trace(active_match_);
diff --git a/third_party/blink/renderer/core/editing/finder/text_finder.h b/third_party/blink/renderer/core/editing/finder/text_finder.h
index 27c1d94..1ae14d99 100644
--- a/third_party/blink/renderer/core/editing/finder/text_finder.h
+++ b/third_party/blink/renderer/core/editing/finder/text_finder.h
@@ -202,6 +202,10 @@
   // Determines whether to invalidate the content area and scrollbar.
   void InvalidateIfNecessary();
 
+  // Issues a paint invalidation on the layout viewport's vertical scrollbar,
+  // which is responsible for painting the tickmarks.
+  void InvalidatePaintForTickmarks();
+
   LocalFrame* GetFrame() const;
 
   WebLocalFrameImpl& OwnerFrame() const {
diff --git a/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc b/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc
index b30fd72..1d327f8 100644
--- a/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc
+++ b/third_party/blink/renderer/core/editing/markers/document_marker_controller.cc
@@ -49,8 +49,8 @@
 #include "third_party/blink/renderer/core/editing/markers/text_match_marker.h"
 #include "third_party/blink/renderer/core/editing/markers/text_match_marker_list_impl.h"
 #include "third_party/blink/renderer/core/editing/visible_units.h"
-#include "third_party/blink/renderer/core/frame/local_frame_view.h"
 #include "third_party/blink/renderer/core/layout/layout_object.h"
+#include "third_party/blink/renderer/core/layout/layout_view.h"
 
 #ifndef NDEBUG
 #include <stdio.h>
@@ -553,8 +553,8 @@
 }
 
 static void InvalidatePaintForTickmarks(const Node& node) {
-  if (LocalFrameView* frame_view = node.GetDocument().View())
-    frame_view->InvalidatePaintForTickmarks();
+  if (LayoutView* layout_view = node.GetDocument().GetLayoutView())
+    layout_view->InvalidatePaintForTickmarks();
 }
 
 void DocumentMarkerController::InvalidateRectsForTextMatchMarkersInNode(
diff --git a/third_party/blink/renderer/core/exported/web_frame_test.cc b/third_party/blink/renderer/core/exported/web_frame_test.cc
index 6f81093..3c8eeb06 100644
--- a/third_party/blink/renderer/core/exported/web_frame_test.cc
+++ b/third_party/blink/renderer/core/exported/web_frame_test.cc
@@ -5376,9 +5376,9 @@
 
   // Get the tickmarks for the original find request.
   LocalFrameView* frame_view = web_view_helper.LocalMainFrame()->GetFrameView();
-  Scrollbar* scrollbar = frame_view->CreateScrollbar(kHorizontalScrollbar);
+  ScrollableArea* layout_viewport = frame_view->LayoutViewportScrollableArea();
   Vector<IntRect> original_tickmarks;
-  scrollbar->GetTickmarks(original_tickmarks);
+  layout_viewport->GetTickmarks(original_tickmarks);
   EXPECT_EQ(4u, original_tickmarks.size());
 
   // Override the tickmarks.
@@ -5390,7 +5390,7 @@
 
   // Check the tickmarks are overriden correctly.
   Vector<IntRect> overriding_tickmarks_actual;
-  scrollbar->GetTickmarks(overriding_tickmarks_actual);
+  layout_viewport->GetTickmarks(overriding_tickmarks_actual);
   EXPECT_EQ(overriding_tickmarks_expected, overriding_tickmarks_actual);
 
   // Reset the tickmark behavior.
@@ -5399,7 +5399,7 @@
 
   // Check that the original tickmarks are returned
   Vector<IntRect> original_tickmarks_after_reset;
-  scrollbar->GetTickmarks(original_tickmarks_after_reset);
+  layout_viewport->GetTickmarks(original_tickmarks_after_reset);
   EXPECT_EQ(original_tickmarks, original_tickmarks_after_reset);
 }
 
@@ -6911,7 +6911,6 @@
   Platform::Current()->GetURLLoaderMockFactory()->RegisterErrorURL(
       URLTestHelpers::ToKURL(error_url), response, error);
   FrameTestHelpers::LoadHistoryItem(frame, error_history_item,
-                                    kWebHistoryDifferentDocumentLoad,
                                     mojom::FetchCacheMode::kDefault);
   WebString text = WebFrameContentDumper::DumpWebViewAsText(
       web_view_helper.GetWebView(), std::numeric_limits<size_t>::max());
@@ -7725,7 +7724,6 @@
             main_frame_loader.GetDocumentLoader()->GetHistoryItem());
 
   FrameTestHelpers::LoadHistoryItem(frame, WebHistoryItem(first_item.Get()),
-                                    kWebHistoryDifferentDocumentLoad,
                                     mojom::FetchCacheMode::kDefault);
   EXPECT_EQ(first_item.Get(),
             main_frame_loader.GetDocumentLoader()->GetHistoryItem());
@@ -7758,8 +7756,7 @@
   ResourceRequest request =
       history_item->GenerateResourceRequest(mojom::FetchCacheMode::kDefault);
   main_frame->CommitNavigation(WrappedResourceRequest(request),
-                               WebFrameLoadType::kBackForward, item,
-                               kWebHistoryDifferentDocumentLoad, false,
+                               WebFrameLoadType::kBackForward, item, false,
                                base::UnguessableToken::Create());
 
   FrameTestHelpers::ReloadFrame(child_frame);
@@ -7809,7 +7806,6 @@
 
   // Cache policy overrides should take.
   FrameTestHelpers::LoadHistoryItem(frame, WebHistoryItem(first_item),
-                                    kWebHistoryDifferentDocumentLoad,
                                     mojom::FetchCacheMode::kValidateCache);
   EXPECT_EQ(first_item.Get(),
             main_frame_loader.GetDocumentLoader()->GetHistoryItem());
@@ -8141,10 +8137,9 @@
 
   ToLocalFrame(web_view_impl->GetPage()->MainFrame())
       ->Loader()
-      .CommitNavigation(
-          FrameLoadRequest(nullptr, item->GenerateResourceRequest(
-                                        mojom::FetchCacheMode::kDefault)),
-          kFrameLoadTypeBackForward, item.Get(), kHistorySameDocumentLoad);
+      .CommitSameDocumentNavigation(
+          item->Url(), kFrameLoadTypeBackForward, item.Get(),
+          ClientRedirectPolicy::kNotClientRedirect, nullptr, nullptr);
   EXPECT_EQ(kWebBackForwardCommit, client.LastCommitType());
 }
 
@@ -11787,9 +11782,8 @@
   RunPendingTasks();
 
   // Get the tickmarks for the original find request.
-  Scrollbar* scrollbar = frame_view->CreateScrollbar(kVerticalScrollbar);
   Vector<IntRect> original_tickmarks;
-  scrollbar->GetTickmarks(original_tickmarks);
+  frame_view->LayoutViewportScrollableArea()->GetTickmarks(original_tickmarks);
   EXPECT_EQ(1u, original_tickmarks.size());
 
   EXPECT_EQ(IntPoint(800, 2000), original_tickmarks[0].Location());
diff --git a/third_party/blink/renderer/core/exported/web_settings_impl.cc b/third_party/blink/renderer/core/exported/web_settings_impl.cc
index d9038b63b..bf3a8f8 100644
--- a/third_party/blink/renderer/core/exported/web_settings_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_settings_impl.cc
@@ -483,7 +483,7 @@
 }
 
 void WebSettingsImpl::SetHideScrollbars(bool enabled) {
-  settings_->SetHideScrollbars(enabled);
+  dev_tools_emulator_->SetHideScrollbars(enabled);
 }
 
 void WebSettingsImpl::SetMockGestureTapHighlightsEnabled(bool enabled) {
diff --git a/third_party/blink/renderer/core/exported/web_view_test.cc b/third_party/blink/renderer/core/exported/web_view_test.cc
index 80868fe..f68d6df 100644
--- a/third_party/blink/renderer/core/exported/web_view_test.cc
+++ b/third_party/blink/renderer/core/exported/web_view_test.cc
@@ -2265,18 +2265,15 @@
       main_frame_local->Loader().GetDocumentLoader()->GetHistoryItem();
 
   // Go back, then forward, then back again.
-  main_frame_local->Loader().CommitNavigation(
-      FrameLoadRequest(nullptr, item1->GenerateResourceRequest(
-                                    mojom::FetchCacheMode::kDefault)),
-      kFrameLoadTypeBackForward, item1.Get(), kHistorySameDocumentLoad);
-  main_frame_local->Loader().CommitNavigation(
-      FrameLoadRequest(nullptr, item2->GenerateResourceRequest(
-                                    mojom::FetchCacheMode::kDefault)),
-      kFrameLoadTypeBackForward, item2.Get(), kHistorySameDocumentLoad);
-  main_frame_local->Loader().CommitNavigation(
-      FrameLoadRequest(nullptr, item1->GenerateResourceRequest(
-                                    mojom::FetchCacheMode::kDefault)),
-      kFrameLoadTypeBackForward, item1.Get(), kHistorySameDocumentLoad);
+  main_frame_local->Loader().CommitSameDocumentNavigation(
+      item1->Url(), kFrameLoadTypeBackForward, item1.Get(),
+      ClientRedirectPolicy::kNotClientRedirect, nullptr, nullptr);
+  main_frame_local->Loader().CommitSameDocumentNavigation(
+      item2->Url(), kFrameLoadTypeBackForward, item2.Get(),
+      ClientRedirectPolicy::kNotClientRedirect, nullptr, nullptr);
+  main_frame_local->Loader().CommitSameDocumentNavigation(
+      item1->Url(), kFrameLoadTypeBackForward, item1.Get(),
+      ClientRedirectPolicy::kNotClientRedirect, nullptr, nullptr);
 
   // Click a different anchor
   main_frame_local->Loader().StartNavigation(FrameLoadRequest(
@@ -2287,14 +2284,12 @@
 
   // Go back, then forward. The scroll position should be properly set on the
   // forward navigation.
-  main_frame_local->Loader().CommitNavigation(
-      FrameLoadRequest(nullptr, item1->GenerateResourceRequest(
-                                    mojom::FetchCacheMode::kDefault)),
-      kFrameLoadTypeBackForward, item1.Get(), kHistorySameDocumentLoad);
-  main_frame_local->Loader().CommitNavigation(
-      FrameLoadRequest(nullptr, item3->GenerateResourceRequest(
-                                    mojom::FetchCacheMode::kDefault)),
-      kFrameLoadTypeBackForward, item3.Get(), kHistorySameDocumentLoad);
+  main_frame_local->Loader().CommitSameDocumentNavigation(
+      item1->Url(), kFrameLoadTypeBackForward, item1.Get(),
+      ClientRedirectPolicy::kNotClientRedirect, nullptr, nullptr);
+  main_frame_local->Loader().CommitSameDocumentNavigation(
+      item3->Url(), kFrameLoadTypeBackForward, item3.Get(),
+      ClientRedirectPolicy::kNotClientRedirect, nullptr, nullptr);
   EXPECT_EQ(0, web_view_impl->MainFrameImpl()->GetScrollOffset().width);
   EXPECT_GT(web_view_impl->MainFrameImpl()->GetScrollOffset().height, 2000);
 }
diff --git a/third_party/blink/renderer/core/fetch/request.cc b/third_party/blink/renderer/core/fetch/request.cc
index a966276..f5980e2 100644
--- a/third_party/blink/renderer/core/fetch/request.cc
+++ b/third_party/blink/renderer/core/fetch/request.cc
@@ -162,18 +162,15 @@
     // - "Set |fallbackCredentials| to "omit"."
   }
 
-  // "If any of |init|'s members are present, run these substeps:"
+  // "If any of |init|'s members are present, then:"
   if (init.AreAnyMembersSet()) {
-    // "If |request|'s |mode| is "navigate", throw a TypeError."
-    if (request->Mode() == network::mojom::FetchRequestMode::kNavigate) {
-      exception_state.ThrowTypeError(
-          "Cannot construct a Request with a Request whose mode is 'navigate' "
-          "and a non-empty RequestInit.");
-      return nullptr;
-    }
+    // "If |request|'s |mode| is "navigate", then set it to "same-origin".
+    if (request->Mode() == network::mojom::FetchRequestMode::kNavigate)
+      request->SetMode(network::mojom::FetchRequestMode::kSameOrigin);
 
     // TODO(yhirano): Implement the following substep:
-    //   "Unset |request|'s omit-Origin-header flag."
+    // "Unset |request|'s reload-navigation flag."
+    // "Unset |request|'s history-navigation flag."
 
     // The substep "Set |request|'s referrer to "client"." is performed by
     // the code below as follows:
diff --git a/third_party/blink/renderer/core/frame/find_in_page.cc b/third_party/blink/renderer/core/frame/find_in_page.cc
index 355066b..f189e147 100644
--- a/third_party/blink/renderer/core/frame/find_in_page.cc
+++ b/third_party/blink/renderer/core/frame/find_in_page.cc
@@ -37,6 +37,7 @@
 #include "third_party/blink/public/web/web_plugin_document.h"
 #include "third_party/blink/renderer/core/editing/finder/text_finder.h"
 #include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
+#include "third_party/blink/renderer/core/layout/layout_view.h"
 
 namespace blink {
 
@@ -230,11 +231,11 @@
 }
 
 void FindInPage::SetTickmarks(const WebVector<WebRect>& tickmarks) {
-  if (frame_->GetFrameView()) {
+  if (LayoutView* layout_view = frame_->GetFrame()->ContentLayoutObject()) {
     Vector<IntRect> tickmarks_converted(tickmarks.size());
     for (size_t i = 0; i < tickmarks.size(); ++i)
       tickmarks_converted[i] = tickmarks[i];
-    frame_->GetFrameView()->SetTickmarks(tickmarks_converted);
+    layout_view->OverrideTickmarks(tickmarks_converted);
   }
 }
 
diff --git a/third_party/blink/renderer/core/frame/frame_test_helpers.cc b/third_party/blink/renderer/core/frame/frame_test_helpers.cc
index 2ae3aa4..db80576 100644
--- a/third_party/blink/renderer/core/frame/frame_test_helpers.cc
+++ b/third_party/blink/renderer/core/frame/frame_test_helpers.cc
@@ -106,8 +106,7 @@
   } else {
     frame->CommitNavigation(
         WebURLRequest(web_url), blink::WebFrameLoadType::kStandard,
-        blink::WebHistoryItem(), blink::kWebHistoryDifferentDocumentLoad, false,
-        base::UnguessableToken::Create());
+        blink::WebHistoryItem(), false, base::UnguessableToken::Create());
   }
   PumpPendingRequestsForFrameToLoad(frame);
 }
@@ -121,12 +120,11 @@
 
 void LoadHistoryItem(WebLocalFrame* frame,
                      const WebHistoryItem& item,
-                     WebHistoryLoadType load_type,
                      mojom::FetchCacheMode cache_mode) {
   HistoryItem* history_item = item;
   frame->CommitNavigation(
       WrappedResourceRequest(history_item->GenerateResourceRequest(cache_mode)),
-      WebFrameLoadType::kBackForward, item, kWebHistoryDifferentDocumentLoad,
+      WebFrameLoadType::kBackForward, item,
       /*is_client_redirect=*/false, base::UnguessableToken::Create());
   PumpPendingRequestsForFrameToLoad(frame);
 }
diff --git a/third_party/blink/renderer/core/frame/frame_test_helpers.h b/third_party/blink/renderer/core/frame/frame_test_helpers.h
index d0bfe90..73a070f 100644
--- a/third_party/blink/renderer/core/frame/frame_test_helpers.h
+++ b/third_party/blink/renderer/core/frame/frame_test_helpers.h
@@ -101,7 +101,6 @@
 // Same as above, but for WebLocalFrame::RequestFromHistoryItem/Load.
 void LoadHistoryItem(WebLocalFrame*,
                      const WebHistoryItem&,
-                     WebHistoryLoadType,
                      mojom::FetchCacheMode);
 // Same as above, but for WebLocalFrame::Reload().
 void ReloadFrame(WebLocalFrame*);
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.cc b/third_party/blink/renderer/core/frame/local_frame_view.cc
index edfd701..52bfafee 100644
--- a/third_party/blink/renderer/core/frame/local_frame_view.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_view.cc
@@ -2478,25 +2478,6 @@
   return page && page->GetFocusController().IsActive();
 }
 
-void LocalFrameView::InvalidatePaintForTickmarks() {
-  ScrollableArea* scrollable_area = LayoutViewportScrollableArea();
-  if (!scrollable_area)
-    return;
-  if (Scrollbar* scrollbar = scrollable_area->VerticalScrollbar()) {
-    scrollbar->SetNeedsPaintInvalidation(
-        static_cast<ScrollbarPart>(~kThumbPart));
-  }
-}
-
-void LocalFrameView::GetTickmarks(Vector<IntRect>& tickmarks) const {
-  if (!tickmarks_.IsEmpty()) {
-    tickmarks = tickmarks_;
-    return;
-  }
-  tickmarks =
-      GetFrame().GetDocument()->Markers().LayoutRectsForTextMatchMarkers();
-}
-
 void LocalFrameView::SetInputEventsScaleForEmulation(
     float content_scale_factor) {
   input_events_scale_factor_for_emulation_ = content_scale_factor;
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.h b/third_party/blink/renderer/core/frame/local_frame_view.h
index 54a8a6c..c42c96b 100644
--- a/third_party/blink/renderer/core/frame/local_frame_view.h
+++ b/third_party/blink/renderer/core/frame/local_frame_view.h
@@ -464,20 +464,9 @@
   // returns false.
   bool IsSubtreeLayout() const { return !layout_subtree_root_list_.IsEmpty(); }
 
-  // Sets the tickmarks for the LocalFrameView, overriding the default behavior
-  // which is to display the tickmarks corresponding to find results.
-  // If |m_tickmarks| is empty, the default behavior is restored.
-  void SetTickmarks(const Vector<IntRect>& tickmarks) {
-    tickmarks_ = tickmarks;
-    InvalidatePaintForTickmarks();
-  }
-
-  void InvalidatePaintForTickmarks();
-
   IntSize MaximumScrollOffsetInt() const override;
 
   // ScrollableArea interface
-  void GetTickmarks(Vector<IntRect>&) const override;
   IntRect ScrollableAreaBoundingBox() const override;
   CompositorElementId GetCompositorElementId() const override;
   bool ScrollAnimatorEnabled() const override;
@@ -1161,8 +1150,6 @@
 
   TaskRunnerTimer<LocalFrameView> did_scroll_timer_;
 
-  Vector<IntRect> tickmarks_;
-
   bool needs_update_geometries_;
 
 #if DCHECK_IS_ON()
diff --git a/third_party/blink/renderer/core/frame/visual_viewport_test.cc b/third_party/blink/renderer/core/frame/visual_viewport_test.cc
index 297eb88e..815718d 100644
--- a/third_party/blink/renderer/core/frame/visual_viewport_test.cc
+++ b/third_party/blink/renderer/core/frame/visual_viewport_test.cc
@@ -866,7 +866,6 @@
   item.SetPageScaleFactor(2);
 
   FrameTestHelpers::LoadHistoryItem(WebView()->MainFrameImpl(), item,
-                                    kWebHistoryDifferentDocumentLoad,
                                     mojom::FetchCacheMode::kDefault);
 
   VisualViewport& visual_viewport = GetFrame()->GetPage()->GetVisualViewport();
@@ -897,7 +896,6 @@
   item.SetPageScaleFactor(2);
 
   FrameTestHelpers::LoadHistoryItem(WebView()->MainFrameImpl(), item,
-                                    kWebHistoryDifferentDocumentLoad,
                                     mojom::FetchCacheMode::kDefault);
 
   VisualViewport& visual_viewport = GetFrame()->GetPage()->GetVisualViewport();
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index 8cdc10b1..f0fe55d 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
@@ -944,7 +944,7 @@
   DCHECK(GetFrame());
   LoadData(data, WebString::FromUTF8("text/html"), WebString::FromUTF8("UTF-8"),
            base_url, unreachable_url, replace, WebFrameLoadType::kStandard,
-           WebHistoryItem(), kWebHistoryDifferentDocumentLoad, false);
+           WebHistoryItem(), false);
 }
 
 void WebLocalFrameImpl::StopLoading() {
@@ -2030,7 +2030,6 @@
     const WebURLRequest& request,
     WebFrameLoadType web_frame_load_type,
     const WebHistoryItem& item,
-    WebHistoryLoadType web_history_load_type,
     bool is_client_redirect,
     const base::UnguessableToken& devtools_navigation_token) {
   DCHECK(GetFrame());
@@ -2049,7 +2048,7 @@
   HistoryItem* history_item = item;
   GetFrame()->Loader().CommitNavigation(
       frame_request, static_cast<FrameLoadType>(web_frame_load_type),
-      history_item, static_cast<HistoryLoadType>(web_history_load_type));
+      history_item);
 }
 
 blink::mojom::CommitResult WebLocalFrameImpl::CommitSameDocumentNavigation(
@@ -2114,7 +2113,6 @@
                                  bool replace,
                                  WebFrameLoadType web_frame_load_type,
                                  const WebHistoryItem& item,
-                                 WebHistoryLoadType web_history_load_type,
                                  bool is_client_redirect) {
   DCHECK(GetFrame());
 
@@ -2152,7 +2150,7 @@
 
   GetFrame()->Loader().CommitNavigation(
       frame_request, static_cast<FrameLoadType>(web_frame_load_type),
-      history_item, static_cast<HistoryLoadType>(web_history_load_type));
+      history_item);
 }
 
 WebLocalFrame::FallbackContentResult
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
index 13ce1c387..fec6d4a 100644
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
@@ -261,7 +261,6 @@
       const WebURLRequest&,
       WebFrameLoadType,
       const WebHistoryItem&,
-      WebHistoryLoadType,
       bool is_client_redirect,
       const base::UnguessableToken& devtools_navigation_token) override;
   blink::mojom::CommitResult CommitSameDocumentNavigation(
@@ -278,7 +277,6 @@
                 bool replace,
                 WebFrameLoadType,
                 const WebHistoryItem&,
-                WebHistoryLoadType,
                 bool is_client_redirect) override;
   FallbackContentResult MaybeRenderFallbackContent(
       const WebURLError&) const override;
diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_party/blink/renderer/core/html/html_image_element.cc
index 1e4e926..0a90c529 100644
--- a/third_party/blink/renderer/core/html/html_image_element.cc
+++ b/third_party/blink/renderer/core/html/html_image_element.cc
@@ -752,7 +752,7 @@
   // appropriate for |m_layoutDisposition|. Force recreate it.
   // TODO(engedy): Remove this hack. See: https://crbug.com/671953.
   SetLayoutDisposition(LayoutDisposition::kFallbackContent,
-                       true /* forceReattach */);
+                       true /* force_reattach */);
 }
 
 void HTMLImageElement::EnsureCollapsedOrFallbackContent() {
@@ -781,19 +781,15 @@
   if (layout_disposition_ == layout_disposition && !force_reattach)
     return;
 
+  DCHECK(!GetDocument().InStyleRecalc());
+
   layout_disposition_ = layout_disposition;
 
-  if (GetDocument().InStyleRecalc()) {
-    // This can happen inside of AttachLayoutTree() in the middle of a
-    // RebuildLayoutTree, so we need to reattach synchronously here.
-    ReattachLayoutTree(SyncReattachContext::CurrentAttachContext());
-  } else {
-    if (layout_disposition_ == LayoutDisposition::kFallbackContent) {
-      EventDispatchForbiddenScope::AllowUserAgentEvents allow_events;
-      EnsureUserAgentShadowRoot();
-    }
-    LazyReattachIfAttached();
+  if (layout_disposition_ == LayoutDisposition::kFallbackContent) {
+    EventDispatchForbiddenScope::AllowUserAgentEvents allow_events;
+    EnsureUserAgentShadowRoot();
   }
+  LazyReattachIfAttached();
 }
 
 scoped_refptr<ComputedStyle> HTMLImageElement::CustomStyleForLayoutObject() {
diff --git a/third_party/blink/renderer/core/inspector/browser_protocol.pdl b/third_party/blink/renderer/core/inspector/browser_protocol.pdl
index 4d057b3..9e05e09 100644
--- a/third_party/blink/renderer/core/inspector/browser_protocol.pdl
+++ b/third_party/blink/renderer/core/inspector/browser_protocol.pdl
@@ -2321,6 +2321,11 @@
       # change is not observed by the page, e.g. viewport-relative elements do not change positions.
       experimental optional Page.Viewport viewport
 
+  experimental command setScrollbarsHidden
+    parameters
+      # Whether scrollbars should be always hidden.
+      boolean hidden
+
   experimental command setEmitTouchEventsForMouse
     parameters
       # Whether touch emulation based on mouse input should be enabled.
diff --git a/third_party/blink/renderer/core/inspector/dev_tools_emulator.cc b/third_party/blink/renderer/core/inspector/dev_tools_emulator.cc
index 52c6aed..15cec1db 100644
--- a/third_party/blink/renderer/core/inspector/dev_tools_emulator.cc
+++ b/third_party/blink/renderer/core/inspector/dev_tools_emulator.cc
@@ -100,7 +100,10 @@
       original_max_touch_points_(0),
       embedder_script_enabled_(
           web_view->GetPage()->GetSettings().GetScriptEnabled()),
-      script_execution_disabled_(false) {}
+      script_execution_disabled_(false),
+      embedder_hide_scrollbars_(
+          web_view->GetPage()->GetSettings().GetHideScrollbars()),
+      scrollbars_hidden_(false) {}
 
 DevToolsEmulator::~DevToolsEmulator() = default;
 
@@ -163,6 +166,12 @@
     web_view_->GetPage()->GetSettings().SetScriptEnabled(enabled);
 }
 
+void DevToolsEmulator::SetHideScrollbars(bool hide) {
+  embedder_hide_scrollbars_ = hide;
+  if (!scrollbars_hidden_)
+    web_view_->GetPage()->GetSettings().SetHideScrollbars(hide);
+}
+
 void DevToolsEmulator::SetDoubleTapToZoomEnabled(bool enabled) {
   double_tap_to_zoom_enabled_ = enabled;
 }
@@ -501,4 +510,12 @@
       script_execution_disabled_ ? false : embedder_script_enabled_);
 }
 
+void DevToolsEmulator::SetScrollbarsHidden(bool hidden) {
+  if (scrollbars_hidden_ == hidden)
+    return;
+  scrollbars_hidden_ = hidden;
+  web_view_->GetPage()->GetSettings().SetHideScrollbars(
+      scrollbars_hidden_ ? true : embedder_hide_scrollbars_);
+}
+
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/inspector/dev_tools_emulator.h b/third_party/blink/renderer/core/inspector/dev_tools_emulator.h
index 898f6a58..4b46bfa 100644
--- a/third_party/blink/renderer/core/inspector/dev_tools_emulator.h
+++ b/third_party/blink/renderer/core/inspector/dev_tools_emulator.h
@@ -35,6 +35,7 @@
   void SetViewportStyle(WebViewportStyle);
   void SetPluginsEnabled(bool);
   void SetScriptEnabled(bool);
+  void SetHideScrollbars(bool);
   void SetDoubleTapToZoomEnabled(bool);
   bool DoubleTapToZoomEnabled() const;
   void SetAvailablePointerTypes(int);
@@ -52,6 +53,7 @@
   bool ResizeIsDeviceSizeChange();
   void SetTouchEventEmulationEnabled(bool, int max_touch_points);
   void SetScriptExecutionDisabled(bool);
+  void SetScrollbarsHidden(bool);
 
   // Notify the DevToolsEmulator about a scroll or scale change of the main
   // frame. Updates the transform for a viewport override.
@@ -112,6 +114,9 @@
 
   bool embedder_script_enabled_;
   bool script_execution_disabled_;
+
+  bool embedder_hide_scrollbars_;
+  bool scrollbars_hidden_;
 };
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc b/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc
index fba2e2bb5..53b520a 100644
--- a/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc
+++ b/third_party/blink/renderer/core/inspector/inspector_emulation_agent.cc
@@ -28,6 +28,7 @@
 
 namespace EmulationAgentState {
 static const char kScriptExecutionDisabled[] = "scriptExecutionDisabled";
+static const char kScrollbarsHidden[] = "scrollbarsHidden";
 static const char kTouchEventEmulationEnabled[] = "touchEventEmulationEnabled";
 static const char kMaxTouchPoints[] = "maxTouchPoints";
 static const char kEmulatedMedia[] = "emulatedMedia";
@@ -71,8 +72,12 @@
     return;
 
   // Following code only runs for pages.
-  setScriptExecutionDisabled(state_->booleanProperty(
-      EmulationAgentState::kScriptExecutionDisabled, false));
+  if (state_->booleanProperty(EmulationAgentState::kScriptExecutionDisabled,
+                              false)) {
+    GetWebViewImpl()->GetDevToolsEmulator()->SetScriptExecutionDisabled(true);
+  }
+  if (state_->booleanProperty(EmulationAgentState::kScrollbarsHidden, false))
+    GetWebViewImpl()->GetDevToolsEmulator()->SetScrollbarsHidden(true);
   setTouchEmulationEnabled(
       state_->booleanProperty(EmulationAgentState::kTouchEventEmulationEnabled,
                               false),
@@ -151,6 +156,7 @@
   if (enabled_)
     instrumenting_agents_->removeInspectorEmulationAgent(this);
   setScriptExecutionDisabled(false);
+  setScrollbarsHidden(false);
   setTouchEmulationEnabled(false, Maybe<int>());
   setEmulatedMedia(String());
   setCPUThrottlingRate(1);
@@ -185,11 +191,28 @@
   Response response = AssertPage();
   if (!response.isSuccess())
     return response;
+  if (state_->booleanProperty(EmulationAgentState::kScriptExecutionDisabled,
+                              false) == value) {
+    return response;
+  }
   state_->setBoolean(EmulationAgentState::kScriptExecutionDisabled, value);
   GetWebViewImpl()->GetDevToolsEmulator()->SetScriptExecutionDisabled(value);
   return response;
 }
 
+Response InspectorEmulationAgent::setScrollbarsHidden(bool hidden) {
+  Response response = AssertPage();
+  if (!response.isSuccess())
+    return response;
+  if (state_->booleanProperty(EmulationAgentState::kScrollbarsHidden, false) ==
+      hidden) {
+    return response;
+  }
+  state_->setBoolean(EmulationAgentState::kScrollbarsHidden, hidden);
+  GetWebViewImpl()->GetDevToolsEmulator()->SetScrollbarsHidden(hidden);
+  return response;
+}
+
 Response InspectorEmulationAgent::setTouchEmulationEnabled(
     bool enabled,
     protocol::Maybe<int> max_touch_points) {
diff --git a/third_party/blink/renderer/core/inspector/inspector_emulation_agent.h b/third_party/blink/renderer/core/inspector/inspector_emulation_agent.h
index 742e7100..4beb255 100644
--- a/third_party/blink/renderer/core/inspector/inspector_emulation_agent.h
+++ b/third_party/blink/renderer/core/inspector/inspector_emulation_agent.h
@@ -42,6 +42,7 @@
   protocol::Response resetPageScaleFactor() override;
   protocol::Response setPageScaleFactor(double) override;
   protocol::Response setScriptExecutionDisabled(bool value) override;
+  protocol::Response setScrollbarsHidden(bool hidden) override;
   protocol::Response setTouchEmulationEnabled(
       bool enabled,
       protocol::Maybe<int> max_touch_points) override;
diff --git a/third_party/blink/renderer/core/inspector/inspector_protocol_config.json b/third_party/blink/renderer/core/inspector/inspector_protocol_config.json
index 5d2c22e..e7dda8d2 100644
--- a/third_party/blink/renderer/core/inspector/inspector_protocol_config.json
+++ b/third_party/blink/renderer/core/inspector/inspector_protocol_config.json
@@ -90,7 +90,7 @@
                 "domain": "Emulation",
                 "include": ["forceViewport", "resetViewport", "resetPageScaleFactor", "setPageScaleFactor", "setScriptExecutionDisabled", "setTouchEmulationEnabled",
                             "setEmulatedMedia", "setCPUThrottlingRate", "setVirtualTimePolicy", "setNavigatorOverrides", "setDefaultBackgroundColorOverride", "setDeviceMetricsOverride", "clearDeviceMetricsOverride",
-                            "setUserAgentOverride"],
+                            "setUserAgentOverride", "setScrollbarsHidden"],
                 "include_events": ["virtualTimeBudgetExpired", "virtualTimeAdvanced", "virtualTimePaused"]
             },
             {
diff --git a/third_party/blink/renderer/core/inspector/main_thread_debugger.cc b/third_party/blink/renderer/core/inspector/main_thread_debugger.cc
index b2185c3..a31518e 100644
--- a/third_party/blink/renderer/core/inspector/main_thread_debugger.cc
+++ b/third_party/blink/renderer/core/inspector/main_thread_debugger.cc
@@ -331,7 +331,8 @@
   ExecutionContext* execution_context = ToExecutionContext(context);
   DCHECK(execution_context);
   DCHECK(execution_context->IsDocument());
-  return ToV8(MemoryInfo::Create(), context->Global(), isolate);
+  return ToV8(MemoryInfo::Create(MemoryInfo::Precision::Bucketized),
+              context->Global(), isolate);
 }
 
 void MainThreadDebugger::installAdditionalCommandLineAPI(
diff --git a/third_party/blink/renderer/core/layout/layout_view.cc b/third_party/blink/renderer/core/layout/layout_view.cc
index d3c4df8..e1699051 100644
--- a/third_party/blink/renderer/core/layout/layout_view.cc
+++ b/third_party/blink/renderer/core/layout/layout_view.cc
@@ -27,6 +27,7 @@
 #include "third_party/blink/renderer/core/dom/document.h"
 #include "third_party/blink/renderer/core/dom/element.h"
 #include "third_party/blink/renderer/core/editing/frame_selection.h"
+#include "third_party/blink/renderer/core/editing/markers/document_marker_controller.h"
 #include "third_party/blink/renderer/core/frame/local_frame.h"
 #include "third_party/blink/renderer/core/frame/local_frame_view.h"
 #include "third_party/blink/renderer/core/frame/settings.h"
@@ -889,4 +890,26 @@
   }
 }
 
+Vector<IntRect> LayoutView::GetTickmarks() const {
+  if (!tickmarks_override_.IsEmpty())
+    return tickmarks_override_;
+
+  return GetDocument().Markers().LayoutRectsForTextMatchMarkers();
+}
+
+void LayoutView::OverrideTickmarks(const Vector<IntRect>& tickmarks) {
+  tickmarks_override_ = tickmarks;
+  InvalidatePaintForTickmarks();
+}
+
+void LayoutView::InvalidatePaintForTickmarks() {
+  ScrollableArea* scrollable_area = GetScrollableArea();
+  if (!scrollable_area)
+    return;
+  Scrollbar* scrollbar = scrollable_area->VerticalScrollbar();
+  if (!scrollbar)
+    return;
+  scrollbar->SetNeedsPaintInvalidation(static_cast<ScrollbarPart>(~kThumbPart));
+}
+
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/layout/layout_view.h b/third_party/blink/renderer/core/layout/layout_view.h
index b7b9c67..52ec800 100644
--- a/third_party/blink/renderer/core/layout/layout_view.h
+++ b/third_party/blink/renderer/core/layout/layout_view.h
@@ -242,6 +242,18 @@
 
   IntSize ScrolledContentOffset() const override;
 
+  // Returns the coordinates of find-in-page scrollbar tickmarks.  These come
+  // from DocumentMarkerController, unless overridden by SetTickmarks.
+  Vector<IntRect> GetTickmarks() const;
+
+  // Sets the coordinates of find-in-page scrollbar tickmarks, bypassing
+  // DocumentMarkerController.  This is used by the PDF plugin.
+  void OverrideTickmarks(const Vector<IntRect>&);
+
+  // Issues a paint invalidation on the layout viewport's vertical scrollbar
+  // (which is responsible for painting the tickmarks).
+  void InvalidatePaintForTickmarks();
+
  private:
   void MapLocalToAncestor(
       const LayoutBoxModelObject* ancestor,
@@ -302,6 +314,8 @@
   unsigned hit_test_count_;
   unsigned hit_test_cache_hits_;
   Persistent<HitTestCache> hit_test_cache_;
+
+  Vector<IntRect> tickmarks_override_;
 };
 
 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, IsLayoutView());
diff --git a/third_party/blink/renderer/core/loader/frame_loader.cc b/third_party/blink/renderer/core/loader/frame_loader.cc
index 40019f1c..fe189a843 100644
--- a/third_party/blink/renderer/core/loader/frame_loader.cc
+++ b/third_party/blink/renderer/core/loader/frame_loader.cc
@@ -605,9 +605,9 @@
                                        : SerializedScriptValue::NullValue());
 
   if (history_item) {
-    RestoreScrollPositionAndViewState(frame_load_type, kHistorySameDocumentLoad,
-                                      view_state.get(),
-                                      history_item->ScrollRestorationType());
+    RestoreScrollPositionAndViewState(
+        frame_load_type, true /* is_same_document */, view_state.get(),
+        history_item->ScrollRestorationType());
   }
 
   // We need to scroll to the fragment whether or not a hash change occurred,
@@ -839,32 +839,28 @@
 
 void FrameLoader::StartNavigation(const FrameLoadRequest& passed_request,
                                   FrameLoadType frame_load_type,
-                                  HistoryItem* history_item,
-                                  HistoryLoadType history_load_type) {
+                                  HistoryItem* history_item) {
   CHECK(!passed_request.GetSubstituteData().IsValid());
   CHECK(frame_load_type != kFrameLoadTypeBackForward);
   CHECK(!history_item);
-  CHECK(history_load_type == kHistoryDifferentDocumentLoad);
   return LoadInternal(passed_request, frame_load_type, history_item,
-                      history_load_type, true /* check_with_client */);
+                      true /* check_with_client */);
 }
 
 void FrameLoader::CommitNavigation(const FrameLoadRequest& passed_request,
                                    FrameLoadType frame_load_type,
-                                   HistoryItem* history_item,
-                                   HistoryLoadType history_load_type) {
+                                   HistoryItem* history_item) {
   CHECK(!passed_request.OriginDocument());
   CHECK(passed_request.FrameName().IsEmpty());
   CHECK(!passed_request.TriggeringEvent());
   CHECK(!passed_request.Form());
   return LoadInternal(passed_request, frame_load_type, history_item,
-                      history_load_type, false /* check_with_client */);
+                      false /* check_with_client */);
 }
 
 void FrameLoader::LoadInternal(const FrameLoadRequest& passed_request,
                                FrameLoadType frame_load_type,
                                HistoryItem* history_item,
-                               HistoryLoadType history_load_type,
                                bool check_with_client) {
   DCHECK(frame_->GetDocument());
 
@@ -932,9 +928,6 @@
                                     ? DetermineFrameLoadType(request)
                                     : frame_load_type;
 
-  bool same_document_history_navigation =
-      IsBackForwardLoadType(new_load_type) &&
-      history_load_type == kHistorySameDocumentLoad;
   bool same_document_navigation =
       policy == kNavigationPolicyCurrentTab &&
       ShouldPerformFragmentNavigation(request.Form(),
@@ -942,7 +935,7 @@
                                       new_load_type, url);
 
   // Perform same document navigation.
-  if (same_document_history_navigation || same_document_navigation) {
+  if (same_document_navigation) {
     CommitSameDocumentNavigation(
         request.GetResourceRequest().Url(), new_load_type, history_item,
         request.ClientRedirect(), request.OriginDocument(),
@@ -1167,14 +1160,14 @@
   }
   base::AutoReset<bool> in_restore_scroll(&in_restore_scroll_, true);
   RestoreScrollPositionAndViewState(
-      GetDocumentLoader()->LoadType(), kHistoryDifferentDocumentLoad,
+      GetDocumentLoader()->LoadType(), false /* is_same_document */,
       GetDocumentLoader()->GetHistoryItem()->GetViewState(),
       GetDocumentLoader()->GetHistoryItem()->ScrollRestorationType());
 }
 
 void FrameLoader::RestoreScrollPositionAndViewState(
     FrameLoadType load_type,
-    HistoryLoadType history_load_type,
+    bool is_same_document,
     HistoryItem::ViewState* view_state,
     HistoryScrollRestorationType scroll_restoration_type) {
   LocalFrameView* view = frame_->View();
@@ -1203,8 +1196,7 @@
       view->LayoutViewportScrollableArea()->ClampScrollOffset(
           view_state->scroll_offset_) == view_state->scroll_offset_;
 
-  bool should_force_clamping =
-      !frame_->IsLoading() || history_load_type == kHistorySameDocumentLoad;
+  bool should_force_clamping = !frame_->IsLoading() || is_same_document;
   // Here |can_restore_without_clamping| is false, but layout might be necessary
   // to ensure correct content size.
   if (!can_restore_without_clamping && should_force_clamping)
@@ -1871,10 +1863,6 @@
   return loader;
 }
 
-STATIC_ASSERT_ENUM(kWebHistorySameDocumentLoad, kHistorySameDocumentLoad);
-STATIC_ASSERT_ENUM(kWebHistoryDifferentDocumentLoad,
-                   kHistoryDifferentDocumentLoad);
-
 STATIC_ASSERT_ENUM(kWebHistoryScrollRestorationManual,
                    kScrollRestorationManual);
 STATIC_ASSERT_ENUM(kWebHistoryScrollRestorationAuto, kScrollRestorationAuto);
diff --git a/third_party/blink/renderer/core/loader/frame_loader.h b/third_party/blink/renderer/core/loader/frame_loader.h
index bc487e3..7c86e5e 100644
--- a/third_party/blink/renderer/core/loader/frame_loader.h
+++ b/third_party/blink/renderer/core/loader/frame_loader.h
@@ -97,8 +97,7 @@
   // TODO(dgozman): remove history parameters.
   void StartNavigation(const FrameLoadRequest&,
                        FrameLoadType = kFrameLoadTypeStandard,
-                       HistoryItem* = nullptr,
-                       HistoryLoadType = kHistoryDifferentDocumentLoad);
+                       HistoryItem* = nullptr);
 
   // Called when the browser process has asked this renderer process to commit
   // a navigation in this frame. This method skips most of the checks assuming
@@ -107,8 +106,7 @@
   // an appropriate FrameLoadType should be given.
   void CommitNavigation(const FrameLoadRequest&,
                         FrameLoadType = kFrameLoadTypeStandard,
-                        HistoryItem* = nullptr,
-                        HistoryLoadType = kHistoryDifferentDocumentLoad);
+                        HistoryItem* = nullptr);
 
   // Called when the browser process has asked this renderer process to commit a
   // same document navigation in that frame. Returns false if the navigation
@@ -271,7 +269,6 @@
   void LoadInternal(const FrameLoadRequest&,
                     FrameLoadType,
                     HistoryItem*,
-                    HistoryLoadType,
                     bool check_with_client);
   void StartLoad(FrameLoadRequest&,
                  FrameLoadType,
@@ -288,7 +285,7 @@
                           ClientRedirectPolicy,
                           Document*);
   void RestoreScrollPositionAndViewState(FrameLoadType,
-                                         HistoryLoadType,
+                                         bool is_same_document,
                                          HistoryItem::ViewState*,
                                          HistoryScrollRestorationType);
 
diff --git a/third_party/blink/renderer/core/loader/frame_loader_types.h b/third_party/blink/renderer/core/loader/frame_loader_types.h
index 99755a7..17c43331 100644
--- a/third_party/blink/renderer/core/loader/frame_loader_types.h
+++ b/third_party/blink/renderer/core/loader/frame_loader_types.h
@@ -70,11 +70,6 @@
   kSameDocumentNavigationHistoryApi,
 };
 
-enum HistoryLoadType {
-  kHistorySameDocumentLoad,
-  kHistoryDifferentDocumentLoad
-};
-
 enum HistoryCommitType {
   kStandardCommit,
   kBackForwardCommit,
diff --git a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
index a70393d..7461a97 100644
--- a/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
+++ b/third_party/blink/renderer/core/paint/paint_layer_scrollable_area.cc
@@ -2329,12 +2329,8 @@
 }
 
 void PaintLayerScrollableArea::GetTickmarks(Vector<IntRect>& tickmarks) const {
-  if (layer_->IsRootLayer()) {
-    tickmarks = GetLayoutBox()
-                    ->GetDocument()
-                    .Markers()
-                    .LayoutRectsForTextMatchMarkers();
-  }
+  if (layer_->IsRootLayer())
+    tickmarks = ToLayoutView(GetLayoutBox())->GetTickmarks();
 }
 
 PaintLayerScrollableArea*
diff --git a/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc b/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc
index 199a405..a9f5165 100644
--- a/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc
+++ b/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc
@@ -117,7 +117,8 @@
   }
 
   frame_view.ClearNeedsPaintPropertyUpdate();
-  frame_view.GetJankTracker().NotifyPrePaintFinished();
+  if (RuntimeEnabledFeatures::JankTrackingEnabled())
+    frame_view.GetJankTracker().NotifyPrePaintFinished();
   context_storage_.pop_back();
 }
 
@@ -251,9 +252,11 @@
 
   CompositingLayerPropertyUpdater::Update(object);
 
-  object.GetFrameView()->GetJankTracker().NotifyObjectPrePaint(
-      object, paint_invalidator_context.old_visual_rect,
-      *paint_invalidator_context.painting_layer);
+  if (RuntimeEnabledFeatures::JankTrackingEnabled()) {
+    object.GetFrameView()->GetJankTracker().NotifyObjectPrePaint(
+        object, paint_invalidator_context.old_visual_rect,
+        *paint_invalidator_context.painting_layer);
+  }
 }
 
 void PrePaintTreeWalk::Walk(const LayoutObject& object) {
diff --git a/third_party/blink/renderer/core/testing/internals.cc b/third_party/blink/renderer/core/testing/internals.cc
index a277e97..95011dbc 100644
--- a/third_party/blink/renderer/core/testing/internals.cc
+++ b/third_party/blink/renderer/core/testing/internals.cc
@@ -1049,7 +1049,7 @@
 
   // This simulates what the production code does after
   // DocumentMarkerController::addTextMatchMarker().
-  range->OwnerDocument().View()->InvalidatePaintForTickmarks();
+  range->OwnerDocument().GetLayoutView()->InvalidatePaintForTickmarks();
 }
 
 static bool ParseColor(const String& value,
diff --git a/third_party/blink/renderer/core/testing/sim/sim_test.cc b/third_party/blink/renderer/core/testing/sim/sim_test.cc
index e9b79d5..312b4310 100644
--- a/third_party/blink/renderer/core/testing/sim/sim_test.cc
+++ b/third_party/blink/renderer/core/testing/sim/sim_test.cc
@@ -48,8 +48,7 @@
 void SimTest::LoadURL(const String& url) {
   WebURLRequest request{KURL(url)};
   WebView().MainFrameImpl()->CommitNavigation(
-      request, WebFrameLoadType::kStandard, WebHistoryItem(),
-      kWebHistoryDifferentDocumentLoad, false,
+      request, WebFrameLoadType::kStandard, WebHistoryItem(), false,
       base::UnguessableToken::Create());
 }
 
diff --git a/third_party/blink/renderer/core/timing/memory_info.cc b/third_party/blink/renderer/core/timing/memory_info.cc
index 0a478b023..86dabfb 100644
--- a/third_party/blink/renderer/core/timing/memory_info.cc
+++ b/third_party/blink/renderer/core/timing/memory_info.cc
@@ -43,13 +43,14 @@
 
 namespace blink {
 
-static const double kTwentyMinutesInSeconds = 20 * 60;
+static constexpr TimeDelta kTwentyMinutes = TimeDelta::FromMinutes(20);
+static constexpr TimeDelta kFiftyMs = TimeDelta::FromMilliseconds(50);
 
 static void GetHeapSize(HeapInfo& info) {
   v8::HeapStatistics heap_statistics;
   v8::Isolate::GetCurrent()->GetHeapStatistics(&heap_statistics);
   info.used_js_heap_size = heap_statistics.used_heap_size();
-  info.total_js_heap_size = heap_statistics.total_physical_size();
+  info.total_js_heap_size = heap_statistics.total_heap_size();
   info.js_heap_size_limit = heap_statistics.heap_size_limit();
 }
 
@@ -57,12 +58,10 @@
   USING_FAST_MALLOC(HeapSizeCache);
 
  public:
-  HeapSizeCache()
-      : last_update_time_(CurrentTimeTicksInSeconds() -
-                          kTwentyMinutesInSeconds) {}
+  HeapSizeCache() {}
 
-  void GetCachedHeapSize(HeapInfo& info) {
-    MaybeUpdate();
+  void GetCachedHeapSize(HeapInfo& info, MemoryInfo::Precision precision) {
+    MaybeUpdate(precision);
     info = info_;
   }
 
@@ -73,25 +72,32 @@
   }
 
  private:
-  void MaybeUpdate() {
-    // We rate-limit queries to once every twenty minutes to make it more
-    // difficult for attackers to compare memory usage before and after some
-    // event.
-    double now = CurrentTimeTicksInSeconds();
-    if (now - last_update_time_ >= kTwentyMinutesInSeconds) {
-      Update();
+  void MaybeUpdate(MemoryInfo::Precision precision) {
+    // We rate-limit queries to once every twenty minutes in the Bucketized case
+    // to make it more difficult for attackers to compare memory usage before
+    // and after some event. We limit to once every 50 ms in the Precise case to
+    // avoid exposing precise GC timings.
+    TimeTicks now = CurrentTimeTicks();
+    TimeDelta delta_allowed = precision == MemoryInfo::Precision::Bucketized
+                                  ? kTwentyMinutes
+                                  : kFiftyMs;
+    if (now - last_update_time_ >= delta_allowed) {
+      Update(precision);
       last_update_time_ = now;
     }
   }
 
-  void Update() {
+  void Update(MemoryInfo::Precision precision) {
     GetHeapSize(info_);
+    if (precision == MemoryInfo::Precision::Precise)
+      return;
+
     info_.used_js_heap_size = QuantizeMemorySize(info_.used_js_heap_size);
     info_.total_js_heap_size = QuantizeMemorySize(info_.total_js_heap_size);
     info_.js_heap_size_limit = QuantizeMemorySize(info_.js_heap_size_limit);
   }
 
-  double last_update_time_;
+  TimeTicks last_update_time_;
 
   HeapInfo info_;
   DISALLOW_COPY_AND_ASSIGN(HeapSizeCache);
@@ -149,11 +155,12 @@
   return bucket_size_list[kNumberOfBuckets - 1];
 }
 
-MemoryInfo::MemoryInfo() {
+MemoryInfo::MemoryInfo(Precision precision) {
+  // With the experimental PreciseMemoryInfoEnabled flag on, we will not
+  // bucketize or cache values.
   if (RuntimeEnabledFeatures::PreciseMemoryInfoEnabled())
     GetHeapSize(info_);
-  else
-    HeapSizeCache::ForCurrentThread().GetCachedHeapSize(info_);
+  HeapSizeCache::ForCurrentThread().GetCachedHeapSize(info_, precision);
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/timing/memory_info.h b/third_party/blink/renderer/core/timing/memory_info.h
index 5ad4195..06ae8af 100644
--- a/third_party/blink/renderer/core/timing/memory_info.h
+++ b/third_party/blink/renderer/core/timing/memory_info.h
@@ -52,14 +52,21 @@
   DEFINE_WRAPPERTYPEINFO();
 
  public:
-  static MemoryInfo* Create() { return new MemoryInfo(); }
+  // Precision of the performance.memory() attribute. A Precise value means that
+  // the numbers will not be bucketized and only cached for a small amount of
+  // time (50 ms). A Bucketized value means that the numbers will be bucketized
+  // and cached for a long period of time (20 minutes).
+  enum class Precision { Precise, Bucketized };
+  static MemoryInfo* Create(Precision precision) {
+    return new MemoryInfo(precision);
+  }
 
   size_t totalJSHeapSize() const { return info_.total_js_heap_size; }
   size_t usedJSHeapSize() const { return info_.used_js_heap_size; }
   size_t jsHeapSizeLimit() const { return info_.js_heap_size_limit; }
 
  private:
-  MemoryInfo();
+  explicit MemoryInfo(Precision precision);
 
   HeapInfo info_;
 };
diff --git a/third_party/blink/renderer/core/timing/memory_info_test.cc b/third_party/blink/renderer/core/timing/memory_info_test.cc
index d5680b3..da8da1f 100644
--- a/third_party/blink/renderer/core/timing/memory_info_test.cc
+++ b/third_party/blink/renderer/core/timing/memory_info_test.cc
@@ -31,6 +31,8 @@
 #include "third_party/blink/renderer/core/timing/memory_info.h"
 
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
+#include "third_party/blink/renderer/platform/wtf/time.h"
 
 namespace blink {
 
@@ -53,4 +55,151 @@
   EXPECT_EQ(10000000u, QuantizeMemorySize(0));
 }
 
+static constexpr int kModForBucketizationCheck = 100000;
+
+// The current time per the MemoryInfo Tests.
+// Use a large value as a start so that when subtracting twenty minutes it does
+// not become negative.
+static double current_time_ = 60 * 60;
+
+class MemoryInfoTest : public testing::Test {
+ protected:
+  void SetUp() override {
+    // Use a large value so that when subtracting twenty minutes it does not
+    // become negative. current_time_ = 60 * 60;
+    original_time_function_ = SetTimeFunctionsForTesting(MockTimeFunction);
+    // Advance clock by a large amount so that if there were previous MemoryInfo
+    // values, then they are no longer cached.
+    AdvanceClock(300 * 60);
+  }
+
+  void TearDown() override {
+    SetTimeFunctionsForTesting(original_time_function_);
+  }
+
+  void AdvanceClock(double seconds) { current_time_ += seconds; }
+
+  void CheckValues(MemoryInfo* info, MemoryInfo::Precision precision) {
+    // Check that used <= total <= limit.
+    EXPECT_LE(info->usedJSHeapSize(), info->totalJSHeapSize());
+    EXPECT_LE(info->totalJSHeapSize(), info->jsHeapSizeLimit());
+    if (precision == MemoryInfo::Precision::Bucketized) {
+      // Check that the bucketized values are heavily rounded.
+      EXPECT_EQ(0u, info->totalJSHeapSize() % kModForBucketizationCheck);
+      EXPECT_EQ(0u, info->usedJSHeapSize() % kModForBucketizationCheck);
+      EXPECT_EQ(0u, info->jsHeapSizeLimit() % kModForBucketizationCheck);
+    } else {
+      // Check that the precise values are not heavily rounded.
+      // Note: these checks are potentially flaky but in practice probably never
+      // flaky. If this is noticed to be flaky, disable test and assign bug to
+      // npm@.
+      EXPECT_NE(0u, info->totalJSHeapSize() % kModForBucketizationCheck);
+      EXPECT_NE(0u, info->usedJSHeapSize() % kModForBucketizationCheck);
+      EXPECT_NE(0u, info->jsHeapSizeLimit() % kModForBucketizationCheck);
+    }
+  }
+
+  void CheckEqual(MemoryInfo* info, MemoryInfo* info2) {
+    EXPECT_EQ(info2->totalJSHeapSize(), info->totalJSHeapSize());
+    EXPECT_EQ(info2->usedJSHeapSize(), info->usedJSHeapSize());
+    EXPECT_EQ(info2->jsHeapSizeLimit(), info->jsHeapSizeLimit());
+  }
+
+ private:
+  static double MockTimeFunction() { return current_time_; }
+
+  TimeFunction original_time_function_;
+};
+
+TEST_F(MemoryInfoTest, Bucketized) {
+  V8TestingScope scope;
+  v8::Isolate* isolate = scope.GetIsolate();
+  // The vector is used to keep the objects
+  // allocated alive even if GC happens. In practice, the objects only get GC'd
+  // after we go out of V8TestingScope. But having them in a vector makes it
+  // impossible for GC to clear them up unexpectedly early.
+  std::vector<v8::Local<v8::ArrayBuffer>> objects;
+
+  MemoryInfo* bucketized_memory =
+      MemoryInfo::Create(MemoryInfo::Precision::Bucketized);
+
+  // Check that the values are monotone and rounded.
+  CheckValues(bucketized_memory, MemoryInfo::Precision::Bucketized);
+
+  // Advance the clock for a minute. Not enough to make bucketized value
+  // recalculate. Also allocate some memory.
+  AdvanceClock(60);
+  objects.push_back(v8::ArrayBuffer::New(isolate, 100));
+
+  MemoryInfo* bucketized_memory2 =
+      MemoryInfo::Create(MemoryInfo::Precision::Bucketized);
+  // The old bucketized values must be equal to the new bucketized values.
+  CheckEqual(bucketized_memory, bucketized_memory2);
+
+  // TODO(npm): The bucketized MemoryInfo is very hard to change reliably. One
+  // option is to do something such as:
+  // for (int i = 0; i < kNumArrayBuffersForLargeAlloc; i++)
+  //   objects.push_back(v8::ArrayBuffer::New(isolate, 1));
+  // Here, kNumArrayBuffersForLargeAlloc should be strictly greater than 200000
+  // (test failed on Windows with this value). Creating a single giant
+  // ArrayBuffer does not seem to work, so instead a lot of small ArrayBuffers
+  // are used. For now we only test that values are still rounded after adding
+  // some memory.
+  for (int i = 0; i < 10; i++) {
+    // Advance the clock for another thirty minutes, enough to make the
+    // bucketized value recalculate.
+    AdvanceClock(60 * 30);
+    objects.push_back(v8::ArrayBuffer::New(isolate, 100));
+    MemoryInfo* bucketized_memory3 =
+        MemoryInfo::Create(MemoryInfo::Precision::Bucketized);
+    CheckValues(bucketized_memory3, MemoryInfo::Precision::Bucketized);
+    // The limit should remain unchanged.
+    EXPECT_EQ(bucketized_memory3->jsHeapSizeLimit(),
+              bucketized_memory->jsHeapSizeLimit());
+  }
+}
+
+TEST_F(MemoryInfoTest, Precise) {
+  V8TestingScope scope;
+  v8::Isolate* isolate = scope.GetIsolate();
+  std::vector<v8::Local<v8::ArrayBuffer>> objects;
+
+  MemoryInfo* precise_memory =
+      MemoryInfo::Create(MemoryInfo::Precision::Precise);
+  // Check that the precise values are monotone and not heavily rounded.
+  CheckValues(precise_memory, MemoryInfo::Precision::Precise);
+
+  // Advance the clock for a nanosecond, which should not be enough to make the
+  // precise value recalculate.
+  AdvanceClock(1e-9);
+  // Allocate an object in heap and keep it in a vector to make sure that it
+  // does not get accidentally GC'd. This single ArrayBuffer should be enough to
+  // be noticed by the used heap size in the precise MemoryInfo case.
+  objects.push_back(v8::ArrayBuffer::New(isolate, 100));
+  MemoryInfo* precise_memory2 =
+      MemoryInfo::Create(MemoryInfo::Precision::Precise);
+  // The old precise values must be equal to the new precise values.
+  CheckEqual(precise_memory, precise_memory2);
+
+  for (int i = 0; i < 10; i++) {
+    // Advance the clock for another thirty seconds, enough to make the precise
+    // values be recalculated. Also allocate another object.
+    AdvanceClock(30);
+    objects.push_back(v8::ArrayBuffer::New(isolate, 100));
+
+    MemoryInfo* new_precise_memory =
+        MemoryInfo::Create(MemoryInfo::Precision::Precise);
+
+    CheckValues(new_precise_memory, MemoryInfo::Precision::Precise);
+    // The old precise used heap size must be different from the new one.
+    EXPECT_NE(new_precise_memory->usedJSHeapSize(),
+              precise_memory->usedJSHeapSize());
+    // The limit should remain unchanged.
+    EXPECT_EQ(new_precise_memory->jsHeapSizeLimit(),
+              precise_memory->jsHeapSizeLimit());
+    // Update |precise_memory| to be the newest MemoryInfo thus far.
+    precise_memory = new_precise_memory;
+  }
+}
+
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/timing/window_performance.cc b/third_party/blink/renderer/core/timing/window_performance.cc
index a08ac03..dded7e7 100644
--- a/third_party/blink/renderer/core/timing/window_performance.cc
+++ b/third_party/blink/renderer/core/timing/window_performance.cc
@@ -138,7 +138,14 @@
 }
 
 MemoryInfo* WindowPerformance::memory() const {
-  return MemoryInfo::Create();
+  // The performance.memory() API has been improved so that we report precise
+  // values when the process is locked to a site. The intent (which changed
+  // course over time about what changes would be implemented) can be found at
+  // https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/no00RdMnGio,
+  // and the relevant bug is https://crbug.com/807651.
+  return MemoryInfo::Create(Platform::Current()->IsLockedToSite()
+                                ? MemoryInfo::Precision::Precise
+                                : MemoryInfo::Precision::Bucketized);
 }
 
 bool WindowPerformance::shouldYield() const {
diff --git a/third_party/blink/renderer/devtools/front_end/elements/StylesSidebarPane.js b/third_party/blink/renderer/devtools/front_end/elements/StylesSidebarPane.js
index 3d0051c..6fbcb7f 100644
--- a/third_party/blink/renderer/devtools/front_end/elements/StylesSidebarPane.js
+++ b/third_party/blink/renderer/devtools/front_end/elements/StylesSidebarPane.js
@@ -2120,6 +2120,7 @@
         // Accept any available autocompletions and advance to the next field.
         if (this.textWithCurrentSuggestion() !== this.text()) {
           this.tabKeyPressed();
+          event.preventDefault();
           return;
         }
         break;
diff --git a/third_party/blink/renderer/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/third_party/blink/renderer/devtools/front_end/sources/WatchExpressionsSidebarPane.js
index c5462594..06f6f16 100644
--- a/third_party/blink/renderer/devtools/front_end/sources/WatchExpressionsSidebarPane.js
+++ b/third_party/blink/renderer/devtools/front_end/sources/WatchExpressionsSidebarPane.js
@@ -83,8 +83,8 @@
     this._watchExpressionsSetting.set(toSave);
   }
 
-  _addButtonClicked() {
-    UI.viewManager.showView('sources.watch');
+  async _addButtonClicked() {
+    await UI.viewManager.showView('sources.watch');
     this._createWatchExpression(null).startEditing();
   }
 
diff --git a/third_party/blink/renderer/devtools/front_end/sources/navigatorTree.css b/third_party/blink/renderer/devtools/front_end/sources/navigatorTree.css
index 51ed07e..706de5ae 100644
--- a/third_party/blink/renderer/devtools/front_end/sources/navigatorTree.css
+++ b/third_party/blink/renderer/devtools/front_end/sources/navigatorTree.css
@@ -46,8 +46,8 @@
     background: linear-gradient(45deg, hsl(0, 0%, 50%), hsl(0, 0%, 70%));
 }
 
-.navigator-fs-tree-item:not(.has-mapped-files),
-.navigator-fs-folder-tree-item:not(.has-mapped-files) {
+.navigator-fs-tree-item:not(.has-mapped-files):not(.selected) > :not(.selection),
+.navigator-fs-folder-tree-item:not(.has-mapped-files):not(.selected) > :not(.selection) {
     filter: grayscale(50%);
     opacity: 0.5;
 }
diff --git a/third_party/blink/renderer/devtools/front_end/ui/toolbar.css b/third_party/blink/renderer/devtools/front_end/ui/toolbar.css
index 40da5f09..57662ed2 100644
--- a/third_party/blink/renderer/devtools/front_end/ui/toolbar.css
+++ b/third_party/blink/renderer/devtools/front_end/ui/toolbar.css
@@ -263,7 +263,7 @@
 }
 
 .toolbar-input-clear-button:hover {
-    opacity: 1;
+    opacity: .99;
 }
 
 .toolbar-input-empty .toolbar-input-clear-button {
diff --git a/third_party/blink/renderer/devtools/front_end/ui/treeoutline.js b/third_party/blink/renderer/devtools/front_end/ui/treeoutline.js
index a4adc62..20a000d 100644
--- a/third_party/blink/renderer/devtools/front_end/ui/treeoutline.js
+++ b/third_party/blink/renderer/devtools/front_end/ui/treeoutline.js
@@ -49,10 +49,6 @@
       this.contentElement.setAttribute('tabIndex', -1);
     this.element = this.contentElement;
     UI.ARIAUtils.markAsTree(this.element);
-
-    // Adjust to allow computing margin-left for the selection element.
-    // Check the padding-left for the li element for correct value.
-    this._paddingSize = 0;
   }
 
   _createRootElement() {
@@ -244,13 +240,6 @@
   }
 
   /**
-   * @param {number} paddingSize
-   */
-  setPaddingSize(paddingSize) {
-    this._paddingSize = paddingSize;
-  }
-
-  /**
    * @param {!Event} event
    */
   _treeKeyDown(event) {
@@ -787,27 +776,12 @@
     }
   }
 
-  /**
-   * @return {number}
-   */
-  computeLeftMargin() {
-    let treeElement = this.parent;
-    let depth = 0;
-    while (treeElement !== null) {
-      depth++;
-      treeElement = treeElement.parent;
-    }
-
-    return -(this.treeOutline._paddingSize * (depth - 1) + 4);
-  }
 
   _ensureSelection() {
     if (!this.treeOutline || !this.treeOutline._renderSelection)
       return;
     if (!this._selectionElement)
       this._selectionElement = createElementWithClass('div', 'selection fill');
-    if (this.treeOutline._paddingSize)
-      this._selectionElement.style.setProperty('margin-left', this.computeLeftMargin() + 'px');
     this._listItemNode.insertBefore(this._selectionElement, this.listItemElement.firstChild);
   }
 
@@ -1035,6 +1009,14 @@
   selectOnMouseDown(event) {
     if (this.select(false, true))
       event.consume(true);
+
+    if (this._listItemNode.draggable && this._selectionElement) {
+      const marginLeft =
+          this.treeOutline.element.getBoundingClientRect().left - this._listItemNode.getBoundingClientRect().left;
+      // By default the left margin extends far off screen. This is not a problem except when dragging an element.
+      // Setting the margin once here should be fine, because we believe the left margin should never change.
+      this._selectionElement.style.setProperty('margin-left', marginLeft + 'px');
+    }
   }
 
   /**
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index 7d5ae18..ad3935a2 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -443,7 +443,6 @@
     "bindings/script_wrappable.h",
     "bindings/script_wrappable_marking_visitor.cc",
     "bindings/script_wrappable_marking_visitor.h",
-    "bindings/script_wrappable_visitor.cc",
     "bindings/script_wrappable_visitor.h",
     "bindings/script_wrappable_visitor_verifier.h",
     "bindings/shared_persistent.h",
diff --git a/third_party/blink/renderer/platform/bindings/callback_function_base.cc b/third_party/blink/renderer/platform/bindings/callback_function_base.cc
index e0dfe80c..73dc173 100644
--- a/third_party/blink/renderer/platform/bindings/callback_function_base.cc
+++ b/third_party/blink/renderer/platform/bindings/callback_function_base.cc
@@ -22,11 +22,6 @@
   visitor->Trace(callback_function_);
 }
 
-void CallbackFunctionBase::TraceWrappers(
-    ScriptWrappableVisitor* visitor) const {
-  visitor->TraceWrappers(callback_function_);
-}
-
 V8PersistentCallbackFunctionBase::V8PersistentCallbackFunctionBase(
     CallbackFunctionBase* callback_function)
     : callback_function_(callback_function) {
diff --git a/third_party/blink/renderer/platform/bindings/callback_function_base.h b/third_party/blink/renderer/platform/bindings/callback_function_base.h
index f2de6cb..c8ea9fb6 100644
--- a/third_party/blink/renderer/platform/bindings/callback_function_base.h
+++ b/third_party/blink/renderer/platform/bindings/callback_function_base.h
@@ -30,7 +30,6 @@
   virtual ~CallbackFunctionBase() = default;
 
   virtual void Trace(blink::Visitor* visitor);
-  void TraceWrappers(ScriptWrappableVisitor*) const override;
 
   v8::Isolate* GetIsolate() const {
     return callback_relevant_script_state_->GetIsolate();
diff --git a/third_party/blink/renderer/platform/bindings/callback_interface_base.cc b/third_party/blink/renderer/platform/bindings/callback_interface_base.cc
index acf0181..f09d50b 100644
--- a/third_party/blink/renderer/platform/bindings/callback_interface_base.cc
+++ b/third_party/blink/renderer/platform/bindings/callback_interface_base.cc
@@ -25,11 +25,6 @@
   visitor->Trace(callback_object_);
 }
 
-void CallbackInterfaceBase::TraceWrappers(
-    ScriptWrappableVisitor* visitor) const {
-  visitor->TraceWrappers(callback_object_);
-}
-
 V8PersistentCallbackInterfaceBase::V8PersistentCallbackInterfaceBase(
     CallbackInterfaceBase* callback_interface)
     : callback_interface_(callback_interface) {
diff --git a/third_party/blink/renderer/platform/bindings/callback_interface_base.h b/third_party/blink/renderer/platform/bindings/callback_interface_base.h
index 4d8cd9f..b46fe4d 100644
--- a/third_party/blink/renderer/platform/bindings/callback_interface_base.h
+++ b/third_party/blink/renderer/platform/bindings/callback_interface_base.h
@@ -37,7 +37,6 @@
   virtual ~CallbackInterfaceBase() = default;
 
   virtual void Trace(blink::Visitor*);
-  void TraceWrappers(ScriptWrappableVisitor*) const override;
 
   v8::Isolate* GetIsolate() {
     return callback_relevant_script_state_->GetIsolate();
diff --git a/third_party/blink/renderer/platform/bindings/dom_data_store.h b/third_party/blink/renderer/platform/bindings/dom_data_store.h
index c66d44d..cc6c038 100644
--- a/third_party/blink/renderer/platform/bindings/dom_data_store.h
+++ b/third_party/blink/renderer/platform/bindings/dom_data_store.h
@@ -147,11 +147,6 @@
     visitor->Trace(&wrapper_map_.value(), script_wrappable);
   }
 
-  void TraceWrappers(const ScriptWrappable* script_wrappable,
-                     ScriptWrappableVisitor* visitor) {
-    visitor->TraceWrappers(&wrapper_map_.value(), script_wrappable);
-  }
-
   void MarkWrapper(ScriptWrappable* script_wrappable) {
     wrapper_map_->MarkWrapper(script_wrappable);
   }
diff --git a/third_party/blink/renderer/platform/bindings/dom_wrapper_world.cc b/third_party/blink/renderer/platform/bindings/dom_wrapper_world.cc
index 8f49afa..08efe987 100644
--- a/third_party/blink/renderer/platform/bindings/dom_wrapper_world.cc
+++ b/third_party/blink/renderer/platform/bindings/dom_wrapper_world.cc
@@ -126,17 +126,6 @@
   }
 }
 
-void DOMWrapperWorld::TraceWrappers(const ScriptWrappable* script_wrappable,
-                                    ScriptWrappableVisitor* visitor) {
-  // Marking for worlds other than the main world.
-  DCHECK(ThreadState::Current()->GetIsolate());
-  for (DOMWrapperWorld* world : GetWorldMap().Values()) {
-    DOMDataStore& data_store = world->DomDataStore();
-    if (data_store.ContainsWrapper(script_wrappable))
-      data_store.TraceWrappers(script_wrappable, visitor);
-  }
-}
-
 DOMWrapperWorld::~DOMWrapperWorld() {
   DCHECK(!IsMainWorld());
   if (IsMainThread())
diff --git a/third_party/blink/renderer/platform/bindings/dom_wrapper_world.h b/third_party/blink/renderer/platform/bindings/dom_wrapper_world.h
index e6cef6d..81ae140 100644
--- a/third_party/blink/renderer/platform/bindings/dom_wrapper_world.h
+++ b/third_party/blink/renderer/platform/bindings/dom_wrapper_world.h
@@ -97,7 +97,6 @@
 
   // Traces wrappers corresponding to the ScriptWrappable in DOM data stores.
   static void Trace(const ScriptWrappable*, Visitor*);
-  static void TraceWrappers(const ScriptWrappable*, ScriptWrappableVisitor*);
 
   static DOMWrapperWorld& World(v8::Local<v8::Context> context) {
     return ScriptState::From(context)->World();
diff --git a/third_party/blink/renderer/platform/bindings/script_wrappable.cc b/third_party/blink/renderer/platform/bindings/script_wrappable.cc
index 8b5de7a..d32c3d53 100644
--- a/third_party/blink/renderer/platform/bindings/script_wrappable.cc
+++ b/third_party/blink/renderer/platform/bindings/script_wrappable.cc
@@ -44,11 +44,6 @@
   DOMWrapperWorld::Trace(this, visitor);
 }
 
-void ScriptWrappable::TraceWrappers(ScriptWrappableVisitor* visitor) const {
-  visitor->TraceWrappers(main_world_wrapper_);
-  DOMWrapperWorld::TraceWrappers(this, visitor);
-}
-
 const char* ScriptWrappable::NameInHeapSnapshot() const {
   return GetWrapperTypeInfo()->interface_name;
 }
diff --git a/third_party/blink/renderer/platform/bindings/script_wrappable.h b/third_party/blink/renderer/platform/bindings/script_wrappable.h
index cf57e9e7..037bc24 100644
--- a/third_party/blink/renderer/platform/bindings/script_wrappable.h
+++ b/third_party/blink/renderer/platform/bindings/script_wrappable.h
@@ -59,11 +59,6 @@
 
   virtual void Trace(blink::Visitor*);
 
-  // Traces wrapper objects corresponding to this ScriptWrappable in all worlds.
-  void TraceWrappers(ScriptWrappableVisitor*) const override;
-
-  bool IsScriptWrappable() const override { return true; }
-
   const char* NameInHeapSnapshot() const override;
 
   template <typename T>
diff --git a/third_party/blink/renderer/platform/bindings/script_wrappable_marking_visitor.cc b/third_party/blink/renderer/platform/bindings/script_wrappable_marking_visitor.cc
index b8ecd76..8e1693f 100644
--- a/third_party/blink/renderer/platform/bindings/script_wrappable_marking_visitor.cc
+++ b/third_party/blink/renderer/platform/bindings/script_wrappable_marking_visitor.cc
@@ -56,7 +56,7 @@
   ScriptWrappableVisitorVerifier verifier;
   for (auto& marking_data : verifier_deque_) {
     // Check that all children of this object are marked.
-    marking_data.TraceWrappers(&verifier);
+    marking_data.Trace(&verifier);
   }
 #endif
 
@@ -203,7 +203,7 @@
     if (marking_deque_.IsEmpty()) {
       return false;
     }
-    marking_deque_.TakeFirst().TraceWrappers(this);
+    marking_deque_.TakeFirst().Trace(this);
   }
   return true;
 }
@@ -228,7 +228,7 @@
 
   // Conservatively assume that the source object containing |dst_object| is
   // marked.
-  visitor->TraceWrappers(dst_object);
+  visitor->Trace(dst_object);
 }
 
 void ScriptWrappableMarkingVisitor::WriteBarrier(
@@ -239,7 +239,7 @@
   if (!visitor->WrapperTracingInProgress())
     return;
   // Conservatively assume that the source object key is marked.
-  visitor->TraceWrappers(wrapper_map, key);
+  visitor->Trace(wrapper_map, key);
 }
 
 void ScriptWrappableMarkingVisitor::Visit(
@@ -252,20 +252,20 @@
   traced_wrapper.Get().RegisterExternalReference(isolate_);
 }
 
-void ScriptWrappableMarkingVisitor::Visit(
+void ScriptWrappableMarkingVisitor::VisitWithWrappers(
     void* object,
-    TraceWrapperDescriptor wrapper_descriptor) {
+    TraceDescriptor descriptor) {
   HeapObjectHeader* header =
-      HeapObjectHeader::FromPayload(wrapper_descriptor.base_object_payload);
+      HeapObjectHeader::FromPayload(descriptor.base_object_payload);
   if (header->IsWrapperHeaderMarked())
     return;
   MarkWrapperHeader(header);
   DCHECK(tracing_in_progress_);
   DCHECK(header->IsWrapperHeaderMarked());
-  marking_deque_.push_back(MarkingDequeItem(wrapper_descriptor));
+  marking_deque_.push_back(MarkingDequeItem(descriptor));
 #if DCHECK_IS_ON()
   if (!advancing_tracing_) {
-    verifier_deque_.push_back(MarkingDequeItem(wrapper_descriptor));
+    verifier_deque_.push_back(MarkingDequeItem(descriptor));
   }
 #endif
 }
diff --git a/third_party/blink/renderer/platform/bindings/script_wrappable_marking_visitor.h b/third_party/blink/renderer/platform/bindings/script_wrappable_marking_visitor.h
index d85686f1..6e6768b 100644
--- a/third_party/blink/renderer/platform/bindings/script_wrappable_marking_visitor.h
+++ b/third_party/blink/renderer/platform/bindings/script_wrappable_marking_visitor.h
@@ -35,8 +35,6 @@
  public:
   static ScriptWrappableMarkingVisitor* CurrentVisitor(v8::Isolate*);
 
-  bool WrapperTracingInProgress() const { return tracing_in_progress_; }
-
   // Replace all dead objects in the marking deque with nullptr after Oilpan
   // garbage collection.
   static void InvalidateDeadObjectsInMarkingDeque(v8::Isolate*);
@@ -48,33 +46,14 @@
   //
   // On assignment 'x.a = y' during incremental marking the Dijkstra barrier
   // suggests checking the color of 'x' and only mark 'y' if 'x' is marked.
-
+  //
   // Since checking 'x' is expensive in the current setting, as it requires
   // either a back pointer or expensive lookup logic due to large objects and
   // multiple inheritance, just assume that 'x' is black. We assume here that
   // since an object 'x' is referenced for a write, it will generally also be
   // alive in the current GC cycle.
   template <typename T>
-  static void WriteBarrier(const T* dst_object) {
-    if (!ThreadState::IsAnyWrapperTracing() || !dst_object)
-      return;
-
-    const ThreadState* thread_state =
-        ThreadStateFor<ThreadingTrait<T>::kAffinity>::GetState();
-    DCHECK(thread_state);
-    // Bail out if tracing is not in progress.
-    if (!thread_state->IsWrapperTracing())
-      return;
-
-    // If the wrapper is already marked we can bail out here.
-    if (TraceTrait<T>::GetHeapObjectHeader(const_cast<T*>(dst_object))
-            ->IsWrapperHeaderMarked())
-      return;
-
-    CurrentVisitor(thread_state->GetIsolate())
-        ->Visit(const_cast<T*>(dst_object),
-                TraceWrapperDescriptorFor(dst_object));
-  }
+  inline static void WriteBarrier(const T* dst_object);
 
   static void WriteBarrier(v8::Isolate*,
                            const TraceWrapperV8Reference<v8::Value>&);
@@ -86,6 +65,8 @@
   ScriptWrappableMarkingVisitor(v8::Isolate* isolate) : isolate_(isolate){};
   ~ScriptWrappableMarkingVisitor() override;
 
+  bool WrapperTracingInProgress() const { return tracing_in_progress_; }
+
   // v8::EmbedderHeapTracer interface.
 
   void TracePrologue() override;
@@ -99,9 +80,10 @@
   void EnterFinalPause() override;
   size_t NumberOfWrappersToTrace() override;
 
-  // Visitor interface.
+  // ScriptWrappableVisitor interface.
+
   void Visit(const TraceWrapperV8Reference<v8::Value>&) override;
-  void Visit(void*, TraceWrapperDescriptor) override;
+  void VisitWithWrappers(void*, TraceDescriptor) override;
   void Visit(DOMWrapperMap<ScriptWrappable>*,
              const ScriptWrappable* key) override;
   void VisitBackingStoreStrongly(void* object,
@@ -116,18 +98,17 @@
  private:
   class MarkingDequeItem {
    public:
-    explicit MarkingDequeItem(const TraceWrapperDescriptor& wrapper_descriptor)
-        : raw_object_pointer_(wrapper_descriptor.base_object_payload),
-          trace_wrappers_callback_(wrapper_descriptor.trace_wrappers_callback) {
+    explicit MarkingDequeItem(const TraceDescriptor& descriptor)
+        : raw_object_pointer_(descriptor.base_object_payload),
+          trace_callback_(descriptor.callback) {
       DCHECK(raw_object_pointer_);
-      DCHECK(trace_wrappers_callback_);
+      DCHECK(trace_callback_);
     }
 
     // Traces wrappers if the underlying object has not yet been invalidated.
-    inline void TraceWrappers(ScriptWrappableVisitor* visitor) const {
+    inline void Trace(ScriptWrappableVisitor* visitor) const {
       if (raw_object_pointer_) {
-        trace_wrappers_callback_(visitor,
-                                 const_cast<void*>(raw_object_pointer_));
+        trace_callback_(visitor, const_cast<void*>(raw_object_pointer_));
       }
     }
 
@@ -139,7 +120,7 @@
       return raw_object_pointer_ && !GetHeapObjectHeader()->IsMarked();
     }
 
-    // Invalidates the current wrapper marking data, i.e., calling TraceWrappers
+    // Invalidates the current wrapper marking data, i.e., calling Trace
     // will result in a noop.
     inline void Invalidate() { raw_object_pointer_ = nullptr; }
 
@@ -149,7 +130,7 @@
     }
 
     const void* raw_object_pointer_;
-    TraceWrappersCallback trace_wrappers_callback_;
+    TraceCallback trace_callback_;
   };
 
   void MarkWrapperHeader(HeapObjectHeader*);
@@ -231,6 +212,28 @@
                            WriteBarrierOnHeapVectorSwap2);
 };
 
+template <typename T>
+inline void ScriptWrappableMarkingVisitor::WriteBarrier(const T* dst_object) {
+  if (!ThreadState::IsAnyWrapperTracing() || !dst_object)
+    return;
+
+  const ThreadState* thread_state =
+      ThreadStateFor<ThreadingTrait<T>::kAffinity>::GetState();
+  DCHECK(thread_state);
+  // Bail out if tracing is not in progress.
+  if (!thread_state->IsWrapperTracing())
+    return;
+
+  // If the wrapper is already marked we can bail out here.
+  if (TraceTrait<T>::GetHeapObjectHeader(const_cast<T*>(dst_object))
+          ->IsWrapperHeaderMarked())
+    return;
+
+  CurrentVisitor(thread_state->GetIsolate())
+      ->VisitWithWrappers(const_cast<T*>(dst_object),
+                          TraceDescriptorFor(dst_object));
+}
+
 }  // namespace blink
 
 #endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_SCRIPT_WRAPPABLE_MARKING_VISITOR_H_
diff --git a/third_party/blink/renderer/platform/bindings/script_wrappable_visitor.cc b/third_party/blink/renderer/platform/bindings/script_wrappable_visitor.cc
deleted file mode 100644
index af91f84..0000000
--- a/third_party/blink/renderer/platform/bindings/script_wrappable_visitor.cc
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 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 "third_party/blink/renderer/platform/bindings/script_wrappable_visitor.h"
-
-#include "third_party/blink/renderer/platform/bindings/dom_wrapper_map.h"
-#include "third_party/blink/renderer/platform/bindings/trace_wrapper_base.h"
-#include "third_party/blink/renderer/platform/supplementable.h"
-
-namespace blink {
-
-void ScriptWrappableVisitor::TraceWrappers(
-    DOMWrapperMap<ScriptWrappable>* wrapper_map,
-    const ScriptWrappable* key) {
-  Visit(wrapper_map, key);
-}
-
-void ScriptWrappableVisitor::DispatchTraceWrappers(
-    TraceWrapperBase* wrapper_base) {
-  wrapper_base->TraceWrappers(this);
-}
-
-void ScriptWrappableVisitor::DispatchTraceWrappersForSupplement(
-    TraceWrapperBaseForSupplement* wrapper_base) {
-  wrapper_base->TraceWrappers(this);
-}
-}  // namespace blink
diff --git a/third_party/blink/renderer/platform/bindings/script_wrappable_visitor.h b/third_party/blink/renderer/platform/bindings/script_wrappable_visitor.h
index 2fc781d1..4caa74f 100644
--- a/third_party/blink/renderer/platform/bindings/script_wrappable_visitor.h
+++ b/third_party/blink/renderer/platform/bindings/script_wrappable_visitor.h
@@ -5,102 +5,18 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_SCRIPT_WRAPPABLE_VISITOR_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_SCRIPT_WRAPPABLE_VISITOR_H_
 
-#include "third_party/blink/renderer/platform/bindings/trace_wrapper_base.h"
-#include "third_party/blink/renderer/platform/heap/heap_page.h"
-#include "third_party/blink/renderer/platform/heap/threading_traits.h"
 #include "third_party/blink/renderer/platform/heap/visitor.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
-#include "third_party/blink/renderer/platform/wtf/deque.h"
-#include "third_party/blink/renderer/platform/wtf/vector.h"
-#include "v8/include/v8.h"
 
 namespace blink {
 
-template <typename T>
-class DOMWrapperMap;
-class ScriptWrappable;
-class ScriptWrappableVisitor;
-template <typename T>
-class Supplement;
-class TraceWrapperBase;
-class TraceWrapperBaseForSupplement;
-template <typename T>
-class TraceWrapperV8Reference;
-
-#define DEFINE_TRAIT_FOR_TRACE_WRAPPERS(ClassName)                            \
-  template <>                                                                 \
-  inline void TraceTrait<ClassName>::TraceWrappers(                           \
-      ScriptWrappableVisitor* visitor, void* t) {                             \
-    static_assert(sizeof(ClassName), "type needs to be defined");             \
-    static_assert(IsGarbageCollectedType<ClassName>::value,                   \
-                  "only objects deriving from GarbageCollected can be used"); \
-    static_cast<ClassName*>(t)->TraceWrappers(visitor);                       \
-  }
-
-// Abstract visitor for wrapper references in a ScriptWrappable.
-// Usage:
-// - Define a derived class that overrides Visit(..) methods.
-// - Create an instance of the derived class: visitor.
-// - Call visitor.DispatchTraceWrappers(traceable).
-// DispatchTraceWrappers will invoke Visit() method for all
-// wrapper references in traceable.
+// Abstract visitor for visiting ScriptWrappable. Inherit from this
+// visitor and implement the remaining Visit*() methods to visit all
+// references related to wrappers.
 class PLATFORM_EXPORT ScriptWrappableVisitor : public Visitor {
  public:
   ScriptWrappableVisitor() : Visitor(ThreadState::Current()) {}
 
-  // Trace all wrappers of |tracable|.
-  //
-  // If you cannot use TraceWrapperMember & the corresponding TraceWrappers()
-  // for some reason (e.g., unions using raw pointers), see
-  // |TraceWrappersWithManualWriteBarrier()| below.
-  template <typename T>
-  void TraceWrappers(const TraceWrapperMember<T>& traceable) {
-    static_assert(sizeof(T), "T must be fully defined");
-    Visit(traceable.Get());
-  }
-
-  // Enable partial tracing of objects. This is used when tracing interior
-  // objects without their own header.
-  template <typename T>
-  void TraceWrappers(const T& traceable) {
-    static_assert(sizeof(T), "T must be fully defined");
-    traceable.TraceWrappers(this);
-  }
-
-  // Only called from automatically generated bindings code.
-  template <typename T>
-  void TraceWrappersFromGeneratedCode(const T* traceable) {
-    Visit(traceable);
-  }
-
-  // Require all users of manual write barriers to make this explicit in their
-  // |TraceWrappers| definition. Be sure to add
-  // |ScriptWrappableMarkingVisitor::WriteBarrier(new_value)| after all
-  // assignments to the field. Otherwise, the objects may be collected
-  // prematurely.
-  template <typename T>
-  void TraceWrappersWithManualWriteBarrier(const T* traceable) {
-    Visit(traceable);
-  }
-
-  template <typename V8Type>
-  void TraceWrappers(const TraceWrapperV8Reference<V8Type>& v8reference) {
-    Visit(v8reference.template Cast<v8::Value>());
-  }
-
-  // Trace wrappers in non-main worlds.
-  void TraceWrappers(DOMWrapperMap<ScriptWrappable>*,
-                     const ScriptWrappable* key);
-
-  virtual void DispatchTraceWrappers(TraceWrapperBase*);
-  template <typename T>
-  void DispatchTraceWrappers(Supplement<T>* traceable) {
-    TraceWrapperBaseForSupplement* base = traceable;
-    DispatchTraceWrappersForSupplement(base);
-  }
-  // Catch all handlers needed because of mixins except for Supplement<T>.
-  void DispatchTraceWrappers(const void*) const { CHECK(false); }
-
   // Unused blink::Visitor overrides. Derived visitors should still override
   // the cross-component visitation methods. See Visitor documentation.
   void Visit(void* object, TraceDescriptor desc) final {}
@@ -119,21 +35,6 @@
 
  protected:
   using Visitor::Visit;
-
- private:
-  // Helper method to invoke the virtual Visit method with wrapper descriptor.
-  template <typename T>
-  void Visit(const T* traceable) {
-    static_assert(sizeof(T), "T must be fully defined");
-    if (!traceable)
-      return;
-    Visit(const_cast<T*>(traceable), TraceWrapperDescriptorFor(traceable));
-  }
-
-  // Supplement-specific implementation of DispatchTraceWrappers.  The suffix of
-  // "ForSupplement" is necessary not to make this member function a candidate
-  // of overload resolutions.
-  void DispatchTraceWrappersForSupplement(TraceWrapperBaseForSupplement*);
 };
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/platform/bindings/script_wrappable_visitor_verifier.h b/third_party/blink/renderer/platform/bindings/script_wrappable_visitor_verifier.h
index 0f1eb87..84724bc6 100644
--- a/third_party/blink/renderer/platform/bindings/script_wrappable_visitor_verifier.h
+++ b/third_party/blink/renderer/platform/bindings/script_wrappable_visitor_verifier.h
@@ -18,16 +18,16 @@
  public:
   void Visit(const TraceWrapperV8Reference<v8::Value>&) final {}
 
-  void Visit(void* object, TraceWrapperDescriptor descriptor) final {
+  void VisitWithWrappers(void* object, TraceDescriptor descriptor) final {
     HeapObjectHeader* header =
         HeapObjectHeader::FromPayload(descriptor.base_object_payload);
     const char* name = GCInfoTable::Get()
                            .GCInfoFromIndex(header->GcInfoIndex())
                            ->name_(descriptor.base_object_payload);
     // If this FATAL is hit, it means that a white (not discovered by
-    // TraceWrappers) object was assigned as a member to a black object (already
-    // processed by TraceWrappers). The black object will not be processed
-    // anymore so white object will remain undetected and therefore its wrapper
+    // Trace) object was assigned as a member to a black object (already
+    // processed by Trace). The black object will not be processed anymore
+    // so white object will remain undetected and therefore its wrapper
     // and all wrappers reachable from it would be collected.
     //
     // This means there is a write barrier missing somewhere. Check the
diff --git a/third_party/blink/renderer/platform/bindings/trace_wrapper_base.h b/third_party/blink/renderer/platform/bindings/trace_wrapper_base.h
index 4e3e34bc..f82d144 100644
--- a/third_party/blink/renderer/platform/bindings/trace_wrapper_base.h
+++ b/third_party/blink/renderer/platform/bindings/trace_wrapper_base.h
@@ -5,22 +5,18 @@
 #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_TRACE_WRAPPER_BASE_H_
 #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_BINDINGS_TRACE_WRAPPER_BASE_H_
 
+#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
 #include "third_party/blink/renderer/platform/platform_export.h"
 #include "third_party/blink/renderer/platform/wtf/noncopyable.h"
 
 namespace blink {
 
-class ScriptWrappableVisitor;
-
-class PLATFORM_EXPORT TraceWrapperBase {
+class GC_PLUGIN_IGNORE("crbug.com/841830") PLATFORM_EXPORT TraceWrapperBase {
   WTF_MAKE_NONCOPYABLE(TraceWrapperBase);
 
  public:
   TraceWrapperBase() = default;
   ~TraceWrapperBase() = default;
-  virtual bool IsScriptWrappable() const { return false; }
-
-  virtual void TraceWrappers(ScriptWrappableVisitor*) const {}
 
   // Human-readable name of this object. The DevTools heap snapshot uses
   // this method to show the object.
diff --git a/third_party/blink/renderer/platform/bindings/trace_wrapper_member.h b/third_party/blink/renderer/platform/bindings/trace_wrapper_member.h
index 2d4dd707..38711f6 100644
--- a/third_party/blink/renderer/platform/bindings/trace_wrapper_member.h
+++ b/third_party/blink/renderer/platform/bindings/trace_wrapper_member.h
@@ -16,14 +16,10 @@
 
 // TraceWrapperMember is used for Member fields that should participate in
 // wrapper tracing, i.e., strongly hold a ScriptWrappable alive. All
-// TraceWrapperMember fields must be traced in the class' |TraceWrappers|
-// method.
+// TraceWrapperMember fields must be traced in the class' |Trace| method.
 template <class T>
 class TraceWrapperMember : public Member<T> {
   DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
-  // TODO(mlippautz): Enable the following check.
-  // static_assert(std::is_base_of<TraceWrapperBase, T>::value,
-  //               "T must inherit from TraceWrapperBase");
 
  public:
   TraceWrapperMember() : Member<T>(nullptr) {}
diff --git a/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h b/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h
index 3584abdb..7f8af2b 100644
--- a/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h
+++ b/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h
@@ -58,8 +58,7 @@
     return reinterpret_cast<const TraceWrapperV8Reference<S>&>(
         const_cast<const TraceWrapperV8Reference<T>&>(*this));
   }
-  // TODO(mlippautz): Support TraceWrappers(const
-  // TraceWrapperV8Reference<v8::Module>&) and remove UnsafeCast.
+
   template <typename S>
   const TraceWrapperV8Reference<S>& UnsafeCast() const {
     return reinterpret_cast<const TraceWrapperV8Reference<S>&>(
diff --git a/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_string.h b/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_string.h
index d29a6b4..a9dcc3d 100644
--- a/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_string.h
+++ b/third_party/blink/renderer/platform/bindings/trace_wrapper_v8_string.h
@@ -35,9 +35,6 @@
 
   virtual void Trace(Visitor* visitor) { visitor->Trace(string_); }
 
-  void TraceWrappers(ScriptWrappableVisitor* visitor) const override {
-    visitor->TraceWrappers(string_);
-  }
   const char* NameInHeapSnapshot() const override {
     return "TraceWrapperV8String";
   }
diff --git a/third_party/blink/renderer/platform/heap/blink_gc.h b/third_party/blink/renderer/platform/heap/blink_gc.h
index f7dc0c7..f462953c 100644
--- a/third_party/blink/renderer/platform/heap/blink_gc.h
+++ b/third_party/blink/renderer/platform/heap/blink_gc.h
@@ -17,7 +17,6 @@
 class HeapObjectHeader;
 class MarkingVisitor;
 class Visitor;
-class ScriptWrappableVisitor;
 
 using Address = uint8_t*;
 
@@ -25,7 +24,6 @@
 using VisitorCallback = void (*)(Visitor*, void*);
 using MarkingVisitorCallback = void (*)(MarkingVisitor*, void*);
 using TraceCallback = VisitorCallback;
-using TraceWrappersCallback = void (*)(ScriptWrappableVisitor*, void*);
 using WeakCallback = VisitorCallback;
 using EphemeronCallback = VisitorCallback;
 using NameCallback = const char* (*)(const void* self);
diff --git a/third_party/blink/renderer/platform/heap/garbage_collected.h b/third_party/blink/renderer/platform/heap/garbage_collected.h
index d7f66a8..3111f5c 100644
--- a/third_party/blink/renderer/platform/heap/garbage_collected.h
+++ b/third_party/blink/renderer/platform/heap/garbage_collected.h
@@ -54,12 +54,6 @@
   bool can_trace_eagerly;
 };
 
-struct TraceWrapperDescriptor {
-  STACK_ALLOCATED();
-  void* base_object_payload;
-  TraceWrappersCallback trace_wrappers_callback;
-};
-
 // The GarbageCollectedMixin interface and helper macro
 // USING_GARBAGE_COLLECTED_MIXIN can be used to automatically define
 // TraceTrait/ObjectAliveTrait on non-leftmost deriving classes
@@ -112,9 +106,6 @@
   virtual TraceDescriptor GetTraceDescriptor() const {
     return {BlinkGC::kNotFullyConstructedObject, nullptr, false};
   }
-  virtual TraceWrapperDescriptor GetTraceWrapperDescriptor() const {
-    return {BlinkGC::kNotFullyConstructedObject, nullptr};
-  }
 };
 
 #define DEFINE_GARBAGE_COLLECTED_MIXIN_METHODS(TYPE)                         \
@@ -132,11 +123,6 @@
             TraceTrait<TYPE>::Trace, TraceEagerlyTrait<TYPE>::value};        \
   }                                                                          \
                                                                              \
-  TraceWrapperDescriptor GetTraceWrapperDescriptor() const override {        \
-    return {const_cast<TYPE*>(static_cast<const TYPE*>(this)),               \
-            TraceTrait<TYPE>::TraceWrappers};                                \
-  }                                                                          \
-                                                                             \
  private:
 
 // A C++ object's vptr will be initialized to its leftmost base's vtable after
@@ -245,7 +231,6 @@
  public:                                                                 \
   HeapObjectHeader* GetHeapObjectHeader() const override = 0;            \
   TraceDescriptor GetTraceDescriptor() const override = 0;               \
-  TraceWrapperDescriptor GetTraceWrapperDescriptor() const override = 0; \
                                                                          \
  private:                                                                \
   using merge_garbage_collected_mixins_requires_semicolon = void
diff --git a/third_party/blink/renderer/platform/heap/incremental_marking_test.cc b/third_party/blink/renderer/platform/heap/incremental_marking_test.cc
index cdfb0e2..bdea58e 100644
--- a/third_party/blink/renderer/platform/heap/incremental_marking_test.cc
+++ b/third_party/blink/renderer/platform/heap/incremental_marking_test.cc
@@ -72,7 +72,7 @@
   void Visit(const TraceWrapperV8Reference<v8::Value>&) final {}
   void Visit(DOMWrapperMap<ScriptWrappable>*,
              const ScriptWrappable* key) final {}
-  void Visit(void*, TraceWrapperDescriptor) final {}
+  void VisitWithWrappers(void*, TraceDescriptor) final {}
 
  private:
   std::vector<void*>* objects_;
diff --git a/third_party/blink/renderer/platform/heap/marking_verifier.h b/third_party/blink/renderer/platform/heap/marking_verifier.h
index 1d9d67a..d5b01125 100644
--- a/third_party/blink/renderer/platform/heap/marking_verifier.h
+++ b/third_party/blink/renderer/platform/heap/marking_verifier.h
@@ -58,7 +58,7 @@
   void Visit(const TraceWrapperV8Reference<v8::Value>&) final {}
   void Visit(DOMWrapperMap<ScriptWrappable>*,
              const ScriptWrappable* key) final {}
-  void Visit(void*, TraceWrapperDescriptor) final {}
+  void VisitWithWrappers(void*, TraceDescriptor) final {}
 
  private:
   void VerifyChild(void* base_object_payload) {
diff --git a/third_party/blink/renderer/platform/heap/marking_visitor.h b/third_party/blink/renderer/platform/heap/marking_visitor.h
index 0c5c362..24ae2ce 100644
--- a/third_party/blink/renderer/platform/heap/marking_visitor.h
+++ b/third_party/blink/renderer/platform/heap/marking_visitor.h
@@ -109,7 +109,7 @@
                desc.callback);
   }
 
-  void Visit(void*, TraceWrapperDescriptor) final {
+  void VisitWithWrappers(void*, TraceDescriptor) final {
     // Ignore as the object is also passed to Visit(void*, TraceDescriptor).
   }
 
diff --git a/third_party/blink/renderer/platform/heap/trace_traits.h b/third_party/blink/renderer/platform/heap/trace_traits.h
index 86180e77..9ac4c315 100644
--- a/third_party/blink/renderer/platform/heap/trace_traits.h
+++ b/third_party/blink/renderer/platform/heap/trace_traits.h
@@ -54,10 +54,6 @@
     return {self, TraceTrait<T>::Trace, TraceEagerlyTrait<T>::value};
   }
 
-  static TraceWrapperDescriptor GetTraceWrapperDescriptor(void* self) {
-    return {self, TraceTrait<T>::TraceWrappers};
-  }
-
   static HeapObjectHeader* GetHeapObjectHeader(void* self) {
 #if DCHECK_IS_ON()
     HeapObjectHeader::CheckFromPayload(self);
@@ -76,11 +72,6 @@
     return self->GetTraceDescriptor();
   }
 
-  static TraceWrapperDescriptor GetTraceWrapperDescriptor(const T* self) {
-    DCHECK(self);
-    return self->GetTraceWrapperDescriptor();
-  }
-
   static HeapObjectHeader* GetHeapObjectHeader(const T* self) {
     DCHECK(self);
     return self->GetHeapObjectHeader();
@@ -191,17 +182,11 @@
     return AdjustPointerTrait<T>::GetTraceDescriptor(static_cast<T*>(self));
   }
 
-  static TraceWrapperDescriptor GetTraceWrapperDescriptor(void* self) {
-    return AdjustPointerTrait<T>::GetTraceWrapperDescriptor(
-        static_cast<T*>(self));
-  }
-
   static HeapObjectHeader* GetHeapObjectHeader(void* self) {
     return AdjustPointerTrait<T>::GetHeapObjectHeader(static_cast<T*>(self));
   }
 
   static void Trace(Visitor*, void* self);
-  static void TraceWrappers(ScriptWrappableVisitor*, void*);
 };
 
 template <typename T>
@@ -213,14 +198,6 @@
   static_cast<T*>(self)->Trace(visitor);
 }
 
-template <typename T>
-void TraceTrait<T>::TraceWrappers(ScriptWrappableVisitor* visitor, void* self) {
-  static_assert(sizeof(T), "type needs to be defined");
-  static_assert(IsGarbageCollectedType<T>::value,
-                "only objects deriving from GarbageCollected can be used");
-  static_cast<T*>(self)->Trace(visitor);
-}
-
 template <typename T, typename Traits>
 struct TraceTrait<HeapVectorBacking<T, Traits>> {
   STATIC_ONLY(TraceTrait);
diff --git a/third_party/blink/renderer/platform/heap/visitor.h b/third_party/blink/renderer/platform/heap/visitor.h
index ee3ad9d..9b9ba50 100644
--- a/third_party/blink/renderer/platform/heap/visitor.h
+++ b/third_party/blink/renderer/platform/heap/visitor.h
@@ -228,8 +228,8 @@
     // the TraceDescriptor versions.
     Visit(const_cast<void*>(reinterpret_cast<const void*>(t)),
           TraceDescriptorFor(t));
-    Visit(const_cast<void*>(reinterpret_cast<const void*>(t)),
-          TraceWrapperDescriptorFor(t));
+    VisitWithWrappers(const_cast<void*>(reinterpret_cast<const void*>(t)),
+                      TraceDescriptorFor(t));
   }
 
   void Trace(DOMWrapperMap<ScriptWrappable>* wrapper_map,
@@ -248,9 +248,7 @@
   virtual void Visit(void*, TraceDescriptor) = 0;
   // Subgraph of objects that are interested in wrappers. Note that the same
   // object is also passed to Visit(void*, TraceDescriptor).
-  // TODO(mlippautz): Remove this visit method once wrapper tracing also uses
-  // Trace() instead of TraceWrappers().
-  virtual void Visit(void*, TraceWrapperDescriptor) = 0;
+  virtual void VisitWithWrappers(void*, TraceDescriptor) = 0;
 
   // Visits an object through a weak reference.
   virtual void VisitWeak(void*, void**, TraceDescriptor, WeakCallback) = 0;
@@ -298,12 +296,6 @@
     return TraceTrait<T>::GetTraceDescriptor(const_cast<T*>(traceable));
   }
 
-  template <typename T>
-  static inline TraceWrapperDescriptor TraceWrapperDescriptorFor(
-      const T* traceable) {
-    return TraceTrait<T>::GetTraceWrapperDescriptor(const_cast<T*>(traceable));
-  }
-
  private:
   template <typename T>
   static void HandleWeakCell(Visitor* self, void*);
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index 4eaad70..4f2404b7 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -616,6 +616,12 @@
       name: "IntersectionObserverV2",
     },
     {
+      // Tracks "jank" from layout objects changing their visual location
+      // between animation frames (see crbug.com/581518).
+      name: "JankTracking",
+      status: "experimental",
+    },
+    {
       name: "JSImageDecode",
       status: "stable",
     },
diff --git a/third_party/blink/renderer/platform/supplementable.h b/third_party/blink/renderer/platform/supplementable.h
index 50381117..356a674e 100644
--- a/third_party/blink/renderer/platform/supplementable.h
+++ b/third_party/blink/renderer/platform/supplementable.h
@@ -105,19 +105,8 @@
 template <typename T>
 class Supplementable;
 
-// Supplement<T>-specific version of TraceWrapperBase class. In order to support
-// wrapper-tracing from Supplementable<T> to Supplement<T> (especially when
-// crossing core/modules boundary), Supplement<T> needs to be wrapper-traceable.
-// This class provides a common API for all subclasses of Supplement<T> to
-// support wrapper-tracing.
-class PLATFORM_EXPORT TraceWrapperBaseForSupplement {
- public:
-  virtual void TraceWrappers(ScriptWrappableVisitor* visitor) const {}
-};
-
 template <typename T>
-class Supplement : public GarbageCollectedMixin,
-                   public TraceWrapperBaseForSupplement {
+class Supplement : public GarbageCollectedMixin {
  public:
   // TODO(haraken): Remove the default constructor.
   // All Supplement objects should be instantiated with |supplementable_|.
@@ -205,10 +194,6 @@
   }
 
   void Trace(blink::Visitor* visitor) override { visitor->Trace(supplements_); }
-  virtual void TraceWrappers(ScriptWrappableVisitor* visitor) const {
-    for (const auto& supplement : supplements_.Values())
-      visitor->TraceWrappers(supplement);
-  }
 
  protected:
   using SupplementMap = HeapHashMap<const char*,
diff --git a/third_party/blink/tools/apache_config/mime.types b/third_party/blink/tools/apache_config/mime.types
index c6b19b8..6934e1b 100644
--- a/third_party/blink/tools/apache_config/mime.types
+++ b/third_party/blink/tools/apache_config/mime.types
@@ -84,7 +84,6 @@
 application/sgml
 application/sgml-open-catalog
 application/sieve
-application/signed-exchange;v=b0	htxg
 application/signed-exchange;v=b1	sxg
 application/slate
 application/smil		smi smil
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl
index 2cab490..139770c 100644
--- a/tools/mb/mb_config.pyl
+++ b/tools/mb/mb_config.pyl
@@ -570,7 +570,11 @@
     # TODO(crbug/786044): Remove non-compile debug configs when migrated.
     'tryserver.chromium.angle': {
       'android_angle_rel_ng': 'gpu_tests_android_release_trybot_arm64',
+      'android_angle_vk32_rel_ng': 'gpu_tests_android_vulkan_release_trybot',
+      'android_angle_vk64_rel_ng': 'gpu_tests_android_vulkan_release_trybot_arm64',
       'android_angle_deqp_rel_ng': 'deqp_android_release_trybot_arm64',
+      'android_angle_vk32_deqp_rel_ng': 'deqp_android_vulkan_release_trybot',
+      'android_angle_vk64_deqp_rel_ng': 'deqp_android_vulkan_release_trybot_arm64',
       'linux_angle_ozone_rel_ng': 'gpu_fyi_tests_ozone_linux_system_gbm_libdrm_release_trybot',
       'linux_angle_dbg_ng': 'gpu_fyi_tests_debug_trybot',
       'linux_angle_deqp_rel_ng': 'deqp_release_trybot',
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 5bd7b0b..30ae448 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -8296,6 +8296,11 @@
   <int value="7" label="Error Starting Container"/>
 </enum>
 
+<enum name="CrostiniUISurface">
+  <int value="0" label="Settings"/>
+  <int value="1" label="App List"/>
+</enum>
+
 <enum name="CrostiniUninstallResult">
   <int value="0" label="User Cancelled"/>
   <int value="1" label="Error"/>
@@ -11464,6 +11469,7 @@
   <int value="7" label="THREAD_STARTED"/>
   <int value="8" label="SCRIPT_READ_STARTED"/>
   <int value="9" label="SCRIPT_READ_FINISHED"/>
+  <int value="10" label="SCRIPT_STREAMING"/>
 </enum>
 
 <enum name="EmmcLifeUsed">
@@ -27006,6 +27012,7 @@
   <int value="-1327676774" label="disable-accelerated-mjpeg-decode"/>
   <int value="-1325887476" label="NewPrintPreview:enabled"/>
   <int value="-1322882747" label="disable-datasaver-prompt"/>
+  <int value="-1320952186" label="new-files-app-navigation"/>
   <int value="-1319688939" label="ignore-gpu-blacklist"/>
   <int value="-1318914924" label="OverflowIconsForMediaControls:enabled"/>
   <int value="-1314603238" label="ChromeHomePullToRefreshIphAtTop:enabled"/>
@@ -29632,6 +29639,15 @@
   <int value="2" label="Non-Secure"/>
 </enum>
 
+<enum name="MashService">
+  <int value="0" label="Ash (window manager)"/>
+  <int value="1" label="Autoclick"/>
+  <int value="2" label="Quick launch"/>
+  <int value="3" label="Shortcut viewer"/>
+  <int value="4" label="Tap visualizer"/>
+  <int value="5" label="Font"/>
+</enum>
+
 <enum name="MatchResult">
   <int value="0" label="Valid match"/>
   <int value="1" label="Invalid match"/>
@@ -33175,6 +33191,14 @@
   <int value="4" label="UNREGISTRATION_FAILED"/>
 </enum>
 
+<enum name="NotificationHelperNotificationActivatorStatus">
+  <int value="0" label="Success"/>
+  <int value="1" label="Chrome exe missing"/>
+  <int value="2" label="Launch chrome failed"/>
+  <int value="3" label="Launch id empty"/>
+  <int value="4" label="AllowSetForegroundWindow call failed"/>
+</enum>
+
 <enum name="NotifierType">
   <int value="0" label="Application"/>
   <int value="1" label="Arc++"/>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 041fb77..9cca43d 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -14000,20 +14000,38 @@
   <owner>benwells@chromium.org</owner>
   <owner>tbuckley@chromium.org</owner>
   <summary>
-    Recorded each time the user initiates the Crostini setup UI, recording the
+    Recorded each time the user completes the Crostini setup UI, recording the
     result of the setup.
   </summary>
 </histogram>
 
+<histogram name="Crostini.SetupSource" enum="CrostiniUISurface">
+  <owner>benwells@chromium.org</owner>
+  <owner>tbuckley@chromium.org</owner>
+  <summary>
+    Recorded each time the user initiates the Crostini setup UI, recording the
+    UI surface that invoked the setup.
+  </summary>
+</histogram>
+
 <histogram name="Crostini.UninstallResult" enum="CrostiniUninstallResult">
   <owner>benwells@chromium.org</owner>
   <owner>tbuckley@chromium.org</owner>
   <summary>
-    Recorded each time the user initiates the Crostini uninstall UI, recording
+    Recorded each time the user completes the Crostini uninstall UI, recording
     the result of the uninstall.
   </summary>
 </histogram>
 
+<histogram name="Crostini.UninstallSource" enum="CrostiniUISurface">
+  <owner>benwells@chromium.org</owner>
+  <owner>tbuckley@chromium.org</owner>
+  <summary>
+    Recorded each time the user initiates the Crostini uninstall UI, recording
+    the UI surface that initiated the uninstall.
+  </summary>
+</histogram>
+
 <histogram name="CryptAuth.DeviceSyncSoftwareFeaturesResult"
     enum="BooleanSuccess">
   <owner>hansberry@chromium.org</owner>
@@ -29202,6 +29220,17 @@
   </summary>
 </histogram>
 
+<histogram name="FileBrowser.TeamDrivesCount" units="Team Drives"
+    expires_after="M75">
+  <owner>sashab@google.com</owner>
+  <summary>
+    Chrome OS File Browser: number of Team Drives a user has available in the
+    Files app. Computed every time the File Browser is opened (including file
+    picker dialogs). NOTE: This data is biased towards users that use the Files
+    App more often.
+  </summary>
+</histogram>
+
 <histogram name="FileBrowser.ToggleFileListType" enum="FileManagerListType">
   <owner>sashab@chromium.org</owner>
   <summary>
@@ -35469,6 +35498,14 @@
   </summary>
 </histogram>
 
+<histogram name="Launch.MashService" enum="MashService">
+  <owner>jamescook@chromium.org</owner>
+  <summary>
+    Records when a mojo ash UI service is started, for example the mojo app
+    version of the keyboard shortcut viewer.
+  </summary>
+</histogram>
+
 <histogram name="Launch.Modes" enum="LaunchMode">
   <owner>calamity@chromium.org</owner>
   <summary>The different ways Chrome is launched.</summary>
@@ -56619,12 +56656,22 @@
 <histogram name="NewTabPage.BackgroundService.Collections.RequestLatency"
     units="ms">
   <owner>ramyan@chromium.org</owner>
+  <owner>yyushkina@chromium.org</owner>
   <summary>
     The time it took until a request from the New Tab page for the NTP
     Background Collections script was served. Recorded only on the local NTP.
   </summary>
 </histogram>
 
+<histogram name="NewTabPage.BackgroundService.Images.RequestLatency" units="ms">
+  <owner>ramyan@chromium.org</owner>
+  <owner>yyushkina@chromium.org</owner>
+  <summary>
+    The time it took until a request from the New Tab page for the NTP
+    Background Images script was served. Recorded only on the local NTP.
+  </summary>
+</histogram>
+
 <histogram name="NewTabPage.BookmarkActionAndroid"
     enum="NewTabPageBookmarkActionAndroid">
   <obsolete>
@@ -58864,6 +58911,15 @@
   </summary>
 </histogram>
 
+<histogram name="Notifications.NotificationHelper.NotificationActivatorStatus"
+    enum="NotificationHelperNotificationActivatorStatus">
+  <owner>chengx@chromium.org</owner>
+  <summary>
+    The execute status of NotificationActivator::Activate. Logged whenever a
+    notification_helper process is launched by Windows.
+  </summary>
+</histogram>
+
 <histogram name="Notifications.NotificationHelper.ServerRuntime" units="ms">
   <owner>chengx@chromium.org</owner>
   <summary>
@@ -96006,6 +96062,38 @@
   </summary>
 </histogram>
 
+<histogram name="Sync.Preferences.ClearedLocalPrefOnTypeMismatch"
+    units="BooleanHit">
+  <owner>tschumann@chromium.org</owner>
+  <owner>treib@chromium.org</owner>
+  <summary>
+    Counts the number of times a syncable pref got registered using a type that
+    mismatched the type present in the pref store. In these events, the
+    persisted value gets removed from the pref store.
+  </summary>
+</histogram>
+
+<histogram name="Sync.Preferences.RemotePrefTypeMismatch" units="BooleanHit">
+  <owner>tschumann@chromium.org</owner>
+  <owner>treib@chromium.org</owner>
+  <summary>
+    Counts the number of times a client received a remote pref update with a
+    value type different from the registered pref type. The client will ignore
+    those remote updates.
+  </summary>
+</histogram>
+
+<histogram name="Sync.Preferences.SyncingUnknownPrefs" units="prefs">
+  <owner>tschumann@chromium.org</owner>
+  <owner>treib@chromium.org</owner>
+  <summary>
+    The number of unknown prefs being synced. This number is computed after the
+    sync model has been associated. Preferences which get handled by sync even
+    before being registered are considered &quot;unknown&quot;. This might be
+    limited to a whitelist of preferences.
+  </summary>
+</histogram>
+
 <histogram name="Sync.PreferencesAssociationTime" units="ms">
   <owner>zea@chromium.org</owner>
   <summary>Time taken during preference association.</summary>
@@ -116643,13 +116731,14 @@
   <affected-histogram name="OOBE.ErrorScreensTime.Update"/>
 </histogram_suffixes>
 
-<histogram_suffixes
-    name="NewTabPage.BackgroundService.Collections.RequestLatency"
+<histogram_suffixes name="NewTabPage.BackgroundService.RequestLatency"
     separator=".">
-  <suffix name="Failure" label="Failed to fetch background collections"/>
-  <suffix name="Success" label="Successfully fetched background collections"/>
+  <suffix name="Failure" label="Failed to fetch data from background service"/>
+  <suffix name="Success" label="Successfully fetched from background service"/>
   <affected-histogram
       name="NewTabPage.BackgroundService.Collections.RequestLatency"/>
+  <affected-histogram
+      name="NewTabPage.BackgroundService.Images.RequestLatency"/>
 </histogram_suffixes>
 
 <histogram_suffixes name="NewTabPage.OneGoogleBar.RequestLatency" separator=".">
diff --git a/tools/traffic_annotation/summary/annotations.xml b/tools/traffic_annotation/summary/annotations.xml
index 77840159..423126e 100644
--- a/tools/traffic_annotation/summary/annotations.xml
+++ b/tools/traffic_annotation/summary/annotations.xml
@@ -20,6 +20,7 @@
  <item id="asset_links" hash_code="89771989" type="0" content_hash_code="72216357" os_list="linux,windows" file_path="components/password_manager/core/browser/site_affiliation/asset_link_retriever.cc"/>
  <item id="autofill_query" hash_code="88863520" type="0" content_hash_code="15563339" os_list="linux,windows" file_path="components/autofill/core/browser/autofill_download_manager.cc"/>
  <item id="autofill_upload" hash_code="104798869" type="0" content_hash_code="110634763" os_list="linux,windows" file_path="components/autofill/core/browser/autofill_download_manager.cc"/>
+ <item id="backdrop_collection_images_download" hash_code="34767164" type="0" content_hash_code="103835921" os_list="linux,windows" file_path="chrome/browser/search/background/ntp_background_service.cc"/>
  <item id="backdrop_collection_names_download" hash_code="49246286" type="0" content_hash_code="84237233" os_list="linux,windows" file_path="chrome/browser/search/background/ntp_background_service.cc"/>
  <item id="background_fetch_context" hash_code="16469669" type="0" content_hash_code="52235434" os_list="linux,windows" file_path="content/browser/background_fetch/background_fetch_delegate_proxy.cc"/>
  <item id="background_performance_tracer" hash_code="84575287" type="0" content_hash_code="120154250" os_list="linux,windows" file_path="chrome/browser/tracing/crash_service_uploader.cc"/>
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index 149569c..a88c0c89 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -1278,6 +1278,41 @@
 }
 
 //
+// IAccessibleEx implementation.
+//
+
+STDMETHODIMP AXPlatformNodeWin::GetObjectForChild(LONG child_id,
+                                                  IAccessibleEx** result) {
+  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_OBJECT_FOR_CHILD);
+  // No support for child IDs in this implementation.
+  COM_OBJECT_VALIDATE_1_ARG(result);
+  *result = nullptr;
+  return S_OK;
+}
+
+STDMETHODIMP AXPlatformNodeWin::GetIAccessiblePair(IAccessible** accessible,
+                                                   LONG* child_id) {
+  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_IACCESSIBLE_PAIR);
+  COM_OBJECT_VALIDATE_2_ARGS(accessible, child_id);
+  *accessible = static_cast<IAccessible*>(this);
+  (*accessible)->AddRef();
+  *child_id = CHILDID_SELF;
+  return S_OK;
+}
+
+STDMETHODIMP AXPlatformNodeWin::GetRuntimeId(SAFEARRAY** runtime_id) {
+  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_RUNTIME_ID);
+  return E_NOTIMPL;
+}
+
+STDMETHODIMP
+AXPlatformNodeWin::ConvertReturnedElement(IRawElementProviderSimple* element,
+                                          IAccessibleEx** acc) {
+  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_CONVERT_RETURNED_ELEMENT);
+  return E_NOTIMPL;
+}
+
+//
 // IAccessibleTable methods.
 //
 
@@ -2398,6 +2433,158 @@
 }
 
 //
+// IRawElementProviderSimple implementation.
+//
+
+STDMETHODIMP AXPlatformNodeWin::GetPatternProvider(PATTERNID pattern_id,
+                                                   IUnknown** result) {
+  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_PATTERN_PROVIDER);
+  COM_OBJECT_VALIDATE_1_ARG(result);
+
+  switch (pattern_id) {
+    // Supported by IAccessibleEx.
+    case UIA_DockPatternId:
+    case UIA_ExpandCollapsePatternId:
+    case UIA_GridPatternId:
+    case UIA_GridItemPatternId:
+    case UIA_MultipleViewPatternId:
+    case UIA_RangeValuePatternId:
+    case UIA_ScrollPatternId:
+    case UIA_ScrollItemPatternId:
+    case UIA_SynchronizedInputPatternId:
+    case UIA_TablePatternId:
+    case UIA_TableItemPatternId:
+    case UIA_TransformPatternId:
+      // TODO(suproteem): Implementations where applicable.
+      *result = nullptr;
+      break;
+    // TODO(suproteem): Add checks for control role.
+    case UIA_InvokePatternId:
+    case UIA_SelectionItemPatternId:
+    case UIA_SelectionPatternId:
+    case UIA_TogglePatternId:
+    case UIA_ValuePatternId:
+    case UIA_WindowPatternId:
+
+    // Overlap with MSAA, not supported.
+    case UIA_AnnotationPatternId:
+    case UIA_CustomNavigationPatternId:
+    case UIA_DragPatternId:
+    case UIA_DropTargetPatternId:
+    case UIA_ItemContainerPatternId:
+    case UIA_LegacyIAccessiblePatternId:
+    case UIA_ObjectModelPatternId:
+    case UIA_SpreadsheetPatternId:
+    case UIA_SpreadsheetItemPatternId:
+    case UIA_StylesPatternId:
+    case UIA_TextChildPatternId:
+    case UIA_TextEditPatternId:
+    case UIA_TextPatternId:
+    case UIA_TextPattern2Id:
+    case UIA_TransformPattern2Id:
+    case UIA_VirtualizedItemPatternId:
+      *result = nullptr;
+      break;
+  }
+  return S_OK;
+}
+
+STDMETHODIMP AXPlatformNodeWin::GetPropertyValue(PROPERTYID property_id,
+                                                 VARIANT* result) {
+  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_PROPERTY_VALUE);
+  COM_OBJECT_VALIDATE_1_ARG(result);
+
+  switch (property_id) {
+    // Supported by IAccessibleEx.
+    case UIA_AriaPropertiesPropertyId:
+    case UIA_AriaRolePropertyId:
+    case UIA_AutomationIdPropertyId:
+    case UIA_ClassNamePropertyId:
+    case UIA_ClickablePointPropertyId:
+    case UIA_ControllerForPropertyId:
+    case UIA_CulturePropertyId:
+    case UIA_DescribedByPropertyId:
+    case UIA_FlowsToPropertyId:
+    case UIA_FrameworkIdPropertyId:
+    case UIA_IsContentElementPropertyId:
+    case UIA_IsControlElementPropertyId:
+    case UIA_IsDataValidForFormPropertyId:
+    case UIA_IsRequiredForFormPropertyId:
+    case UIA_ItemStatusPropertyId:
+    case UIA_ItemTypePropertyId:
+    case UIA_LabeledByPropertyId:
+    case UIA_LocalizedControlTypePropertyId:
+    case UIA_OrientationPropertyId:
+      // TODO(suproteem): Implementations where applicable.
+      result->vt = VT_EMPTY;
+      break;
+    // Covered by MSAA.
+    case UIA_BoundingRectanglePropertyId:
+    case UIA_HasKeyboardFocusPropertyId:
+    case UIA_HelpTextPropertyId:
+    case UIA_IsEnabledPropertyId:
+    case UIA_IsKeyboardFocusablePropertyId:
+    case UIA_IsOffscreenPropertyId:
+    case UIA_IsPasswordPropertyId:
+    case UIA_NamePropertyId:
+    case UIA_NativeWindowHandlePropertyId:
+    case UIA_ProcessIdPropertyId:
+      result->vt = VT_EMPTY;
+      break;
+    // Overlap with MSAA, not supported.
+    case UIA_AcceleratorKeyPropertyId:
+    case UIA_AccessKeyPropertyId:
+    case UIA_AnnotationObjectsPropertyId:
+    case UIA_AnnotationTypesPropertyId:
+    case UIA_CenterPointPropertyId:
+    case UIA_ControlTypePropertyId:
+    case UIA_CustomControlTypeId:
+    case UIA_FillColorPropertyId:
+    case UIA_FillTypePropertyId:
+    case UIA_FlowsFromPropertyId:
+    case UIA_FullDescriptionPropertyId:
+    case UIA_GroupControlTypeId:
+    case UIA_HeadingLevelPropertyId:
+    case UIA_IsPeripheralPropertyId:
+    case UIA_LandmarkTypePropertyId:
+    case UIA_LevelPropertyId:
+    case UIA_LiveSettingPropertyId:
+    case UIA_LocalizedLandmarkTypePropertyId:
+    case UIA_MenuControlTypeId:
+    case UIA_OptimizeForVisualContentPropertyId:
+    case UIA_OutlineColorPropertyId:
+    case UIA_OutlineThicknessPropertyId:
+    case UIA_PaneControlTypeId:
+    case UIA_PositionInSetPropertyId:
+    case UIA_ProviderDescriptionPropertyId:
+    case UIA_RotationPropertyId:
+    case UIA_RuntimeIdPropertyId:
+    case UIA_SizeOfSetPropertyId:
+    case UIA_SizePropertyId:
+    case UIA_ToolBarControlTypeId:
+    case UIA_ToolTipControlTypeId:
+    case UIA_VisualEffectsPropertyId:
+    case UIA_WindowControlTypeId:
+      // MSAA-to-UIA Proxy.
+      result->vt = VT_EMPTY;
+      break;
+  }
+
+  return S_OK;
+}
+
+STDMETHODIMP AXPlatformNodeWin::get_ProviderOptions(ProviderOptions* ret) {
+  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_PROVIDER_OPTIONS);
+  return E_NOTIMPL;
+}
+
+STDMETHODIMP AXPlatformNodeWin::get_HostRawElementProvider(
+    IRawElementProviderSimple** provider) {
+  WIN_ACCESSIBILITY_API_HISTOGRAM(UMA_API_GET_HOST_RAW_ELEMENT_PROVIDER);
+  return E_NOTIMPL;
+}
+
+//
 // IServiceProvider implementation.
 //
 
@@ -2421,6 +2608,9 @@
     return QueryInterface(riid, object);
   }
 
+  // TODO(suproteem): Include IAccessibleEx in the list, potentially checking
+  // for version.
+
   *object = nullptr;
   return E_FAIL;
 }
diff --git a/ui/accessibility/platform/ax_platform_node_win.h b/ui/accessibility/platform/ax_platform_node_win.h
index b4fb9840..6d4cb3f 100644
--- a/ui/accessibility/platform/ax_platform_node_win.h
+++ b/ui/accessibility/platform/ax_platform_node_win.h
@@ -7,10 +7,13 @@
 
 #include <atlbase.h>
 #include <atlcom.h>
+#include <objbase.h>
 #include <oleacc.h>
-#include <vector>
+#include <uiautomation.h>
 #include <wrl/client.h>
 
+#include <vector>
+
 #include "base/compiler_specific.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/observer_list.h"
@@ -232,10 +235,12 @@
                         public IDispatchImpl<IAccessible2_2,
                                              &IID_IAccessible2,
                                              &LIBID_IAccessible2Lib>,
+                        public IAccessibleEx,
                         public IAccessibleText,
                         public IAccessibleTable,
                         public IAccessibleTable2,
                         public IAccessibleTableCell,
+                        public IRawElementProviderSimple,
                         public IServiceProvider,
                         public AXPlatformNodeBase {
  public:
@@ -245,10 +250,12 @@
     COM_INTERFACE_ENTRY(IAccessible)
     COM_INTERFACE_ENTRY(IAccessible2)
     COM_INTERFACE_ENTRY(IAccessible2_2)
+    COM_INTERFACE_ENTRY(IAccessibleEx)
     COM_INTERFACE_ENTRY(IAccessibleText)
     COM_INTERFACE_ENTRY(IAccessibleTable)
     COM_INTERFACE_ENTRY(IAccessibleTable2)
     COM_INTERFACE_ENTRY(IAccessibleTableCell)
+    COM_INTERFACE_ENTRY(IRawElementProviderSimple)
     COM_INTERFACE_ENTRY(IServiceProvider)
   END_COM_MAP()
 
@@ -401,6 +408,23 @@
                                        LONG* caret_offset) override;
 
   //
+  // IAccessibleEx methods.
+  //
+
+  STDMETHODIMP GetObjectForChild(LONG child_id,
+                                 IAccessibleEx** result) override;
+
+  STDMETHODIMP GetIAccessiblePair(IAccessible** accessible,
+                                  LONG* child_id) override;
+
+  // IAccessibleEx methods not implemented.
+  STDMETHODIMP GetRuntimeId(SAFEARRAY** runtime_id) override;
+
+  STDMETHODIMP
+  ConvertReturnedElement(IRawElementProviderSimple* element,
+                         IAccessibleEx** acc) override;
+
+  //
   // IAccessibleText methods.
   //
 
@@ -614,6 +638,24 @@
                                       LONG y) override;
 
   //
+  // IRawElementProviderSimple methods.
+  //
+
+  STDMETHODIMP GetPatternProvider(PATTERNID pattern_id,
+                                  IUnknown** result) override;
+
+  STDMETHODIMP GetPropertyValue(PROPERTYID property_id,
+                                VARIANT* result) override;
+
+  // IRawElementProviderSimple methods not implemented.
+
+  STDMETHODIMP
+  get_ProviderOptions(enum ProviderOptions* ret) override;
+
+  STDMETHODIMP
+  get_HostRawElementProvider(IRawElementProviderSimple** provider) override;
+
+  //
   // IServiceProvider methods.
   //
 
diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn
index 78fac36..2f80c4e 100644
--- a/ui/android/BUILD.gn
+++ b/ui/android/BUILD.gn
@@ -316,6 +316,7 @@
     "//cc:test_support",
     "//components/viz/host:host",
     "//components/viz/service:service",
+    "//components/viz/test:test_support",
     "//skia",
     "//testing/gmock",
     "//testing/gtest",
diff --git a/ui/android/DEPS b/ui/android/DEPS
index bfdcf755..55fec7913 100644
--- a/ui/android/DEPS
+++ b/ui/android/DEPS
@@ -21,3 +21,9 @@
   "+ui/events",
   "+ui/gfx",
 ]
+
+specific_include_rules = {
+  ".*test\.(cc|h)": [
+    "+components/viz/test"
+  ]
+}
diff --git a/ui/android/delegated_frame_host_android.cc b/ui/android/delegated_frame_host_android.cc
index f3fd302a..96736d9 100644
--- a/ui/android/delegated_frame_host_android.cc
+++ b/ui/android/delegated_frame_host_android.cc
@@ -39,14 +39,15 @@
 constexpr viz::LocalSurfaceId kInvalidLocalSurfaceId;
 
 scoped_refptr<cc::SurfaceLayer> CreateSurfaceLayer(
-    const viz::SurfaceId& surface_id,
+    const viz::SurfaceId& primary_surface_id,
+    const viz::SurfaceId& fallback_surface_id,
     const gfx::Size& size_in_pixels,
+    const cc::DeadlinePolicy& deadline_policy,
     bool surface_opaque) {
   // manager must outlive compositors using it.
   auto layer = cc::SurfaceLayer::Create();
-  layer->SetPrimarySurfaceId(surface_id,
-                             cc::DeadlinePolicy::UseDefaultDeadline());
-  layer->SetFallbackSurfaceId(surface_id);
+  layer->SetPrimarySurfaceId(primary_surface_id, deadline_policy);
+  layer->SetFallbackSurfaceId(fallback_surface_id);
   layer->SetBounds(size_in_pixels);
   layer->SetIsDrawable(true);
   layer->SetContentsOpaque(surface_opaque);
@@ -74,6 +75,12 @@
   DCHECK(view_);
   DCHECK(client_);
 
+  constexpr bool is_transparent = false;
+  content_layer_ = CreateSurfaceLayer(
+      viz::SurfaceId(), viz::SurfaceId(), gfx::Size(),
+      cc::DeadlinePolicy::UseDefaultDeadline(), is_transparent);
+  view_->GetLayer()->AddChild(content_layer_);
+
   host_frame_sink_manager_->RegisterFrameSinkId(frame_sink_id_, this);
   host_frame_sink_manager_->SetFrameSinkDebugLabel(frame_sink_id_,
                                                    "DelegatedFrameHostAndroid");
@@ -81,7 +88,7 @@
 }
 
 DelegatedFrameHostAndroid::~DelegatedFrameHostAndroid() {
-  DestroyDelegatedContent();
+  EvictDelegatedFrame();
   DetachFromCompositor();
   support_.reset();
   host_frame_sink_manager_->InvalidateFrameSinkId(frame_sink_id_);
@@ -93,33 +100,20 @@
     base::Optional<viz::HitTestRegionList> hit_test_region_list) {
   DCHECK(!enable_viz_);
 
-  if (local_surface_id != surface_info_.id().local_surface_id()) {
-    DestroyDelegatedContent();
-    DCHECK(!content_layer_);
+  viz::RenderPass* root_pass = frame.render_pass_list.back().get();
+  has_transparent_background_ = root_pass->has_transparent_background;
+  support_->SubmitCompositorFrame(local_surface_id, std::move(frame),
+                                  std::move(hit_test_region_list));
 
-    viz::RenderPass* root_pass = frame.render_pass_list.back().get();
-    gfx::Size frame_size = root_pass->output_rect.size();
-    surface_info_ = viz::SurfaceInfo(
-        viz::SurfaceId(frame_sink_id_, local_surface_id), 1.f, frame_size);
-    has_transparent_background_ = root_pass->has_transparent_background;
+  if (!enable_surface_synchronization_) {
+    compositor_attach_until_frame_lock_.reset();
 
-    support_->SubmitCompositorFrame(local_surface_id, std::move(frame),
-                                    std::move(hit_test_region_list));
-
-    content_layer_ =
-        CreateSurfaceLayer(surface_info_.id(), surface_info_.size_in_pixels(),
-                           !has_transparent_background_);
-    view_->GetLayer()->AddChild(content_layer_);
-  } else {
-    support_->SubmitCompositorFrame(local_surface_id, std::move(frame),
-                                    std::move(hit_test_region_list));
+    // If surface synchronization is disabled, SubmitCompositorFrame immediately
+    // activates the CompositorFrame and issues OnFirstSurfaceActivation if the
+    // |local_surface_id| has changed since the last submission.
+    if (content_layer_->bounds() == expected_pixel_size_)
+      compositor_pending_resize_lock_.reset();
   }
-
-  compositor_attach_until_frame_lock_.reset();
-
-  DCHECK(content_layer_);
-  if (content_layer_->bounds() == expected_pixel_size_)
-    compositor_pending_resize_lock_.reset();
 }
 
 void DelegatedFrameHostAndroid::DidNotProduceFrame(
@@ -143,9 +137,11 @@
     return;
   }
 
-  scoped_refptr<cc::Layer> readback_layer =
-      CreateSurfaceLayer(surface_info_.id(), surface_info_.size_in_pixels(),
-                         !has_transparent_background_);
+  // TODO(samans): We shouldn't need a readback layer. https://crbug.com/841734
+  scoped_refptr<cc::Layer> readback_layer = CreateSurfaceLayer(
+      content_layer_->fallback_surface_id(),
+      content_layer_->fallback_surface_id(), content_layer_->bounds(),
+      cc::DeadlinePolicy::UseDefaultDeadline(), !has_transparent_background_);
   readback_layer->SetHideLayerAndSubtree(true);
   view_->GetWindowAndroid()->GetCompositor()->AttachLayerForReadback(
       readback_layer);
@@ -162,7 +158,7 @@
               std::move(callback), std::move(readback_layer)));
 
   if (src_subrect.IsEmpty()) {
-    request->set_area(gfx::Rect(surface_info_.size_in_pixels()));
+    request->set_area(gfx::Rect(content_layer_->bounds()));
   } else {
     request->set_area(
         gfx::ConvertRectToPixel(view_->GetDipScale(), src_subrect));
@@ -179,30 +175,28 @@
 
 bool DelegatedFrameHostAndroid::CanCopyFromCompositingSurface() const {
   // TODO(ericrk): Handle Viz cases here.
-  return support_ && surface_info_.is_valid() && view_->GetWindowAndroid() &&
+  return support_ && content_layer_->fallback_surface_id().is_valid() &&
+         view_->GetWindowAndroid() &&
          view_->GetWindowAndroid()->GetCompositor();
 }
 
-void DelegatedFrameHostAndroid::DestroyDelegatedContent() {
-  // TakeFallbackContentFrom() can populate |content_layer_| when
-  // |surface_info_| is invalid.
-  if (content_layer_) {
-    content_layer_->RemoveFromParent();
-    content_layer_ = nullptr;
-  }
-
-  if (surface_info_.is_valid()) {
-    support_->EvictLastActivatedSurface();
-    surface_info_ = viz::SurfaceInfo();
-  }
+void DelegatedFrameHostAndroid::EvictDelegatedFrame() {
+  viz::SurfaceId surface_id = content_layer_->fallback_surface_id();
+  content_layer_->SetFallbackSurfaceId(viz::SurfaceId());
+  content_layer_->SetPrimarySurfaceId(viz::SurfaceId(),
+                                      cc::DeadlinePolicy::UseDefaultDeadline());
+  if (!surface_id.is_valid())
+    return;
+  std::vector<viz::SurfaceId> surface_ids = {surface_id};
+  host_frame_sink_manager_->EvictSurfaces(surface_ids);
 }
 
 bool DelegatedFrameHostAndroid::HasDelegatedContent() const {
-  return surface_info_.is_valid();
+  return content_layer_->primary_surface_id().is_valid();
 }
 
 void DelegatedFrameHostAndroid::CompositorFrameSinkChanged() {
-  DestroyDelegatedContent();
+  EvictDelegatedFrame();
   CreateNewCompositorFrameSinkSupport();
   if (registered_parent_compositor_)
     AttachToCompositor(registered_parent_compositor_);
@@ -243,21 +237,20 @@
   registered_parent_compositor_ = nullptr;
 }
 
-void DelegatedFrameHostAndroid::SynchronizeVisualProperties(gfx::Size size) {
-  local_surface_id_allocator_.GenerateId();
+void DelegatedFrameHostAndroid::EmbedSurface(
+    const viz::LocalSurfaceId& new_pending_local_surface_id,
+    const gfx::Size& new_pending_size_in_pixels,
+    cc::DeadlinePolicy deadline_policy) {
+  if (!enable_surface_synchronization_)
+    return;
 
-  if (enable_viz_) {
-    DestroyDelegatedContent();
-    DCHECK(!content_layer_);
+  pending_local_surface_id_ = new_pending_local_surface_id;
 
-    // TODO(ericrk): Do we need to handle transparency in Viz?
-    bool is_transparent = true;
-    content_layer_ = CreateSurfaceLayer(
-        viz::SurfaceId(frame_sink_id_,
-                       local_surface_id_allocator_.GetCurrentLocalSurfaceId()),
-        size, is_transparent);
-    view_->GetLayer()->AddChild(content_layer_);
-  }
+  // TODO(fsamuel): Early exit if not visible.
+
+  viz::SurfaceId primary_surface_id(frame_sink_id_, pending_local_surface_id_);
+  content_layer_->SetPrimarySurfaceId(primary_surface_id, deadline_policy);
+  content_layer_->SetBounds(new_pending_size_in_pixels);
 }
 
 void DelegatedFrameHostAndroid::PixelSizeWillChange(
@@ -275,7 +268,7 @@
 
   expected_pixel_size_ = pixel_size;
   if (registered_parent_compositor_) {
-    if (!content_layer_ || content_layer_->bounds() != expected_pixel_size_) {
+    if (content_layer_->bounds() != expected_pixel_size_) {
       compositor_pending_resize_lock_ =
           registered_parent_compositor_->GetCompositorLock(
               this, base::TimeDelta::FromSeconds(kResizeTimeoutSeconds));
@@ -326,25 +319,46 @@
 
 void DelegatedFrameHostAndroid::OnFirstSurfaceActivation(
     const viz::SurfaceInfo& surface_info) {
-  if (!enable_viz_)
+  if (!enable_surface_synchronization_) {
+    EvictDelegatedFrame();
+    content_layer_->SetPrimarySurfaceId(
+        surface_info.id(), cc::DeadlinePolicy::UseExistingDeadline());
+    content_layer_->SetFallbackSurfaceId(surface_info.id());
+    content_layer_->SetContentsOpaque(!has_transparent_background_);
+    content_layer_->SetBounds(surface_info.size_in_pixels());
     return;
+  }
 
-  uint32_t parent_sequence_number =
+  uint32_t active_parent_sequence_number =
       surface_info.id().local_surface_id().parent_sequence_number();
+  uint32_t pending_parent_sequence_number =
+      pending_local_surface_id_.parent_sequence_number();
 
-  // TODO(ericrk): Handle errors due to wrapping.
-  if (parent_sequence_number < parent_sequence_number_at_navigation_) {
-    // TODO(ericrk): Drop reference from HostFrameSinkManager.
-    return;
+  // If |pending_parent_sequence_number| is less than
+  // |first_parent_sequence_number_after_navigation_|, then the parent id has
+  // wrapped around. Make sure that case is covered.
+  bool sequence_wrapped_around =
+      pending_parent_sequence_number <
+          first_parent_sequence_number_after_navigation_ &&
+      active_parent_sequence_number <= pending_parent_sequence_number;
+
+  if (active_parent_sequence_number >=
+          first_parent_sequence_number_after_navigation_ ||
+      sequence_wrapped_around) {
+    if (!received_frame_after_navigation_) {
+      received_frame_after_navigation_ = true;
+      client_->DidReceiveFirstFrameAfterNavigation();
+    }
+  } else {
+    host_frame_sink_manager_->DropTemporaryReference(surface_info.id());
   }
 
-  if (!received_frame_after_navigation_) {
-    client_->DidReceiveFirstFrameAfterNavigation();
-    received_frame_after_navigation_ = true;
-  }
-
-  if (!content_layer_) {
-    // TODO(ericrk): Drop reference from HostFrameSinkManager.
+  // If there's no primary surface, then we don't wish to display content at
+  // this time (e.g. the view is hidden) and so we don't need a fallback
+  // surface either. Since we won't use the fallback surface, we drop the
+  // temporary reference here to save resources.
+  if (!content_layer_->primary_surface_id().is_valid()) {
+    host_frame_sink_manager_->DropTemporaryReference(surface_info.id());
     return;
   }
 
@@ -369,33 +383,27 @@
 }
 
 const viz::SurfaceId& DelegatedFrameHostAndroid::SurfaceId() const {
-  return surface_info_.id();
-}
-
-const viz::LocalSurfaceId& DelegatedFrameHostAndroid::GetLocalSurfaceId()
-    const {
-  return local_surface_id_allocator_.GetCurrentLocalSurfaceId();
+  return content_layer_->fallback_surface_id();
 }
 
 void DelegatedFrameHostAndroid::TakeFallbackContentFrom(
     DelegatedFrameHostAndroid* other) {
-  if (content_layer_ || !other->content_layer_)
+  if (content_layer_->fallback_surface_id().is_valid() ||
+      !other->content_layer_->fallback_surface_id().is_valid()) {
     return;
-  content_layer_ =
-      CreateSurfaceLayer(other->content_layer_->fallback_surface_id(),
-                         other->content_layer_->bounds(),
-                         other->content_layer_->contents_opaque());
-  view_->GetLayer()->AddChild(content_layer_);
+  }
+
+  content_layer_->SetFallbackSurfaceId(
+      other->content_layer_->fallback_surface_id());
 }
 
 void DelegatedFrameHostAndroid::DidNavigate() {
   if (!enable_surface_synchronization_)
     return;
 
+  first_parent_sequence_number_after_navigation_ =
+      pending_local_surface_id_.parent_sequence_number();
   received_frame_after_navigation_ = false;
-  parent_sequence_number_at_navigation_ =
-      local_surface_id_allocator_.GetCurrentLocalSurfaceId()
-          .parent_sequence_number();
 }
 
 }  // namespace ui
diff --git a/ui/android/delegated_frame_host_android.h b/ui/android/delegated_frame_host_android.h
index ba3b53aa..66f2f4c1 100644
--- a/ui/android/delegated_frame_host_android.h
+++ b/ui/android/delegated_frame_host_android.h
@@ -7,9 +7,9 @@
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "cc/layers/deadline_policy.h"
 #include "components/viz/common/frame_sinks/copy_output_request.h"
 #include "components/viz/common/resources/returned_resource.h"
-#include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
 #include "components/viz/common/surfaces/surface_info.h"
 #include "components/viz/host/host_frame_sink_client.h"
 #include "components/viz/service/frame_sinks/compositor_frame_sink_support.h"
@@ -66,7 +66,7 @@
       base::Optional<viz::HitTestRegionList> hit_test_region_list);
   void DidNotProduceFrame(const viz::BeginFrameAck& ack);
 
-  void DestroyDelegatedContent();
+  void EvictDelegatedFrame();
 
   bool HasDelegatedContent() const;
 
@@ -88,7 +88,9 @@
   void AttachToCompositor(WindowAndroidCompositor* compositor);
   void DetachFromCompositor();
 
-  void SynchronizeVisualProperties(gfx::Size size_in_pixels);
+  void EmbedSurface(const viz::LocalSurfaceId& new_pending_local_surface_id,
+                    const gfx::Size& new_pending_size_in_pixels,
+                    cc::DeadlinePolicy deadline_policy);
 
   // Called when we begin a resize operation. Takes the compositor lock until we
   // receive a frame of the expected size.
@@ -98,15 +100,6 @@
   // surface exists (!HasDelegatedContent()).
   const viz::SurfaceId& SurfaceId() const;
 
-  // Returns the local surface ID for this delegated content.
-  const viz::LocalSurfaceId& GetLocalSurfaceId() const;
-
-  // TODO(fsamuel): We should move the viz::ParentLocalSurfaceIdAllocator to
-  // RenderWidgetHostViewAndroid.
-  viz::ParentLocalSurfaceIdAllocator* GetLocalSurfaceIdAllocator() {
-    return &local_surface_id_allocator_;
-  }
-
   void TakeFallbackContentFrom(DelegatedFrameHostAndroid* other);
 
   void DidNavigate();
@@ -148,14 +141,12 @@
   std::unique_ptr<viz::CompositorFrameSinkSupport> support_;
   viz::ExternalBeginFrameSource begin_frame_source_;
 
-  viz::SurfaceInfo surface_info_;
   bool has_transparent_background_ = false;
 
   scoped_refptr<cc::SurfaceLayer> content_layer_;
 
   const bool enable_surface_synchronization_;
   const bool enable_viz_;
-  viz::ParentLocalSurfaceIdAllocator local_surface_id_allocator_;
 
   // The size we are resizing to. Once we receive a frame of this size we can
   // release any resize compositor lock.
@@ -171,9 +162,14 @@
   std::unique_ptr<ui::CompositorLock> compositor_pending_resize_lock_;
 
   // Whether we've received a frame from the renderer since navigating.
-  // Only used in Viz mode.
+  // Only used when surface synchronization is on.
+  uint32_t first_parent_sequence_number_after_navigation_ = 0;
   bool received_frame_after_navigation_ = false;
-  uint32_t parent_sequence_number_at_navigation_ = 0;
+
+  // The local surface id as of the most recent call to
+  // EmbedSurface. This is the surface that we expect future frames to
+  // reference. This will eventually equal the active surface.
+  viz::LocalSurfaceId pending_local_surface_id_;
 
   DISALLOW_COPY_AND_ASSIGN(DelegatedFrameHostAndroid);
 };
diff --git a/ui/android/delegated_frame_host_android_unittest.cc b/ui/android/delegated_frame_host_android_unittest.cc
index 89f2db5..7b40b361 100644
--- a/ui/android/delegated_frame_host_android_unittest.cc
+++ b/ui/android/delegated_frame_host_android_unittest.cc
@@ -8,8 +8,10 @@
 #include "cc/layers/layer.h"
 #include "cc/layers/solid_color_layer.h"
 #include "components/viz/common/hit_test/hit_test_region_list.h"
+#include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
 #include "components/viz/host/host_frame_sink_manager.h"
 #include "components/viz/service/frame_sinks/frame_sink_manager_impl.h"
+#include "components/viz/test/compositor_frame_helpers.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "ui/android/resources/resource_manager.h"
@@ -77,29 +79,24 @@
         task_runner_(new base::TestMockTimeTaskRunner()),
         lock_manager_(task_runner_, &lock_manager_client_) {
     host_frame_sink_manager_.SetLocalManager(&frame_sink_manager_impl_);
+    frame_sink_manager_impl_.SetLocalClient(&host_frame_sink_manager_);
     view_.SetLayer(cc::SolidColorLayer::Create());
     frame_host_ = std::make_unique<DelegatedFrameHostAndroid>(
         &view_, &host_frame_sink_manager_, &client_, frame_sink_id_);
   }
 
-  static viz::LocalSurfaceId GetFakeId() {
-    return viz::LocalSurfaceId(1, 1, base::UnguessableToken::Create());
-  }
-
   ui::CompositorLock* GetLock(CompositorLockClient* client,
                               base::TimeDelta time_delta) {
     return lock_manager_.GetCompositorLock(client, time_delta).release();
   }
 
   void SubmitCompositorFrame(const gfx::Size& frame_size = gfx::Size(10, 10)) {
-    viz::CompositorFrame frame;
-    auto render_pass = viz::RenderPass::Create();
-    render_pass->output_rect = gfx::Rect(frame_size);
-    frame.render_pass_list.push_back(std::move(render_pass));
-    frame.metadata.begin_frame_ack.sequence_number = 1;
-    frame.metadata.device_scale_factor = 1;
-    frame_host_->SubmitCompositorFrame(GetFakeId(), std::move(frame),
-                                       base::nullopt);
+    viz::CompositorFrame frame =
+        viz::CompositorFrameBuilder()
+            .AddRenderPass(gfx::Rect(frame_size), gfx::Rect(frame_size))
+            .Build();
+    frame_host_->SubmitCompositorFrame(allocator_.GenerateId(),
+                                       std::move(frame), base::nullopt);
   }
 
   void SetUpValidFrame(const gfx::Size& frame_size) {
@@ -123,6 +120,7 @@
   viz::HostFrameSinkManager host_frame_sink_manager_;
   MockDelegatedFrameHostAndroidClient client_;
   viz::FrameSinkId frame_sink_id_;
+  viz::ParentLocalSurfaceIdAllocator allocator_;
   std::unique_ptr<DelegatedFrameHostAndroid> frame_host_;
   MockCompositorLockManagerClient lock_manager_client_;
   scoped_refptr<base::TestMockTimeTaskRunner> task_runner_;
diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn
index 5c31061d..426d1f82 100644
--- a/ui/aura/BUILD.gn
+++ b/ui/aura/BUILD.gn
@@ -138,6 +138,7 @@
     "scoped_simple_keyboard_hook.cc",
     "scoped_window_targeter.cc",
     "window.cc",
+    "window_delegate.cc",
     "window_event_dispatcher.cc",
     "window_observer.cc",
     "window_occlusion_tracker.cc",
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 1ab3970..47f55ce7 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -1143,6 +1143,10 @@
   return embeds_external_client_;
 }
 
+bool Window::RequiresDoubleTapGestureEvents() const {
+  return delegate_ && delegate_->RequiresDoubleTapGestureEvents();
+}
+
 void Window::OnPaintLayer(const ui::PaintContext& context) {
   Paint(context);
 }
diff --git a/ui/aura/window.h b/ui/aura/window.h
index fc2b4cd3..4e21096b 100644
--- a/ui/aura/window.h
+++ b/ui/aura/window.h
@@ -422,6 +422,9 @@
   // Returns whether this window is embedding another client.
   bool IsEmbeddingClient() const;
 
+  // ui::GestureConsumer:
+  bool RequiresDoubleTapGestureEvents() const override;
+
  protected:
   // Deletes (or removes if not owned by parent) all child windows. Intended for
   // use from the destructor.
diff --git a/ui/aura/window_delegate.cc b/ui/aura/window_delegate.cc
new file mode 100644
index 0000000..ba61d67
--- /dev/null
+++ b/ui/aura/window_delegate.cc
@@ -0,0 +1,13 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/aura/window_delegate.h"
+
+namespace aura {
+
+bool WindowDelegate::RequiresDoubleTapGestureEvents() const {
+  return false;
+}
+
+}  // namespace aura
diff --git a/ui/aura/window_delegate.h b/ui/aura/window_delegate.h
index 2b24e2e..fae8ea9 100644
--- a/ui/aura/window_delegate.h
+++ b/ui/aura/window_delegate.h
@@ -110,6 +110,10 @@
   // |surface_info| for the first time.
   virtual void OnFirstSurfaceActivation(const viz::SurfaceInfo& surface_info) {}
 
+  // Returns whether the window wants to receive and handle double tap gesture
+  // events. Defaults to false.
+  virtual bool RequiresDoubleTapGestureEvents() const;
+
  protected:
   ~WindowDelegate() override {}
 };
diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc
index a7e13cd9..3efc487 100644
--- a/ui/base/ui_base_features.cc
+++ b/ui/base/ui_base_features.cc
@@ -63,7 +63,12 @@
 
 // Enables GPU rasterization for all UI drawing (where not blacklisted).
 const base::Feature kUiGpuRasterization = {"UiGpuRasterization",
-                                           base::FEATURE_DISABLED_BY_DEFAULT};
+#if defined(OS_MACOSX)
+                                           base::FEATURE_ENABLED_BY_DEFAULT
+#else
+                                           base::FEATURE_DISABLED_BY_DEFAULT
+#endif
+};
 
 bool IsUiGpuRasterizationEnabled() {
   return base::FeatureList::IsEnabled(kUiGpuRasterization);
diff --git a/ui/events/BUILD.gn b/ui/events/BUILD.gn
index 0e619cd..c2631049 100644
--- a/ui/events/BUILD.gn
+++ b/ui/events/BUILD.gn
@@ -148,6 +148,7 @@
     "events_export.h",
     "events_stub.cc",
     "gestures/gesture_recognizer_impl_mac.cc",
+    "gestures/gesture_types.cc",
     "gestures/gesture_types.h",
     "keyboard_hook.h",
     "keyboard_hook_base.cc",
diff --git a/ui/events/event.h b/ui/events/event.h
index 5668526..aabf5a9 100644
--- a/ui/events/event.h
+++ b/ui/events/event.h
@@ -164,6 +164,7 @@
       case ET_GESTURE_SCROLL_END:
       case ET_GESTURE_SCROLL_UPDATE:
       case ET_GESTURE_TAP:
+      case ET_GESTURE_DOUBLE_TAP:
       case ET_GESTURE_TAP_CANCEL:
       case ET_GESTURE_TAP_DOWN:
       case ET_GESTURE_BEGIN:
diff --git a/ui/events/gesture_detection/filtered_gesture_provider.cc b/ui/events/gesture_detection/filtered_gesture_provider.cc
index 8038aa73..d35d750 100644
--- a/ui/events/gesture_detection/filtered_gesture_provider.cc
+++ b/ui/events/gesture_detection/filtered_gesture_provider.cc
@@ -93,6 +93,10 @@
       GestureEventDataPacket::FromTouchTimeout(event));
 }
 
+bool FilteredGestureProvider::RequiresDoubleTapGestureEvents() const {
+  return client_->RequiresDoubleTapGestureEvents();
+}
+
 void FilteredGestureProvider::ForwardGestureEvent(
     const GestureEventData& event) {
   client_->OnGestureEvent(event);
diff --git a/ui/events/gesture_detection/filtered_gesture_provider.h b/ui/events/gesture_detection/filtered_gesture_provider.h
index b0f5c7b..e15a50f3 100644
--- a/ui/events/gesture_detection/filtered_gesture_provider.h
+++ b/ui/events/gesture_detection/filtered_gesture_provider.h
@@ -55,6 +55,7 @@
  private:
   // GestureProviderClient implementation.
   void OnGestureEvent(const ui::GestureEventData& event) override;
+  bool RequiresDoubleTapGestureEvents() const override;
 
   // TouchDispositionGestureFilterClient implementation.
   void ForwardGestureEvent(const ui::GestureEventData& event) override;
diff --git a/ui/events/gesture_detection/filtered_gesture_provider_unittest.cc b/ui/events/gesture_detection/filtered_gesture_provider_unittest.cc
index a4b9e6f..da9d317 100644
--- a/ui/events/gesture_detection/filtered_gesture_provider_unittest.cc
+++ b/ui/events/gesture_detection/filtered_gesture_provider_unittest.cc
@@ -19,6 +19,7 @@
 
   // GestureProviderClient implementation.
   void OnGestureEvent(const GestureEventData&) override {}
+  bool RequiresDoubleTapGestureEvents() const override { return false; }
 
  private:
   base::test::ScopedTaskEnvironment scoped_task_environment_;
diff --git a/ui/events/gesture_detection/gesture_configuration_aura.cc b/ui/events/gesture_detection/gesture_configuration_aura.cc
index d5aa7248..24717a4 100644
--- a/ui/events/gesture_detection/gesture_configuration_aura.cc
+++ b/ui/events/gesture_detection/gesture_configuration_aura.cc
@@ -12,6 +12,12 @@
 namespace ui {
 namespace {
 
+#if defined(OS_CHROMEOS)
+constexpr bool kDoubleTapAuraSupport = true;
+#else
+constexpr bool kDoubleTapAuraSupport = false;
+#endif  // defined(OS_CHROMEOS)
+
 class GestureConfigurationAura : public GestureConfiguration {
  public:
   ~GestureConfigurationAura() override {
@@ -23,7 +29,7 @@
 
  private:
   GestureConfigurationAura() : GestureConfiguration() {
-    set_double_tap_enabled(false);
+    set_double_tap_enabled(kDoubleTapAuraSupport);
     set_double_tap_timeout_in_ms(semi_long_press_time_in_ms());
     set_gesture_begin_end_types_enabled(true);
     set_min_gesture_bounds_length(default_radius());
diff --git a/ui/events/gesture_detection/gesture_detector.cc b/ui/events/gesture_detection/gesture_detector.cc
index baa63d3..b9a807c 100644
--- a/ui/events/gesture_detection/gesture_detector.cc
+++ b/ui/events/gesture_detection/gesture_detector.cc
@@ -145,7 +145,8 @@
 
 GestureDetector::~GestureDetector() {}
 
-bool GestureDetector::OnTouchEvent(const MotionEvent& ev) {
+bool GestureDetector::OnTouchEvent(const MotionEvent& ev,
+                                   bool should_process_double_tap) {
   const MotionEvent::Action action = ev.GetAction();
 
   velocity_tracker_.AddMovement(ev);
@@ -249,8 +250,9 @@
     case MotionEvent::Action::DOWN: {
       bool is_repeated_tap =
           current_down_event_ && previous_up_event_ &&
-          IsRepeatedTap(*current_down_event_, *previous_up_event_, ev);
-      if (double_tap_listener_) {
+          IsRepeatedTap(*current_down_event_, *previous_up_event_, ev,
+                        should_process_double_tap);
+      if (double_tap_listener_ && should_process_double_tap) {
         is_down_candidate_for_repeated_single_tap_ = false;
         bool had_tap_message = timeout_handler_->HasTimeout(TAP);
         if (had_tap_message)
@@ -345,7 +347,7 @@
     case MotionEvent::Action::UP:
       still_down_ = false;
       {
-        if (is_double_tapping_) {
+        if (is_double_tapping_ && should_process_double_tap) {
           // Finally, give the up event of the double-tap.
           DCHECK(double_tap_listener_);
           handled |= double_tap_listener_->OnDoubleTapEvent(ev);
@@ -360,7 +362,8 @@
           }
           handled = listener_->OnSingleTapUp(
               ev, 1 + current_single_tap_repeat_count_);
-          if (defer_confirm_single_tap_ && double_tap_listener_ != NULL) {
+          if (defer_confirm_single_tap_ && should_process_double_tap &&
+              double_tap_listener_ != NULL) {
             double_tap_listener_->OnSingleTapConfirmed(ev);
           }
         } else if (!all_pointers_within_slop_regions_) {
@@ -495,7 +498,8 @@
 
 bool GestureDetector::IsRepeatedTap(const MotionEvent& first_down,
                                     const MotionEvent& first_up,
-                                    const MotionEvent& second_down) const {
+                                    const MotionEvent& second_down,
+                                    bool should_process_double_tap) const {
   if (!always_in_bigger_tap_region_)
     return false;
 
@@ -507,8 +511,10 @@
   // Only use the min time when in double-tap detection mode. For repeated
   // single taps the risk of accidental repeat detection (e.g., from fingernail
   // interference) is minimal.
-  if (double_tap_listener_ && delta_time < double_tap_min_time_)
+  if (should_process_double_tap && double_tap_listener_ &&
+      delta_time < double_tap_min_time_) {
     return false;
+  }
 
   const float delta_x = first_down.GetX() - second_down.GetX();
   const float delta_y = first_down.GetY() - second_down.GetY();
diff --git a/ui/events/gesture_detection/gesture_detector.h b/ui/events/gesture_detection/gesture_detector.h
index 3993ead..761bc5a 100644
--- a/ui/events/gesture_detection/gesture_detector.h
+++ b/ui/events/gesture_detection/gesture_detector.h
@@ -85,7 +85,7 @@
                   DoubleTapListener* optional_double_tap_listener);
   ~GestureDetector();
 
-  bool OnTouchEvent(const MotionEvent& ev);
+  bool OnTouchEvent(const MotionEvent& ev, bool should_process_double_tap);
 
   // Setting a valid |double_tap_listener| will enable double-tap detection,
   // wherein calls to |OnSimpleTapConfirmed| are delayed by the tap timeout.
@@ -116,7 +116,8 @@
   void CancelTaps();
   bool IsRepeatedTap(const MotionEvent& first_down,
                      const MotionEvent& first_up,
-                     const MotionEvent& second_down) const;
+                     const MotionEvent& second_down,
+                     bool should_process_double_tap) const;
   bool HandleSwipeIfNeeded(const MotionEvent& up, float vx, float vy);
   bool IsWithinTouchSlop(const MotionEvent& ev);
 
diff --git a/ui/events/gesture_detection/gesture_provider.cc b/ui/events/gesture_detection/gesture_provider.cc
index d05af66..6af37b3 100644
--- a/ui/events/gesture_detection/gesture_provider.cc
+++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -76,6 +76,12 @@
 
 }  // namespace
 
+// GestureProviderClient:
+
+bool GestureProviderClient::RequiresDoubleTapGestureEvents() const {
+  return false;
+}
+
 // GestureProvider:::Config
 
 GestureProvider::Config::Config()
@@ -129,7 +135,8 @@
       tap_down_point_ = gfx::PointF(event.GetX(), event.GetY());
       max_diameter_before_show_press_ = event.GetTouchMajor();
     }
-    gesture_detector_.OnTouchEvent(event);
+    gesture_detector_.OnTouchEvent(event,
+                                   client_->RequiresDoubleTapGestureEvents());
     scale_gesture_detector_.OnTouchEvent(event);
 
     if (action == MotionEvent::Action::UP ||
@@ -669,7 +676,8 @@
   }
 
   bool IsDoubleTapEnabled() const {
-    return gesture_detector_.has_doubletap_listener();
+    return gesture_detector_.has_doubletap_listener() &&
+           client_->RequiresDoubleTapGestureEvents();
   }
 
   void SetIgnoreSingleTap(bool value) { ignore_single_tap_ = value; }
diff --git a/ui/events/gesture_detection/gesture_provider.h b/ui/events/gesture_detection/gesture_provider.h
index 5c3bbc3..f4c7bcc 100644
--- a/ui/events/gesture_detection/gesture_provider.h
+++ b/ui/events/gesture_detection/gesture_provider.h
@@ -21,6 +21,13 @@
  public:
   virtual ~GestureProviderClient() {}
   virtual void OnGestureEvent(const GestureEventData& gesture) = 0;
+
+  // Supporting double tap events requires adding some extra delay before
+  // sending single-tap events in order to determine whether its a potential
+  // double tap or not. This delay may be undesirable in many UI components and
+  // should be avoided if not needed.
+  // Returns true if the client wants to receive double tap gesture events.
+  virtual bool RequiresDoubleTapGestureEvents() const;
 };
 
 // Given a stream of |MotionEvent|'s, provides gesture detection and gesture
diff --git a/ui/events/gesture_detection/gesture_provider_unittest.cc b/ui/events/gesture_detection/gesture_provider_unittest.cc
index 646ad4eb..dfce867 100644
--- a/ui/events/gesture_detection/gesture_provider_unittest.cc
+++ b/ui/events/gesture_detection/gesture_provider_unittest.cc
@@ -148,6 +148,10 @@
     gestures_.push_back(gesture);
   }
 
+  bool RequiresDoubleTapGestureEvents() const override {
+    return should_process_double_tap_events_;
+  }
+
   void SetUpWithConfig(const GestureProvider::Config& config) {
     gesture_provider_.reset(new GestureProvider(config, this));
     gesture_provider_->SetMultiTouchZoomSupportEnabled(false);
@@ -434,6 +438,7 @@
   std::unique_ptr<GestureProvider> gesture_provider_;
   std::unique_ptr<GestureEventData> active_scroll_begin_event_;
   base::test::ScopedTaskEnvironment scoped_task_environment_;
+  bool should_process_double_tap_events_ = true;
 };
 
 // Verify that a DOWN followed shortly by an UP will trigger a single tap.
@@ -1442,6 +1447,60 @@
   EXPECT_EQ(ET_GESTURE_DOUBLE_TAP, GetMostRecentGestureEventType());
 }
 
+TEST_F(GestureProviderTest, NoDoubleTapWhenConsumerDoesntWantIt) {
+  // Double tap gestures are supported by the platform but the current consumer
+  // doesn't want it.
+  should_process_double_tap_events_ = false;
+  gesture_provider_->SetDoubleTapSupportForPlatformEnabled(true);
+
+  base::TimeTicks event_time = base::TimeTicks::Now();
+  MockMotionEvent event = ObtainMotionEvent(
+      event_time, MotionEvent::Action::DOWN, kFakeCoordX, kFakeCoordY);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP_DOWN, GetMostRecentGestureEventType());
+
+  event = ObtainMotionEvent(event_time + kOneMicrosecond,
+                            MotionEvent::Action::UP, kFakeCoordX, kFakeCoordY);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP, GetMostRecentGestureEventType());
+
+  event_time += GetValidDoubleTapDelay();
+  event = ObtainMotionEvent(event_time, MotionEvent::Action::DOWN, kFakeCoordX,
+                            kFakeCoordY);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP_DOWN, GetMostRecentGestureEventType());
+
+  event = ObtainMotionEvent(event_time + kOneMicrosecond,
+                            MotionEvent::Action::UP, kFakeCoordX, kFakeCoordY);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP, GetMostRecentGestureEventType());
+
+  // The consumer now wants to receive double taps.
+  should_process_double_tap_events_ = true;
+
+  event_time = base::TimeTicks::Now();
+  event = ObtainMotionEvent(event_time, MotionEvent::Action::DOWN, kFakeCoordX,
+                            kFakeCoordY);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP_DOWN, GetMostRecentGestureEventType());
+
+  event = ObtainMotionEvent(event_time + kOneMicrosecond,
+                            MotionEvent::Action::UP, kFakeCoordX, kFakeCoordY);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP_UNCONFIRMED, GetMostRecentGestureEventType());
+
+  event_time += GetValidDoubleTapDelay();
+  event = ObtainMotionEvent(event_time, MotionEvent::Action::DOWN, kFakeCoordX,
+                            kFakeCoordY);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_TAP_DOWN, GetMostRecentGestureEventType());
+
+  event = ObtainMotionEvent(event_time + kOneMicrosecond,
+                            MotionEvent::Action::UP, kFakeCoordX, kFakeCoordY);
+  EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
+  EXPECT_EQ(ET_GESTURE_DOUBLE_TAP, GetMostRecentGestureEventType());
+}
+
 TEST_F(GestureProviderTest, NoDelayedTapWhenDoubleTapSupportToggled) {
   gesture_provider_->SetDoubleTapSupportForPlatformEnabled(true);
 
diff --git a/ui/events/gestures/gesture_provider_aura.cc b/ui/events/gestures/gesture_provider_aura.cc
index 260ada94..fd0912c 100644
--- a/ui/events/gestures/gesture_provider_aura.cc
+++ b/ui/events/gestures/gesture_provider_aura.cc
@@ -16,6 +16,16 @@
 
 namespace ui {
 
+namespace {
+
+#if defined(OS_CHROMEOS)
+constexpr bool kDoubleTapPlatformSupport = true;
+#else
+constexpr bool kDoubleTapPlatformSupport = false;
+#endif  // defined(OS_CHROMEOS)
+
+}  // namespace
+
 GestureProviderAura::GestureProviderAura(GestureConsumer* consumer,
                                          GestureProviderAuraClient* client)
     : client_(client),
@@ -24,7 +34,8 @@
           this),
       handling_event_(false),
       gesture_consumer_(consumer) {
-  filtered_gesture_provider_.SetDoubleTapSupportForPlatformEnabled(false);
+  filtered_gesture_provider_.SetDoubleTapSupportForPlatformEnabled(
+      kDoubleTapPlatformSupport);
 }
 
 GestureProviderAura::~GestureProviderAura() {}
@@ -68,6 +79,10 @@
   }
 }
 
+bool GestureProviderAura::RequiresDoubleTapGestureEvents() const {
+  return gesture_consumer_->RequiresDoubleTapGestureEvents();
+}
+
 std::vector<std::unique_ptr<GestureEvent>>
 GestureProviderAura::GetAndResetPendingGestures() {
   std::vector<std::unique_ptr<GestureEvent>> result;
diff --git a/ui/events/gestures/gesture_provider_aura.h b/ui/events/gestures/gesture_provider_aura.h
index fc7bdab..987fbbe2 100644
--- a/ui/events/gestures/gesture_provider_aura.h
+++ b/ui/events/gestures/gesture_provider_aura.h
@@ -51,6 +51,7 @@
 
   // GestureProviderClient implementation
   void OnGestureEvent(const GestureEventData& gesture) override;
+  bool RequiresDoubleTapGestureEvents() const override;
 
  private:
   GestureProviderAuraClient* client_;
diff --git a/ui/events/gestures/gesture_types.cc b/ui/events/gestures/gesture_types.cc
new file mode 100644
index 0000000..809ba6f
--- /dev/null
+++ b/ui/events/gestures/gesture_types.cc
@@ -0,0 +1,13 @@
+// Copyright 2018 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/events/gestures/gesture_types.h"
+
+namespace ui {
+
+bool GestureConsumer::RequiresDoubleTapGestureEvents() const {
+  return false;
+}
+
+}  // namespace ui
diff --git a/ui/events/gestures/gesture_types.h b/ui/events/gestures/gesture_types.h
index 986cc93..3d63c57 100644
--- a/ui/events/gestures/gesture_types.h
+++ b/ui/events/gestures/gesture_types.h
@@ -17,6 +17,14 @@
 class EVENTS_EXPORT GestureConsumer {
  public:
   virtual ~GestureConsumer() {}
+
+  // Supporting double tap events requires adding some extra delay before
+  // sending single-tap events in order to determine whether its a potential
+  // double tap or not. This delay may be undesirable in many UI components and
+  // should be avoided if not needed.
+  // Returns true if the consumer wants to receive double tap gesture events.
+  // Defaults to false.
+  virtual bool RequiresDoubleTapGestureEvents() const;
 };
 
 // GestureEventHelper creates implementation-specific gesture events and
diff --git a/ui/file_manager/file_manager/common/js/util.js b/ui/file_manager/file_manager/common/js/util.js
index c499d3a..2f74b1c5 100644
--- a/ui/file_manager/file_manager/common/js/util.js
+++ b/ui/file_manager/file_manager/common/js/util.js
@@ -1350,6 +1350,21 @@
 };
 
 /**
+ * Returns if the new-style navigation should be used.
+ * @return {!Promise<boolean>} Resolves with true if flag
+ * "new-files-app-navigation" is enabled.
+ */
+util.isNewNavigationEnabled = function() {
+  return new Promise(resolve => {
+    chrome.commandLinePrivate.hasSwitch(
+        'new-files-app-navigation', isEnabled => {
+          resolve(isEnabled);
+        });
+  });
+};
+
+
+/**
  * Retrieves all entries inside the given |rootEntry|.
  * @param {!DirectoryEntry} rootEntry
  * @param {function(!Array<!Entry>)} entriesCallback Called when some chunk of
diff --git a/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js b/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
index 9031aec1a..87e8364b 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/directory_tree.js
@@ -811,9 +811,10 @@
 
 /**
  * Checks whether the Team Drives grand root should be shown.
- * @param {function(boolean)} callback to receive the result. The paramter is
- *     true if the Files app. should show the Team Drives grand root and its
- *     subtree.
+ * We show the Team Drives grand root if the user has at least one Team Drive.
+ *
+ * @param {function(boolean)} callback Called with True if the grand root and
+ *     its subtree should be shown, false if not.
  * @private
  */
 DriveVolumeItem.prototype.shouldShowTeamDrives_ = function(callback) {
@@ -821,8 +822,12 @@
   if (!teamDriveEntry) {
     callback(false);
   } else {
+    // Don't show the Team Drives root unless the user has at least one team
+    // drive, since we don't currently support any functionality with just the
+    // grand root (e.g. you can't create a new team drive from the root yet).
     var reader = teamDriveEntry.createReader();
     reader.readEntries(function(results) {
+      metrics.recordSmallCount('TeamDrivesCount', results.length);
       callback(results.length > 0);
     });
   }
diff --git a/ui/file_manager/file_manager/foreground/js/ui/directory_tree_unittest.js b/ui/file_manager/file_manager/foreground/js/ui/directory_tree_unittest.js
index d034533d..93adc1b 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/directory_tree_unittest.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/directory_tree_unittest.js
@@ -4,6 +4,7 @@
 
 var chrome;
 var mockCommandLinePrivate;
+var metrics;
 
 /**
  * Set string data.
@@ -30,6 +31,8 @@
   };
   mockCommandLinePrivate = new MockCommandLinePrivate();
 
+  metrics = {recordSmallCount: function() {}};
+
   window.webkitResolveLocalFileSystemURLEntries = {};
   window.webkitResolveLocalFileSystemURL = function(url, callback) {
     callback(webkitResolveLocalFileSystemURLEntries[url]);
diff --git a/ui/keyboard/keyboard_controller.cc b/ui/keyboard/keyboard_controller.cc
index a3a0d17..bec1950 100644
--- a/ui/keyboard/keyboard_controller.cc
+++ b/ui/keyboard/keyboard_controller.cc
@@ -310,11 +310,10 @@
 
 void KeyboardController::MoveKeyboard(const gfx::Rect& new_bounds) {
   DCHECK(keyboard_visible());
-  SetContainerBounds(new_bounds, false);
+  SetContainerBounds(new_bounds);
 }
 
-void KeyboardController::SetContainerBounds(const gfx::Rect& new_bounds,
-                                            const bool contents_loaded) {
+void KeyboardController::SetContainerBounds(const gfx::Rect& new_bounds) {
   ui::LayerAnimator* animator = container_->layer()->GetAnimator();
   // Stops previous animation if a window resize is requested during animation.
   if (animator->is_animating())
@@ -322,32 +321,31 @@
 
   container_->SetBounds(new_bounds);
 
-  if (contents_loaded) {
-    const bool should_show = show_on_content_update_;
-    if (state_ == KeyboardControllerState::LOADING_EXTENSION)
-      ChangeState(KeyboardControllerState::HIDDEN);
-    if (should_show) {
-      // The window height is set to 0 initially or before switch to an IME in a
-      // different extension. Virtual keyboard window may wait for this bounds
-      // change to correctly animate in.
-      if (keyboard_locked()) {
-        // Do not move the keyboard to another display after switch to an IME in
-        // a different extension.
-        ShowKeyboardInDisplay(
-            display_util_.GetNearestDisplayToWindow(GetContainerWindow()));
-      } else {
-        ShowKeyboard(false /* lock */);
-      }
-      return;
-    }
-  }
-
   // We need to send out this notification only if keyboard is visible since
   // the contents window is resized even if keyboard is hidden.
   if (keyboard_visible())
     NotifyContentsBoundsChanging(new_bounds);
 }
 
+void KeyboardController::NotifyContentsLoaded() {
+  const bool should_show = show_on_content_update_;
+  if (state_ == KeyboardControllerState::LOADING_EXTENSION)
+    ChangeState(KeyboardControllerState::HIDDEN);
+  if (should_show) {
+    // The window height is set to 0 initially or before switch to an IME in a
+    // different extension. Virtual keyboard window may wait for this bounds
+    // change to correctly animate in.
+    if (keyboard_locked()) {
+      // Do not move the keyboard to another display after switch to an IME in
+      // a different extension.
+      ShowKeyboardInDisplay(
+          display_util_.GetNearestDisplayToWindow(GetContainerWindow()));
+    } else {
+      ShowKeyboard(false /* lock */);
+    }
+  }
+}
+
 void KeyboardController::AddObserver(KeyboardControllerObserver* observer) {
   observer_list_.AddObserver(observer);
 }
@@ -444,8 +442,7 @@
       // |PopulateKeyboardContent| before showing animation, so we can set the
       // passed bounds directly.
       if (queued_container_type_->target_bounds())
-        SetContainerBounds(queued_container_type_->target_bounds().value(),
-                           false /* contents_loaded */);
+        SetContainerBounds(queued_container_type_->target_bounds().value());
       ShowKeyboard(false /* lock */);
     }
 
@@ -852,7 +849,7 @@
     // the passed callback now.
     SetContainerBehaviorInternal(type);
     if (target_bounds)
-      SetContainerBounds(target_bounds.value(), false /* contents_loaded */);
+      SetContainerBounds(target_bounds.value());
     DCHECK_EQ(GetActiveContainerType(), type);
     std::move(callback).Run(true /* change_successful */);
   }
diff --git a/ui/keyboard/keyboard_controller.h b/ui/keyboard/keyboard_controller.h
index b683debc..2096906 100644
--- a/ui/keyboard/keyboard_controller.h
+++ b/ui/keyboard/keyboard_controller.h
@@ -200,6 +200,10 @@
   void MoveToDisplayWithTransition(display::Display display,
                                    gfx::Rect new_bounds_in_local);
 
+  // Called by KeyboardUI when the keyboard contents have loaded. Shows
+  // the keyboard if show_on_content_update_ is true.
+  void NotifyContentsLoaded();
+
   // InputMethodKeyboardController overrides.
   bool DisplayVirtualKeyboard() override;
   void DismissVirtualKeyboard() override;
@@ -238,11 +242,8 @@
   void OnTextInputStateChanged(const ui::TextInputClient* client) override;
   void OnShowImeIfNeeded() override;
 
-  // Sets the bounds of the container window. Shows the keyboard if contents
-  // is first loaded and show_on_content_update_ is true. Called by
-  // KeyboardLayoutManager.
-  void SetContainerBounds(const gfx::Rect& new_bounds,
-                          const bool contents_loaded);
+  // Sets the bounds of the container window.
+  void SetContainerBounds(const gfx::Rect& new_bounds);
 
   // Show virtual keyboard immediately with animation.
   void ShowKeyboardInternal(const display::Display& display);
diff --git a/ui/keyboard/keyboard_controller_unittest.cc b/ui/keyboard/keyboard_controller_unittest.cc
index eb0f520fd..89d74f106 100644
--- a/ui/keyboard/keyboard_controller_unittest.cc
+++ b/ui/keyboard/keyboard_controller_unittest.cc
@@ -302,6 +302,8 @@
         controller_.ui()->GetContentsWindow()->SetBounds(
             KeyboardBoundsFromRootBounds(root_window()->bounds(),
                                          kDefaultVirtualKeyboardHeight));
+        // Simulate the keyboard contents finish loading
+        controller_.NotifyContentsLoaded();
       }
     }
   }
diff --git a/ui/keyboard/keyboard_layout_manager.cc b/ui/keyboard/keyboard_layout_manager.cc
index 237291fb..35f54a0 100644
--- a/ui/keyboard/keyboard_layout_manager.cc
+++ b/ui/keyboard/keyboard_layout_manager.cc
@@ -65,10 +65,8 @@
     return;
 
   SetChildBoundsDirect(contents_window_, gfx::Rect(new_bounds.size()));
-  const bool contents_loaded =
-      old_bounds.height() == 0 && new_bounds.height() > 0;
 
-  controller_->SetContainerBounds(new_bounds, contents_loaded);
+  controller_->SetContainerBounds(new_bounds);
 }
 
 }  // namespace keyboard
diff --git a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html
index 56fccde..eee1f57 100644
--- a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html
+++ b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.html
@@ -24,11 +24,11 @@
         flex: 1;
       }
     </style>
-    <div id="outer" on-tap="toggleExpand_">
-      <div id="label" on-tap="toggleExpand_"><slot></slot></div>
+    <div id="outer">
+      <div id="label"><slot></slot></div>
       <paper-icon-button-light class$="[[iconName_(expanded)]]">
-        <button toggles active="{{expanded}}" disabled="[[disabled]]"
-            aria-label$="[[alt]]" aria-pressed$="[[getAriaPressed_(expanded)]]"
+        <button disabled="[[disabled]]" aria-label$="[[alt]]"
+            aria-pressed$="[[getAriaPressed_(expanded)]]"
             tabindex$="[[tabIndex]]">
         </button>
       </paper-icon-button-light>
diff --git a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.js b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.js
index 65a019c..423e73d 100644
--- a/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.js
+++ b/ui/webui/resources/cr_elements/cr_expand_button/cr_expand_button.js
@@ -29,11 +29,62 @@
       type: Number,
       value: 0,
     },
+
+  },
+
+  listeners: {
+    'blur': 'onBlur_',
+    'click': 'toggleExpand_',
+    'focus': 'onFocus_',
+    'keypress': 'onKeyPress_',
+    'pointerdown': 'onPointerDown_',
+  },
+
+  /**
+   * Used to differentiate pointer and keyboard click events.
+   * @private {boolean}
+   */
+  fromPointer_: false,
+
+  /**
+   * @param {boolean} expanded
+   * @private
+   */
+  getAriaPressed_: function(expanded) {
+    return expanded ? 'true' : 'false';
+  },
+
+
+  /**
+   * @param {boolean} expanded
+   * @private
+   */
+  iconName_: function(expanded) {
+    return expanded ? 'icon-expand-less' : 'icon-expand-more';
   },
 
   /** @private */
-  iconName_: function(expanded) {
-    return expanded ? 'icon-expand-less' : 'icon-expand-more';
+  onBlur_: function() {
+    this.updateRippleHoldDown_(false);
+  },
+
+  /** @private */
+  onFocus_: function() {
+    this.updateRippleHoldDown_(true);
+  },
+
+  /**
+   * @param {!Event} event
+   * @private
+   */
+  onKeyPress_: function(event) {
+    if (event.key == ' ' || event.key == 'Enter')
+      this.updateRippleHoldDown_(true);
+  },
+
+  /** @private */
+  onPointerDown_: function() {
+    this.fromPointer_ = true;
   },
 
   /**
@@ -41,12 +92,25 @@
    * @private
    */
   toggleExpand_: function(event) {
-    this.expanded = !this.expanded;
+    // Prevent |click| event from bubbling. It can cause parents of this
+    // elements to erroneously re-toggle this control.
     event.stopPropagation();
+    event.preventDefault();
+
+    this.expanded = !this.expanded;
+
+    // If this event originated from a pointer, then |ripple.holdDown| should
+    // preemptively be set to false to allow ripple to animate.
+    if (this.fromPointer_)
+      this.updateRippleHoldDown_(false);
+    this.fromPointer_ = false;
   },
 
-  /** @private */
-  getAriaPressed_: function(expanded) {
-    return expanded ? 'true' : 'false';
+  /**
+   * @param {boolean} holdDown
+   * @private
+   */
+  updateRippleHoldDown_: function(holdDown) {
+    this.$$('paper-ripple').holdDown = holdDown;
   },
 });